Skip to content

Build your personal knowledge base with Trilium Notes

feat(tab_navigation): functional back/forward buttons

Elian Dorane3f5b3535aa9
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index fea8ca13f9..24e30c6a96 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2117,5 +2117,9 @@
"unknown_http_error_title": "Communication error with the server",
"unknown_http_error_content": "Status code: {{statusCode}}\nURL: {{method}} {{url}}\nMessage: {{message}}",
"traefik_blocks_requests": "If you are using the Traefik reverse proxy, it introduced a breaking change which affects the communication with the server."
+ },
+ "tab_history_navigation_buttons": {
+ "go-back": "Go back to previous note",
+ "go-forward": "Go forward to next note"
}
}
diff --git a/apps/client/src/widgets/TabHistoryNavigationButtons.tsx b/apps/client/src/widgets/TabHistoryNavigationButtons.tsx
index cac468c2d1..e3972f0df4 100644
--- a/apps/client/src/widgets/TabHistoryNavigationButtons.tsx
+++ b/apps/client/src/widgets/TabHistoryNavigationButtons.tsx
@@ -1,11 +1,21 @@
-import ActionButton from "./react/ActionButton";
import "./TabHistoryNavigationButtons.css";
+import { t } from "../services/i18n";
+import ActionButton from "./react/ActionButton";
+
export default function TabHistoryNavigationButtons() {
return (
<div className="tab-history-navigation-buttons">
- <ActionButton icon="bx bx-left-arrow-alt" />
- <ActionButton icon="bx bx-right-arrow-alt" />
+ <ActionButton
+ icon="bx bx-left-arrow-alt"
+ text={t("tab_history_navigation_buttons.go-back")}
+ triggerCommand="backInNoteHistory"
+ />
+ <ActionButton
+ icon="bx bx-right-arrow-alt"
+ text={t("tab_history_navigation_buttons.go-forward")}
+ triggerCommand="forwardInNoteHistory"
+ />
</div>
- )
+ );
}