This commit is contained in:
syuilo 2022-01-13 01:50:53 +09:00
parent 4adb95e034
commit 39ec2a77fa
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(' ')));