From 1828d971ce490fc1ef2475dd7db57dc94ff84e5b Mon Sep 17 00:00:00 2001 From: "hermes.santos" Date: Thu, 30 Jul 2026 13:47:42 -0300 Subject: [PATCH] feat(i18n, layout): add dock orientation options and translations Introduced new localization strings for "Dock to bottom" and "Dock to right" in English, Spanish, and Brazilian Portuguese. Updated layout service to manage details orientation, allowing users to toggle between bottom and right docking for the details panel in the History view. --- app/ui/src/i18n/en.json | 2 + app/ui/src/i18n/es.json | 2 + app/ui/src/i18n/pt-br.json | 2 + app/ui/src/layouts/History/HistoryView.vue | 6 +- .../History/components/HistoryDetailPanel.vue | 73 ++++++++++++++++--- app/ui/src/services/layoutService.ts | 20 +++++ 6 files changed, 95 insertions(+), 10 deletions(-) diff --git a/app/ui/src/i18n/en.json b/app/ui/src/i18n/en.json index 2b2e4e6..1d24724 100644 --- a/app/ui/src/i18n/en.json +++ b/app/ui/src/i18n/en.json @@ -606,6 +606,8 @@ "explain_commits": "Explain commits", "n_commits_selected": "{count} commits selected", "close_details": "Close Details", + "dock_bottom": "Dock to bottom", + "dock_right": "Dock to right", "tab_information": "INFORMATION", "tab_changes": "CHANGES", "tab_submodule": "SUBMODULE", diff --git a/app/ui/src/i18n/es.json b/app/ui/src/i18n/es.json index 0aefe79..d823211 100644 --- a/app/ui/src/i18n/es.json +++ b/app/ui/src/i18n/es.json @@ -548,6 +548,8 @@ "explain_commits": "Explicar commits", "n_commits_selected": "{count} commits seleccionados", "close_details": "Cerrar detalles", + "dock_bottom": "Anclar abajo", + "dock_right": "Anclar a la derecha", "tab_information": "INFORMACIÓN", "tab_changes": "CAMBIOS", "tab_submodule": "SUBMÓDULO", diff --git a/app/ui/src/i18n/pt-br.json b/app/ui/src/i18n/pt-br.json index 93156b0..78771fa 100644 --- a/app/ui/src/i18n/pt-br.json +++ b/app/ui/src/i18n/pt-br.json @@ -606,6 +606,8 @@ "explain_commits": "Explicar commits", "n_commits_selected": "{count} commits selecionados", "close_details": "Fechar detalhes", + "dock_bottom": "Encaixar embaixo", + "dock_right": "Encaixar à direita", "tab_information": "INFORMAÇÃO", "tab_changes": "ALTERAÇÕES", "tab_submodule": "SUBMÓDULO", diff --git a/app/ui/src/layouts/History/HistoryView.vue b/app/ui/src/layouts/History/HistoryView.vue index 53bf2f9..b3150f0 100644 --- a/app/ui/src/layouts/History/HistoryView.vue +++ b/app/ui/src/layouts/History/HistoryView.vue @@ -23,6 +23,7 @@ import { historyAuthorWidth, historyDateWidth, detailsWidth, + detailsOrientation, layoutRefs } from '../../services/layoutService'; import { appendCommitGraph, createGraphState, GraphState } from '../../GraphBuilder'; @@ -526,7 +527,10 @@ async function onRemoveFilter(name: string) { v-if="effectiveLogRefs.length" :refs="effectiveLogRefs" @remove="onRemoveFilter" /> -
+
detailsOrientation.value === 'bottom'); + +function toggleOrientation() { + detailsOrientation.value = isBottom.value ? 'right' : 'bottom'; +} + // Let the parent drive the active tab (e.g. an AI file link jumps to "changes"). watch(() => props.requestedTab, (tab) => { if (tab) activeDetailTab.value = tab; @@ -76,9 +83,31 @@ function onSetTab(tab: string) {