Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
personal-settings: Redesign buttons in personal settings.
Maneesh Shuklaa062d25aeaa0
diff --git a/help/manage-your-uploaded-files.md b/help/manage-your-uploaded-files.mdindex ea5b45c2720..3e03baf94b9 100644--- a/help/manage-your-uploaded-files.md+++ b/help/manage-your-uploaded-files.md@@ -41,8 +41,8 @@ You can sort your uploaded files by name, upload date, message ID, and size.{settings_tab|uploaded-files}-1. In the **Actions** column, click the **download file**- (<i class="fa fa-download"></i>) icon for the file you want to download.+1. In the **Actions** column, click the **download**+ (<i class="zulip-icon zulip-icon-download"></i>) icon for the file you want to download.{end_tabs}@@ -52,8 +52,8 @@ You can sort your uploaded files by name, upload date, message ID, and size.{settings_tab|uploaded-files}-1. In the **Actions** column, click the **delete file**- (<i class="fa fa-trash-o"></i>) icon for the file you want to remove.+1. In the **Actions** column, click the **delete**+ (<i class="zulip-icon zulip-icon-trash"></i>) icon for the file you want to remove.1. Approve by clicking **Delete**. If you delete a file, your message will stillcontain a file link, but the link will no longer work.diff --git a/web/e2e-tests/settings.test.ts b/web/e2e-tests/settings.test.tsindex 3ad3fe9d49a..1c33e402e1f 100644--- a/web/e2e-tests/settings.test.ts+++ b/web/e2e-tests/settings.test.ts@@ -329,7 +329,7 @@ async function test_duplicate_alert_words_cannot_be_added(}async function delete_alert_word(page: Page, word: string): Promise<void> {- const delete_button_selector = `.remove-alert-word[data-word="${CSS.escape(word)}"]`;+ const delete_button_selector = `tr[data-word="${CSS.escape(word)}"] .remove-alert-word`;await page.click(delete_button_selector);await page.waitForSelector(delete_button_selector, {hidden: true});}diff --git a/web/shared/icons/download.svg b/web/shared/icons/download.svgnew file mode 100644index 00000000000..a2bda5764f1--- /dev/null+++ b/web/shared/icons/download.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">+ <path fill="#000" d="M8 1.335c.367 0 .665.298.665.665v6.395l2.198-2.199a.665.665 0 0 1 .94.94L8.47 10.47c-.26.26-.68.26-.94 0L4.196 7.137a.665.665 0 1 1 .94-.94l2.199 2.198V2c0-.367.298-.665.665-.665Zm-6 8c.367 0 .665.298.665.665v2.667a.668.668 0 0 0 .668.668h9.334a.668.668 0 0 0 .668-.668V10a.665.665 0 1 1 1.33 0v2.667a1.998 1.998 0 0 1-1.998 1.998H3.333a1.998 1.998 0 0 1-1.998-1.998V10c0-.367.298-.665.665-.665Z"/>+</svg>diff --git a/web/src/attachments_ui.ts b/web/src/attachments_ui.tsindex ead9c1e445e..b26383bd96b 100644--- a/web/src/attachments_ui.ts+++ b/web/src/attachments_ui.ts@@ -196,6 +196,10 @@ export function set_up_attachments(): void {text: $t({defaultMessage: "Loading…"}),});+ $("#uploaded_files_table").on("click", ".download-attachment", function () {+ $(this).siblings(".hidden-attachment-download")[0]?.click();+ });+$("#uploaded_files_table").on("click", ".remove-attachment", (e) => {const file_name = $(e.target).closest(".uploaded_file_row").attr("data-attachment-name");delete_attachments(diff --git a/web/styles/settings.css b/web/styles/settings.cssindex 9c22f0eff59..8893cdba0bd 100644--- a/web/styles/settings.css+++ b/web/styles/settings.css@@ -555,21 +555,6 @@ input[type="checkbox"] {.edit-attachment-buttons {display: inline-block;vertical-align: middle;- height: 32px;-}--.edit-attachment-buttons .remove-attachment {- margin-left: 5px;-}--.edit-attachment-buttons .download-attachment {- display: block;- padding: 6px 9px;- text-decoration: none;-- &:hover {- color: hsl(156deg 41% 40%);- }}.remove-alert-word {diff --git a/web/templates/muted_user_ui_row.hbs b/web/templates/muted_user_ui_row.hbsindex 7a590b86194..a6115c89448 100644--- a/web/templates/muted_user_ui_row.hbs+++ b/web/templates/muted_user_ui_row.hbs@@ -4,7 +4,12 @@<td>{{date_muted_str}}</td><td class="actions">{{#if can_unmute}}- <span><a class="settings-unmute-user">{{t "Unmute" }}</a></span>+ {{> ./components/action_button+ label=(t "Unmute")+ attention="quiet"+ intent="danger"+ custom_classes="settings-unmute-user"+ }}{{/if}}</td></tr>diff --git a/web/templates/settings/alert_word_settings_item.hbs b/web/templates/settings/alert_word_settings_item.hbsindex 60f2ce7c76a..e1b41f8606a 100644--- a/web/templates/settings/alert_word_settings_item.hbs+++ b/web/templates/settings/alert_word_settings_item.hbs@@ -7,9 +7,12 @@</div></td><td>- <button type="submit" class="button rounded small delete button-danger remove-alert-word tippy-zulip-delayed-tooltip" data-tippy-content="{{t 'Delete' }}" data-word="{{word}}">- <i class="fa fa-trash-o" aria-hidden="true"></i>- </button>+ {{> ../components/icon_button+ icon="trash"+ intent="danger"+ custom_classes="delete remove-alert-word tippy-zulip-delayed-tooltip"+ data-tippy-content=(t "Delete")+ }}</td></tr>{{/with}}diff --git a/web/templates/settings/uploaded_files_list.hbs b/web/templates/settings/uploaded_files_list.hbsindex 8a136812b09..e5f4fae3200 100644--- a/web/templates/settings/uploaded_files_list.hbs+++ b/web/templates/settings/uploaded_files_list.hbs@@ -20,16 +20,21 @@<td class="upload-size" >{{ size_str }}</td><td class="actions"><span class="edit-attachment-buttons">- <a type="submit" href="/user_uploads/{{path_id}}" class="button rounded small sea-green tippy-zulip-delayed-tooltip download-attachment" data-tippy-content="{{t 'Download' }}" download>- <i class="fa fa-download sea-green" aria-hidden="true"></i>- </a>+ <a type="submit" href="/user_uploads/{{path_id}}" class="hidden-attachment-download" download></a>+ {{> ../components/icon_button+ icon="download"+ intent="info"+ custom_classes="tippy-zulip-delayed-tooltip download-attachment"+ data-tippy-content=(t "Download")+ }}</span><span class="edit-attachment-buttons">- <button type="submit"- class="button rounded small delete button-danger remove-attachment tippy-zulip-delayed-tooltip"- data-tippy-content="{{t 'Delete' }}" data-attachment="{{id}}">- <i class="fa fa-trash-o" aria-hidden="true"></i>- </button>+ {{> ../components/icon_button+ icon="trash"+ custom_classes="tippy-zulip-delayed-tooltip delete remove-attachment"+ intent="danger"+ data-tippy-content=(t "Delete")+ }}</span></td></tr>