diff --git a/help/manage-your-uploaded-files.md b/help/manage-your-uploaded-files.md index ea5b45c272..3e03baf94b 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** - () icon for the file you want to download. +1. In the **Actions** column, click the **download** + () 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** - () icon for the file you want to remove. +1. In the **Actions** column, click the **delete** + () icon for the file you want to remove. 1. Approve by clicking **Delete**. If you delete a file, your message will still contain 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.ts index 3ad3fe9d49..1c33e402e1 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 { - 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.svg new file mode 100644 index 0000000000..a2bda5764f --- /dev/null +++ b/web/shared/icons/download.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/src/attachments_ui.ts b/web/src/attachments_ui.ts index ead9c1e445..b26383bd96 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.css index 9c22f0eff5..8893cdba0b 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.hbs index 7a590b8619..a6115c8944 100644 --- a/web/templates/muted_user_ui_row.hbs +++ b/web/templates/muted_user_ui_row.hbs @@ -4,7 +4,12 @@ {{date_muted_str}} {{#if can_unmute}} - {{t "Unmute" }} + {{> ./components/action_button + label=(t "Unmute") + attention="quiet" + intent="danger" + custom_classes="settings-unmute-user" + }} {{/if}} diff --git a/web/templates/settings/alert_word_settings_item.hbs b/web/templates/settings/alert_word_settings_item.hbs index 60f2ce7c76..e1b41f8606 100644 --- a/web/templates/settings/alert_word_settings_item.hbs +++ b/web/templates/settings/alert_word_settings_item.hbs @@ -7,9 +7,12 @@ - + {{> ../components/icon_button + icon="trash" + intent="danger" + custom_classes="delete remove-alert-word tippy-zulip-delayed-tooltip" + data-tippy-content=(t "Delete") + }} {{/with}} diff --git a/web/templates/settings/uploaded_files_list.hbs b/web/templates/settings/uploaded_files_list.hbs index 8a136812b0..e5f4fae320 100644 --- a/web/templates/settings/uploaded_files_list.hbs +++ b/web/templates/settings/uploaded_files_list.hbs @@ -20,16 +20,21 @@ {{ size_str }} - - - + + {{> ../components/icon_button + icon="download" + intent="info" + custom_classes="tippy-zulip-delayed-tooltip download-attachment" + data-tippy-content=(t "Download") + }} - + {{> ../components/icon_button + icon="trash" + custom_classes="tippy-zulip-delayed-tooltip delete remove-attachment" + intent="danger" + data-tippy-content=(t "Delete") + }}