From 6d3e7c2718286e520741579cc5ebb72eda463a93 Mon Sep 17 00:00:00 2001
From: 4sterisk <4sterisk@ymail.ne.jp>
Date: Tue, 3 Sep 2024 21:28:23 +0900
Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88TL=E3=81=A7=E3=83=95?=
=?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E4=BB=98=E3=81=8D=E3=81=AE=E3=81=BF?=
=?UTF-8?q?=E3=81=AA=E3=81=A9=E3=82=92=E9=81=B8=E6=8A=9E=E3=81=A7=E3=81=8D?=
=?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../frontend/src/pages/user-list-timeline.vue | 58 ++++++++++++++++---
1 file changed, 50 insertions(+), 8 deletions(-)
diff --git a/packages/frontend/src/pages/user-list-timeline.vue b/packages/frontend/src/pages/user-list-timeline.vue
index de6737f37d82..86ec8126822e 100644
--- a/packages/frontend/src/pages/user-list-timeline.vue
+++ b/packages/frontend/src/pages/user-list-timeline.vue
@@ -11,9 +11,12 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -32,6 +35,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/router/supplier.js';
+import * as os from '@/os.js';
const router = useRouter();
@@ -44,11 +48,20 @@ const queue = ref(0);
const tlEl = shallowRef>();
const rootEl = shallowRef();
-watch(() => props.listId, async () => {
+const withRenotes = ref(true);
+const withReplies = ref(false);
+const onlyFiles = ref(false);
+
+watch(withRenotes, fetch, { immediate: true });
+watch(withReplies, fetch, { immediate: true });
+watch(onlyFiles, fetch, { immediate: true });
+watch(() => props.listId, fetch, { immediate: true });
+
+async function fetch() {
list.value = await misskeyApi('users/lists/show', {
listId: props.listId,
});
-}, { immediate: true });
+}
function queueUpdated(q) {
queue.value = q;
@@ -62,11 +75,40 @@ function settings() {
router.push(`/my/lists/${props.listId}`);
}
-const headerActions = computed(() => list.value ? [{
- icon: 'ti ti-settings',
- text: i18n.ts.settings,
- handler: settings,
-}] : []);
+const headerActions = computed(() => list.value ? [
+ {
+ icon: 'ti ti-refresh',
+ text: i18n.ts.reload,
+ handler: (ev: Event) => {
+ tlEl.value?.reloadTimeline();
+ },
+ }, {
+ icon: 'ti ti-dots',
+ text: i18n.ts.options,
+ handler: (ev) => {
+ os.popupMenu([
+ {
+ icon: 'ti ti-settings',
+ text: i18n.ts.editList,
+ action: settings,
+ },
+ {
+ type: 'switch',
+ text: i18n.ts.showRenotes,
+ ref: withRenotes,
+ }, {
+ type: 'switch',
+ text: i18n.ts.showRepliesToOthersInTimeline,
+ ref: withReplies,
+ disabled: onlyFiles,
+ }, {
+ type: 'switch',
+ text: i18n.ts.fileAttachedOnly,
+ ref: onlyFiles,
+ disabled: withReplies,
+ }], ev.currentTarget ?? ev.target);
+ },
+ }] : []);
const headerTabs = computed(() => []);