feat: add icon to create a new lesson from side nav (#145)

* feat: classroomio-issue-143

* issue 143: remove bg-color from the add icon

* fix: hide the + icon for student

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Adeyemi Adetunji
2024-02-01 20:18:03 +01:00
committed by GitHub
co-authored by Rotimi Best
parent 67db904dae
commit cadfa81913
28 changed files with 123 additions and 100 deletions
@@ -9,7 +9,7 @@
import ArrowLeft from 'carbon-icons-svelte/lib/ArrowLeft.svelte';
import IconButton from '$lib/components/IconButton/index.svelte';
import { appStore } from '$lib/utils/store/app';
import { globalStore } from '$lib/utils/store/app';
import { currentOrgPath } from '$lib/utils/store/org';
import { toggleBodyByMode } from '$lib/utils/functions/app';
import { sideBar } from '../Org/store';
@@ -23,16 +23,16 @@
};
function toggleDarkMode() {
$appStore.isDark = !$appStore.isDark;
$globalStore.isDark = !$globalStore.isDark;
toggleBodyByMode($appStore.isDark);
toggleBodyByMode($globalStore.isDark);
if (browser) {
localStorage.setItem('mode', $appStore.isDark ? 'dark' : '');
localStorage.setItem('mode', $globalStore.isDark ? 'dark' : '');
}
}
$: coursesPath = $appStore.isOrgSite
$: coursesPath = $globalStore.isOrgSite
? '/lms/mylearning'
: isCoursePage
? `${$currentOrgPath}/courses`
@@ -91,7 +91,7 @@
</li>
<li>
<IconButton size="small" onClick={toggleDarkMode}>
{#if $appStore.isDark}
{#if $globalStore.isDark}
<Sun size={16} class="text-white" />
{:else}
<Moon size={16} class="text-white" />
@@ -8,7 +8,7 @@
import TextChip from '$lib/components/Chip/Text.svelte';
import IconButton from '$lib/components/IconButton/index.svelte';
import { appStore } from '$lib/utils/store/app';
import { globalStore } from '$lib/utils/store/app';
import { Close, Menu } from 'carbon-icons-svelte';
import { sideBar } from '$lib/components/Org/store';
import { currentOrg } from '$lib/utils/store/org';
@@ -21,11 +21,11 @@
};
function toggleDarkMode() {
$appStore.isDark = !$appStore.isDark;
$globalStore.isDark = !$globalStore.isDark;
toggleBodyByMode($appStore.isDark);
toggleBodyByMode($globalStore.isDark);
if (browser) {
localStorage.setItem('mode', $appStore.isDark ? 'dark' : '');
localStorage.setItem('mode', $globalStore.isDark ? 'dark' : '');
}
}
@@ -80,7 +80,7 @@
</li>
<li>
<IconButton size="small" onClick={toggleDarkMode}>
{#if $appStore.isDark}
{#if $globalStore.isDark}
<SunIcon size={16} class="text-white" />
{:else}
<MoonIcon size={16} class="text-white" />