diff --git a/locales/ja.yml b/locales/ja.yml index 8e04d0988f..320da8e777 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -87,6 +87,7 @@ common: swap-right: "右に移動" remove: "カラムを削除" add-column: "カラムを追加" + rename: "名前を変更" common/views/components/connect-failed.vue: title: "サーバーに接続できません" diff --git a/src/client/app/desktop/views/pages/deck/deck.column.vue b/src/client/app/desktop/views/pages/deck/deck.column.vue index f71503d5c1..10005fa9b0 100644 --- a/src/client/app/desktop/views/pages/deck/deck.column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.column.vue @@ -20,6 +20,10 @@ export default Vue.extend({ type: String, required: false }, + name: { + type: String, + required: false + }, menu: { type: Array, required: false @@ -75,6 +79,17 @@ export default Vue.extend({ showMenu() { const items = [{ + content: '%fa:pencil-alt% %i18n:common.deck.rename%', + onClick: () => { + (this as any).apis.input({ + title: '%i18n:common.deck.rename%', + default: this.name, + allowEmpty: false + }).then(name => { + this.$store.dispatch('settings/renameDeckColumn', { id: this.id, name }); + }); + } + }, null, { content: '%fa:arrow-left% %i18n:common.deck.swap-left%', onClick: () => { this.$store.dispatch('settings/swapLeftDeckColumn', this.id); @@ -84,7 +99,7 @@ export default Vue.extend({ onClick: () => { this.$store.dispatch('settings/swapRightDeckColumn', this.id); } - }, { + }, null, { content: '%fa:trash-alt R% %i18n:common.deck.remove%', onClick: () => { this.$store.dispatch('settings/removeDeckColumn', this.id); diff --git a/src/client/app/desktop/views/pages/deck/deck.list-tl.vue b/src/client/app/desktop/views/pages/deck/deck.list-tl.vue index 7b5e76ffec..ee4e89747b 100644 --- a/src/client/app/desktop/views/pages/deck/deck.list-tl.vue +++ b/src/client/app/desktop/views/pages/deck/deck.list-tl.vue @@ -18,6 +18,11 @@ export default Vue.extend({ list: { type: Object, required: true + }, + mediaOnly: { + type: Boolean, + required: false, + default: false } }, @@ -30,6 +35,12 @@ export default Vue.extend({ }; }, + watch: { + mediaOnly() { + this.fetch(); + } + }, + mounted() { if (this.connection) this.connection.close(); this.connection = new UserListStream((this as any).os, this.$store.state.i, this.list.id); @@ -52,6 +63,7 @@ export default Vue.extend({ (this as any).api('notes/user-list-timeline', { listId: this.list.id, limit: fetchLimit + 1, + mediaOnly: this.mediaOnly, includeMyRenotes: this.$store.state.settings.showMyRenotes, includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes }).then(notes => { @@ -72,6 +84,7 @@ export default Vue.extend({ listId: this.list.id, limit: fetchLimit + 1, untilId: (this.$refs.timeline as any).tail().id, + mediaOnly: this.mediaOnly, includeMyRenotes: this.$store.state.settings.showMyRenotes, includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes }); @@ -89,6 +102,8 @@ export default Vue.extend({ return promise; }, onNote(note) { + if (this.mediaOnly && note.media.length == 0) return; + // Prepend a note (this.$refs.timeline as any).prepend(note); }, diff --git a/src/client/app/desktop/views/pages/deck/deck.notifications-column.vue b/src/client/app/desktop/views/pages/deck/deck.notifications-column.vue index f57c52d2e1..e01f91c24d 100644 --- a/src/client/app/desktop/views/pages/deck/deck.notifications-column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.notifications-column.vue @@ -1,7 +1,7 @@