This commit is contained in:
syuilo 2022-01-13 01:50:53 +09:00
parent d2623a2ef2
commit 25f15677c3
29 changed files with 5 additions and 109 deletions

View File

@ -154,8 +154,6 @@ export default defineComponent({
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
os.api('users/stats', {
userId: this.$i.id
}).then(stats => {

View File

@ -53,10 +53,6 @@ export default defineComponent({
};
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
menu(account, ev) {
os.popupMenu([{

View File

@ -32,10 +32,6 @@ export default defineComponent({
};
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
generateToken() {
os.popup(import('@/components/token-generate-window.vue'), {}, {

View File

@ -67,10 +67,6 @@ export default defineComponent({
};
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
revoke(token) {
os.api('i/revoke-token', { tokenId: token.id }).then(() => {

View File

@ -37,8 +37,6 @@ export default defineComponent({
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
this.$watch('localCustomCss', this.apply);
},

View File

@ -83,10 +83,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async setProfile() {
const { canceled, result: name } = await os.inputText({

View File

@ -33,10 +33,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async deleteAccount() {
{

View File

@ -99,10 +99,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
chooseUploadFolder() {
os.selectDriveFolder(false).then(async folder => {

View File

@ -111,8 +111,6 @@ export default defineComponent({
});
onMounted(() => {
context.emit('info', INFO);
watch(emailAddress, () => {
saveEmailAddress();
});

View File

@ -195,10 +195,6 @@ export default defineComponent({
},
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async reloadAsk() {
const { canceled } = await os.confirm({

View File

@ -133,10 +133,6 @@ export default defineComponent({
os.api('i/import-blocking', { fileId: file.id }).then(onImportSuccess).catch(onError);
};
onMounted(() => {
context.emit('info', INFO);
});
return {
[symbols.PAGE_INFO]: INFO,
excludeMutingUsers,

View File

@ -14,7 +14,7 @@
</div>
<div class="main">
<div class="bkzroven">
<component :is="component" :key="page" v-bind="pageProps" @info="onInfo"/>
<component :is="component" :ref="el => pageChanged(el)" :key="page" v-bind="pageProps"/>
</div>
</div>
</div>
@ -250,8 +250,9 @@ export default defineComponent({
const emailNotConfigured = computed(() => instance.enableEmail && ($i.email == null || !$i.emailVerified));
const onInfo = (info) => {
childInfo.value = info;
const pageChanged = (page) => {
if (page == null) return;
childInfo.value = page[symbols.PAGE_INFO];
};
return {
@ -264,7 +265,7 @@ export default defineComponent({
pageProps,
component,
emailNotConfigured,
onInfo,
pageChanged,
childInfo,
};
},

View File

@ -47,11 +47,6 @@ export default defineComponent({
},
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
async created() {
this.instanceMutes = this.$i.mutedInstances.join('\n');
},

View File

@ -73,8 +73,6 @@ export default defineComponent({
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
document.cookie = `igi=${this.$i.token}; path=/;` +
` max-age=31536000;` +
(document.location.protocol.startsWith('https') ? ' secure' : '');

View File

@ -67,10 +67,6 @@ export default defineComponent({
},
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async addItem() {
const menu = Object.keys(this.menuDef).filter(k => !this.$store.state.menu.includes(k));

View File

@ -66,10 +66,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
userPage
}

View File

@ -37,10 +37,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
readAllUnreadNotes() {
os.api('i/read-all-unread-notes');

View File

@ -47,10 +47,6 @@ export default defineComponent({
reportError: defaultStore.makeGetterSetter('reportError'),
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
changeDebug(v) {
console.log(v);

View File

@ -45,10 +45,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
installPlugin({ id, meta, ast, token }) {
ColdDeviceStorage.set('plugins', ColdDeviceStorage.get('plugins').concat({

View File

@ -64,10 +64,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
uninstall(plugin) {
ColdDeviceStorage.set('plugins', this.plugins.filter(x => x.id !== plugin.id));

View File

@ -101,10 +101,6 @@ export default defineComponent({
this.ffVisibility = this.$i.ffVisibility;
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
save() {
os.api('i/update', {

View File

@ -132,10 +132,6 @@ export default defineComponent({
this.$watch('alwaysMarkNsfw', this.save);
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
changeAvatar(e) {
selectFile(e.currentTarget || e.target, this.$ts.avatar).then(file => {

View File

@ -100,10 +100,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
save() {
this.$store.set('reactions', this.reactions);

View File

@ -72,10 +72,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async change() {
const { canceled: canceled1, result: currentPassword } = await os.inputText({

View File

@ -96,10 +96,6 @@ export default defineComponent({
this.sounds.channel = ColdDeviceStorage.get('sound_channel');
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async edit(type) {
const { canceled, result } = await os.form(this.$t('_sfx.' + type), {

View File

@ -40,10 +40,6 @@ export default defineComponent({
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
parseThemeCode(code) {
let theme;

View File

@ -78,10 +78,6 @@ export default defineComponent({
},
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
copyThemeCode() {
copyToClipboard(this.selectedThemeCode);

View File

@ -163,10 +163,6 @@ export default defineComponent({
location.reload();
});
onMounted(() => {
emit('info', INFO);
});
onActivated(() => {
fetchThemes().then(() => {
installedThemes.value = getThemes();

View File

@ -87,10 +87,6 @@ export default defineComponent({
this.hardWordMutedNotesCount = (await os.api('i/get-word-muted-notes-count', {})).count;
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
async save() {
this.$store.set('mutedWords', this.softMutedWords.trim().split('\n').map(x => x.trim().split(' ')));