From 8e0355a79caddf94fe1346673a982da3f79908a5 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Tue, 31 Jan 2023 21:10:06 +0900 Subject: [PATCH] [refactor] Remove overlaid props from Toot --- .../TimelineSpace/Contents/Bookmarks.vue | 2 -- .../TimelineSpace/Contents/DirectMessages.vue | 2 -- .../TimelineSpace/Contents/Favourites.vue | 2 -- .../TimelineSpace/Contents/Hashtag/Tag.vue | 2 -- .../components/TimelineSpace/Contents/Home.vue | 2 -- .../TimelineSpace/Contents/Lists/Show.vue | 2 -- .../components/TimelineSpace/Contents/Local.vue | 2 -- .../TimelineSpace/Contents/Notifications.vue | 2 -- .../components/TimelineSpace/Contents/Public.vue | 2 -- .../TimelineSpace/Detail/Profile/Posts.vue | 3 --- .../components/TimelineSpace/Detail/Status.vue | 7 +------ src/renderer/components/organisms/Notification.vue | 14 -------------- .../components/organisms/Notification/Follow.vue | 5 ----- .../organisms/Notification/FollowRequest.vue | 5 ----- .../components/organisms/Notification/Mention.vue | 5 ----- .../components/organisms/Notification/Status.vue | 5 ----- .../organisms/Notification/StatusReaction.vue | 5 ----- src/renderer/components/organisms/Toot.vue | 14 +++++++------- 18 files changed, 8 insertions(+), 73 deletions(-) diff --git a/src/renderer/components/TimelineSpace/Contents/Bookmarks.vue b/src/renderer/components/TimelineSpace/Contents/Bookmarks.vue index f71e31dc..722e5d72 100644 --- a/src/renderer/components/TimelineSpace/Contents/Bookmarks.vue +++ b/src/renderer/components/TimelineSpace/Contents/Bookmarks.vue @@ -8,7 +8,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri === focusedId" - :overlaid="modalOpened" :filters="[]" :account="account.account" :server="account.server" @@ -218,7 +217,6 @@ export default defineComponent({ scroller, bookmarks, focusedId, - modalOpened, updateToot, deleteToot, focusToot, diff --git a/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue b/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue index ddaf6e18..c82054b5 100644 --- a/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue +++ b/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue @@ -7,7 +7,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :filters="[]" :account="account.account" :server="account.server" @@ -159,7 +158,6 @@ export default defineComponent({ timeline, scroller, focusedId, - modalOpened, updateToot, deleteToot, focusToot, diff --git a/src/renderer/components/TimelineSpace/Contents/Favourites.vue b/src/renderer/components/TimelineSpace/Contents/Favourites.vue index 2460b876..6601237a 100644 --- a/src/renderer/components/TimelineSpace/Contents/Favourites.vue +++ b/src/renderer/components/TimelineSpace/Contents/Favourites.vue @@ -8,7 +8,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri === focusedId" - :overlaid="modalOpened" :filters="[]" :account="account.account" :server="account.server" @@ -222,7 +221,6 @@ export default defineComponent({ backgroundColor, scroller, focusedId, - modalOpened, updateToot, deleteToot, focusToot, diff --git a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue index 4521ea37..25a33f47 100644 --- a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue +++ b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue @@ -8,7 +8,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :filters="[]" :account="account.account" :server="account.server" @@ -235,7 +234,6 @@ export default defineComponent({ statuses, scroller, focusedId, - modalOpened, updateToot, deleteToot, focusToot, diff --git a/src/renderer/components/TimelineSpace/Contents/Home.vue b/src/renderer/components/TimelineSpace/Contents/Home.vue index 67490fca..93b83d29 100644 --- a/src/renderer/components/TimelineSpace/Contents/Home.vue +++ b/src/renderer/components/TimelineSpace/Contents/Home.vue @@ -13,7 +13,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :filters="filters" :account="account.account" :server="account.server" @@ -219,7 +218,6 @@ export default defineComponent({ loadingMore, fetchTimelineSince, focusedId, - modalOpened, filters, updateToot, deleteToot, diff --git a/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue b/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue index e2cfcbdf..9fc89010 100644 --- a/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue +++ b/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue @@ -8,7 +8,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :filters="[]" :account="account.account" :server="account.server" @@ -232,7 +231,6 @@ export default defineComponent({ scroller, statuses, focusedId, - modalOpened, updateToot, deleteToot, focusToot, diff --git a/src/renderer/components/TimelineSpace/Contents/Local.vue b/src/renderer/components/TimelineSpace/Contents/Local.vue index dbfc6acf..8570045e 100644 --- a/src/renderer/components/TimelineSpace/Contents/Local.vue +++ b/src/renderer/components/TimelineSpace/Contents/Local.vue @@ -7,7 +7,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :filters="[]" :account="account.account" :server="account.server" @@ -167,7 +166,6 @@ export default defineComponent({ scroller, timeline, focusedId, - modalOpened, updateToot, deleteToot, focusToot, diff --git a/src/renderer/components/TimelineSpace/Contents/Notifications.vue b/src/renderer/components/TimelineSpace/Contents/Notifications.vue index 85feb71a..372bb617 100644 --- a/src/renderer/components/TimelineSpace/Contents/Notifications.vue +++ b/src/renderer/components/TimelineSpace/Contents/Notifications.vue @@ -13,7 +13,6 @@ v-if="account.account && account.server" :message="item" :focused="item.id === focusedId" - :overlaid="modalOpened" :filters="filters" :account="account.account" :server="account.server" @@ -204,7 +203,6 @@ export default defineComponent({ loadingMore, fetchNotificationsSince, focusedId, - modalOpened, filters, updateToot, focusNext, diff --git a/src/renderer/components/TimelineSpace/Contents/Public.vue b/src/renderer/components/TimelineSpace/Contents/Public.vue index 6185bafc..514c8d5c 100644 --- a/src/renderer/components/TimelineSpace/Contents/Public.vue +++ b/src/renderer/components/TimelineSpace/Contents/Public.vue @@ -8,7 +8,6 @@ v-if="account.account && account.server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :filters="filters" :account="account.account" :server="account.server" @@ -203,7 +202,6 @@ export default defineComponent({ statuses, scroller, focusedId, - modalOpened, filters, updateToot, deleteToot, diff --git a/src/renderer/components/TimelineSpace/Detail/Profile/Posts.vue b/src/renderer/components/TimelineSpace/Detail/Profile/Posts.vue index f626f0cf..0e715a54 100644 --- a/src/renderer/components/TimelineSpace/Detail/Profile/Posts.vue +++ b/src/renderer/components/TimelineSpace/Detail/Profile/Posts.vue @@ -6,7 +6,6 @@ v-if="account && server" :message="item" :focused="item.uri + item.id === focusedId" - :overlaid="modalOpened" :account="account" :server="server" @update="updateToot" @@ -52,7 +51,6 @@ export default defineComponent({ const focusedId = ref(null) const userAgent = computed(() => store.state.App.userAgent) - const modalOpened = computed(() => store.getters[`TimelineSpace/Modals/modalOpened`]) onMounted(async () => { client.value = generator(server.value.sns, server.value.baseURL, account.value.accessToken, userAgent.value) @@ -86,7 +84,6 @@ export default defineComponent({ return { statuses, - modalOpened, updateToot, deleteToot, focusedId, diff --git a/src/renderer/components/TimelineSpace/Detail/Status.vue b/src/renderer/components/TimelineSpace/Detail/Status.vue index 87586da4..2029287c 100644 --- a/src/renderer/components/TimelineSpace/Detail/Status.vue +++ b/src/renderer/components/TimelineSpace/Detail/Status.vue @@ -4,7 +4,6 @@ store.getters[`TimelineSpace/Modals/modalOpened`]) onMounted(async () => { const [a, s]: [LocalAccount, LocalServer] = await win.ipcRenderer.invoke('get-local-account', id.value) @@ -112,8 +108,7 @@ export default defineComponent({ status, ancestors, descendants, - updateStatus, - modalOpened + updateStatus } } }) diff --git a/src/renderer/components/organisms/Notification.vue b/src/renderer/components/organisms/Notification.vue index 56c29a45..309655d3 100644 --- a/src/renderer/components/organisms/Notification.vue +++ b/src/renderer/components/organisms/Notification.vue @@ -5,7 +5,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" reaction-type="favourite" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" @@ -15,7 +14,6 @@ v-else-if="message.type === 'follow'" :message="message" :focused="focused" - :overlaid="overlaid" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -24,7 +22,6 @@ v-else-if="message.type === 'follow_request'" :message="message" :focused="focused" - :overlaid="overlaid" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" > @@ -34,7 +31,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" :account="account" :server="server" @update="updateToot" @@ -48,7 +44,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" reaction-type="quote" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" @@ -59,7 +54,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" reaction-type="reblog" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" @@ -70,7 +64,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" :account="account" :server="server" @focus-right="$emit('focusRight')" @@ -82,7 +75,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" reaction-type="poll-vote" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" @@ -93,7 +85,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" reaction-type="poll-expired" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" @@ -104,7 +95,6 @@ :message="message" :filters="filters" :focused="focused" - :overlaid="overlaid" reaction-type="emoji-reaction" @focus-right="$emit('focusRight')" @select="$emit('selectNotification')" @@ -146,10 +136,6 @@ export default defineComponent({ type: Boolean, default: () => false }, - overlaid: { - type: Boolean, - default: () => false - }, account: { type: Object as PropType, required: true diff --git a/src/renderer/components/organisms/Notification/Follow.vue b/src/renderer/components/organisms/Notification/Follow.vue index 0fc9c261..676b67b9 100644 --- a/src/renderer/components/organisms/Notification/Follow.vue +++ b/src/renderer/components/organisms/Notification/Follow.vue @@ -48,10 +48,6 @@ export default defineComponent({ focused: { type: Boolean, default: false - }, - overlaid: { - type: Boolean, - default: false } }, emits: ['select'], @@ -61,7 +57,6 @@ export default defineComponent({ const router = useRouter() const notificationRef = ref(null) - // const shortcutEnabled = computed(() => focused.value && !overlaid.value) const displayNameStyle = computed(() => store.state.App.displayNameStyle) watch(focused, (newVal, oldVal) => { diff --git a/src/renderer/components/organisms/Notification/FollowRequest.vue b/src/renderer/components/organisms/Notification/FollowRequest.vue index 71936d85..45d2197e 100644 --- a/src/renderer/components/organisms/Notification/FollowRequest.vue +++ b/src/renderer/components/organisms/Notification/FollowRequest.vue @@ -48,10 +48,6 @@ export default defineComponent({ focused: { type: Boolean, default: false - }, - overlaid: { - type: Boolean, - default: false } }, emits: ['select'], @@ -61,7 +57,6 @@ export default defineComponent({ const router = useRouter() const notificationRef = ref(null) - // const shortcutEnabled = computed(() => focused.value && !overlaid.value) const displayNameStyle = computed(() => store.state.App.displayNameStyle) watch(focused, (newVal, oldVal) => { diff --git a/src/renderer/components/organisms/Notification/Mention.vue b/src/renderer/components/organisms/Notification/Mention.vue index 16f956e9..d2f06bb1 100644 --- a/src/renderer/components/organisms/Notification/Mention.vue +++ b/src/renderer/components/organisms/Notification/Mention.vue @@ -4,7 +4,6 @@ :message="message.status" :filters="filters" :focused="focused" - :overlaid="overlaid" :account="account" :server="server" v-on:update="updateToot" @@ -38,10 +37,6 @@ export default defineComponent({ type: Boolean, default: false }, - overlaid: { - type: Boolean, - default: false - }, account: { type: Object as PropType, required: true diff --git a/src/renderer/components/organisms/Notification/Status.vue b/src/renderer/components/organisms/Notification/Status.vue index 33a126e7..28f83ee1 100644 --- a/src/renderer/components/organisms/Notification/Status.vue +++ b/src/renderer/components/organisms/Notification/Status.vue @@ -25,7 +25,6 @@ :message="message.status" :filters="filters" :focused="focused" - :overlaid="overlaid" :account="account" :server="server" v-on:update="updateToot" @@ -64,10 +63,6 @@ export default defineComponent({ type: Boolean, default: false }, - overlaid: { - type: Boolean, - default: false - }, account: { type: Object as PropType, required: true diff --git a/src/renderer/components/organisms/Notification/StatusReaction.vue b/src/renderer/components/organisms/Notification/StatusReaction.vue index cd5491e3..da58069b 100644 --- a/src/renderer/components/organisms/Notification/StatusReaction.vue +++ b/src/renderer/components/organisms/Notification/StatusReaction.vue @@ -130,10 +130,6 @@ export default defineComponent({ focused: { type: Boolean, default: false - }, - overlaid: { - type: Boolean, - default: false } }, emits: ['select'], @@ -152,7 +148,6 @@ export default defineComponent({ const timeFormat = computed(() => store.state.App.timeFormat) const language = computed(() => store.state.App.language) const hideAllAttachments = computed(() => store.state.App.hideAllAttachments) - // const shortcutEnabled = computed(() => focused.value && !overlaid.value) const timestamp = computed(() => parseDatetime(message.value.created_at, timeFormat.value, language.value)) const readableTimestamp = computed(() => { moment.locale(language.value) diff --git a/src/renderer/components/organisms/Toot.vue b/src/renderer/components/organisms/Toot.vue index eb46b058..340447a5 100644 --- a/src/renderer/components/organisms/Toot.vue +++ b/src/renderer/components/organisms/Toot.vue @@ -232,7 +232,7 @@