Skip to content

Commit

Permalink
feat: update init page
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Nov 16, 2024
1 parent ddd6f2e commit b1bdff0
Show file tree
Hide file tree
Showing 12 changed files with 251 additions and 191 deletions.
1 change: 1 addition & 0 deletions l10n_arb/intl_zh_CN.arb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"hide": "隐藏",
"add": "添加",
"requiredField": "必填",
"skipLoading": "跳过加载",

"durationJustNow": "刚刚",
"durationSeconds": "{number} 秒前",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/intl/messages_zh-CN.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ class MessageLookup extends MessageLookupByLibrary {
"serverSetup": MessageLookupByLibrary.simpleMessage("服务器设置"),
"settings": MessageLookupByLibrary.simpleMessage("设置"),
"showServerConfig": MessageLookupByLibrary.simpleMessage("查看服务器信息"),
"skipLoading": MessageLookupByLibrary.simpleMessage("跳过加载"),
"steamScanResultFinished": MessageLookupByLibrary.simpleMessage("扫描完成"),
"steamScanResultLibraryEmpty":
MessageLookupByLibrary.simpleMessage("Steam游戏库为空"),
Expand Down
10 changes: 10 additions & 0 deletions lib/l10n/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions lib/main_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:go_router/go_router.dart';
import 'bloc/deeplink_bloc.dart';
import 'bloc/main_bloc.dart';
import 'common/platform.dart';
import 'view/pages/server_select_overlay.dart';
import 'view/specialized/theme_mode_toggle.dart';
import 'view/specialized/title_bar.dart';

Expand All @@ -27,9 +26,7 @@ class MainWindow extends StatelessWidget {
maintainBottomViewPadding: true,
child: Stack(
children: [
ClipRect(
child: ServerSelectOverlay(child: child),
),
child,
const TitleBar(
actions: [ThemeModeToggle()],
),
Expand Down
27 changes: 13 additions & 14 deletions lib/route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class InitRoute extends GoRouteData {
const InitRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) =>
Page<void> buildPage(BuildContext context, GoRouterState state) =>
NoTransitionPage(
child: MainWindow(
key: mainWindowKey,
Expand All @@ -163,7 +163,7 @@ class WebLandingRoute extends GoRouteData {
const WebLandingRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) =>
Page<void> buildPage(BuildContext context, GoRouterState state) =>
NoTransitionPage(
child: MainWindow(
key: mainWindowKey,
Expand All @@ -180,8 +180,7 @@ class ImageViewerRoute extends GoRouteData {
final List<PicSwiperItem>? $extra;

@override
CustomTransitionPage<void> buildPage(
BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
return CustomTransitionPage(
fullscreenDialog: true,
opaque: false,
Expand Down Expand Up @@ -236,7 +235,7 @@ class ModuleRoute extends StatefulShellRouteData {
const ModuleRoute();

@override
NoTransitionPage<void> pageBuilder(
Page<void> pageBuilder(
BuildContext context,
GoRouterState state,
StatefulNavigationShell navigationShell,
Expand Down Expand Up @@ -275,7 +274,7 @@ class TipherethRootRoute extends GoRouteData {
const TipherethRootRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
context.read<TipherethBloc>().add(TipherethGetAccountsEvent());
return const NoTransitionPage(
child: ModuleFramePage(
Expand Down Expand Up @@ -308,7 +307,7 @@ class YesodFunctionRoute extends GoRouteData {
final dynamic $extra;

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
final yesodPages = {
YesodFunctions.recent: const YesodRecentPage(),
YesodFunctions.timeline: Container(),
Expand Down Expand Up @@ -397,7 +396,7 @@ class GeburaStoreRoute extends GoRouteData {
const GeburaStoreRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
return NoTransitionPage(
child: GeburaRoute.rootWidget(
child: const ModuleFramePage(
Expand All @@ -415,7 +414,7 @@ class GeburaLibraryRoute extends GoRouteData {
const GeburaLibraryRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
return NoTransitionPage(
child: GeburaRoute.rootWidget(
child: const ModuleFramePage(
Expand All @@ -441,7 +440,7 @@ class GeburaLibrarySettingsRoute extends GoRouteData {
final dynamic $extra;

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
final actions = {
GeburaLibrarySettingsActions.commonAppScanResult:
GeburaCommonAppScanResultPanel(
Expand Down Expand Up @@ -475,7 +474,7 @@ class GeburaLibraryDetailRoute extends GoRouteData {
final String uuid;

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
final actions = {
GeburaLibraryDetailActions.assignApp: const GeburaAssignAppPanel(),
};
Expand Down Expand Up @@ -504,7 +503,7 @@ class ChesedRootRoute extends GoRouteData {
const ChesedRootRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
context.read<ChesedBloc>().add(ChesedSearchImagesEvent(''));
return const NoTransitionPage(
child: ModuleFramePage(
Expand All @@ -525,7 +524,7 @@ class NotificationRootRoute extends GoRouteData {
const NotificationRootRoute();

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
context.read<NetzachBloc>().add(NetzachSystemNotificationLoadEvent(1));
return const NoTransitionPage(
child: ModuleFramePage(
Expand Down Expand Up @@ -558,7 +557,7 @@ class SettingsFunctionRoute extends GoRouteData {
final dynamic $extra;

@override
NoTransitionPage<void> buildPage(BuildContext context, GoRouterState state) {
Page<void> buildPage(BuildContext context, GoRouterState state) {
final settingsPages = {
SettingsFunctions.client: const ClientSettingPage(),
SettingsFunctions.session: const SessionManagePage(),
Expand Down
20 changes: 11 additions & 9 deletions lib/view/pages/gebura/gebura_nav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import '../../../bloc/gebura/gebura_bloc.dart';
import '../../../l10n/l10n.dart';
import '../../../model/gebura_model.dart';
import '../../../route.dart';
import '../../helper/connection.dart';
import '../../layout/overlapping_panels.dart';
import '../../universal/universal.dart';
import 'gebura_common.dart';
Expand All @@ -33,15 +34,16 @@ class GeburaNav extends StatelessWidget {
builder: (context, state) {
return Column(
children: [
UniversalListTile(
leading: Icon(UniversalUI.of(context).icons.shoppingCart),
onTap: () {
const GeburaStoreRoute().go(context);
OverlappingPanels.of(context)?.reveal(RevealSide.main);
},
title: Text(S.of(context).store),
selected: function == GeburaFunctions.store,
),
if (ConnectionHelper.isNotLocal(context))
UniversalListTile(
leading: Icon(UniversalUI.of(context).icons.shoppingCart),
onTap: () {
const GeburaStoreRoute().go(context);
OverlappingPanels.of(context)?.reveal(RevealSide.main);
},
title: Text(S.of(context).store),
selected: function == GeburaFunctions.store,
),
UniversalListTile(
leading: Icon(UniversalUI.of(context).icons.apps),
onTap: () {
Expand Down
Loading

0 comments on commit b1bdff0

Please sign in to comment.