summaryrefslogtreecommitdiff
path: root/packages/frontend/src/ui/deck/tl-column.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/ui/deck/tl-column.vue')
-rw-r--r--packages/frontend/src/ui/deck/tl-column.vue58
1 files changed, 35 insertions, 23 deletions
diff --git a/packages/frontend/src/ui/deck/tl-column.vue b/packages/frontend/src/ui/deck/tl-column.vue
index 17afa12551..8315f7fca5 100644
--- a/packages/frontend/src/ui/deck/tl-column.vue
+++ b/packages/frontend/src/ui/deck/tl-column.vue
@@ -115,29 +115,41 @@ function onNote() {
sound.playMisskeySfxFile(soundSetting.value);
}
-const menu = computed<MenuItem[]>(() => [{
- icon: 'ti ti-pencil',
- text: i18n.ts.timeline,
- action: setType,
-}, {
- icon: 'ti ti-bell',
- text: i18n.ts._deck.newNoteNotificationSettings,
- action: () => soundSettingsButton(soundSetting),
-}, {
- type: 'switch',
- text: i18n.ts.showRenotes,
- ref: withRenotes,
-}, hasWithReplies(props.column.tl) ? {
- type: 'switch',
- text: i18n.ts.showRepliesToOthersInTimeline,
- ref: withReplies,
- disabled: onlyFiles,
-} : undefined, {
- type: 'switch',
- text: i18n.ts.fileAttachedOnly,
- ref: onlyFiles,
- disabled: hasWithReplies(props.column.tl) ? withReplies : false,
-}]);
+const menu = computed<MenuItem[]>(() => {
+ const menuItems: MenuItem[] = [];
+
+ menuItems.push({
+ icon: 'ti ti-pencil',
+ text: i18n.ts.timeline,
+ action: setType,
+ }, {
+ icon: 'ti ti-bell',
+ text: i18n.ts._deck.newNoteNotificationSettings,
+ action: () => soundSettingsButton(soundSetting),
+ }, {
+ type: 'switch',
+ text: i18n.ts.showRenotes,
+ ref: withRenotes,
+ });
+
+ if (hasWithReplies(props.column.tl)) {
+ menuItems.push({
+ type: 'switch',
+ text: i18n.ts.showRepliesToOthersInTimeline,
+ ref: withReplies,
+ disabled: onlyFiles,
+ });
+ }
+
+ menuItems.push({
+ type: 'switch',
+ text: i18n.ts.fileAttachedOnly,
+ ref: onlyFiles,
+ disabled: hasWithReplies(props.column.tl) ? withReplies : false,
+ });
+
+ return menuItems;
+});
</script>
<style lang="scss" module>