From dddfdf8a13cb2ef1aafb77a573463f4f18da81e2 Mon Sep 17 00:00:00 2001
From: Marie <github@yuugi.dev>
Date: Thu, 12 Dec 2024 21:45:54 +0100
Subject: [PATCH 1/2] Add locales and new navbar entry

---
 locales/index.d.ts                               |  8 ++++++++
 .../frontend/src/components/MkNoteSimple.vue     |  2 +-
 .../frontend/src/components/MkScheduleEditor.vue |  2 +-
 packages/frontend/src/navbar.ts                  | 16 ++++++++++++++--
 sharkey-locales/en-US.yml                        |  2 ++
 5 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/locales/index.d.ts b/locales/index.d.ts
index 3ffa402598..d2d72d1078 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -11464,6 +11464,14 @@ export interface Locale extends ILocale {
      * List of scheduled notes
      */
     "schedulePostList": string;
+    /**
+     * Post on
+     */
+    "postOn": string;
+    /**
+     * Scheduled Notes
+     */
+    "scheduledNotes": string;
 }
 declare const locales: {
     [lang: string]: Locale;
diff --git a/packages/frontend/src/components/MkNoteSimple.vue b/packages/frontend/src/components/MkNoteSimple.vue
index 924262d62e..a369d84783 100644
--- a/packages/frontend/src/components/MkNoteSimple.vue
+++ b/packages/frontend/src/components/MkNoteSimple.vue
@@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 			<div v-show="note.cw == null || showContent">
 				<MkSubNoteContent :hideFiles="hideFiles" :class="$style.text" :note="note" :expandAllCws="props.expandAllCws"/>
 				<div v-if="note.isSchedule" style="margin-top: 10px;">
-					<MkButton :class="$style.button" inline @click.stop.prevent="editScheduleNote()"><i class="ti ti-eraser"></i> {{ i18n.ts.deleteAndEdit }}</MkButton>
+					<MkButton :class="$style.button" inline @click.stop.prevent="editScheduleNote()"><i class="ti ti-eraser"></i> {{ i18n.ts.edit }}</MkButton>
 					<MkButton :class="$style.button" inline danger @click.stop.prevent="deleteScheduleNote()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
 				</div>
 			</div>
diff --git a/packages/frontend/src/components/MkScheduleEditor.vue b/packages/frontend/src/components/MkScheduleEditor.vue
index 60a60bed28..f40d37c962 100644
--- a/packages/frontend/src/components/MkScheduleEditor.vue
+++ b/packages/frontend/src/components/MkScheduleEditor.vue
@@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 <div style="padding: 8px 16px;">
 	<section>
 		<MkInput v-model="atDate" small type="date" class="input">
-			<template #label>{{ i18n.ts._poll.deadlineDate }}</template>
+			<template #label>{{ i18n.ts.postOn }}</template>
 		</MkInput>
 		<MkInput v-model="atTime" small type="time" class="input">
 			<template #label>{{ i18n.ts._poll.deadlineTime }}</template>
diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts
index 6f236dc89e..bbffacba14 100644
--- a/packages/frontend/src/navbar.ts
+++ b/packages/frontend/src/navbar.ts
@@ -3,7 +3,8 @@
  * SPDX-License-Identifier: AGPL-3.0-only
  */
 
-import { computed, reactive } from 'vue';
+import { computed, defineAsyncComponent, reactive } from 'vue';
+import { ui } from '@@/js/config.js';
 import { clearCache } from './scripts/clear-cache.js';
 import { instance } from './instance.js';
 import { $i } from '@/account.js';
@@ -12,7 +13,6 @@ import { openInstanceMenu } from '@/ui/_common_/common.js';
 import { lookup } from '@/scripts/lookup.js';
 import * as os from '@/os.js';
 import { i18n } from '@/i18n.js';
-import { ui } from '@@/js/config.js';
 import { unisonReload } from '@/scripts/unison-reload.js';
 
 export const navbarItemDef = reactive({
@@ -74,6 +74,18 @@ export const navbarItemDef = reactive({
 		show: computed(() => $i != null && !$i.movedTo),
 		to: '/following-feed',
 	},
+	scheduledNotes: {
+		title: i18n.ts.scheduledNotes,
+		icon: 'ti ti-calendar-event',
+		show: computed(() => $i != null),
+		action: (ev) => {
+			const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkSchedulePostListDialog.vue')), {}, {
+				closed: () => {
+					dispose();
+				},
+			});
+		},
+	},
 	lists: {
 		title: i18n.ts.lists,
 		icon: 'ti ti-list',
diff --git a/sharkey-locales/en-US.yml b/sharkey-locales/en-US.yml
index 4e462edda7..54fdf444d3 100644
--- a/sharkey-locales/en-US.yml
+++ b/sharkey-locales/en-US.yml
@@ -422,6 +422,8 @@ selectFollowRelationship: "Select a follow relationship..."
 
 schedulePost: "Schedule a note"
 schedulePostList: "List of scheduled notes"
+postOn: "Post on"
+scheduledNotes: "Scheduled Notes"
 
 _permissions:
   "read:notes-schedule": "View your list of scheduled notes"
-- 
GitLab


From b2facb2ee84c031422eaca24b0ce897bc614c1a3 Mon Sep 17 00:00:00 2001
From: Marie <github@yuugi.dev>
Date: Thu, 12 Dec 2024 20:48:50 +0000
Subject: [PATCH 2/2] revert forced editor eslint formatting

---
 packages/frontend/src/navbar.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts
index bbffacba14..2bcb69b145 100644
--- a/packages/frontend/src/navbar.ts
+++ b/packages/frontend/src/navbar.ts
@@ -4,7 +4,6 @@
  */
 
 import { computed, defineAsyncComponent, reactive } from 'vue';
-import { ui } from '@@/js/config.js';
 import { clearCache } from './scripts/clear-cache.js';
 import { instance } from './instance.js';
 import { $i } from '@/account.js';
@@ -13,6 +12,7 @@ import { openInstanceMenu } from '@/ui/_common_/common.js';
 import { lookup } from '@/scripts/lookup.js';
 import * as os from '@/os.js';
 import { i18n } from '@/i18n.js';
+import { ui } from '@@/js/config.js';
 import { unisonReload } from '@/scripts/unison-reload.js';
 
 export const navbarItemDef = reactive({
-- 
GitLab