diff options
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/components/SkApprovalUser.vue | 18 | ||||
| -rw-r--r-- | packages/frontend/src/pages/admin/modlog.ModLog.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/general.vue | 3 | ||||
| -rw-r--r-- | packages/frontend/src/store.ts | 4 | ||||
| -rw-r--r-- | packages/frontend/src/ui/_common_/common.vue | 11 |
5 files changed, 21 insertions, 17 deletions
diff --git a/packages/frontend/src/components/SkApprovalUser.vue b/packages/frontend/src/components/SkApprovalUser.vue index 20059f139d..1ef0ac5b17 100644 --- a/packages/frontend/src/components/SkApprovalUser.vue +++ b/packages/frontend/src/components/SkApprovalUser.vue @@ -69,22 +69,10 @@ async function deleteAccount() { }); if (confirm.canceled) return; - const typed = await os.inputText({ - text: i18n.t('typeToConfirm', { x: props.user.username }), + await os.apiWithDialog('admin/decline-user', { + userId: props.user.id, }); - if (typed.canceled) return; - - if (typed.result === props.user.username) { - await os.apiWithDialog('admin/delete-account', { - userId: props.user.id, - }); - emits('deleted', props.user.id); - } else { - os.alert({ - type: 'error', - text: 'input not match', - }); - } + emits('deleted', props.user.id); } async function approveAccount() { diff --git a/packages/frontend/src/pages/admin/modlog.ModLog.vue b/packages/frontend/src/pages/admin/modlog.ModLog.vue index 9fe804b2bd..6c81155c51 100644 --- a/packages/frontend/src/pages/admin/modlog.ModLog.vue +++ b/packages/frontend/src/pages/admin/modlog.ModLog.vue @@ -31,6 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only [$style.logRed]: [ 'suspend', 'approve', + 'decline', 'deleteRole', 'deleteGlobalAnnouncement', 'deleteUserAnnouncement', @@ -51,6 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only <span v-if="log.type === 'updateUserNote'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span> <span v-else-if="log.type === 'suspend'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span> <span v-else-if="log.type === 'approve'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span> + <span v-else-if="log.type === 'decline'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span> <span v-else-if="log.type === 'unsuspend'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span> <span v-else-if="log.type === 'resetPassword'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span> <span v-else-if="log.type === 'assignRole'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }} <i class="ti ti-arrow-right"></i> {{ log.info.roleName }}</span> diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 27607322ee..e1068132b7 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -170,6 +170,8 @@ SPDX-License-Identifier: AGPL-3.0-only <option value="horizontal"><i class="ti ti-carousel-horizontal"></i> {{ i18n.ts.horizontal }}</option> </MkRadios> + <MkSwitch v-model="notificationClickable">{{ i18n.ts.allowClickingNotifications }}</MkSwitch> + <MkButton @click="testNotification">{{ i18n.ts._notification.checkNotificationBehavior }}</MkButton> </div> </FormSection> @@ -414,6 +416,7 @@ const showAvatarDecorations = computed(defaultStore.makeGetterSetter('showAvatar const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('mediaListWithOneImageAppearance')); const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition')); const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); +const notificationClickable = computed(defaultStore.makeGetterSetter('notificationClickable')); const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn')); const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline')); const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications')); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index a00afcd79a..8f356c557b 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -481,6 +481,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: 'horizontal' as 'vertical' | 'horizontal', }, + notificationClickable: { + where: 'device', + default: false, + }, enableCondensedLine: { where: 'device', default: true, diff --git a/packages/frontend/src/ui/_common_/common.vue b/packages/frontend/src/ui/_common_/common.vue index e9baa0eab4..a8ff2a4c8d 100644 --- a/packages/frontend/src/ui/_common_/common.vue +++ b/packages/frontend/src/ui/_common_/common.vue @@ -30,7 +30,11 @@ SPDX-License-Identifier: AGPL-3.0-only :enterFromClass="defaultStore.state.animation ? $style.transition_notification_enterFrom : ''" :leaveToClass="defaultStore.state.animation ? $style.transition_notification_leaveTo : ''" > - <div v-for="notification in notifications" :key="notification.id" :class="$style.notification"> + <div + v-for="notification in notifications" :key="notification.id" :class="$style.notification" :style="{ + pointerEvents: getPointerEvents() + }" + > <XNotification :notification="notification"/> </div> </TransitionGroup> @@ -101,6 +105,10 @@ if ($i) { swInject(); } } + +function getPointerEvents() { + return defaultStore.state.notificationClickable ? undefined : 'none'; +} </script> <style lang="scss" module> @@ -122,7 +130,6 @@ if ($i) { position: fixed; z-index: 3900000; padding: 0 var(--margin); - pointer-events: none; display: flex; &.notificationsPosition_leftTop { |