Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
JGeek00 committed Oct 4, 2023
2 parents c909db3 + f5b2533 commit 832f349
Show file tree
Hide file tree
Showing 13 changed files with 368 additions and 27 deletions.
1 change: 1 addition & 0 deletions lib/functions/refresh_server_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Future refreshServerStatus(BuildContext context) async {
final result = await realtimeStatus(
serversProvider.selectedServer!
);
if (!context.mounted) return;
if (result['result'] == "success") {
serversProvider.updateselectedServerStatus(
result['data'].status == 'enabled' ? true : false
Expand Down
1 change: 1 addition & 0 deletions lib/functions/server_management.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void disableServer(int time, BuildContext context) async {
time
);
process.close();
if (!context.mounted) return;
if (result['result'] == 'success') {
serversProvider.updateselectedServerStatus(false);
showSnackBar(
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,4 @@
"unlockWithFingerprint": "Unlock the app with your fingerprint",
"fingerprintAuthUnavailableAttempts": "Fingerprint authentication unavailable due to many failed attempts.",
"fingerprintAuthUnavailable": "Fingerprint authentication unavailable."
}
}
321 changes: 321 additions & 0 deletions lib/l10n/app_pl.arb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ class _DroidHoleState extends State<DroidHole> {
supportedLocales: const [
Locale('en', ''),
Locale('es', ''),
Locale('de', '')
Locale('de', ''),
Locale('pl', ''),
],
scaffoldMessengerKey: scaffoldMessengerKey,
builder: (context, child) {
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/home/clients_last_hours.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class ClientsLastHours extends StatelessWidget {
}) : super(key: key);

LineChartData mainData(Map<String, dynamic> data, ThemeMode selectedTheme) {
final interval = (data['topPoint']/5).toDouble() > 0
final double interval = (data['topPoint']/5).toDouble() > 0
? (data['topPoint']/5).toDouble()
: data['topPoint'].toDouble() > 0
? data['topPoint'].toDouble()
: 1;
: 1.0;
return LineChartData(
gridData: FlGridData(
show: true,
Expand Down
44 changes: 24 additions & 20 deletions lib/screens/home/home_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,31 @@ class HomeTile extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
label,
textAlign: TextAlign.end,
style: const TextStyle(
color: Colors.white,
fontSize: 14
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Flexible(
child: Text(
label,
textAlign: TextAlign.end,
style: const TextStyle(
color: Colors.white,
fontSize: 14
),
),
),
),
Text(
value,
style: const TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.w500
),
)
],
Text(
value,
style: const TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.w500
),
)
],
),
),
],
),
Expand Down
7 changes: 6 additions & 1 deletion lib/screens/home/queries_last_hours.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ class QueriesLastHours extends StatelessWidget {
}) : super(key: key);

LineChartData mainData(Map<String, dynamic> data, ThemeMode selectedTheme) {
final double interval = (data['topPoint']/5).toDouble() > 0
? (data['topPoint']/5).toDouble()
: data['topPoint'].toDouble() > 0
? data['topPoint'].toDouble()
: 1.0;
return LineChartData(
gridData: FlGridData(
show: true,
drawVerticalLine: false,
horizontalInterval: (data['topPoint']/5).toDouble(),
horizontalInterval: interval,
getDrawingHorizontalLine: (value) => FlLine(
color: selectedTheme == ThemeMode.light
? Colors.black12
Expand Down
1 change: 1 addition & 0 deletions lib/screens/logs/logs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ class _LogsState extends State<Logs> {
loading.close();
if (result['result'] == 'success') {
if (result['data']['message'].toString().contains('Added')) {
if (!mounted) return;
showSnackBar(
appConfigProvider: appConfigProvider,
label: list == 'white'
Expand Down
1 change: 1 addition & 0 deletions lib/screens/unlock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class _UnlockState extends State<Unlock> {
AppLock.of(context)!.didUnlock();
}
} catch (e) {
if (!mounted) return;
if (e.toString().contains('LockedOut')) {
showSnackBar(
appConfigProvider: appConfigProvider,
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/start_warning_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class ImportantInfoModal extends StatelessWidget {
Container(
width: double.maxFinite,
margin: const EdgeInsets.only(top: 10),
child: Column(
child: const Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: const [
children: [
Text("Pi-hole: v5.12+"),
SizedBox(height: 5),
Text("Web interface: v5.14.2+")
Expand Down
1 change: 1 addition & 0 deletions windows/innosetup_installer_builder.iss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Source: "..\build\windows\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\runner\Release\dynamic_color_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\runner\Release\local_auth_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\runner\Release\permission_handler_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\runner\Release\sentry_flutter_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\build\windows\runner\Release\sqlite3.dll"; DestDir: "{app}"; Flags: ignoreversion
Expand Down
5 changes: 5 additions & 0 deletions windows/runner/flutter_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ bool FlutterWindow::OnCreate() {
this->Show();
});

// Flutter can complete the first frame before the "show window" callback is
// registered. The following call ensures a frame is pending to ensure the
// window is shown. It is a no-op if the first frame hasn't completed yet.
flutter_controller_->ForceRedraw();

return true;
}

Expand Down

0 comments on commit 832f349

Please sign in to comment.