diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-12 09:21:04 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-12 09:21:04 +0900 |
| commit | 7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb (patch) | |
| tree | 4b8e58dcd39d113313866c6b66ecb82c65bb7880 /packages/frontend/src | |
| parent | Merge pull request #11963 from misskey-dev/develop (diff) | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb.tar.gz misskey-7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb.tar.bz2 misskey-7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb.zip | |
Merge pull request #12011 from misskey-dev/develop
Release: 2023.10.1
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/components/MkEmojiPicker.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkTimeline.vue | 6 | ||||
| -rw-r--r-- | packages/frontend/src/pages/timeline.vue | 10 | ||||
| -rw-r--r-- | packages/frontend/src/ui/deck/deck-store.ts | 1 | ||||
| -rw-r--r-- | packages/frontend/src/ui/deck/tl-column.vue | 10 |
5 files changed, 25 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 32f440ae5d..7eff637482 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -615,6 +615,8 @@ defineExpose({ height: 1.25em; vertical-align: -.25em; pointer-events: none; + width: 100%; + object-fit: contain; } } } diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index 45dedd5042..cdd72febd1 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -24,9 +24,11 @@ const props = withDefaults(defineProps<{ role?: string; sound?: boolean; withRenotes?: boolean; + withReplies?: boolean; onlyFiles?: boolean; }>(), { withRenotes: true, + withReplies: false, onlyFiles: false, }); @@ -90,10 +92,12 @@ if (props.src === 'antenna') { endpoint = 'notes/local-timeline'; query = { withRenotes: props.withRenotes, + withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, }; connection = stream.useChannel('localTimeline', { withRenotes: props.withRenotes, + withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, }); connection.on('note', prepend); @@ -101,10 +105,12 @@ if (props.src === 'antenna') { endpoint = 'notes/hybrid-timeline'; query = { withRenotes: props.withRenotes, + withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, }; connection = stream.useChannel('hybridTimeline', { withRenotes: props.withRenotes, + withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, }); connection.on('note', prepend); diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index b8deb77952..c88be2c839 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -15,10 +15,11 @@ SPDX-License-Identifier: AGPL-3.0-only <div :class="$style.tl"> <MkTimeline ref="tlComponent" - :key="src + withRenotes + onlyFiles" + :key="src + withRenotes + withReplies + onlyFiles" :src="src.split(':')[0]" :list="src.split(':')[1]" :withRenotes="withRenotes" + :withReplies="withReplies" :onlyFiles="onlyFiles" :sound="true" @queue="queueUpdated" @@ -61,6 +62,7 @@ let queue = $ref(0); let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global'); const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) }); const withRenotes = $ref(true); +const withReplies = $ref(false); const onlyFiles = $ref(false); watch($$(src), () => queue = 0); @@ -142,7 +144,11 @@ const headerActions = $computed(() => [{ text: i18n.ts.showRenotes, icon: 'ti ti-repeat', ref: $$(withRenotes), - }, { + }, src === 'local' || src === 'social' ? { + type: 'switch', + text: i18n.ts.showRepliesToOthersInTimeline, + ref: $$(withReplies), + } : undefined, { type: 'switch', text: i18n.ts.fileAttachedOnly, icon: 'ti ti-photo', diff --git a/packages/frontend/src/ui/deck/deck-store.ts b/packages/frontend/src/ui/deck/deck-store.ts index b2a44ac96b..49fdf4d314 100644 --- a/packages/frontend/src/ui/deck/deck-store.ts +++ b/packages/frontend/src/ui/deck/deck-store.ts @@ -31,6 +31,7 @@ export type Column = { excludeTypes?: typeof notificationTypes[number][]; tl?: 'home' | 'local' | 'social' | 'global'; withRenotes?: boolean; + withReplies?: boolean; onlyFiles?: boolean; }; diff --git a/packages/frontend/src/ui/deck/tl-column.vue b/packages/frontend/src/ui/deck/tl-column.vue index 847752247e..bab93622f0 100644 --- a/packages/frontend/src/ui/deck/tl-column.vue +++ b/packages/frontend/src/ui/deck/tl-column.vue @@ -23,9 +23,10 @@ SPDX-License-Identifier: AGPL-3.0-only <MkTimeline v-else-if="column.tl" ref="timeline" - :key="column.tl + withRenotes + onlyFiles" + :key="column.tl + withRenotes + withReplies + onlyFiles" :src="column.tl" :withRenotes="withRenotes" + :withReplies="withReplies" :onlyFiles="onlyFiles" /> </XColumn> @@ -51,6 +52,7 @@ let disabled = $ref(false); const isLocalTimelineAvailable = (($i == null && instance.policies.ltlAvailable) || ($i != null && $i.policies.ltlAvailable)); const isGlobalTimelineAvailable = (($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable)); const withRenotes = $ref(props.column.withRenotes ?? true); +const withReplies = $ref(props.column.withReplies ?? false); const onlyFiles = $ref(props.column.onlyFiles ?? false); watch($$(withRenotes), v => { @@ -107,7 +109,11 @@ const menu = [{ type: 'switch', text: i18n.ts.showRenotes, ref: $$(withRenotes), -}, { +}, props.column.tl === 'local' || props.column.tl === 'social' ? { + type: 'switch', + text: i18n.ts.showRepliesToOthersInTimeline, + ref: $$(withReplies), +} : undefined, { type: 'switch', text: i18n.ts.fileAttachedOnly, ref: $$(onlyFiles), |