Commit Graph

2270 Commits

Author SHA1 Message Date
Leptopoda-GitHub 5878fadcc0 add feedback localizations fixes #357
I'm not that happy with the way this is implemented and that it isn't integrated into our localization workflow...

this is a quick fix and something cleaner will come later
2021-10-31 07:23:28 +08:00
Leptopoda-GitHub 6a39abda75
fix translation instructions 2021-10-30 21:02:07 +02:00
Leptopoda-GitHub 233bf10694
fix drawer icon color
the drawer icon will now follow the nearest IconThemeData. Only the gamePage nad helPage do override them.

cleanup code
2021-10-30 20:49:47 +02:00
Leptopoda-GitHub f993e975fe better utilize flutter_gen 2021-10-31 01:05:31 +08:00
Leptopoda-GitHub a2c414f89a fix some toolbar color fixes #328 2021-10-31 00:34:02 +08:00
Leptopoda-GitHub 2523e52c82 fix game page allignment 2021-10-31 00:30:09 +08:00
Leptopoda 1315f2eb0c fix some drawer stuff fixes #358 and fixes #351 2021-10-31 00:30:09 +08:00
Nikolas Rimikis ec9ec27c05
Clean up dead code (#363)
* Clean up dead code

We had a lot of old code-behind comments. 
I've removed them for better readability of the code and easier maintenance.
(when searching stiff in the code, it sometimes brings you to dead code ...)

Also, the methods on the gamePage observing the routes does only log "/" 
as we don't use namedRoutes.

* Update position.dart

Co-authored-by: Calcitem <calcitem@outlook.com>
2021-10-31 00:22:24 +08:00
Calcitem 3bad4f0942 android: Support compiling to Android 12
* Change compileSdkVersion and targetSdkVersion to 31.
* Declare on the Manifest with exported:true for MainActivity.

Reference:
https://medium.com/androiddevelopers/lets-be-explicit-about-our-intent-filters-c5dbe2dbdce0
https://cafonsomota.medium.com/android-12-dont-forget-to-set-android-exported-on-your-activities-services-and-receivers-3bee33f37beb
https://developer.android.com/guide/topics/manifest/activity-element#exported
2021-10-30 23:06:15 +08:00
Calcitem 86d7638e61
Fix some typos in Readme.md 2021-10-30 13:41:48 +08:00
Calcitem 615047f872
Merge remote-tracking branch 'origin/dev' 2021-10-30 13:07:19 +08:00
Calcitem bd2d123225
l10n: Fix exception when switching to Norsk
Exception:

exception = {FlutterError} No MaterialLocalizations found.
  AlertDialog widgets require MaterialLocalizations to be provided by a Localizations widget ances
context = {StatelessElement} AlertDialog(dirty, dependencies:
  [MediaQuery, _LocalizationsScope-[GlobalKey#5646e], Directionality, _InheritedTheme])

Reference:
https://blog.csdn.net/wangyajuncsd/article/details/106930365
https://github.com/flutter/flutter/blob/master/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart Line 18605
2021-10-30 12:57:59 +08:00
Calcitem 2a3afa625a
ci: Create dart-analyze.yml
See: https://github.com/ValentinVignal/action-dart-analyze
2021-10-30 09:03:05 +08:00
Leptopoda 2e48f98f2a
fix some localizations fixes #352 also fixes #342
fix betterFeedback localization
2021-10-28 12:42:01 +02:00
Leptopoda 61d980add2 cleanup constants 2021-10-26 10:33:34 +02:00
Leptopoda ed85908834 better null safety 2021-10-26 10:33:34 +02:00
Leptopoda bc915c7d53 unify logging tags
- make tags constant
- make tags private
2021-10-26 10:33:34 +02:00
Leptopoda 4525953b33 rewrite drawer fixes #316
rewrites the drawer from scratch

add drawer shaddow
2021-10-26 07:31:08 +08:00
Calcitem 9e6e6a6ac7
flutter: windows: Fix build error because of disabling warning 4996 2021-10-25 01:45:28 +08:00
Calcitem 77254675e1
qt: Change saved filename' format
Change from currentDateTime.toTime_t to currentDateTime
2021-10-24 19:43:39 +08:00
Calcitem d5d3758dce
qt: Fix GCC build error about QAction and QActionGroup
error: invalid use of incomplete type 'class QAction'
error: invalid use of incomplete type 'class QActionGroup'
2021-10-24 19:43:39 +08:00
Calcitem 0f77c59319
qt: Replace QSound with QSoundEffect 2021-10-24 19:43:38 +08:00
Calcitem 281f2b832b
qt: Replace QApplication::desktop() with QGuiApplication::primaryScreen()->geometry() 2021-10-24 19:43:38 +08:00
Calcitem f1f3514fae
qt: Disable NET_FIGHT_SUPPORT
Because QNetworkConfigurationManager, QNetworkConfiguration and QNetworkSession
are deprecated, to be removed in Qt 6.
2021-10-24 19:43:18 +08:00
Calcitem 472b184566
qt: Fix build warning 'QFlags<Qt::MouseButton>::QFlags'
Use default constructor instead.
2021-10-24 19:42:43 +08:00
Calcitem 240dca3c5b
qt: Replace QMatrix with QTransform
To Fix Warning	C4996	'QGraphicsView::setMatrix': Use setTransform()
2021-10-24 19:40:26 +08:00
Calcitem ae5e403be1
qt: Replace Qt::endl to "\n"
To fix Qt 5.12 MinGW build error.
2021-10-24 19:40:26 +08:00
Calcitem 5504f9120d
qt: Relpace endl by Qt::endl 2021-10-24 19:40:25 +08:00
Calcitem 57d1aff863
win32: Remove disabling warning 4996 2021-10-24 19:40:25 +08:00
Calcitem 8ff8d5808b
windows: Enable windows desktop in flutter-windows-init.sh 2021-10-23 14:16:00 +08:00
Calcitem d382d84817
msvc: Upgrade to Qt 5.15.2 2021-10-23 11:29:28 +08:00
Nikolas Rimikis b19c6354e3
Merge pull request #336 from calcitem/enviornment_config
add compile time enviornment options
2021-10-22 14:51:56 +02:00
Leptopoda a0f234bf47
add compile time enviornment options
## Why?
- in the future we could enable the developer options in dev builds only. This would result in better performance and smaller downloadsize.
- Ability to disable catcher. Catcher limits the ability of debuging as it catches everything thrown. Also catcher won't even display the crash when the system is in dark mode (white text on white background. Probably a bug on theier side)

## How to use this?
just add a `--dart-define` followed by your config after the flutter command. Further info can be found in [Readme.md](/Readme.md)
2021-10-22 14:47:17 +02:00
Leptopoda bffda2b816
check initialisation of audio fixes #326
Although not a problem in production there was an error when hot reloading  or using hot restart.

we now ckeck the initialisation of the autio service
2021-10-19 12:24:20 +02:00
Leptopoda 4d53769dca
fix code style fixes #335
- renames snackbar.dart
- fixes a wrong log
2021-10-19 10:44:38 +02:00
Nikolas Rimikis 965e66e43b
Merge pull request #333 from calcitem/license_page
use showLicensePage fixes #324
2021-10-18 15:22:33 +02:00
Leptopoda 8459d36ff1
use showLicensePage fixes #324
- migrate the `open source license page`to `showLicensePage()`
- deactivate unused buildrunner

## Why?
this method is flutter internal. This means less code to maintain and less issues to make (see the one this fixes).

## What changes?
- a bit of UI (the new page will have a master detail view on large screens helping accessibility)
- we don't need to pre generate the licenses manually
2021-10-18 15:10:53 +02:00
Leptopoda b00e982480
Merge branch 'l10n' into dev 2021-10-18 13:35:23 +02:00
Leptopoda 399250df9d
migrate l10n
Restyled by shellharden

Restyled by shfmt

Restyled by whitespace

fix ci
2021-10-18 13:33:11 +02:00
Leptopoda 150fd7215a
Merge branch 'config_rework' into dev 2021-10-18 11:34:23 +02:00
Leptopoda dc19874ee7
remove unused code 2021-10-18 11:28:22 +02:00
Leptopoda e93f62b455
reactive storage and db migration
- make new storage reactive
- add Database Migrator

change how the developerMode reacts
2021-10-18 11:28:11 +02:00
Leptopoda 21702f568f
fix file naming convention (fixes #325) 2021-10-17 18:27:28 +02:00
Calcitem 529ac8b493
.gitignore: Ignore all jks files 2021-10-17 10:23:39 +08:00
Calcitem 98244e0a04
lint: Fix invariant booleans
info: Conditions should not unconditionally evaluate to `true` or
to `false`. verify: pieceToRemoveCount <= 0.
(invariant_booleans at [sanmill] lib/mill/position.dart:675)
2021-10-16 13:35:02 +08:00
Calcitem 8d2afa2a5d
lint: Fix invalid assignment
Fix error: A value of type 'dynamic' can't be assigned to a variable
of type 'int'.
(invalid_assignment at [sanmill] lib/shared/picker.dart:76)
2021-10-16 13:32:41 +08:00
Calcitem 4df5dcd96d
build: Support Flutter 2.5.3 2021-10-16 12:06:04 +08:00
Calcitem f3a77965cb
build: Support Flutter 2.5.2 2021-10-16 11:26:20 +08:00
Leptopoda ef2b888410
initial database migration
- removed `shared/common/`
- implemented new data models for the settings
- implemented a new `LocalDatabaseService`

Why:
The new code will allow use to better utilize flutter's ractivenes. `HiveDB` (our new database backend) will give us `ValueListenable`, `Streams` and real time storage access. The sriliazation for the models is  generated by `build_runner` and even the old seriliazation for the storage migration is generated (json_serializable).

TODO:
- implement reactivenes. We currently don't utilize this functionality to it's full potential (`Consumer`) :)
- implement migration. The migration service for the old database service isn't there yet.
2021-10-15 18:40:50 +02:00
Leptopoda 16a4e3dc44
make constants constant :) 2021-10-14 16:29:39 +02:00