[Client] Fix bug

This commit is contained in:
syuilo 2018-11-09 08:26:32 +09:00
parent 60ef3e3563
commit fccbecf159
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
44 changed files with 83 additions and 81 deletions

View file

@ -88,7 +88,7 @@ export default (opts: Opts = {}) => ({
methods: { methods: {
reply(viaKeyboard = false) { reply(viaKeyboard = false) {
(this as any).apis.post({ this.$root.apis.post({
reply: this.appearNote, reply: this.appearNote,
animation: !viaKeyboard, animation: !viaKeyboard,
cb: () => { cb: () => {
@ -98,7 +98,7 @@ export default (opts: Opts = {}) => ({
}, },
renote(viaKeyboard = false) { renote(viaKeyboard = false) {
(this as any).apis.post({ this.$root.apis.post({
renote: this.appearNote, renote: this.appearNote,
animation: !viaKeyboard, animation: !viaKeyboard,
cb: () => { cb: () => {

View file

@ -50,7 +50,7 @@ export default Vue.extend({
methods: { methods: {
regenerateToken() { regenerateToken() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-password'), title: this.$t('enter-password'),
type: 'password' type: 'password'
}).then(password => { }).then(password => {

View file

@ -100,7 +100,7 @@ export default Vue.extend({
}, },
match() { match() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-username') title: this.$t('enter-username')
}).then(username => { }).then(username => {
this.$root.api('users/show', { this.$root.api('users/show', {

View file

@ -131,7 +131,7 @@ export default Vue.extend({
}, },
chooseFileFromDrive() { chooseFileFromDrive() {
(this as any).apis.chooseDriveFile({ this.$root.apis.chooseDriveFile({
multiple: false multiple: false
}).then(file => { }).then(file => {
this.file = file; this.file = file;

View file

@ -12,20 +12,20 @@ export default Vue.extend({
i18n: i18n('common/views/components/password-settings.vue'), i18n: i18n('common/views/components/password-settings.vue'),
methods: { methods: {
reset() { reset() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-current-password'), title: this.$t('enter-current-password'),
type: 'password' type: 'password'
}).then(currentPassword => { }).then(currentPassword => {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-new-password'), title: this.$t('enter-new-password'),
type: 'password' type: 'password'
}).then(newPassword => { }).then(newPassword => {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-new-password-again'), title: this.$t('enter-new-password-again'),
type: 'password' type: 'password'
}).then(newPassword2 => { }).then(newPassword2 => {
if (newPassword !== newPassword2) { if (newPassword !== newPassword2) {
(this as any).apis.dialog({ this.$root.apis.dialog({
title: null, title: null,
text: this.$t('not-match'), text: this.$t('not-match'),
actions: [{ actions: [{
@ -38,7 +38,7 @@ export default Vue.extend({
currentPasword: currentPassword, currentPasword: currentPassword,
newPassword: newPassword newPassword: newPassword
}).then(() => { }).then(() => {
(this as any).apis.notify(this.$t('changed')); this.$root.apis.notify(this.$t('changed'));
}); });
}); });
}); });

View file

@ -114,7 +114,7 @@ export default define({
}); });
}, },
choose() { choose() {
(this as any).apis.chooseDriveFolder().then(folder => { this.$root.apis.chooseDriveFolder().then(folder => {
this.props.folder = folder ? folder.id : null; this.props.folder = folder ? folder.id : null;
this.save(); this.save();
this.fetch(); this.fetch();

View file

@ -149,7 +149,7 @@ export default Vue.extend({
}, },
rename() { rename() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('contextmenu.rename-file'), title: this.$t('contextmenu.rename-file'),
placeholder: this.$t('contextmenu.input-new-file-name'), placeholder: this.$t('contextmenu.input-new-file-name'),
default: this.file.name, default: this.file.name,
@ -171,7 +171,7 @@ export default Vue.extend({
copyUrl() { copyUrl() {
copyToClipboard(this.file.url); copyToClipboard(this.file.url);
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('contextmenu.copied'), title: this.$t('contextmenu.copied'),
text: this.$t('contextmenu.copied-url-to-clipboard'), text: this.$t('contextmenu.copied-url-to-clipboard'),
actions: [{ actions: [{
@ -181,11 +181,11 @@ export default Vue.extend({
}, },
setAsAvatar() { setAsAvatar() {
(this as any).apis.updateAvatar(this.file); this.$root.apis.updateAvatar(this.file);
}, },
setAsBanner() { setAsBanner() {
(this as any).apis.updateBanner(this.file); this.$root.apis.updateBanner(this.file);
}, },
addApp() { addApp() {

View file

@ -156,7 +156,7 @@ export default Vue.extend({
}).catch(err => { }).catch(err => {
switch (err) { switch (err) {
case 'detected-circular-definition': case 'detected-circular-definition':
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('unable-to-process'), title: this.$t('unable-to-process'),
text: this.$t('circular-reference-detected'), text: this.$t('circular-reference-detected'),
actions: [{ actions: [{
@ -196,7 +196,7 @@ export default Vue.extend({
}, },
rename() { rename() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('contextmenu.rename-folder'), title: this.$t('contextmenu.rename-folder'),
placeholder: this.$t('contextmenu.input-new-folder-name'), placeholder: this.$t('contextmenu.input-new-folder-name'),
default: this.folder.name default: this.folder.name

View file

@ -314,7 +314,7 @@ export default Vue.extend({
}).catch(err => { }).catch(err => {
switch (err) { switch (err) {
case 'detected-circular-definition': case 'detected-circular-definition':
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('unable-to-process'), title: this.$t('unable-to-process'),
text: this.$t('circular-reference-detected'), text: this.$t('circular-reference-detected'),
actions: [{ actions: [{
@ -335,7 +335,7 @@ export default Vue.extend({
}, },
urlUpload() { urlUpload() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('url-upload'), title: this.$t('url-upload'),
placeholder: this.$t('url-of-file') placeholder: this.$t('url-of-file')
}).then(url => { }).then(url => {
@ -344,7 +344,7 @@ export default Vue.extend({
folderId: this.folder ? this.folder.id : undefined folderId: this.folder ? this.folder.id : undefined
}); });
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('url-upload-requested'), title: this.$t('url-upload-requested'),
text: this.$t('may-take-time'), text: this.$t('may-take-time'),
actions: [{ actions: [{
@ -355,7 +355,7 @@ export default Vue.extend({
}, },
createFolder() { createFolder() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('create-folder'), title: this.$t('create-folder'),
placeholder: this.$t('folder-name') placeholder: this.$t('folder-name')
}).then(name => { }).then(name => {

View file

@ -186,7 +186,7 @@ export default Vue.extend({
methods: { methods: {
hint() { hint() {
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('@.customization-tips.title'), title: this.$t('@.customization-tips.title'),
text: this.$t('@.customization-tips.paragraph'), text: this.$t('@.customization-tips.paragraph'),
actions: [{ actions: [{

View file

@ -36,7 +36,7 @@
<button class="drive" :title="$t('attach-media-from-drive')" @click="chooseFileFromDrive"><fa icon="cloud"/></button> <button class="drive" :title="$t('attach-media-from-drive')" @click="chooseFileFromDrive"><fa icon="cloud"/></button>
<button class="kao" :title="$t('insert-a-kao')" @click="kao"><fa :icon="['far', 'smile']"/></button> <button class="kao" :title="$t('insert-a-kao')" @click="kao"><fa :icon="['far', 'smile']"/></button>
<button class="poll" :title="$t('create-poll')" @click="poll = !poll"><fa icon="chart-pie"/></button> <button class="poll" :title="$t('create-poll')" @click="poll = !poll"><fa icon="chart-pie"/></button>
<button class="cw%" :title="$t('hide-contents%')" @click="useCw = !useCw"><fa icon="eye-slash"/></button> <button class="cw" :title="$t('hide-contents%')" @click="useCw = !useCw"><fa icon="eye-slash"/></button>
<button class="geo" :title="$t('attach-location-information')" @click="geo ? removeGeo() : setGeo()"><fa icon="map-marker-alt"/></button> <button class="geo" :title="$t('attach-location-information')" @click="geo ? removeGeo() : setGeo()"><fa icon="map-marker-alt"/></button>
<button class="visibility" :title="$t('visibility')" @click="setVisibility" ref="visibilityButton"> <button class="visibility" :title="$t('visibility')" @click="setVisibility" ref="visibilityButton">
<span v-if="visibility === 'public'"><fa icon="globe"/></span> <span v-if="visibility === 'public'"><fa icon="globe"/></span>
@ -45,9 +45,9 @@
<span v-if="visibility === 'specified'"><fa icon="envelope"/></span> <span v-if="visibility === 'specified'"><fa icon="envelope"/></span>
<span v-if="visibility === 'private'"><fa icon="lock"/></span> <span v-if="visibility === 'private'"><fa icon="lock"/></span>
</button> </button>
<p class="text-count" :class="{ over: this.trimmedLength(text) > this.maxNoteTextLength }">{{ this.maxNoteTextLength - this.trimmedLength(text) }}</p> <p class="text-count" :class="{ over: trimmedLength(text) > maxNoteTextLength }">{{ maxNoteTextLength - trimmedLength(text) }}</p>
<button :class="{ posting }" class="submit" :disabled="!canPost" @click="post"> <button :class="{ posting }" class="submit" :disabled="!canPost" @click="post">
{{ posting ? this.$t('posting') : submitText }}<mk-ellipsis v-if="posting"/> {{ posting ? $t('posting') : submitText }}<mk-ellipsis v-if="posting"/>
</button> </button>
<input ref="file" type="file" multiple="multiple" tabindex="-1" @change="onChangeFile"/> <input ref="file" type="file" multiple="multiple" tabindex="-1" @change="onChangeFile"/>
<div class="dropzone" v-if="draghover"></div> <div class="dropzone" v-if="draghover"></div>
@ -245,7 +245,7 @@ export default Vue.extend({
}, },
chooseFileFromDrive() { chooseFileFromDrive() {
(this as any).apis.chooseDriveFile({ this.$root.apis.chooseDriveFile({
multiple: true multiple: true
}).then(files => { }).then(files => {
files.forEach(this.attachMedia); files.forEach(this.attachMedia);
@ -363,7 +363,7 @@ export default Vue.extend({
}, },
addVisibleUser() { addVisibleUser() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-username') title: this.$t('enter-username')
}).then(acct => { }).then(acct => {
if (acct.startsWith('@')) acct = acct.substr(1); if (acct.startsWith('@')) acct = acct.substr(1);
@ -401,13 +401,13 @@ export default Vue.extend({
this.clear(); this.clear();
this.deleteDraft(); this.deleteDraft();
this.$emit('posted'); this.$emit('posted');
(this as any).apis.notify(this.renote this.$root.apis.notify(this.renote
? this.$t('reposted') ? this.$t('reposted')
: this.reply : this.reply
? this.$t('replied') ? this.$t('replied')
: this.$t('posted')); : this.$t('posted'));
}).catch(err => { }).catch(err => {
(this as any).apis.notify(this.renote this.$root.apis.notify(this.renote
? this.$t('renote-failed') ? this.$t('renote-failed')
: this.reply : this.reply
? this.$t('reply-failed') ? this.$t('reply-failed')
@ -689,6 +689,7 @@ export default Vue.extend({
> .drive > .drive
> .kao > .kao
> .poll > .poll
> .cw
> .geo > .geo
> .visibility > .visibility
display inline-block display inline-block

View file

@ -34,9 +34,9 @@ export default Vue.extend({
renoteId: this.note.id renoteId: this.note.id
}).then(data => { }).then(data => {
this.$emit('posted'); this.$emit('posted');
(this as any).apis.notify(this.$t('success')); this.$root.apis.notify(this.$t('success'));
}).catch(err => { }).catch(err => {
(this as any).apis.notify(this.$t('failure')); this.$root.apis.notify(this.$t('failure'));
}).then(() => { }).then(() => {
this.wait = false; this.wait = false;
}); });

View file

@ -35,7 +35,7 @@ export default Vue.extend({
}, },
methods: { methods: {
register() { register() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-password'), title: this.$t('enter-password'),
type: 'password' type: 'password'
}).then(password => { }).then(password => {
@ -48,14 +48,14 @@ export default Vue.extend({
}, },
unregister() { unregister() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-password'), title: this.$t('enter-password'),
type: 'password' type: 'password'
}).then(password => { }).then(password => {
this.$root.api('i/2fa/unregister', { this.$root.api('i/2fa/unregister', {
password: password password: password
}).then(() => { }).then(() => {
(this as any).apis.notify(this.$t('unregistered')); this.$root.apis.notify(this.$t('unregistered'));
this.$store.state.i.twoFactorEnabled = false; this.$store.state.i.twoFactorEnabled = false;
}); });
}); });
@ -65,10 +65,10 @@ export default Vue.extend({
this.$root.api('i/2fa/done', { this.$root.api('i/2fa/done', {
token: this.token token: this.token
}).then(() => { }).then(() => {
(this as any).apis.notify(this.$t('success')); this.$root.apis.notify(this.$t('success'));
this.$store.state.i.twoFactorEnabled = true; this.$store.state.i.twoFactorEnabled = true;
}).catch(() => { }).catch(() => {
(this as any).apis.notify(this.$t('failed')); this.$root.apis.notify(this.$t('failed'));
}); });
} }
} }

View file

@ -513,7 +513,7 @@ export default Vue.extend({
this.$emit('done'); this.$emit('done');
}, },
updateWallpaper() { updateWallpaper() {
(this as any).apis.chooseDriveFile({ this.$root.apis.chooseDriveFile({
multiple: false multiple: false
}).then(file => { }).then(file => {
this.$root.api('i/update', { this.$root.api('i/update', {
@ -537,12 +537,12 @@ export default Vue.extend({
this.checkingForUpdate = false; this.checkingForUpdate = false;
this.latestVersion = newer; this.latestVersion = newer;
if (newer == null) { if (newer == null) {
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('no-updates'), title: this.$t('no-updates'),
text: this.$t('no-updates-desc') text: this.$t('no-updates-desc')
}); });
} else { } else {
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('update-available'), title: this.$t('update-available'),
text: this.$t('update-available-desc') text: this.$t('update-available-desc')
}); });
@ -551,7 +551,7 @@ export default Vue.extend({
}, },
clean() { clean() {
localStorage.clear(); localStorage.clear();
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('cache-cleared'), title: this.$t('cache-cleared'),
text: this.$t('cache-cleared-desc') text: this.$t('cache-cleared-desc')
}); });

View file

@ -109,7 +109,7 @@ export default Vue.extend({
icon: 'plus', icon: 'plus',
text: this.$t('add-list'), text: this.$t('add-list'),
action: () => { action: () => {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('list-name'), title: this.$t('list-name'),
}).then(async title => { }).then(async title => {
const list = await this.$root.api('users/lists/create', { const list = await this.$root.api('users/lists/create', {

View file

@ -12,7 +12,7 @@ export default Vue.extend({
i18n: i18n('desktop/views/components/ui.header.post.vue'), i18n: i18n('desktop/views/components/ui.header.post.vue'),
methods: { methods: {
post() { post() {
(this as any).apis.post(); this.$root.apis.post();
} }
} }
}); });

View file

@ -139,7 +139,7 @@ export default Vue.extend({
}, },
post() { post() {
(this as any).apis.post(); this.$root.apis.post();
}, },
drive() { drive() {

View file

@ -67,7 +67,7 @@ export default Vue.extend({
methods: { methods: {
post() { post() {
(this as any).apis.post(); this.$root.apis.post();
}, },
toggleZenMode() { toggleZenMode() {

View file

@ -29,7 +29,7 @@ export default Vue.extend({
}, },
methods: { methods: {
add() { add() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('list-name'), title: this.$t('list-name'),
}).then(async title => { }).then(async title => {
const list = await this.$root.api('users/lists/create', { const list = await this.$root.api('users/lists/create', {

View file

@ -168,7 +168,7 @@ export default Vue.extend({
icon: 'pencil-alt', icon: 'pencil-alt',
text: this.$t('rename'), text: this.$t('rename'),
action: () => { action: () => {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('rename'), title: this.$t('rename'),
default: this.name, default: this.name,
allowEmpty: false allowEmpty: false

View file

@ -137,7 +137,7 @@ export default Vue.extend({
align-items baseline align-items baseline
white-space nowrap white-space nowrap
i, .mk-reaction-icon [data-icon], .mk-reaction-icon
margin-right 4px margin-right 4px
> .mk-time > .mk-time
@ -159,15 +159,15 @@ export default Vue.extend({
margin-right 3px margin-right 3px
&.renote &.renote
> div > header i > div > header [data-icon]
color #77B255 color #77B255
&.follow &.follow
> div > header i > div > header [data-icon]
color #53c7ce color #53c7ce
&.receiveFollowRequest &.receiveFollowRequest
> div > header i > div > header [data-icon]
color #888 color #888
</style> </style>

View file

@ -131,7 +131,7 @@ export default Vue.extend({
}, },
mounted() { mounted() {
document.title = this.$root.os.instanceName; document.title = this.$root.instanceName;
document.documentElement.style.overflow = 'hidden'; document.documentElement.style.overflow = 'hidden';
}, },
@ -255,7 +255,7 @@ export default Vue.extend({
icon: 'hashtag', icon: 'hashtag',
text: this.$t('@deck.hashtag'), text: this.$t('@deck.hashtag'),
action: () => { action: () => {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-hashtag-tl-title') title: this.$t('enter-hashtag-tl-title')
}).then(title => { }).then(title => {
this.$store.dispatch('settings/addDeckColumn', { this.$store.dispatch('settings/addDeckColumn', {

View file

@ -23,7 +23,7 @@ export default Vue.extend({
} }
}, },
mounted() { mounted() {
document.title = this.$root.os.instanceName; document.title = this.$root.instanceName;
Progress.start(); Progress.start();
}, },

View file

@ -81,7 +81,7 @@ export default Vue.extend({
onBannerClick() { onBannerClick() {
if (!this.$store.getters.isSignedIn || this.$store.state.i.id != this.user.id) return; if (!this.$store.getters.isSignedIn || this.$store.state.i.id != this.user.id) return;
(this as any).apis.updateBanner().then(i => { this.$root.apis.updateBanner().then(i => {
this.user.bannerUrl = i.bannerUrl; this.user.bannerUrl = i.bannerUrl;
}); });
} }

View file

@ -101,7 +101,7 @@ export default Vue.extend({
listId: list.id, listId: list.id,
userId: this.user.id userId: this.user.id
}); });
(this as any).apis.dialog({ this.$root.apis.dialog({
title: 'Done!', title: 'Done!',
text: this.$t('list-pushed').replace('{user}', this.user.name).replace('{list}', list.title) text: this.$t('list-pushed').replace('{user}', this.user.name).replace('{list}', list.title)
}); });

View file

@ -285,7 +285,8 @@ export default (callback: (launch: (router: VueRouter, api?: (os: MiOS) => API)
windows: os.windows windows: os.windows
}, },
stream: os.stream, stream: os.stream,
apis: os.apis apis: os.apis,
instanceName: os.instanceName
}; };
}, },
methods: { methods: {

View file

@ -101,7 +101,7 @@ export default Vue.extend({
}, },
move() { move() {
(this as any).apis.chooseDriveFolder().then(folder => { this.$root.apis.chooseDriveFolder().then(folder => {
this.$root.api('drive/files/update', { this.$root.api('drive/files/update', {
fileId: this.file.id, fileId: this.file.id,
folderId: folder == null ? null : folder.id folderId: folder == null ? null : folder.id

View file

@ -439,7 +439,7 @@ export default Vue.extend({
alert(this.$t('root-move-alert')); alert(this.$t('root-move-alert'));
return; return;
} }
(this as any).apis.chooseDriveFolder().then(folder => { this.$root.apis.chooseDriveFolder().then(folder => {
this.$root.api('drive/folders/update', { this.$root.api('drive/folders/update', {
parentId: folder ? folder.id : null, parentId: folder ? folder.id : null,
folderId: this.folder.id folderId: this.folder.id

View file

@ -196,13 +196,13 @@ export default Vue.extend({
}, },
reply() { reply() {
(this as any).apis.post({ this.$root.apis.post({
reply: this.p reply: this.p
}); });
}, },
renote() { renote() {
(this as any).apis.post({ this.$root.apis.post({
renote: this.p renote: this.p
}); });
}, },

View file

@ -220,7 +220,7 @@ export default Vue.extend({
}, },
chooseFileFromDrive() { chooseFileFromDrive() {
(this as any).apis.chooseDriveFile({ this.$root.apis.chooseDriveFile({
multiple: true multiple: true
}).then(files => { }).then(files => {
files.forEach(this.attachMedia); files.forEach(this.attachMedia);
@ -279,7 +279,7 @@ export default Vue.extend({
}, },
addVisibleUser() { addVisibleUser() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('username-prompt') title: this.$t('username-prompt')
}).then(acct => { }).then(acct => {
if (acct.startsWith('@')) acct = acct.substr(1); if (acct.startsWith('@')) acct = acct.substr(1);

View file

@ -45,7 +45,7 @@ export default Vue.extend({
window.addEventListener('popstate', this.onPopState); window.addEventListener('popstate', this.onPopState);
}, },
mounted() { mounted() {
document.title = `${this.$root.os.instanceName} Drive`; document.title = `${this.$root.instanceName} Drive`;
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener('popstate', this.onPopState); window.removeEventListener('popstate', this.onPopState);
@ -64,7 +64,7 @@ export default Vue.extend({
(this.$refs as any).browser.openContextMenu(); (this.$refs as any).browser.openContextMenu();
}, },
onMoveRoot(silent) { onMoveRoot(silent) {
const title = `${this.$root.os.instanceName} Drive`; const title = `${this.$root.instanceName} Drive`;
if (!silent) { if (!silent) {
// Rewrite URL // Rewrite URL
@ -77,7 +77,7 @@ export default Vue.extend({
this.folder = null; this.folder = null;
}, },
onOpenFolder(folder, silent) { onOpenFolder(folder, silent) {
const title = `${folder.name} | ${this.$root.os.instanceName} Drive`; const title = `${folder.name} | ${this.$root.instanceName} Drive`;
if (!silent) { if (!silent) {
// Rewrite URL // Rewrite URL
@ -90,7 +90,7 @@ export default Vue.extend({
this.folder = folder; this.folder = folder;
}, },
onOpenFile(file, silent) { onOpenFile(file, silent) {
const title = `${file.name} | ${this.$root.os.instanceName} Drive`; const title = `${file.name} | ${this.$root.instanceName} Drive`;
if (!silent) { if (!silent) {
// Rewrite URL // Rewrite URL

View file

@ -30,7 +30,7 @@ export default Vue.extend({
this.fetch(); this.fetch();
}, },
mounted() { mounted() {
document.title = `${this.$root.os.instanceName} | %i18n:@notifications%`; document.title = `${this.$root.instanceName} | %i18n:@notifications%`;
}, },
methods: { methods: {
fetch() { fetch() {

View file

@ -50,7 +50,7 @@ export default Vue.extend({
this.user = user; this.user = user;
this.fetching = false; this.fetching = false;
document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.os.instanceName}`; document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.instanceName}`;
}); });
}, },
onLoaded() { onLoaded() {

View file

@ -49,7 +49,7 @@ export default Vue.extend({
this.user = user; this.user = user;
this.fetching = false; this.fetching = false;
document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.os.instanceName}`; document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.instanceName}`;
}); });
}, },
onLoaded() { onLoaded() {

View file

@ -15,7 +15,7 @@ export default Vue.extend({
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue') XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue')
}, },
mounted() { mounted() {
document.title = `${this.$root.os.instanceName} %i18n:@reversi%`; document.title = `${this.$root.instanceName} %i18n:@reversi%`;
}, },
methods: { methods: {
nav(game, actualNav) { nav(game, actualNav) {

View file

@ -128,7 +128,7 @@ export default Vue.extend({
}, },
mounted() { mounted() {
document.title = this.$root.os.instanceName; document.title = this.$root.instanceName;
Progress.start(); Progress.start();
@ -139,7 +139,7 @@ export default Vue.extend({
methods: { methods: {
fn() { fn() {
(this as any).apis.post(); this.$root.apis.post();
}, },
saveSrc() { saveSrc() {

View file

@ -49,7 +49,7 @@ export default Vue.extend({
this.user = user; this.user = user;
this.fetching = false; this.fetching = false;
document.title = `${this.$t('@.messaging')}: ${Vue.filter('userName')(this.user)} | ${this.$root.os.instanceName}`; document.title = `${this.$t('@.messaging')}: ${Vue.filter('userName')(this.user)} | ${this.$root.instanceName}`;
}); });
} }
} }

View file

@ -13,7 +13,7 @@ import getAcct from '../../../../../misc/acct/render';
export default Vue.extend({ export default Vue.extend({
i18n: i18n(), i18n: i18n(),
mounted() { mounted() {
document.title = `${this.$root.os.instanceName} ${this.$t('@.messaging')}`; document.title = `${this.$root.instanceName} ${this.$t('@.messaging')}`;
}, },
methods: { methods: {
navigate(user) { navigate(user) {

View file

@ -33,7 +33,7 @@ export default Vue.extend({
this.fetch(); this.fetch();
}, },
mounted() { mounted() {
document.title = this.$root.os.instanceName; document.title = this.$root.instanceName;
}, },
methods: { methods: {
fetch() { fetch() {

View file

@ -36,7 +36,7 @@ export default Vue.extend({
} }
}, },
mounted() { mounted() {
document.title = `%i18n:@search%: ${this.q} | ${this.$root.os.instanceName}`; document.title = `%i18n:@search%: ${this.q} | ${this.$root.instanceName}`;
this.fetch(); this.fetch();
}, },

View file

@ -343,12 +343,12 @@ export default Vue.extend({
this.checkingForUpdate = false; this.checkingForUpdate = false;
this.latestVersion = newer; this.latestVersion = newer;
if (newer == null) { if (newer == null) {
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('no-updates'), title: this.$t('no-updates'),
text: this.$t('no-updates-desc') text: this.$t('no-updates-desc')
}); });
} else { } else {
(this as any).apis.dialog({ this.$root.apis.dialog({
title: this.$t('update-available'), title: this.$t('update-available'),
text: this.$t('update-available-desc') text: this.$t('update-available-desc')
}); });

View file

@ -38,7 +38,7 @@ export default Vue.extend({
}, },
methods: { methods: {
fn() { fn() {
(this as any).apis.input({ this.$root.apis.input({
title: this.$t('enter-list-name'), title: this.$t('enter-list-name'),
}).then(async title => { }).then(async title => {
const list = await this.$root.api('users/lists/create', { const list = await this.$root.api('users/lists/create', {

View file

@ -110,7 +110,7 @@ export default Vue.extend({
this.fetching = false; this.fetching = false;
Progress.done(); Progress.done();
document.title = `${Vue.filter('userName')(this.user)} | ${this.$root.os.instanceName}`; document.title = `${Vue.filter('userName')(this.user)} | ${this.$root.instanceName}`;
}); });
}, },

View file

@ -104,7 +104,7 @@ export default Vue.extend({
}, },
mounted() { mounted() {
document.title = this.$root.os.instanceName; document.title = this.$root.instanceName;
}, },
methods: { methods: {