diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..f5854be8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.sourceDirectory": "C:/Users/USER/Documents/miru-app/windows/flutter" +} \ No newline at end of file diff --git a/assets/i18n/en.json b/assets/i18n/en.json index 6b9b20b5..494267b1 100644 --- a/assets/i18n/en.json +++ b/assets/i18n/en.json @@ -189,7 +189,20 @@ "read-mode": "Read mode", "standard": "Standard", "right-to-left": "Right to left", - "web-tonn": "Webtoon" + "web-tonn": "Webtoon", + "bottomLeft": "Bottom left", + "bottomRight": "Bottom right", + "topLeft": "Top left", + "topRight": "Top right", + "indicator-alignment": "Indicator alignment", + "status-bar":"Status bar" + }, + "reader-settings": { + "enable-wakelock": "Keep screen on", + "battery": "Battery", + "time": "Time", + "page-indicator": "Page Indicator", + "battery-icon": "Battery Icon" }, "novel-settings": { "font-size": "Font size" diff --git a/lib/controllers/watch/comic_controller.dart b/lib/controllers/watch/comic_controller.dart index aa9d360c..518a39fb 100644 --- a/lib/controllers/watch/comic_controller.dart +++ b/lib/controllers/watch/comic_controller.dart @@ -50,10 +50,10 @@ class ComicController extends ReaderController { // 是否按下 ctrl Timer? _barreryTimer; final statusBarElement = { - 'reader-setting.battery'.i18n: true.obs, - 'reader-setting.time'.i18n: true.obs, - 'reader-setting.page-indicator'.i18n: true.obs, - 'reader-setting.battery-icon'.i18n: true.obs, + 'reader-settings.battery'.i18n: true.obs, + 'reader-settings.time'.i18n: true.obs, + 'reader-settings.page-indicator'.i18n: true.obs, + 'reader-settings.battery-icon'.i18n: true.obs, }; final isZoom = false.obs; final currentTime = "".obs; diff --git a/lib/views/pages/watch/reader/comic/comic_reader_content.dart b/lib/views/pages/watch/reader/comic/comic_reader_content.dart index 56f5d3b3..5a52c194 100644 --- a/lib/views/pages/watch/reader/comic/comic_reader_content.dart +++ b/lib/views/pages/watch/reader/comic/comic_reader_content.dart @@ -62,7 +62,7 @@ class _ComicReaderContentState extends State { Widget _indicatorBuilder() { return Obx(() => Row(mainAxisSize: MainAxisSize.min, children: [ - if (_c.statusBarElement["reader-setting.page-indicator".i18n]! + if (_c.statusBarElement["reader-settings.page-indicator".i18n]! .value) ...[ Text( "${_c.currentPage.value + 1}/${_c.watchData.value?.urls.length ?? 0}", @@ -70,8 +70,8 @@ class _ComicReaderContentState extends State { ), const SizedBox(width: 8) ], - if (_c - .statusBarElement["reader-setting.battery-icon".i18n]!.value) ...[ + if (_c.statusBarElement["reader-settings.battery-icon".i18n]! + .value) ...[ BasedBatteryIndicator( status: BasedBatteryStatus( value: _c.batteryLevel.value, @@ -84,14 +84,14 @@ class _ComicReaderContentState extends State { ), const SizedBox(width: 8) ], - if (_c.statusBarElement["reader-setting.battery".i18n]!.value) ...[ + if (_c.statusBarElement["reader-settings.battery".i18n]!.value) ...[ Text( "${_c.batteryLevel.value}%", style: const TextStyle(color: Colors.white, fontSize: 15), ), const SizedBox(width: 8) ], - if (_c.statusBarElement["reader-setting.time".i18n]!.value) ...[ + if (_c.statusBarElement["reader-settings.time".i18n]!.value) ...[ Text( _c.currentTime.value, style: const TextStyle(color: Colors.white, fontSize: 15), diff --git a/lib/views/pages/watch/reader/comic/comic_reader_settings.dart b/lib/views/pages/watch/reader/comic/comic_reader_settings.dart index ba7f7e03..fa4c471b 100644 --- a/lib/views/pages/watch/reader/comic/comic_reader_settings.dart +++ b/lib/views/pages/watch/reader/comic/comic_reader_settings.dart @@ -19,7 +19,6 @@ class ComicReaderSettings extends StatefulWidget { class _ComicReaderSettingsState extends State { late final ComicController _c = Get.find(tag: widget.tag); - Widget _buildAndroid(BuildContext context) { return Padding( padding: const EdgeInsets.all(16), @@ -67,19 +66,40 @@ class _ComicReaderSettingsState extends State { segments: [ ButtonSegment( value: Alignment.bottomLeft, - label: Text('comic-settings.bottomLeft'.i18n), + label: Column(children: [ + Text('comic-settings.bottomLeft'.i18n), + const SizedBox(height: 5), + Transform.rotate( + angle: -3.14, + child: const Icon(Icons.arrow_outward)) + ]), ), ButtonSegment( value: Alignment.bottomRight, - label: Text('comic-settings.rightLeft'.i18n), + label: Column(children: [ + Text('comic-settings.bottomRight'.i18n), + const SizedBox(height: 5), + Transform.rotate( + angle: 1.57, child: const Icon(Icons.arrow_outward)) + ]), ), ButtonSegment( value: Alignment.topLeft, - label: Text('comic-settings.topLeft'.i18n), + label: Column(children: [ + Text('comic-settings.topLeft'.i18n), + const SizedBox(height: 5), + Transform.rotate( + angle: -1.57, + child: const Icon(Icons.arrow_outward)) + ]), ), ButtonSegment( value: Alignment.topRight, - label: Text('comic-settings.topRight'.i18n), + label: Column(children: [ + Text('comic-settings.topRight'.i18n), + const SizedBox(height: 5), + const Icon(Icons.arrow_outward) + ]), ) ], selected: {_c.alignMode.value},