Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update custom theme color (#8624)

boojacke714ccdb45c9
diff --git a/frontend/src/CustomThemeProvider.vue b/frontend/src/CustomThemeProvider.vue
index aecb1e29a3..b9a7ce3df6 100644
--- a/frontend/src/CustomThemeProvider.vue
+++ b/frontend/src/CustomThemeProvider.vue
@@ -16,13 +16,16 @@ import { NConfigProvider } from "naive-ui";
import { onMounted, ref } from "vue";
import { themeOverrides, dateLang, generalLang } from "../naive-ui.config";
import { provideAppRootContext } from "./AppRootContext";
+import { useLanguage } from "./composables/useLanguage";
import { applyCustomTheme } from "./utils/customTheme";
const { key } = provideAppRootContext();
+const { setLocale } = useLanguage();
const initialized = ref(false);
onMounted(() => {
const searchParams = new URLSearchParams(window.location.search);
+ // Initial custom theme.
let customTheme = searchParams.get("customTheme") || "";
const cachedCustomTheme = useLocalStorage<string>("bb.custom-theme", "");
if (!customTheme && cachedCustomTheme.value) {
@@ -32,6 +35,11 @@ onMounted(() => {
cachedCustomTheme.value = customTheme;
applyCustomTheme(customTheme);
}
+ // Initial custom language.
+ const lang = searchParams.get("lang") || "";
+ if (lang) {
+ setLocale(lang);
+ }
initialized.value = true;
});
</script>
diff --git a/frontend/src/utils/customTheme.ts b/frontend/src/utils/customTheme.ts
index 9dee5574c0..4974063001 100644
--- a/frontend/src/utils/customTheme.ts
+++ b/frontend/src/utils/customTheme.ts
@@ -4,8 +4,9 @@ import { useI18n } from "vue-i18n";
export const applyCustomTheme = (theme: string) => {
const rootElement = document.documentElement;
if (theme === "lixiang") {
- // TODO: update the color variables.
- rootElement.style.setProperty("--color-accent", "#52ab7c");
+ rootElement.style.setProperty("--color-accent", "#00665f");
+ rootElement.style.setProperty("--color-accent-disabled", "#b8c3c3");
+ rootElement.style.setProperty("--color-accent-hover", "#00554f");
}
};
diff --git a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
index ba684fd15f..a7bdc90501 100644
--- a/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/EditorAction.vue
@@ -108,6 +108,7 @@
<script lang="ts" setup>
import { useElementSize } from "@vueuse/core";
+import { NButton, NPopover } from "naive-ui";
import { computed, defineEmits, reactive, ref } from "vue";
import {
useTabStore,