summaryrefslogtreecommitdiff
path: root/packages/frontend
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-08-06 14:22:21 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-08-06 14:22:21 +0900
commitee9dc9406376e2a8112c89edd3843f5359e9aef8 (patch)
tree60995294c21388ae7931e2c170bb6a7be790b719 /packages/frontend
parentfeat(frontend): AiScriptを1.0に更新 (diff)
downloadmisskey-ee9dc9406376e2a8112c89edd3843f5359e9aef8.tar.gz
misskey-ee9dc9406376e2a8112c89edd3843f5359e9aef8.tar.bz2
misskey-ee9dc9406376e2a8112c89edd3843f5359e9aef8.zip
enhance(frontend): タイムラインページのメニューから投稿フォームの表示有無を切り替えられるように
Diffstat (limited to 'packages/frontend')
-rw-r--r--packages/frontend/src/pages/timeline.vue80
1 files changed, 44 insertions, 36 deletions
diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue
index 3fe48b4d72..1a5f3edc9e 100644
--- a/packages/frontend/src/pages/timeline.vue
+++ b/packages/frontend/src/pages/timeline.vue
@@ -103,6 +103,8 @@ const withSensitive = computed<boolean>({
set: (x) => saveTlFilter('withSensitive', x),
});
+const showFixedPostForm = prefer.model('showFixedPostForm');
+
async function chooseList(ev: MouseEvent): Promise<void> {
const lists = await userListsCache.fetch();
const items: (MenuItem | undefined)[] = [
@@ -202,49 +204,54 @@ onActivated(() => {
});
const headerActions = computed(() => {
- const tmp = [
- {
- icon: 'ti ti-dots',
- text: i18n.ts.options,
- handler: (ev) => {
- const menuItems: MenuItem[] = [];
-
- menuItems.push({
- type: 'switch',
- icon: 'ti ti-repeat',
- text: i18n.ts.showRenotes,
- ref: withRenotes,
- });
+ const items = [{
+ icon: 'ti ti-dots',
+ text: i18n.ts.options,
+ handler: (ev) => {
+ const menuItems: MenuItem[] = [];
- if (isBasicTimeline(src.value) && hasWithReplies(src.value)) {
- menuItems.push({
- type: 'switch',
- icon: 'ti ti-messages',
- text: i18n.ts.showRepliesToOthersInTimeline,
- ref: withReplies,
- disabled: onlyFiles,
- });
- }
+ menuItems.push({
+ type: 'switch',
+ icon: 'ti ti-repeat',
+ text: i18n.ts.showRenotes,
+ ref: withRenotes,
+ });
+ if (isBasicTimeline(src.value) && hasWithReplies(src.value)) {
menuItems.push({
type: 'switch',
- icon: 'ti ti-eye-exclamation',
- text: i18n.ts.withSensitive,
- ref: withSensitive,
- }, {
- type: 'switch',
- icon: 'ti ti-photo',
- text: i18n.ts.fileAttachedOnly,
- ref: onlyFiles,
- disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false,
+ icon: 'ti ti-messages',
+ text: i18n.ts.showRepliesToOthersInTimeline,
+ ref: withReplies,
+ disabled: onlyFiles,
});
+ }
- os.popupMenu(menuItems, ev.currentTarget ?? ev.target);
- },
+ menuItems.push({
+ type: 'switch',
+ icon: 'ti ti-eye-exclamation',
+ text: i18n.ts.withSensitive,
+ ref: withSensitive,
+ }, {
+ type: 'switch',
+ icon: 'ti ti-photo',
+ text: i18n.ts.fileAttachedOnly,
+ ref: onlyFiles,
+ disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false,
+ }, {
+ type: 'divider',
+ }, {
+ type: 'switch',
+ text: i18n.ts.showFixedPostForm,
+ ref: showFixedPostForm,
+ });
+
+ os.popupMenu(menuItems, ev.currentTarget ?? ev.target);
},
- ];
+ }];
+
if (deviceKind === 'desktop') {
- tmp.unshift({
+ items.unshift({
icon: 'ti ti-refresh',
text: i18n.ts.reload,
handler: (ev: Event) => {
@@ -252,7 +259,8 @@ const headerActions = computed(() => {
},
});
}
- return tmp;
+
+ return items;
});
const headerTabs = computed(() => [...(prefer.r.pinnedUserLists.value.map(l => ({