mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 02:09:05 +01:00
50f5743dbd
* Fix: og:site_nameがbase系ページに正しく反映さんれない * instanceNameはAPIのmetaじゃなくてog:site_nameを参照するように * Fix: タイトルが変更されるページから通常ページに遷移してもタイトルが戻らない * Fix: タイトルが戻らない mobile / notifications * Fix: faviconの変更が効かないページがある
72 lines
1.6 KiB
Vue
72 lines
1.6 KiB
Vue
<template>
|
|
<mk-ui>
|
|
<template #header><fa :icon="faBell"/> {{ $t('notifications') }}</template>
|
|
<template #func>
|
|
<button @click="filter()"><fa icon="cog"/></button>
|
|
</template>
|
|
|
|
<main>
|
|
<mk-notifications @before-init="beforeInit()" @inited="inited()" :type="type === 'all' ? null : type" :wide="true" :class="{ shadow: $store.state.device.useShadow, round: $store.state.device.roundedCorners }"/>
|
|
</main>
|
|
</mk-ui>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue';
|
|
import { faBell } from '@fortawesome/free-regular-svg-icons';
|
|
import i18n from '../../../i18n';
|
|
import Progress from '../../../common/scripts/loading';
|
|
|
|
export default Vue.extend({
|
|
i18n: i18n('mobile/views/pages/notifications.vue'),
|
|
data() {
|
|
return {
|
|
type: 'all',
|
|
faBell,
|
|
};
|
|
},
|
|
mounted() {
|
|
document.title = this.$root.instanceName;
|
|
},
|
|
methods: {
|
|
beforeInit() {
|
|
Progress.start();
|
|
},
|
|
inited() {
|
|
Progress.done();
|
|
},
|
|
filter() {
|
|
this.$root.dialog({
|
|
title: this.$t('@.notification-type'),
|
|
type: null,
|
|
select: {
|
|
items: ['all', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest'].map(x => ({
|
|
value: x, text: this.$t('@.notification-types.' + x)
|
|
}))
|
|
default: this.type,
|
|
},
|
|
showCancelButton: true
|
|
}).then(({ canceled, result: type }) => {
|
|
if (canceled) return;
|
|
this.type = type;
|
|
});
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
main > *
|
|
overflow hidden
|
|
background var(--face)
|
|
|
|
&.round
|
|
border-radius 8px
|
|
|
|
&.shadow
|
|
box-shadow 0 4px 16px rgba(#000, 0.1)
|
|
|
|
@media (min-width 500px)
|
|
box-shadow 0 8px 32px rgba(#000, 0.1)
|
|
</style>
|