Tokens and components in styles.css, shared Ui (dialogs, toasts), icons, bottom tab bar on mobile, keyboard/gamepad navigation, library shelf with filters and conversion badges, hero game page, restyled player screens. Games list now returns per-game version counts. Adds docs/UI_DESIGN.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
"""Catalogue of permissions. Roles in the DB are named sets of these codes."""
|
|
|
|
PERMISSIONS: dict[str, str] = {
|
|
"games.play": "Просмотр каталога и игра",
|
|
"games.upload": "Загрузка новых игр",
|
|
"games.edit": "Редактирование карточек игр",
|
|
"games.delete": "Удаление игр и любых версий",
|
|
"versions.fork": "Создание своих версий (форков)",
|
|
"versions.manage_any": "Управление чужими версиями",
|
|
"translations.edit": "Перевод игр в своих версиях",
|
|
"versions.publish": "Публикация версий и переводов, выбор главной версии",
|
|
"users.manage": "Управление пользователями",
|
|
"roles.manage": "Управление ролями",
|
|
}
|
|
|
|
ALL = sorted(PERMISSIONS)
|
|
|
|
SYSTEM_ROLES: dict[str, list[str]] = {
|
|
"admin": ALL,
|
|
"moderator": ["games.play", "games.upload", "games.edit", "versions.fork",
|
|
"translations.edit", "versions.publish"],
|
|
"player": ["games.play"],
|
|
}
|