Commit Graph

20 Commits

Author SHA1 Message Date
Alya Abbott b8dd409d71 help: Update exports documentation.
Document in-app exports with user consent.
2024-10-15 10:15:34 -07:00
Prakhar Pratyush 764083d31b settings: Add 'allow_private_data_export' user setting.
This commit adds a user-setting to allow users to decide
whether to let administrators export their private data.

Fixes part of #31201.
2024-09-16 15:48:40 -07:00
Karl Stolley 2e6a34042f settings: Remove unnecesary inline-block div.
This also removes the need for any min-width declarations on the
labels, which will behave as block elements and take up the
containing block's available width.
2024-08-30 14:06:27 -07:00
Sahil Batra 8fd5c02916 settings: Show correct section when increasing screen width.
Currently if the settings overlay is opened on narrow screen,
where only left side panels are shown, and then the screen
width is increased, the right side shows "Profile" and
"Account and privacy" sections of personal settings together
everytime.

This fixes it to show the last opened section or the first
section or the section used in url.
2024-08-02 21:45:08 -07:00
Shubham Padia 6c152b3adc account_settings: Make change password similar to other setting buttons.
Fixes #30691.
We've removed the pencil icon and renamed the button to `Change your
password`. We've also removed the `.small` and `.btn-link` classes.
We also changed the `Password` label to use the `.settings-field-label`
class, same as the other labels for settings.
2024-07-11 09:49:27 -07:00
Shubham Padia 73e9d9da64 account_settings: Make change email similar to other settings buttons.
We removed the pencil icon, `.btn-link` and `.small` classes.
We also changed the `Email` label to use the `.settings-field-label`
class, same as the other labels for settings.
2024-07-11 09:49:27 -07:00
Shubham Padia 08ee4be121 account_settings: Remove unused id and classes for password field.
`.change_password_button` and `#pw_change_link` were unused.
I've not checked for any other unused classes in this page, only
the password field. This was noticed when trying to make a layout
change for the password field and the change was moved to a preparatory
commit for the same.
2024-07-11 09:49:27 -07:00
Sahil Batra 62d2b93079 settings: Remove dropdown-title class.
We now use "settings-field-label" and "modal-field-label"
class on label elements in settings and modals respectively
to add the bottom margin which was previously done by
"dropdown-title" class as it is better to have more
generic names to use on label for all type of inputs.
2024-05-03 09:51:36 -07:00
David Rosa 9a6ccba733 account-settings: Rename "API key" button.
Renames button to "Manage your API key", and updates docs
accordingly.

Fixes part of #28881.
2024-02-23 09:43:57 -08:00
Anders Kaseorg b9e62c7af8 page_params: Split out state data for realm.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a second step, split
out the subset of fields that pertain to the entire realm.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg e96ede0ef6 page_params: Split out state data for current user.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a first step, split
out the subset of fields that pertain to the current user.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Sahil Batra 6781d06988 settings: Remove extraneous divider in account settings. 2024-01-25 14:28:48 -08:00
Prakhar Pratyush 43789cac58 stream_typing_indicator: Remove the dev environment guard in settings.
This commit removes the 'page_params.development_environment' guard
for the setting 'send_stream_typing_notifications' and makes it
available outside the development environment.
2023-10-11 10:16:24 -07:00
palashb01 2ca1c0c63e settings: Decrease the gap between the account heading and banner.
This commit fixes the alignment of account-alert-notification-banner
by using a new classname 'account-alert-notification' for this specific
banner, removed the default margin-top and margin-left from this banner
which is set to all other banners, and Aligned the banner with
vertical-align property set to middle.

To left-align this specific banner when the email is long enough
to wrap to the next line removed the margin-left and used a new
classname 'account-settings-heading' for the accounts heading,
and gave a margin-right of 10px to ensure that the notice banner and
the heading have enough space between them, when the email is short.

If the email is long enough to wrap to multiple lines, then the gap
between the email input field and the banner is too low. To adjust
this, set the margin-bottom to 10px.
2023-10-01 17:54:22 -07:00
Lauryn Menard 91b40a45fe demo-orgs: Add email and password process for demo organization owners.
Creates process for demo organization owners to add an email address
and password to their account.

Uses the same flow as changing an email (via user settings) at the
beginning, but then sends a different email template to the user
for the email confirmation process.

We also encourage users to set their full name field in the modal for
adding an email in a demo organization. We disable the submit button
on the form if either input is empty, email or full name.

When the user clicks the 'confirm and set password' button in the
email sent to confirm the email address sent via the form, their
email is updated via confirm_email_change, but the user is redirected
to the reset password page for their account (instead of the page for
confirming an email change has happened).

Once the user successfully sets a password, then they will be
prompted to log in with their newly configured email and password.
2023-08-31 15:02:16 -07:00
Lauryn Menard 19b8217e49 demo-orgs: Disable changing user's email visibility until email set.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Disables the dropdown for changing the user's email address visibility
in the account & security tab of the personal settings overlay until
the user configures an email address.
2023-08-31 15:02:16 -07:00
Lauryn Menard 665deac7c0 demo-orgs: Disable show/change API key if email not configured.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Disables the show/change API key button in the account & security
tab of the personal settings overlay if the user's email address
is not configured. A tooltip is shown when hovering over the disabled
button explaining why the feature is disabled.
2023-08-31 15:02:16 -07:00
Lauryn Menard 6a36340ac7 demo-orgs: Hide change password field if email not configured.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Updates showing the password change field in the account & privacy
tab of the personal settings overlay to check if the user's email
being configured (to cover the demo organization case) and if the
organization has enabled password authorization.
2023-08-31 15:02:16 -07:00
Palash Baderia d8adc6de1c personal_settings: Add deactivate organization button for organization.
Added a 'Deactivate Organization' button inside the
'Personal Settings > Account & Privacy'. This button only appears
when the organization owner is the only user present. To verify this,
I used the 'get_active_human_count' function from the 'people.js'.

To remove duplication, a function has been created inside settings_org
file to handle the click event for the two buttons present inside
personal_settings and organization_settings that perform the same
action of deactivating organization. The click handler is defined in
the click_handlers.js file, which calls the dialog for deactivating
the organization. Previously, the error used to appear at the top of
the organization_settings, but now it appears inside the dialog box
itself.

To remove the duplication of two buttons having the same IDs,changed
the Id `deactivate_realm_button` to a className.

Fixes: #24105
2023-02-23 18:17:28 -08:00
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00