feat: add SSO authentication support, configurable brand accent colors, and update UI theme

This commit is contained in:
2026-07-06 18:20:01 +01:00
parent 1346e9e5f5
commit d476901a53
16 changed files with 382 additions and 33 deletions
+27
View File
@@ -1,5 +1,32 @@
<script setup lang="ts">
import { watch, onMounted } from "vue";
import { RouterView } from "vue-router";
import { useAuthStore } from "@/stores/auth";
const auth = useAuthStore();
function hexToRgb(hex: string) {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex.trim());
return result ? `${parseInt(result[1], 16)} ${parseInt(result[2], 16)} ${parseInt(result[3], 16)}` : null;
}
function applyAccentColor() {
const color = auth.org?.accent_color;
if (color) {
const rgb = color.startsWith('#') ? hexToRgb(color) : color;
if (rgb) {
document.documentElement.style.setProperty("--accent", rgb);
document.documentElement.style.setProperty("--accent-muted", rgb);
}
}
}
onMounted(() => {
applyAccentColor();
});
watch(() => auth.org?.accent_color, applyAccentColor);
</script>
<template>
<RouterView />