|
1 | 1 | import { t } from "i18next";
|
2 | 2 | import type { HiddenSubtreeItem } from "./hidden_subtree.js";
|
3 | 3 |
|
4 |
| -export const desktopAvailableLaunchers: HiddenSubtreeItem[] = [ |
5 |
| - { |
6 |
| - id: "_lbBackInHistory", |
| 4 | +const sharedLaunchers: Record<string, Omit<HiddenSubtreeItem, "id">> = { |
| 5 | + backInHistory: { |
7 | 6 | title: t("hidden-subtree.go-to-previous-note-title"),
|
8 | 7 | type: "launcher",
|
9 | 8 | builtinWidget: "backInHistoryButton",
|
10 | 9 | icon: "bx bxs-chevron-left",
|
11 | 10 | attributes: [{ type: "label", name: "docName", value: "launchbar_history_navigation" }]
|
12 | 11 | },
|
13 |
| - { |
14 |
| - id: "_lbForwardInHistory", |
| 12 | + forwardInHistory: { |
15 | 13 | title: t("hidden-subtree.go-to-next-note-title"),
|
16 | 14 | type: "launcher",
|
17 | 15 | builtinWidget: "forwardInHistoryButton",
|
18 | 16 | icon: "bx bxs-chevron-right",
|
19 | 17 | attributes: [{ type: "label", name: "docName", value: "launchbar_history_navigation" }]
|
20 |
| - }, |
| 18 | + } |
| 19 | +}; |
| 20 | + |
| 21 | +export const desktopAvailableLaunchers: HiddenSubtreeItem[] = [ |
| 22 | + { id: "_lbBackInHistory", ...sharedLaunchers.backInHistory }, |
| 23 | + { id: "_lbForwardInHistory", ...sharedLaunchers.forwardInHistory }, |
21 | 24 | { id: "_lbBackendLog", title: t("hidden-subtree.backend-log-title"), type: "launcher", targetNoteId: "_backendLog", icon: "bx bx-terminal" }
|
22 | 25 | ];
|
23 | 26 |
|
@@ -64,21 +67,7 @@ export const mobileAvailableLaunchers: HiddenSubtreeItem[] = [
|
64 | 67 | ];
|
65 | 68 |
|
66 | 69 | export const mobileVisibleLaunchers: HiddenSubtreeItem[] = [
|
67 |
| - { |
68 |
| - id: "_lbMobileBackInHistory", |
69 |
| - title: t("hidden-subtree.go-to-previous-note-title"), |
70 |
| - type: "launcher", |
71 |
| - builtinWidget: "backInHistoryButton", |
72 |
| - icon: "bx bxs-chevron-left", |
73 |
| - attributes: [{ type: "label", name: "docName", value: "launchbar_history_navigation" }] |
74 |
| - }, |
75 |
| - { |
76 |
| - id: "_lbMobileForwardInHistory", |
77 |
| - title: t("hidden-subtree.go-to-next-note-title"), |
78 |
| - type: "launcher", |
79 |
| - builtinWidget: "forwardInHistoryButton", |
80 |
| - icon: "bx bxs-chevron-right", |
81 |
| - attributes: [{ type: "label", name: "docName", value: "launchbar_history_navigation" }] |
82 |
| - }, |
| 70 | + { id: "_lbMobileBackInHistory", ...sharedLaunchers.backInHistory }, |
| 71 | + { id: "_lbMobileForwardInHistory", ...sharedLaunchers.forwardInHistory }, |
83 | 72 | { id: "_lbMobileJumpTo", title: t("hidden-subtree.jump-to-note-title"), type: "launcher", command: "jumpToNote", icon: "bx bx-plus-circle" }
|
84 | 73 | ];
|
0 commit comments