From fd3ad106bed2a5f790556bae200de5c352c5c0ea Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 19 Nov 2023 16:12:43 +0200 Subject: [PATCH] rearrange notification visibility page a bit. --- .../settings_modal/settings_modal.scss | 12 ++ .../settings_modal/tabs/notifications_tab.js | 4 + .../settings_modal/tabs/notifications_tab.vue | 133 ++++++++++++++---- src/i18n/en.json | 3 + src/modules/config.js | 13 +- 5 files changed, 139 insertions(+), 26 deletions(-) diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss index 49ef83e014..6bc9459b7d 100644 --- a/src/components/settings_modal/settings_modal.scss +++ b/src/components/settings_modal/settings_modal.scss @@ -3,6 +3,10 @@ .settings-modal { overflow: hidden; + h4 { + margin-bottom: 0.5em; + } + .setting-list, .option-list { list-style-type: none; @@ -15,6 +19,14 @@ .suboptions { margin-top: 0.3em; } + + &.two-column { + column-count: 2; + + > li { + break-inside: avoid; + } + } } .setting-description { diff --git a/src/components/settings_modal/tabs/notifications_tab.js b/src/components/settings_modal/tabs/notifications_tab.js index 3c6ab87fe7..c53b5889d0 100644 --- a/src/components/settings_modal/tabs/notifications_tab.js +++ b/src/components/settings_modal/tabs/notifications_tab.js @@ -16,6 +16,10 @@ const NotificationsTab = { user () { return this.$store.state.users.currentUser }, + canReceiveReports () { + if (!this.user) { return false } + return this.user.privileges.includes('reports_manage_reports') + }, ...SharedComputedObject() }, methods: { diff --git a/src/components/settings_modal/tabs/notifications_tab.vue b/src/components/settings_modal/tabs/notifications_tab.vue index fcee85a037..00d0f9216b 100644 --- a/src/components/settings_modal/tabs/notifications_tab.vue +++ b/src/components/settings_modal/tabs/notifications_tab.vue @@ -34,43 +34,128 @@ {{ $t('settings.notification_setting_block_from_strangers') }} -
  • - {{ $t('settings.notification_visibility') }} -