-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c5621bc
Showing
33 changed files
with
1,653 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Snap | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
snap: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: snapcore/action-build@v1 | ||
id: snapcraft | ||
- uses: actions/upload-artifact@v3 | ||
if: github.event_name == 'workflow_dispatch' | ||
with: | ||
name: 'snap' | ||
path: ${{steps.snapcraft.outputs.snap}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
target | ||
*.snap | ||
|
||
# Flutter/Dart/Pub related | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
pubspec.lock | ||
pubspec_overrides.yaml | ||
build/ | ||
coverage/ | ||
*.g.dart | ||
*.freezed.dart | ||
*.mocks.dart | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flutter 3.24.0-stable |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Game Center | ||
|
||
Flutter app for system and game tweaks and information. | ||
|
||
## Development | ||
|
||
1. Install [Flutter](https://docs.flutter.dev/get-started/install/linux/desktop) | ||
and [Melos](https://melos.invertase.dev/~melos-latest/getting-started) | ||
2. Bootstrap the monorepo | ||
``` | ||
melos bootstrap | ||
``` | ||
3. Run the app | ||
``` | ||
cd packages/game_center | ||
flutter run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: game_center | ||
|
||
packages: | ||
- packages/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
**/ios/Flutter/.last_build_id | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Obfuscation related | ||
app.*.map.json | ||
|
||
# Android Studio will place build artifacts here | ||
/android/app/debug | ||
/android/app/profile | ||
/android/app/release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: "2e9cb0aa71a386a91f73f7088d115c0d96654829" | ||
channel: "stable" | ||
|
||
project_type: app | ||
|
||
# Tracks metadata for the flutter migrate command | ||
migration: | ||
platforms: | ||
- platform: root | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
- platform: android | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
- platform: ios | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
- platform: linux | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
- platform: macos | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
- platform: web | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
- platform: windows | ||
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829 | ||
|
||
# User provided section | ||
|
||
# List of Local paths (relative to this file) that should be | ||
# ignored by the migrate tool. | ||
# | ||
# Files that are not part of the templates will be ignored by default. | ||
unmanaged_files: | ||
- 'lib/main.dart' | ||
- 'ios/Runner.xcodeproj/project.pbxproj' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# game_center |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include: package:ubuntu_lints/analysis_options.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
arb-dir: lib/l10n | ||
template-arb-file: app_en.arb | ||
output-localization-file: app_localizations.dart | ||
nullable-getter: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
|
||
class AboutPage extends StatelessWidget { | ||
const AboutPage({super.key}); | ||
|
||
static IconData icon(bool selected) => | ||
selected ? YaruIcons.information_filled : YaruIcons.information; | ||
static String label(BuildContext context) => | ||
AppLocalizations.of(context).aboutPageLabel; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final l10n = AppLocalizations.of(context); | ||
|
||
return Center( | ||
child: Text(l10n.aboutPageLabel), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:game_center/app/app_pages.dart'; | ||
import 'package:ubuntu_localizations/ubuntu_localizations.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
|
||
class App extends StatelessWidget { | ||
const App({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return YaruTheme( | ||
builder: (context, yaru, child) => MaterialApp( | ||
theme: yaru.theme, | ||
darkTheme: yaru.darkTheme, | ||
highContrastTheme: yaruHighContrastLight, | ||
highContrastDarkTheme: yaruHighContrastDark, | ||
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[ | ||
...AppLocalizations.localizationsDelegates, | ||
...GlobalUbuntuLocalizations.delegates, | ||
], | ||
supportedLocales: AppLocalizations.supportedLocales, | ||
home: const _AppFrame(), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _AppFrame extends StatelessWidget { | ||
const _AppFrame(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final l10n = AppLocalizations.of(context); | ||
YaruWindow.of(context).setTitle(l10n.appTitle); | ||
|
||
return Scaffold( | ||
appBar: _TitleBar( | ||
title: Text(l10n.appTitle), | ||
), | ||
body: YaruMasterDetailPage( | ||
length: pages.length, | ||
tileBuilder: (context, index, selected, availableWidth) => | ||
pages[index].titleBuilder(context, selected), | ||
pageBuilder: (context, index) => pages[index].pageBuilder(context), | ||
layoutDelegate: const YaruMasterFixedPaneDelegate( | ||
paneWidth: 164, | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _TitleBar extends StatelessWidget implements PreferredSizeWidget { | ||
const _TitleBar({required this.title}); | ||
|
||
final Widget title; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return YaruWindowTitleBar( | ||
title: title, | ||
); | ||
} | ||
|
||
@override | ||
Size get preferredSize => const Size(0, kYaruTitleBarHeight); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:game_center/about/about_page.dart'; | ||
import 'package:game_center/launcher/launcher_page.dart'; | ||
import 'package:game_center/settings/settings_page.dart'; | ||
import 'package:game_center/steam/steam_page.dart'; | ||
import 'package:game_center/system/system_page.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
|
||
typedef AppPage = ({ | ||
Widget Function(BuildContext context, bool selected) titleBuilder, | ||
WidgetBuilder pageBuilder, | ||
}); | ||
|
||
final pages = <AppPage>[ | ||
( | ||
titleBuilder: (context, selected) => YaruMasterTile( | ||
leading: Icon(LauncherPage.icon(selected)), | ||
title: Text(LauncherPage.label(context)), | ||
), | ||
pageBuilder: (_) => const YaruDetailPage( | ||
body: LauncherPage(), | ||
), | ||
), | ||
( | ||
titleBuilder: (context, selected) => YaruMasterTile( | ||
leading: Icon(SteamPage.icon(selected)), | ||
title: Text(SteamPage.label(context)), | ||
), | ||
pageBuilder: (_) => const YaruDetailPage( | ||
body: SteamPage(), | ||
), | ||
), | ||
( | ||
titleBuilder: (context, selected) => YaruMasterTile( | ||
leading: Icon(SystemPage.icon(selected)), | ||
title: Text(SystemPage.label(context)), | ||
), | ||
pageBuilder: (_) => const YaruDetailPage( | ||
body: SystemPage(), | ||
), | ||
), | ||
( | ||
titleBuilder: (context, selected) => YaruMasterTile( | ||
leading: Icon(SettingsPage.icon(selected)), | ||
title: Text(SettingsPage.label(context)), | ||
), | ||
pageBuilder: (_) => const YaruDetailPage( | ||
body: SettingsPage(), | ||
), | ||
), | ||
( | ||
titleBuilder: (context, selected) => YaruMasterTile( | ||
leading: Icon(AboutPage.icon(selected)), | ||
title: Text(AboutPage.label(context)), | ||
), | ||
pageBuilder: (_) => const YaruDetailPage( | ||
body: AboutPage(), | ||
), | ||
), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"@@locale": "en", | ||
"appTitle": "Game Center", | ||
|
||
"aboutPageLabel": "About", | ||
|
||
"launcherPageLabel": "Apps", | ||
|
||
"steamPageLabel": "Steam", | ||
|
||
"settingsPageLabel": "Settings", | ||
|
||
"systemPageLabel": "System" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
|
||
class LauncherPage extends StatelessWidget { | ||
const LauncherPage({super.key}); | ||
|
||
static IconData icon(bool selected) => | ||
selected ? YaruIcons.folder_open_filled : YaruIcons.folder; | ||
static String label(BuildContext context) => | ||
AppLocalizations.of(context).launcherPageLabel; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final l10n = AppLocalizations.of(context); | ||
|
||
return Center( | ||
child: Text(l10n.launcherPageLabel), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:game_center/app/app.dart'; | ||
import 'package:ubuntu_localizations/ubuntu_localizations.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
|
||
Future<void> main() async { | ||
await initDefaultLocale(); | ||
await YaruWindowTitleBar.ensureInitialized(); | ||
|
||
runApp(const App()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
|
||
class SettingsPage extends StatelessWidget { | ||
const SettingsPage({super.key}); | ||
|
||
static IconData icon(bool selected) => | ||
selected ? YaruIcons.settings_filled : YaruIcons.settings; | ||
static String label(BuildContext context) => | ||
AppLocalizations.of(context).settingsPageLabel; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final l10n = AppLocalizations.of(context); | ||
|
||
return Center( | ||
child: Text(l10n.settingsPageLabel), | ||
); | ||
} | ||
} |
Oops, something went wrong.