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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Rotimi Best
2026-07-15 22:28:23 +01:00
committed by GitHub
co-authored by Rotimi Best
parent bfafc685e0
commit 656fa4fa7e
14 changed files with 231 additions and 26 deletions
@@ -289,7 +289,10 @@
"successful_integration": "Integração bem-sucedida",
"successful_deletion": "Integração excluída",
"update_successful": "Atualização bem-sucedida",
"unlocked_all_content": "Todos os itens do curso desbloqueados"
"unlocked_all_content": "Todos os itens do curso desbloqueados",
"all_content_already_unlocked": "Todo o conteúdo já está desbloqueado",
"content_grouping_enabled": "Agrupamento de conteúdo ativado",
"content_grouping_disabled": "Agrupamento de conteúdo desativado"
}
},
"people": {
@@ -1320,6 +1323,12 @@
"add_content_create_lesson": "Criar aula",
"add_content_section_title_placeholder": "por exemplo, Módulo 1: Introdução",
"add_content_lesson_title_placeholder": "por exemplo, Introdução às variáveis",
"content_menu": {
"label": "Opções de conteúdo",
"unlock_all": "Desbloquear todo o conteúdo",
"enable_grouping": "Ativar agrupamento de conteúdo",
"disable_grouping": "Desativar agrupamento de conteúdo"
},
"join_lesson": "Participar da aula",
"no_link": "Sem link",
"no_tutor": "Nenhum tutor adicionado",