Skip to content

Commit

Permalink
update metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
laiiihz committed Nov 28, 2023
1 parent 746a9ba commit 9a32e4a
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 34 deletions.
13 changes: 0 additions & 13 deletions lib/l10n/l10n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@ class S {

static LocalizationsDelegate<AppLocalizations> get delegate =>
AppLocalizations.delegate;

static String getlang(BuildContext context, String? localeCode) {
switch (localeCode) {
case 'zh':
return '简体中文';
case 'en':
return 'English';
case 'ja':
return '日本語';
default:
return of(context).followSystem;
}
}
}

extension L10nX on BuildContext {
Expand Down
36 changes: 15 additions & 21 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:alga/ui/alga_view/all_apps/alga_app_view.dart';
import 'package:alga/ui/views/favorite_view.dart';
import 'package:alga/ui/views/search_view.dart';
import 'package:alga/ui/views/settings_view.dart';
import 'package:alga/utils/hive_boxes/app_config_box.dart';
import 'package:alga/utils/services/app_service.dart';
import 'package:dynamic_color/dynamic_color.dart';
import 'package:flutter/material.dart';
Expand All @@ -25,26 +24,21 @@ class MyApp extends ConsumerWidget {

@override
Widget build(BuildContext context, WidgetRef ref) {
Widget child = ValueListenableBuilder(
valueListenable: AppConfigBox.keys(),
builder: (context, _, __) {
return DynamicColorBuilder(builder: (light, dark) {
light = light?.harmonized() ?? kDefaultLightColorScheme;
dark = dark?.harmonized() ?? kDefaultDarkColorScheme;
return MaterialApp.router(
routerConfig: ref.watch(appRouterProvider),
onGenerateTitle: (context) => S.of(context).appName,
theme: ref.watch(appThemeDataProvider(light, Brightness.light)),
darkTheme: ref.watch(appThemeDataProvider(dark, Brightness.dark)),
themeMode: ref.watch(appThemeModeProvider),
localizationsDelegates: S.localizationsDelegates,
supportedLocales: S.supportedLocales,
locale: AppConfigBox.locale,
debugShowCheckedModeBanner: false,
);
});
},
);
Widget child = DynamicColorBuilder(builder: (light, dark) {
light = light?.harmonized() ?? kDefaultLightColorScheme;
dark = dark?.harmonized() ?? kDefaultDarkColorScheme;
return MaterialApp.router(
routerConfig: ref.watch(appRouterProvider),
onGenerateTitle: (context) => context.tr.appName,
theme: ref.watch(appThemeDataProvider(light, Brightness.light)),
darkTheme: ref.watch(appThemeDataProvider(dark, Brightness.dark)),
themeMode: ref.watch(appThemeModeProvider),
localizationsDelegates: S.localizationsDelegates,
supportedLocales: S.supportedLocales,
locale: ref.watch(appLocaleProvider),
debugShowCheckedModeBanner: false,
);
});

if (Platform.isMacOS) {
child = PlatformMenuBar(
Expand Down
1 change: 1 addition & 0 deletions lib/ui/alga_view/all_apps/alga_app_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class AlgaAppItem extends StatelessWidget {
onTap: () {
GoRouter.of(context).go(item.path);
},
selected: state,
onLongPress: () {
_showMenuModal(context, state);
},
Expand Down
1 change: 1 addition & 0 deletions metadata/en-US/changelogs/100.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.0+100
1 change: 1 addition & 0 deletions metadata/en-US/changelogs/default.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG
11 changes: 11 additions & 0 deletions metadata/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Alga is a development toolbox for all developers.

It supports several tools, including:

* encoders and decoders
* image tools
* text tools
* multi-converters
* formatters
* generators
* and more...
1 change: 1 addition & 0 deletions metadata/zh-CN/changelogs/default.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG

0 comments on commit 9a32e4a

Please sign in to comment.