CLASSROOMIO-T-127: Theming configuration

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

Clean up


Co-authored-by: Rotimi Best <[email protected]>


Merge-request: CLASSROOMIO-MR-51
Merged-by: Best Admin <[email protected]>
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
+1 -1
View File
@@ -1,4 +1,4 @@
export const NavClasses = {
active: 'bg-gray-200 dark:bg-gray-700',
active: 'active-sidenav bg-primary-700 text-white transition delay-150 duration-300 ease-in-out',
background: ''
};
+10 -3
View File
@@ -58,6 +58,7 @@ export async function getOrganizations(userId) {
id,
name,
siteName,
theme,
avatar_url
)
`
@@ -72,6 +73,7 @@ export async function getOrganizations(userId) {
name: orgMember?.organization?.name,
shortName: orgMember?.organization?.name?.substring(0, 2)?.toUpperCase() || '',
siteName: orgMember?.organization?.siteName,
theme: orgMember?.organization?.theme,
avatar_url: orgMember?.organization?.avatar_url,
memberId: orgMember?.id
});
@@ -155,7 +157,7 @@ export async function getCourseBySiteName(siteName) {
return data;
}
export async function getCurrentOrg(siteName) {
export async function getCurrentOrg(siteName, justGet = false) {
const { data, error } = await supabase
.from('organization')
.select(
@@ -163,15 +165,20 @@ export async function getCurrentOrg(siteName) {
id,
name,
siteName,
theme,
avatar_url
`
)
.eq('siteName', siteName);
if (error || isEmpty(data)) {
if (!justGet && (error || isEmpty(data))) {
console.error('Error getOrganization', error);
return goto('/404');
}
currentOrg.set(data[0]);
if (!justGet) {
currentOrg.set(data[0]);
} else {
return data[0];
}
}
+1
View File
@@ -9,6 +9,7 @@ export const currentOrg = writable({
shortName: '',
siteName: '',
avatar_url: '',
theme: '',
memberId: ''
});
export const orgAudience = writable([]);