diff options
Diffstat (limited to 'src/client/app/desktop/views')
11 files changed, 28 insertions, 35 deletions
diff --git a/src/client/app/desktop/views/components/drive.file.vue b/src/client/app/desktop/views/components/drive.file.vue index c560e6d97e..5b9ff81c0d 100644 --- a/src/client/app/desktop/views/components/drive.file.vue +++ b/src/client/app/desktop/views/components/drive.file.vue @@ -60,7 +60,7 @@ export default Vue.extend({ return this.browser.selectedFiles.some(f => f.id == this.file.id); }, title(): string { - return `${this.file.name}\n${this.file.type} ${Vue.filter('bytes')(this.file.datasize)}`; + return `${this.file.name}\n${this.file.type} ${Vue.filter('bytes')(this.file.size)}`; } }, methods: { diff --git a/src/client/app/desktop/views/components/note.vue b/src/client/app/desktop/views/components/note.vue index 9b36716e83..585294fc89 100644 --- a/src/client/app/desktop/views/components/note.vue +++ b/src/client/app/desktop/views/components/note.vue @@ -54,11 +54,11 @@ </button> <button v-if="!isMyNote && appearNote.myReaction == null" class="reactionButton button" @click="react()" ref="reactButton" :title="$t('add-reaction')"> <fa icon="plus"/> - <p class="count" v-if="Object.values(appearNote.reactionCounts).some(x => x)">{{ Object.values(appearNote.reactionCounts).reduce((a, c) => a + c, 0) }}</p> + <p class="count" v-if="Object.values(appearNote.reactions).some(x => x)">{{ Object.values(appearNote.reactions).reduce((a, c) => a + c, 0) }}</p> </button> <button v-if="!isMyNote && appearNote.myReaction != null" class="reactionButton reacted button" @click="undoReact(appearNote)" ref="reactButton" :title="$t('undo-reaction')"> <fa icon="minus"/> - <p class="count" v-if="Object.values(appearNote.reactionCounts).some(x => x)">{{ Object.values(appearNote.reactionCounts).reduce((a, c) => a + c, 0) }}</p> + <p class="count" v-if="Object.values(appearNote.reactions).some(x => x)">{{ Object.values(appearNote.reactions).reduce((a, c) => a + c, 0) }}</p> </button> <button @click="menu()" ref="menuButton" class="button"> <fa icon="ellipsis-h"/> diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue index 24b6fc3eba..0bf0132926 100644 --- a/src/client/app/desktop/views/components/notifications.vue +++ b/src/client/app/desktop/views/components/notifications.vue @@ -110,7 +110,7 @@ </div> </template> - <template v-if="notification.type == 'poll_vote'"> + <template v-if="notification.type == 'pollVote'"> <mk-avatar class="avatar" :user="notification.user"/> <div class="text"> <p><fa icon="chart-pie"/><a :href="notification.user | userPage" v-user-preview="notification.user.id"> diff --git a/src/client/app/desktop/views/components/user-list-window.vue b/src/client/app/desktop/views/components/user-list-window.vue index afece9fe86..6764579b20 100644 --- a/src/client/app/desktop/views/components/user-list-window.vue +++ b/src/client/app/desktop/views/components/user-list-window.vue @@ -1,6 +1,6 @@ <template> <mk-window ref="window" width="450px" height="500px" @closed="destroyDom"> - <template #header><fa icon="list"/> {{ list.title }}</template> + <template #header><fa icon="list"/> {{ list.name }}</template> <x-editor :list="list"/> </mk-window> diff --git a/src/client/app/desktop/views/components/user-lists-window.vue b/src/client/app/desktop/views/components/user-lists-window.vue index 4f0af4a278..7afcd6aa3b 100644 --- a/src/client/app/desktop/views/components/user-lists-window.vue +++ b/src/client/app/desktop/views/components/user-lists-window.vue @@ -4,7 +4,7 @@ <div class="xkxvokkjlptzyewouewmceqcxhpgzprp"> <button class="ui" @click="add">{{ $t('create-list') }}</button> - <a v-for="list in lists" :key="list.id" @click="choice(list)">{{ list.title }}</a> + <a v-for="list in lists" :key="list.id" @click="choice(list)">{{ list.name }}</a> </div> </mk-window> </template> diff --git a/src/client/app/desktop/views/home/home.vue b/src/client/app/desktop/views/home/home.vue index fb7af5a9ad..d0b2fc10bc 100644 --- a/src/client/app/desktop/views/home/home.vue +++ b/src/client/app/desktop/views/home/home.vue @@ -101,7 +101,7 @@ export default Vue.extend({ computed: { home(): any[] { if (this.$store.getters.isSignedIn) { - return this.$store.state.settings.home || []; + return this.$store.state.device.home || []; } else { return [{ name: 'instance', @@ -182,12 +182,8 @@ export default Vue.extend({ } //#endregion - if (this.$store.state.settings.home == null) { - this.$root.api('i/update_home', { - home: _defaultDesktopHomeWidgets - }).then(() => { - this.$store.commit('settings/setHome', _defaultDesktopHomeWidgets); - }); + if (this.$store.state.device.home == null) { + this.$store.commit('device/setHome', _defaultDesktopHomeWidgets); } } }, @@ -226,7 +222,7 @@ export default Vue.extend({ }, addWidget() { - this.$store.dispatch('settings/addHomeWidget', { + this.$store.commit('device/addHomeWidget', { name: this.widgetAdderSelected, id: uuid(), place: 'left', @@ -237,12 +233,9 @@ export default Vue.extend({ saveHome() { const left = this.widgets.left; const right = this.widgets.right; - this.$store.commit('settings/setHome', left.concat(right)); + this.$store.commit('device/setHome', left.concat(right)); for (const w of left) w.place = 'left'; for (const w of right) w.place = 'right'; - this.$root.api('i/update_home', { - home: this.home - }); }, done() { diff --git a/src/client/app/desktop/views/home/tag.vue b/src/client/app/desktop/views/home/tag.vue index 4f9bc66e7b..98d89955b3 100644 --- a/src/client/app/desktop/views/home/tag.vue +++ b/src/client/app/desktop/views/home/tag.vue @@ -21,7 +21,7 @@ export default Vue.extend({ i18n: i18n('desktop/views/pages/tag.vue'), data() { return { - makePromise: cursor => this.$root.api('notes/search_by_tag', { + makePromise: cursor => this.$root.api('notes/search-by-tag', { limit: limit + 1, offset: cursor ? cursor : undefined, tag: this.$route.params.tag diff --git a/src/client/app/desktop/views/home/timeline.core.vue b/src/client/app/desktop/views/home/timeline.core.vue index e306ac873c..bf07b69dbf 100644 --- a/src/client/app/desktop/views/home/timeline.core.vue +++ b/src/client/app/desktop/views/home/timeline.core.vue @@ -58,7 +58,7 @@ export default Vue.extend({ }; if (this.src == 'tag') { - this.endpoint = 'notes/search_by_tag'; + this.endpoint = 'notes/search-by-tag'; this.query = { query: this.tagTl.query }; @@ -77,9 +77,9 @@ export default Vue.extend({ this.endpoint = 'notes/local-timeline'; this.connection = this.$root.stream.useSharedConnection('localTimeline'); this.connection.on('note', prepend); - } else if (this.src == 'hybrid') { - this.endpoint = 'notes/hybrid-timeline'; - this.connection = this.$root.stream.useSharedConnection('hybridTimeline'); + } else if (this.src == 'social') { + this.endpoint = 'notes/social-timeline'; + this.connection = this.$root.stream.useSharedConnection('socialTimeline'); this.connection.on('note', prepend); } else if (this.src == 'global') { this.endpoint = 'notes/global-timeline'; diff --git a/src/client/app/desktop/views/home/timeline.vue b/src/client/app/desktop/views/home/timeline.vue index 0b8ced4795..ccd55d1d7a 100644 --- a/src/client/app/desktop/views/home/timeline.vue +++ b/src/client/app/desktop/views/home/timeline.vue @@ -6,10 +6,10 @@ <header class="zahtxcqi"> <span :data-active="src == 'home'" @click="src = 'home'"><fa icon="home"/> {{ $t('home') }}</span> <span :data-active="src == 'local'" @click="src = 'local'" v-if="enableLocalTimeline"><fa :icon="['far', 'comments']"/> {{ $t('local') }}</span> - <span :data-active="src == 'hybrid'" @click="src = 'hybrid'" v-if="enableLocalTimeline"><fa icon="share-alt"/> {{ $t('hybrid') }}</span> + <span :data-active="src == 'social'" @click="src = 'social'" v-if="enableLocalTimeline"><fa icon="share-alt"/> {{ $t('social') }}</span> <span :data-active="src == 'global'" @click="src = 'global'" v-if="enableGlobalTimeline"><fa icon="globe"/> {{ $t('global') }}</span> <span :data-active="src == 'tag'" @click="src = 'tag'" v-if="tagTl"><fa icon="hashtag"/> {{ tagTl.title }}</span> - <span :data-active="src == 'list'" @click="src = 'list'" v-if="list"><fa icon="list"/> {{ list.title }}</span> + <span :data-active="src == 'list'" @click="src = 'list'" v-if="list"><fa icon="list"/> {{ list.name }}</span> <div class="buttons"> <button :data-active="src == 'mentions'" @click="src = 'mentions'" :title="$t('mentions')"><fa icon="at"/><i class="indicator" v-if="$store.state.i.hasUnreadMentions"><fa icon="circle"/></i></button> <button :data-active="src == 'messages'" @click="src = 'messages'" :title="$t('messages')"><fa :icon="['far', 'envelope']"/><i class="indicator" v-if="$store.state.i.hasUnreadSpecifiedNotes"><fa icon="circle"/></i></button> @@ -78,7 +78,7 @@ export default Vue.extend({ ) && this.src === 'global') this.src = 'local'; if (!( this.enableLocalTimeline = !meta.disableLocalTimeline || this.$store.state.i.isModerator || this.$store.state.i.isAdmin - ) && ['local', 'hybrid'].includes(this.src)) this.src = 'home'; + ) && ['local', 'social'].includes(this.src)) this.src = 'home'; }); if (this.$store.state.device.tl) { @@ -89,7 +89,7 @@ export default Vue.extend({ this.tagTl = this.$store.state.device.tl.arg; } } else if (this.$store.state.i.followingCount == 0) { - this.src = 'hybrid'; + this.src = 'social'; } }, @@ -143,7 +143,7 @@ export default Vue.extend({ menu = menu.concat(lists.map(list => ({ icon: 'list', - text: list.title, + text: list.name, action: () => { this.list = list; this.src = 'list'; diff --git a/src/client/app/desktop/views/home/user/user.header.vue b/src/client/app/desktop/views/home/user/user.header.vue index 85dcd3ddae..61c3839c14 100644 --- a/src/client/app/desktop/views/home/user/user.header.vue +++ b/src/client/app/desktop/views/home/user/user.header.vue @@ -36,8 +36,8 @@ </dl> </div> <div class="info"> - <span class="location" v-if="user.host === null && user.profile.location"><fa icon="map-marker"/> {{ user.profile.location }}</span> - <span class="birthday" v-if="user.host === null && user.profile.birthday"><fa icon="birthday-cake"/> {{ user.profile.birthday.replace('-', $t('year')).replace('-', $t('month')) + $t('day') }} ({{ $t('years-old', { age }) }})</span> + <span class="location" v-if="user.host === null && user.location"><fa icon="map-marker"/> {{ user.location }}</span> + <span class="birthday" v-if="user.host === null && user.birthday"><fa icon="birthday-cake"/> {{ user.birthday.replace('-', $t('year')).replace('-', $t('month')) + $t('day') }} ({{ $t('years-old', { age }) }})</span> </div> <div class="status"> <router-link :to="user | userPage()" class="notes-count"><b>{{ user.notesCount | number }}</b>{{ $t('posts') }}</router-link> @@ -71,7 +71,7 @@ export default Vue.extend({ }, age(): number { - return age(this.user.profile.birthday); + return age(this.user.birthday); } }, mounted() { diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue index ddffeae408..5a5cd9c8e6 100644 --- a/src/client/app/desktop/views/pages/welcome.vue +++ b/src/client/app/desktop/views/pages/welcome.vue @@ -13,8 +13,8 @@ <div class="body"> <div class="main block"> <div> - <h1 v-if="name != 'Misskey'">{{ name }}</h1> - <h1 v-else><img svg-inline src="../../../../assets/title.svg" :alt="name"></h1> + <h1 v-if="name != null">{{ name }}</h1> + <h1 v-else><img svg-inline src="../../../../assets/title.svg" alt="Misskey"></h1> <div class="info"> <span><b>{{ host }}</b> - <span v-html="$t('powered-by-misskey')"></span></span> @@ -87,7 +87,7 @@ <div> <div v-if="meta" class="body"> <p>Version: <b>{{ meta.version }}</b></p> - <p>Maintainer: <b><a :href="'mailto:' + meta.maintainer.email" target="_blank">{{ meta.maintainer.name }}</a></b></p> + <p>Maintainer: <b><a :href="'mailto:' + meta.maintainerEmail" target="_blank">{{ meta.maintainerName }}</a></b></p> </div> </div> </div> @@ -162,7 +162,7 @@ export default Vue.extend({ banner: null, copyright, host: toUnicode(host), - name: 'Misskey', + name: null, description: '', announcements: [], photos: [] |