CLASSROOMIO-T-127: Theming configuration

CLASSROOMIO-T-127: Add 4 themes configurations into the app

Clean up


Co-authored-by: Rotimi Best <rotimiibitoyeemma@gmail.com>


Merge-request: CLASSROOMIO-MR-51
Merged-by: Best Admin <best@digdippa.com>
This commit is contained in:
Rotimi Best
2023-08-20 19:08:48 +00:00
committed by Space Cloud
co-authored by Rotimi Best
parent 910d9c50a9
commit f39a0cee4b
75 changed files with 709 additions and 379 deletions
+12 -3
View File
@@ -34,7 +34,6 @@
import { toggleBodyByTheme } from '$lib/utils/functions/app';
import { appStore } from '$lib/utils/store/app';
import { currentOrg } from '$lib/utils/store/org';
import { blockedSubdomain } from '$lib/utils/constants/app';
import '../app.postcss';
@@ -48,6 +47,10 @@
setTimeout(() => set(currentPreloading), 250);
});
function setTheme(theme) {
document.body.className = document.body.className.concat(' ', theme);
}
function setupSentry() {
if (!dev) {
Sentry.init({
@@ -173,6 +176,8 @@
// By default redirect to first organization
goto(`/org/${orgRes.currentOrg.siteName}`);
}
setTheme(orgRes.currentOrg.theme);
}
}
}
@@ -237,9 +242,11 @@
}
if (data.isOrgSite) {
console.log('data', data);
$appStore.orgSiteName = data.orgSiteName;
$appStore.isOrgSite = data.isOrgSite;
getCurrentOrg(data.orgSiteName);
currentOrg.set(data.org);
}
return () => {
@@ -357,7 +364,9 @@
width: 100%;
}
:global(.dark svg.dark path) {
:global(.dark svg.dark path),
:global(.active-sidenav svg.dark path),
:global(.active-sidenav svg.carbon-icon path) {
fill: #fff;
}