Merge branch 'develop' into feature/2024.9.0
This commit is contained in:
commit
52e291af67
19 changed files with 206 additions and 18 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue