can disable pop up notifications

This commit is contained in:
fly_mc 2024-10-27 21:28:24 +08:00
parent 86ab0f203d
commit 18cd0a268a
3 changed files with 7 additions and 2 deletions

View file

@ -100,7 +100,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="rightTop"><i class="ti ti-align-box-right-top"></i> {{ i18n.ts.rightTop }}</option>
<option value="leftBottom"><i class="ti ti-align-box-left-bottom"></i> {{ i18n.ts.leftBottom }}</option>
<option value="rightBottom"><i class="ti ti-align-box-right-bottom"></i> {{ i18n.ts.rightBottom }}</option>
<option value=""><i class="ti ti-close"></i> {{ i18n.ts.close }}</option>
<option value="close"><i class="ti ti-x"></i> {{ i18n.ts.close }}</option>
</MkRadios>
<MkRadios v-model="notificationStackAxis">

View file

@ -392,7 +392,7 @@ export const defaultStore = markRaw(new Storage('base', {
},
notificationPosition: {
where: 'device',
default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom' | null,
default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom' | 'close',
},
notificationStackAxis: {
where: 'device',

View file

@ -21,6 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
[$style.notificationsPosition_leftBottom]: defaultStore.state.notificationPosition === 'leftBottom',
[$style.notificationsPosition_rightTop]: defaultStore.state.notificationPosition === 'rightTop',
[$style.notificationsPosition_rightBottom]: defaultStore.state.notificationPosition === 'rightBottom',
[$style.notificationsPosition_close]: defaultStore.state.notificationPosition === 'close',
[$style.notificationsStackAxis_vertical]: defaultStore.state.notificationStackAxis === 'vertical',
[$style.notificationsStackAxis_horizontal]: defaultStore.state.notificationStackAxis === 'horizontal',
}]"
@ -205,6 +206,10 @@ function getPointerEvents() {
}
}
.notificationsPosition_close {
display: none;
}
.notification {
container-type: inline-size;
}