Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/views/puzzle/bits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ object bits:

private val trainingI18nKeys = baseI18nKeys ::: List(
trans.puzzle.example,
trans.puzzle.dailyPuzzle,
trans.puzzle.addAnotherTheme,
trans.puzzle.difficultyLevel,
trans.rated,
Expand Down
1 change: 1 addition & 0 deletions modules/i18n/src/main/I18nKeys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,7 @@ object I18nKeys:
val `toGetPersonalizedPuzzles` = I18nKey("puzzle:toGetPersonalizedPuzzles")
val `puzzleId` = I18nKey("puzzle:puzzleId")
val `puzzleOfTheDay` = I18nKey("puzzle:puzzleOfTheDay")
val `dailyPuzzle` = I18nKey("puzzle:dailyPuzzle")
val `clickToSolve` = I18nKey("puzzle:clickToSolve")
val `goodMove` = I18nKey("puzzle:goodMove")
val `bestMove` = I18nKey("puzzle:bestMove")
Expand Down
1 change: 1 addition & 0 deletions translation/source/puzzle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<string name="toGetPersonalizedPuzzles">To get personalized puzzles:</string>
<string name="puzzleId">Puzzle %s</string>
<string name="puzzleOfTheDay">Puzzle of the day</string>
<string name="dailyPuzzle">Daily Puzzle</string>
<string name="clickToSolve">Click to solve</string>
<string name="goodMove">Good move</string>
<string name="bestMove">Best move!</string>
Expand Down
8 changes: 4 additions & 4 deletions ui/puzzle/src/view/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export default function theme(ctrl: Controller): MaybeVNode {
angle = data.angle;
const showEditor = ctrl.vm.mode == 'view' && !ctrl.autoNexting();
if (data.replay) return showEditor ? h('div.puzzle__side__theme', editor(ctrl)) : null;
const puzzleMenu = (v: VNode): VNode =>
h('a', { attrs: { href: router.withLang(`/training/${angle.opening ? 'openings' : 'themes'}`) } }, v);
return ctrl.streak
? null
: ctrl.vm.isDaily
? h('div.puzzle__side__theme.puzzle__side__theme--daily', h('h2', 'Daily Puzzle'))
? h('div.puzzle__side__theme.puzzle__side__theme--daily', puzzleMenu(h('h2', ctrl.trans.noarg('dailyPuzzle'))))
: h('div.puzzle__side__theme', [
h(
'a',
{ attrs: { href: router.withLang(`/training/${angle.opening ? 'openings' : 'themes'}`) } },
puzzleMenu(
h(
'h2',
{
Expand Down