diff --git a/SECURITY.md b/SECURITY.md index 10d94f3f0572..fc35a9505e8a 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ | Version | Supported | | | ------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | -| 1.4-dev | :warning: | [Docs](https://docs.butterfly.linwood.dev/docs/1.4/intro) [Release](https://github.com/LinwoodCloud/butterfly/releases/tag/v1.4.0-beta.1) | +| 1.4-dev | :warning: | [Docs](https://docs.butterfly.linwood.dev/docs/1.4/intro) [Release](https://github.com/LinwoodCloud/butterfly/releases/tag/v1.4.0-rc.2) | | 1.3.2 | :white_check_mark: | [Docs](https://docs.butterfly.linwood.dev/docs/1.3/intro) [Release](https://github.com/LinwoodCloud/butterfly/releases/tag/v1.3.2) | | 1.2.1 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.2/intro) [Release](https://github.com/LinwoodCloud/butterfly/releases/tag/v1.2.1) | | 1.1.2 | :x: | [Docs](https://docs.butterfly.linwood.dev/docs/1.1/intro) [Release](https://github.com/LinwoodCloud/butterfly/releases/tag/v1.1.2) | diff --git a/app/lib/main.dart b/app/lib/main.dart index 8d905d87d9b5..7f563190c6f0 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -94,6 +94,13 @@ Future main([List args = const []]) async { ); } +const kUnsupportedLanguages = ['pt']; + +List getLocales() => + List.from(AppLocalizations.supportedLocales) + .where((l) => !kUnsupportedLanguages.contains(l.toString())) + .toList(); + class ButterflyApp extends StatelessWidget { final String initialLocation; final SharedPreferences prefs; @@ -221,7 +228,7 @@ class ButterflyApp extends StatelessWidget { routeInformationParser: _router.routeInformationParser, routerDelegate: _router.routerDelegate, localizationsDelegates: AppLocalizations.localizationsDelegates, - supportedLocales: AppLocalizations.supportedLocales, + supportedLocales: getLocales(), theme: ThemeManager.getThemeByName(state.design), themeMode: state.theme, builder: (context, child) { diff --git a/app/lib/settings/general.dart b/app/lib/settings/general.dart index c91fe3b09847..38727f3d1988 100644 --- a/app/lib/settings/general.dart +++ b/app/lib/settings/general.dart @@ -63,19 +63,19 @@ class GeneralSettingsPage extends StatelessWidget { ], ), body: ListView(children: [ - if (!kIsWeb)...[ - Card( - margin: const EdgeInsets.all(8), - child: Padding( - padding: const EdgeInsets.all(32), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - AppLocalizations.of(context)!.update, - style: Theme.of(context).textTheme.headline5, - ), - const SizedBox(height: 16), + if (!kIsWeb) ...[ + Card( + margin: const EdgeInsets.all(8), + child: Padding( + padding: const EdgeInsets.all(32), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + AppLocalizations.of(context)!.update, + style: Theme.of(context).textTheme.headline5, + ), + const SizedBox(height: 16), FutureBuilder( future: _fetchMeta(), builder: (context, snapshot) { @@ -143,10 +143,10 @@ class GeneralSettingsPage extends StatelessWidget { ), ]); }), - ]), + ]), + ), ), - ), - ], + ], Card( margin: const EdgeInsets.all(8), child: Padding( diff --git a/app/lib/settings/personalization.dart b/app/lib/settings/personalization.dart index 3e43884f7aea..ebf16320bf02 100644 --- a/app/lib/settings/personalization.dart +++ b/app/lib/settings/personalization.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:butterfly/main.dart'; import 'package:butterfly/cubits/settings.dart'; import 'package:butterfly/views/main.dart'; import 'package:butterfly/visualizer/string.dart'; @@ -11,8 +12,6 @@ import 'package:phosphor_flutter/phosphor_flutter.dart'; import '../theme/manager.dart'; -const kIgnoredLanguages = ['pt']; - class PersonalizationSettingsPage extends StatelessWidget { final bool inView; const PersonalizationSettingsPage({super.key, this.inView = false}); @@ -234,7 +233,7 @@ class PersonalizationSettingsPage extends StatelessWidget { void _openLocaleModal(BuildContext context) { final cubit = context.read(); var currentLocale = cubit.state.localeTag; - var locales = AppLocalizations.supportedLocales; + var locales = getLocales(); showModalBottomSheet( context: context, builder: (context) { @@ -260,8 +259,6 @@ class PersonalizationSettingsPage extends StatelessWidget { selected: currentLocale.isEmpty, onTap: () => changeLocale(null)), ...locales - .where((element) => - !kIgnoredLanguages.contains(element.toLanguageTag())) .map((e) => ListTile( title: Text(_getLocaleName(context, e.toLanguageTag())), selected: currentLocale == e.toLanguageTag(), diff --git a/fastlane/metadata/android/en-US/changelogs/36.txt b/fastlane/metadata/android/en-US/changelogs/36.txt new file mode 100644 index 000000000000..c854684adf82 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/36.txt @@ -0,0 +1,2 @@ +* Add native window title bar support +* Fix supported locales \ No newline at end of file