feat(dashboard): add content page options menu (#757)
* feat(dashboard): add content page options menu Add a three-dot menu on the course Content page with actions to unlock all locked lessons/exercises and toggle content grouping. Reuse shared locked-content collection logic from course settings. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(dashboard): keep unlock-all enabled and add menu icons Show a success snackbar when all content is already unlocked instead of disabling the action. Add lock-open and table-of-contents icons to menu items. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> * fix(dashboard): check courseApi.update return for grouping toggle Use the update() return value instead of courseApi.success, which can be false after a successful PUT if the follow-up refresh request fails. Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com> --------- Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
co-authored by
Rotimi Best
parent
bfafc685e0
commit
656fa4fa7e
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { LessonsPage } from '$features/course/pages';
|
||||
import ContentPageMenu from '$features/course/components/lesson/content-page-menu.svelte';
|
||||
import { Button } from '@cio/ui/base/button';
|
||||
import { RefreshPageData, RoleBasedSecurity } from '$features/ui';
|
||||
import * as Page from '@cio/ui/base/page';
|
||||
@@ -39,6 +40,7 @@
|
||||
>{$t('course.navItem.lessons.add_content')}</Button
|
||||
>
|
||||
</RoleBasedSecurity>
|
||||
<ContentPageMenu courseId={data.courseId} disabled={!!$contentEditingStore} />
|
||||
<RefreshPageData onRefresh={() => courseApi.refreshCourse(data.courseId, $profile.id)} />
|
||||
</div>
|
||||
</Page.Action>
|
||||
|
||||
Reference in New Issue
Block a user