Skip to content
Snippets Groups Projects
Commit d19897c8 authored by こぴなたみぽ's avatar こぴなたみぽ
Browse files

wip

parent aa433c2a
No related branches found
No related tags found
No related merge requests found
<mk-notifications-page>
<mk-ui ref="ui">
<mk-notifications ref="notifications"/>
</mk-ui>
<style lang="stylus" scoped>
:scope
display block
</style>
<script lang="typescript">
import ui from '../../scripts/ui-event';
import Progress from '../../../common/scripts/loading';
this.mixin('api');
this.on('mount', () => {
document.title = 'Misskey | %i18n:mobile.tags.mk-notifications-page.notifications%';
ui.trigger('title', '%fa:R bell%%i18n:mobile.tags.mk-notifications-page.notifications%');
document.documentElement.style.background = '#313a42';
ui.trigger('func', () => {
this.readAll();
}, '%fa:check%');
Progress.start();
this.$refs.ui.refs.notifications.on('fetched', () => {
Progress.done();
});
});
this.readAll = () => {
const ok = window.confirm('%i18n:mobile.tags.mk-notifications-page.read-all%');
if (!ok) return;
this.$root.$data.os.api('notifications/mark_as_read_all');
};
</script>
</mk-notifications-page>
<template>
<mk-ui :func="fn" func-icon="%fa:check%">
<span slot="header">%fa:R bell%%i18n:mobile.tags.mk-notifications-page.notifications%</span>
<mk-notifications @fetched="onFetched"/>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
export default Vue.extend({
mounted() {
document.title = 'Misskey | %i18n:mobile.tags.mk-notifications-page.notifications%';
document.documentElement.style.background = '#313a42';
Progress.start();
},
methods: {
fn() {
const ok = window.confirm('%i18n:mobile.tags.mk-notifications-page.read-all%');
if (!ok) return;
this.$root.$data.os.api('notifications/mark_as_read_all');
},
onFetched() {
Progress.done();
}
}
});
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment