Prepare Android release and refine bookshelf
This commit is contained in:
+13
-64
@@ -29,6 +29,7 @@ import 'services/narrator.dart';
|
||||
import 'services/progress.dart';
|
||||
import 'ui/board.dart';
|
||||
import 'ui/library.dart';
|
||||
import 'ui/licenses.dart';
|
||||
import 'ui/discovery.dart';
|
||||
import 'ui/paper.dart';
|
||||
|
||||
@@ -835,42 +836,7 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
||||
],
|
||||
),
|
||||
divider(),
|
||||
folio('A SMALL DAILY RITUAL'),
|
||||
action('Island postcards', g.showPostcards),
|
||||
writing(
|
||||
DateFormat(
|
||||
'EEEE, d MMMM',
|
||||
Localizations.localeOf(context).languageCode,
|
||||
).format(DateTime.now()),
|
||||
size: 27,
|
||||
),
|
||||
action(
|
||||
'Play today’s puzzle →',
|
||||
() => g.startDaily(DateTime.now()),
|
||||
),
|
||||
gap(),
|
||||
folio('BY THE COTTAGE WINDOW'),
|
||||
writing(
|
||||
'A few spare pages for practice. For overlapping-area puzzles, follow the notebook’s story.',
|
||||
size: 22,
|
||||
color: muted,
|
||||
),
|
||||
action(
|
||||
'Difficulty · ${g.difficulty.label} ▾',
|
||||
chooseDifficulty,
|
||||
),
|
||||
action(
|
||||
'Practice · ${g.difficulty.label} · Level ${g.practiceLevel}',
|
||||
() => unawaited(g.startPractice()),
|
||||
),
|
||||
action('How to play', rules),
|
||||
action(
|
||||
'Open-source licenses',
|
||||
() => showLicensePage(
|
||||
context: context,
|
||||
applicationName: 'Lumen',
|
||||
),
|
||||
),
|
||||
gap(),
|
||||
writing(
|
||||
'Leave a light in the window.',
|
||||
@@ -896,6 +862,7 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
||||
('Sound & atmosphere', soundSettings),
|
||||
('Recording speed', speed),
|
||||
('Privacy & advertising', privacy),
|
||||
('Open-source licenses', openSourceLicenses),
|
||||
if (kDebugMode || appFlavor == 'qa' || appFlavor == 'check')
|
||||
('Playtest report', playtestReport),
|
||||
])
|
||||
@@ -910,6 +877,10 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
||||
),
|
||||
);
|
||||
|
||||
void openSourceLicenses() => Navigator.of(
|
||||
context,
|
||||
).push(MaterialPageRoute<void>(builder: (_) => const OpenSourceLicenses()));
|
||||
|
||||
Future<void> playtestReport() => showDialog<void>(
|
||||
context: context,
|
||||
builder: (c) => AlertDialog(
|
||||
@@ -1921,40 +1892,18 @@ class _NotebookState extends State<Notebook> with WidgetsBindingObserver {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> chooseDifficulty() async {
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
builder: (c) => SimpleDialog(
|
||||
title: CopyText('Classic practice pace', style: hand(29)),
|
||||
children: [
|
||||
for (final d in Difficulty.values)
|
||||
SimpleDialogOption(
|
||||
onPressed: () {
|
||||
g.selectDifficulty(d);
|
||||
Navigator.pop(c);
|
||||
},
|
||||
child: CopyText(
|
||||
'${CopyScope.text(context, d.label)} — ${CopyScope.text(context, d.description)}',
|
||||
style: hand(23),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void rules() {
|
||||
final text = CopyScope.text(
|
||||
final rulesText = CopyScope.text(
|
||||
context,
|
||||
'Light exactly as many cells as the number beside each row and above each column.\n\nTap to cycle: empty → light → crossed out → empty. Mark every cell to finish. Small dots mark fixed clues.\n\nA, B and C are overlapping areas with their own totals. Shared cells count in both areas. Compare clues and subtract their shared parts to find new deductions.\n\nEvery story grid reveals an object. Later pages require area comparisons; all are solvable without guessing. Classic practice grades the length of simpler row and column chains.\n\nWatch a rewarded ad for each explained hint. Hints are optional, and your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.',
|
||||
'Light the number of cells shown beside each row and above each column. Tap a cell to cycle through light, cross and empty. Mark every cell to finish; dotted cells are fixed clues.\n\nSome puzzles have overlapping areas with their own totals. A shared cell counts in every area it belongs to. Compare the totals to work out which cells to light.\n\nSpecial symbols add clues: matching stars have the same state; exactly one of a matching pair of lanterns is lit; and exactly two touching footprints are lit. Some totals are hidden: use the clue on the page to find them.\n\nStory puzzles reveal memories. Find a daily puzzle or explore island postcards from the bookshelf.',
|
||||
);
|
||||
message(
|
||||
'Find the light',
|
||||
final hintText = CopyScope.text(
|
||||
context,
|
||||
kIsWeb
|
||||
? '${text.substring(0, text.lastIndexOf('\n\n'))}\n\n${CopyScope.text(context, 'Hints are free in this browser playtest. Each hint reveals one cell and explains the deduction. Streaks count consecutive daily completions in this browser.')}'
|
||||
: text,
|
||||
close: 'Got it',
|
||||
? 'Hints are free in this browser playtest. Each hint reveals one cell and explains the deduction. Streaks count consecutive daily completions in this browser.'
|
||||
: 'Hints are optional. Watch a rewarded ad to reveal a cell and its explanation; your puzzle remains available if no ad can be shown. Streaks count consecutive daily completions on this device.',
|
||||
);
|
||||
message('Find the light', '$rulesText\n\n$hintText', close: 'Got it');
|
||||
}
|
||||
|
||||
Future<void> privacy() async {
|
||||
|
||||
Reference in New Issue
Block a user