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() { mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
os.api('users/stats', { os.api('users/stats', {
userId: this.$i.id userId: this.$i.id
}).then(stats => { }).then(stats => {

View File

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

View File

@ -32,10 +32,6 @@ export default defineComponent({
}; };
}, },
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: { methods: {
generateToken() { generateToken() {
os.popup(import('@/components/token-generate-window.vue'), {}, { 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: { methods: {
revoke(token) { revoke(token) {
os.api('i/revoke-token', { tokenId: token.id }).then(() => { os.api('i/revoke-token', { tokenId: token.id }).then(() => {

View File

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

View File

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

View File

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

View File

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

View File

@ -195,10 +195,6 @@ export default defineComponent({
}, },
}, },
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: { methods: {
async reloadAsk() { async reloadAsk() {
const { canceled } = await os.confirm({ 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); os.api('i/import-blocking', { fileId: file.id }).then(onImportSuccess).catch(onError);
}; };
onMounted(() => {
context.emit('info', INFO);
});
return { return {
[symbols.PAGE_INFO]: INFO, [symbols.PAGE_INFO]: INFO,
excludeMutingUsers, excludeMutingUsers,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,10 +45,6 @@ export default defineComponent({
} }
}, },
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: { methods: {
installPlugin({ id, meta, ast, token }) { installPlugin({ id, meta, ast, token }) {
ColdDeviceStorage.set('plugins', ColdDeviceStorage.get('plugins').concat({ 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: { methods: {
uninstall(plugin) { uninstall(plugin) {
ColdDeviceStorage.set('plugins', this.plugins.filter(x => x.id !== plugin.id)); 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; this.ffVisibility = this.$i.ffVisibility;
}, },
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: { methods: {
save() { save() {
os.api('i/update', { os.api('i/update', {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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