Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor(sql-editor): replace SQL Editor menu with Go Back (#796)
Yunwei Xiao35bda89ba132
diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.ymlindex 78ac7065fc..5148106700 100644--- a/frontend/src/locales/en.yml+++ b/frontend/src/locales/en.yml@@ -1161,6 +1161,7 @@ sql-editor:readpublic: Publicpublic-desc: Sheet OWNER can read/write, and all others can read+ go-back: Go Backlabel:empty-label-value: <Empty Value>no-label: No labelsdiff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.ymlindex 42ead49c31..cfda3b06ff 100644--- a/frontend/src/locales/zh-CN.yml+++ b/frontend/src/locales/zh-CN.yml@@ -1020,6 +1020,7 @@ sql-editor:project-desc: 工作表所有者或者项目所有者拥有读、写权限,项目开发者拥有只读权限public: 公开public-desc: 工作表所有者拥有读写权限,其他人只拥有只读权限.+ go-back: 返回label:empty-label-value: <空值>no-label: 没有标签diff --git a/frontend/src/views/SqlEditor/EditorHeader.vue b/frontend/src/views/SqlEditor/EditorHeader.vueindex 1c8503e27d..5bbd5b0b59 100644--- a/frontend/src/views/SqlEditor/EditorHeader.vue+++ b/frontend/src/views/SqlEditor/EditorHeader.vue@@ -12,9 +12,9 @@</div><div class="hidden sm:block"><div class="ml-6 flex items-baseline space-x-1">- <router-link to="/sql-editor" class="bar-link px-2 py-2 rounded-md">- {{ $t("sql-editor.self") }}- </router-link>+ <a href="#" class="bar-link px-2 py-2 rounded-md" @click="goBack">+ {{ $t("sql-editor.go-back") }}+ </a></div></div></div>@@ -245,12 +245,21 @@ export default defineComponent({]);useRegisterActions(i18nActions);+ const goBack = () => {+ if (window.history.state?.back) {+ router.go(-1);+ } else {+ router.push("/");+ }+ };+return {state,showDBAItem,showSwitchPlan,inboxSummary,toggleLocales,+ goBack,};},});