enhance(frontend): タイムラインでファイルが添付されたノートのみ表示するオプションを追加
This commit is contained in:
@@ -32,6 +32,7 @@ export type Column = {
|
||||
tl?: 'home' | 'local' | 'social' | 'global';
|
||||
withRenotes?: boolean;
|
||||
withReplies?: boolean;
|
||||
onlyFiles?: boolean;
|
||||
};
|
||||
|
||||
export const deckStore = markRaw(new Storage('deck', {
|
||||
|
@@ -23,10 +23,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkTimeline
|
||||
v-else-if="column.tl"
|
||||
ref="timeline"
|
||||
:key="column.tl + withRenotes + withReplies"
|
||||
:key="column.tl + withRenotes + withReplies + onlyFiles"
|
||||
:src="column.tl"
|
||||
:withRenotes="withRenotes"
|
||||
:withReplies="withReplies"
|
||||
:onlyFiles="onlyFiles"
|
||||
/>
|
||||
</XColumn>
|
||||
</template>
|
||||
@@ -52,6 +53,7 @@ const isLocalTimelineAvailable = (($i == null && instance.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 => {
|
||||
updateColumn(props.column.id, {
|
||||
@@ -111,6 +113,10 @@ const menu = [{
|
||||
type: 'switch',
|
||||
text: i18n.ts.withReplies,
|
||||
ref: $$(withReplies),
|
||||
}, {
|
||||
type: 'switch',
|
||||
text: i18n.ts.fileAttachedOnly,
|
||||
ref: $$(onlyFiles),
|
||||
}];
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user