Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit 027e561

Browse files
committed
Bug fixes (Theme, clicking on links, translations)
1 parent 8bf72c4 commit 027e561

7 files changed

Lines changed: 74 additions & 22 deletions

File tree

assets/translations/de.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,6 @@ settingsPageShizukuTitle: Shizuku Service
9595
settingsPageShizukuDescription: Shizuku ist eine App, die SkyDroid Zugriff auf System-APIs geben kann, auch wenn das Gerät NICHT gerootet ist. Dies ermöglicht SkyDroid Apps ohne Bestätigung zu installieren und aktualisieren.
9696
settingsPageShizukuToggleSwitch: Shizuku aktivieren
9797
settingsPageShizukuInstallButton: Shizuku installieren
98+
appPageInstallingShizukuErrorNotRunning: Shizuku Service läuft nicht
99+
appPageInstallingShizukuErrorNotRunningButton: Shizuku öffnen
100+
appPageInstallingShizukuErrorPermissionNotGranted: Shizuku Berechtigung nicht erteilt (Geh in die SkyDroid Optionen und re-aktiviere Shizuku Unterstützung)

lib/app.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Map<String, List<String>> globalErrors = {};
3030
Translations tr;
3131
AndroidDeviceInfo androidInfo;
3232

33+
TextStyle dialogActionTextStyle(BuildContext context) => TextStyle(
34+
color: Theme.of(context).accentColor,
35+
);
36+
3337
final shizukuPackageName = 'moe.shizuku.privileged.api';
3438

3539
final categoryKeys = {

lib/main.dart

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ final httpClient = http.Client();
8787

8888
class MyApp extends StatelessWidget {
8989
ThemeData _buildThemeData(String theme) {
90-
var _accentColor = Color(0xff1ed660); //Color(0xff57b560);
90+
var _accentColor = Color(0xff1ed660);
91+
//Color(0xff57b560);
9192

9293
var brightness =
9394
['light', 'sepia'].contains(theme) ? Brightness.light : Brightness.dark;
@@ -372,13 +373,19 @@ class _MyHomePageState extends State<MyHomePage> {
372373
onPressed: () {
373374
Navigator.of(context).pop();
374375
},
375-
child: Text(Translations.of(context).dialogCancel),
376+
child: Text(
377+
Translations.of(context).dialogCancel,
378+
style: dialogActionTextStyle(context),
379+
),
376380
),
377381
FlatButton(
378382
onPressed: () {
379383
Navigator.of(context).pop(true);
380384
},
381-
child: Text(Translations.of(context).removeNameDialogConfirm),
385+
child: Text(
386+
Translations.of(context).removeNameDialogConfirm,
387+
style: dialogActionTextStyle(context),
388+
),
382389
),
383390
],
384391
));
@@ -563,6 +570,7 @@ class _MyHomePageState extends State<MyHomePage> {
563570
onPressed: Navigator.of(context).pop,
564571
child: Text(
565572
Translations.of(context).dialogCancel,
573+
style: dialogActionTextStyle(context),
566574
),
567575
),
568576
],
@@ -940,11 +948,17 @@ class _MyHomePageState extends State<MyHomePage> {
940948
actions: <Widget>[
941949
FlatButton(
942950
onPressed: Navigator.of(context).pop,
943-
child: Text(tr.dialogCancel),
951+
child: Text(
952+
tr.dialogCancel,
953+
style: dialogActionTextStyle(context),
954+
),
944955
),
945956
FlatButton(
946957
onPressed: () => Navigator.of(context).pop(ctrl.text),
947-
child: Text(tr.addDomainNameDialogConfirm),
958+
child: Text(
959+
tr.addDomainNameDialogConfirm,
960+
style: dialogActionTextStyle(context),
961+
),
948962
),
949963
],
950964
),
@@ -1026,7 +1040,10 @@ class _MyHomePageState extends State<MyHomePage> {
10261040
actions: <Widget>[
10271041
FlatButton(
10281042
onPressed: Navigator.of(context).pop,
1029-
child: Text(tr.errorDialogCloseButton),
1043+
child: Text(
1044+
tr.errorDialogCloseButton,
1045+
style: dialogActionTextStyle(context),
1046+
),
10301047
),
10311048
],
10321049
),

lib/page/app.dart

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,10 @@ class _AppPageState extends State<AppPage> {
255255
actions: <Widget>[
256256
FlatButton(
257257
onPressed: Navigator.of(context).pop,
258-
child:
259-
Text(tr.verifiedAppDialogCloseButton),
258+
child: Text(
259+
tr.verifiedAppDialogCloseButton,
260+
style: dialogActionTextStyle(context),
261+
),
260262
),
261263
],
262264
),
@@ -309,6 +311,7 @@ class _AppPageState extends State<AppPage> {
309311
DateTime.fromMillisecondsSinceEpoch(
310312
app.lastUpdated,
311313
),
314+
locale: tr.localeName,
312315
),
313316
),
314317
style: TextStyle(fontStyle: FontStyle.italic),
@@ -379,18 +382,25 @@ class _AppPageState extends State<AppPage> {
379382
if (app.localizedDescription != null)
380383
Padding(
381384
padding: const EdgeInsets.all(12.0),
382-
child:
383-
Html(data: md.markdownToHtml(app.localizedDescription)),
385+
child: Html(
386+
data: md.markdownToHtml(app.localizedDescription),
387+
onLinkTap: (str) {
388+
launch(str);
389+
},
390+
),
384391
),
385392
if (app.lastUpdated != null)
386393
Align(
387394
alignment: Alignment.centerRight,
388395
child: Padding(
389396
padding: const EdgeInsets.only(right: 16),
390397
child: Text(
391-
tr.appPageUpdatedTime(timeAgo.format(
392-
DateTime.fromMillisecondsSinceEpoch(
393-
app.lastUpdated))),
398+
tr.appPageUpdatedTime(
399+
timeAgo.format(
400+
DateTime.fromMillisecondsSinceEpoch(app.lastUpdated),
401+
locale: tr.localeName,
402+
),
403+
),
394404
style: TextStyle(fontStyle: FontStyle.italic),
395405
),
396406
),

lib/page/collections.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,28 @@ class _CollectionsPageState extends State<CollectionsPage> {
148148
onPressed: () {
149149
Navigator.of(context).pop();
150150
},
151-
child: Text(tr.dialogCancel),
151+
child: Text(
152+
tr.dialogCancel,
153+
style: dialogActionTextStyle(context),
154+
),
152155
),
153156
FlatButton(
154157
onPressed: () {
155158
Navigator.of(context).pop(true);
156159
},
157-
child: Text(tr.removeCollectionDialogConfirmWithApps),
160+
child: Text(
161+
tr.removeCollectionDialogConfirmWithApps,
162+
style: dialogActionTextStyle(context),
163+
),
158164
),
159165
FlatButton(
160166
onPressed: () {
161167
Navigator.of(context).pop(false);
162168
},
163-
child: Text(tr.removeCollectionDialogConfirm),
169+
child: Text(
170+
tr.removeCollectionDialogConfirm,
171+
style: dialogActionTextStyle(context),
172+
),
164173
),
165174
],
166175
));

lib/page/settings.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class _SettingsPageState extends State<SettingsPage> {
2929

3030
bool _isShizukuInstalled;
3131

32-
33-
3432
_startShizukuCheckLoop() async {
3533
// if (androidInfo.version.sdkInt < 24) return;
3634

@@ -221,7 +219,10 @@ class _SettingsPageState extends State<SettingsPage> {
221219
actions: [
222220
TextButton(
223221
onPressed: Navigator.of(context).pop,
224-
child: Text(tr.settingsPageAboutDebugDialogClose),
222+
child: Text(
223+
tr.settingsPageAboutDebugDialogClose,
224+
style: dialogActionTextStyle(context),
225+
),
225226
),
226227
],
227228
),

lib/page/widget/install.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,17 @@ class _InstallWidgetState extends State<InstallWidget>
159159
showDialog(
160160
context: context,
161161
builder: (context) => AlertDialog(
162-
title: Text(tr.errorAppInstallationShizuku),
162+
title: Text(
163+
tr.errorAppInstallationShizuku,
164+
),
163165
content: content,
164166
actions: [
165167
FlatButton(
166168
onPressed: Navigator.of(context).pop,
167-
child: Text(tr.errorDialogCloseButton),
169+
child: Text(
170+
tr.errorDialogCloseButton,
171+
style: dialogActionTextStyle(context),
172+
),
168173
),
169174
],
170175
),
@@ -402,7 +407,10 @@ class _InstallWidgetState extends State<InstallWidget>
402407
actions: [
403408
FlatButton(
404409
onPressed: Navigator.of(context).pop,
405-
child: Text(tr.errorDialogCloseButton),
410+
child: Text(
411+
tr.errorDialogCloseButton,
412+
style: dialogActionTextStyle(context),
413+
),
406414
),
407415
],
408416
),

0 commit comments

Comments
 (0)