New org improvements

This commit is contained in:
Rotimi Best
2023-09-27 11:26:04 +01:00
parent 73a1d88cd9
commit 0fe6e2ab87
4 changed files with 10 additions and 5 deletions
@@ -196,7 +196,7 @@
<SectionTitle>Banner Image</SectionTitle>
<p>
This optional image will show up on your welcome page. If you include one, it should be at
least 300 x 200"
least 280 x 200"
</p>
<span class="flex items-center justify-start">
<PrimaryButton
@@ -223,13 +223,13 @@
on:change={onFileSelected}
/>
<img
style="width:250px; height:150px"
style="min-width:280px; min-height:200px"
alt="About us"
src={$settings.image ? $settings.image : '/images/classroomio-course-img-template.jpg'}
class="mt-2 md:mt-0 rounded-md w-full relative"
/>
{#if uploadingImage}
<Loading withOverlay={true} small class="absolute top-0 w-[250px]" />
<Loading withOverlay={true} small class="absolute top-0 w-[280px]" />
{/if}
</div>
</Column>
@@ -10,6 +10,7 @@
import { newOrgModal } from '../store';
import { snackbar } from '$lib/components/Snackbar/store';
import { createOrgValidation } from '$lib/utils/functions/validator';
import { goto } from '$app/navigation';
type Error = {
orgName: string;
@@ -97,6 +98,7 @@
resetForm();
goto(`/org/${siteName}`);
$newOrgModal.open = false;
}
}
@@ -6,6 +6,7 @@
import { goto } from '$app/navigation';
import { newOrgModal } from '$lib/components/Org/store';
import type { CurrentOrg } from '$lib/utils/types/org';
import { setTheme } from '$lib/utils/functions/theme';
export let canAddOrg = true;
let open = false;
@@ -18,6 +19,7 @@
function onClick(org: CurrentOrg) {
localStorage.setItem('classroomio_org_sitename', org.siteName);
currentOrg.set(org);
setTheme(org.theme);
goto($currentOrgPath);
open = false;
}
@@ -47,7 +49,7 @@
{#each $orgs as org}
<OrgSelectorItem
size="sm"
active={$currentOrg.shortName === org.shortName}
active={$currentOrg.id === org.id}
avatar={org.avatar_url}
avatarText={org.shortName}
text={org.name}
@@ -15,7 +15,8 @@
<div class="relative">
<button
class="{disabled && 'opacity-25'} flex items-center w-[14rem] py-2 px-3 {hasDivider &&
class="{disabled &&
'opacity-25'} flex items-center text-start w-[14rem] py-2 px-3 {hasDivider &&
'border-b border-gray-100'} {active && 'bg-primary-100 dark:bg-gray-500'}"
on:click={onClick}
>