Gitea CI / Check code and tests (push) Successful in 6m37s
Gitea CI / Build Windows x64 app (push) Successful in 3m18s
Gitea CI / Build Android APK (push) Successful in 3m47s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m7s
Gitea CI / Assemble and validate CI artifacts (push) Successful in 50s
Gitea CI / Gitea CI passed (push) Successful in 2s
Gitea Release / Prepare draft Release (push) Successful in 9s
Gitea Release / Upload Android to draft Release (push) Successful in 16s
Gitea Release / Upload Windows to draft Release (push) Successful in 22s
Gitea Release / Verify and publish Release (push) Successful in 14s
60 lines
1.8 KiB
Dart
60 lines
1.8 KiB
Dart
import 'package:cutdex_ui/icons.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../l10n/l10n.dart';
|
|
|
|
import '../../workspace/workspace_mode.dart';
|
|
import 'workspace_frame.dart';
|
|
|
|
/// A focused surface; hidden features keep their state in workspace controllers.
|
|
class PhoneWorkspaceShell extends StatelessWidget {
|
|
const PhoneWorkspaceShell({
|
|
super.key,
|
|
required this.mode,
|
|
required this.onModeChanged,
|
|
required this.navigation,
|
|
required this.headerActions,
|
|
required this.title,
|
|
required this.integratedTitlebar,
|
|
required this.agent,
|
|
required this.editor,
|
|
});
|
|
|
|
final WorkspaceMode mode;
|
|
final ValueChanged<WorkspaceMode> onModeChanged;
|
|
final Widget navigation;
|
|
final Widget headerActions;
|
|
final String title;
|
|
final bool integratedTitlebar;
|
|
final Widget agent;
|
|
final Widget editor;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => WorkspaceFrame(
|
|
key: const Key('phone-workspace-shell'),
|
|
navigation: navigation,
|
|
headerActions: headerActions,
|
|
title: title,
|
|
integratedTitlebar: integratedTitlebar,
|
|
bottomNavigationBar: NavigationBar(
|
|
height: 64,
|
|
selectedIndex: mode == WorkspaceMode.agent ? 0 : 1,
|
|
onDestinationSelected: (index) =>
|
|
onModeChanged(index == 0 ? WorkspaceMode.agent : WorkspaceMode.cut),
|
|
destinations: [
|
|
NavigationDestination(
|
|
key: const Key('workspace-agent-destination'),
|
|
icon: const Icon(AppIcons.chat),
|
|
label: context.l10n.workspaceAgent,
|
|
),
|
|
NavigationDestination(
|
|
key: const Key('workspace-cut-destination'),
|
|
icon: const Icon(AppIcons.video),
|
|
label: context.l10n.workspaceCut,
|
|
),
|
|
],
|
|
),
|
|
child: mode == WorkspaceMode.agent ? agent : editor,
|
|
);
|
|
}
|