Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified android/app/src/main/res/drawable-hdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxxhdpi/ic_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-ldpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<color name="ic_launcher_background">#000000</color>
</resources>
<color name="ic_launcher_background">#0B1214</color>
</resources>
Binary file removed assets/icons/aternos.png
Binary file not shown.
Binary file removed assets/images/feature.png
Binary file not shown.
Binary file modified assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/players.png
Diff not rendered.
Binary file removed assets/images/skin.png
Diff not rendered.
Binary file removed assets/images/splash.png
Diff not rendered.
Binary file removed assets/images/tracker.png
Diff not rendered.
Binary file removed assets/images/tunnel.png
Diff not rendered.
2 changes: 2 additions & 0 deletions ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>15.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '13.0'
platform :ios, '15.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,6 @@ SPEC CHECKSUMS:
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556

PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e
PODFILE CHECKSUM: 53a6aebc29ccee84c41f92f409fc20cd4ca011f1

COCOAPODS: 1.16.2
138 changes: 69 additions & 69 deletions ios/Runner.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

32 changes: 15 additions & 17 deletions lib/constants/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,22 @@ class AppConstants {

static const String regionHeader = 'X-Region';

static const relayServers = [
{
'name': 'EU Server',
'ip': '152.53.93.178',
'base': 'https://eubackend.mccompanion.net',
'region': 'eu',
},
{
'name': 'US Server',
'ip': '217.77.15.138',
'base': 'https://usbackend.mccompanion.net',
'region': 'us',
},
];
static const relayServers = [
{
'name': 'EU Server',
'ip': '152.53.93.178',
'base': 'https://eubackend.mccompanion.net',
'region': 'eu',
},
{
'name': 'US Server',
'ip': '217.77.15.138',
'base': 'https://usbackend.mccompanion.net',
'region': 'us',
},
];

static const Duration serverRotationDuration = Duration(seconds: 5);
static const Duration animationDuration = Duration(milliseconds: 300);
static const Duration progressUpdateInterval = Duration(milliseconds: 50);

static const int maxLogEntries = 1000;
}
}
7 changes: 7 additions & 0 deletions lib/design/design.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export 'ds_button.dart';
export 'ds_control.dart';
export 'ds_screen.dart';
export 'ds_scroll.dart';
export 'ds_surface.dart';
export 'ds_tile.dart';
export 'ds_tokens.dart';
174 changes: 174 additions & 0 deletions lib/design/ds_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
import 'package:flutter/material.dart';

import 'ds_tokens.dart';

enum DsButtonTone { accent, neutral, quiet, danger }

enum DsButtonSize { small, medium, large }

class DsButton extends StatelessWidget {
final String label;
final VoidCallback? onPressed;
final IconData? icon;
final DsButtonTone tone;
final DsButtonSize size;
final bool expand;
final bool busy;
final Color? accent;

const DsButton({
super.key,
required this.label,
required this.onPressed,
this.icon,
this.tone = DsButtonTone.accent,
this.size = DsButtonSize.medium,
this.expand = false,
this.busy = false,
this.accent,
});

double get _height => switch (size) {
DsButtonSize.small => 36,
DsButtonSize.medium => 46,
DsButtonSize.large => 54,
};

double get _fontSize => switch (size) {
DsButtonSize.small => 13,
DsButtonSize.medium => 14.5,
DsButtonSize.large => 15.5,
};

@override
Widget build(BuildContext context) {
final enabled = onPressed != null && !busy;
final tint = accent ?? DsColor.accent;

final Color background;
final Color foreground;
final BoxBorder? border;

switch (tone) {
case DsButtonTone.accent:
background = enabled ? tint : DsColor.surfaceQuiet;
foreground = enabled ? DsColor.onAccent : DsColor.textDisabled;
border = enabled ? null : Border.all(color: DsColor.line);
case DsButtonTone.neutral:
background = DsColor.surfaceQuiet;
foreground = enabled ? DsColor.text : DsColor.textDisabled;
border = Border.all(color: DsColor.line);
case DsButtonTone.quiet:
background = Colors.transparent;
foreground = enabled ? DsColor.textSoft : DsColor.textDisabled;
border = null;
case DsButtonTone.danger:
background = DsColor.danger.withValues(alpha: enabled ? 0.16 : 0.08);
foreground = enabled ? DsColor.danger : DsColor.textDisabled;
border = Border.all(
color: DsColor.danger.withValues(alpha: enabled ? 0.45 : 0.18),
);
}

final child = busy
? SizedBox(
width: 18,
height: 18,
child: CircularProgressIndicator(strokeWidth: 2, color: foreground),
)
: Row(
mainAxisSize: expand ? MainAxisSize.max : MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null) ...[
Icon(icon, size: _fontSize + 4, color: foreground),
const SizedBox(width: DsSpace.sm),
],
Flexible(
child: Text(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: foreground,
fontSize: _fontSize,
fontWeight: FontWeight.w600,
letterSpacing: -0.1,
),
),
),
],
);

return Semantics(
button: true,
enabled: enabled,
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: enabled ? onPressed : null,
borderRadius: DsRadius.controlR,
child: AnimatedContainer(
duration: DsDuration.fast,
height: _height,
padding: const EdgeInsets.symmetric(horizontal: DsSpace.lg),
alignment: Alignment.center,
decoration: BoxDecoration(
color: background,
borderRadius: DsRadius.controlR,
border: border,
),
child: child,
),
),
),
);
}
}

class DsIconButton extends StatelessWidget {
final IconData icon;
final VoidCallback? onPressed;
final String? tooltip;
final Color? color;
final double size;

const DsIconButton({
super.key,
required this.icon,
required this.onPressed,
this.tooltip,
this.color,
this.size = 40,
});

@override
Widget build(BuildContext context) {
final enabled = onPressed != null;
final button = Material(
color: Colors.transparent,
child: InkWell(
onTap: onPressed,
borderRadius: DsRadius.controlR,
child: Container(
width: size,
height: size,
alignment: Alignment.center,
decoration: BoxDecoration(
color: DsColor.surfaceQuiet,
borderRadius: DsRadius.controlR,
border: Border.all(color: DsColor.line),
),
child: Icon(
icon,
size: size * 0.45,
color: enabled ? (color ?? DsColor.textSoft) : DsColor.textDisabled,
),
),
),
);

if (tooltip == null) return button;
return Tooltip(message: tooltip!, child: button);
}
}
Loading