Skip to content

Commit 6955728

Browse files
authored
🚀 v1.0.0+6 released.
V1.0.0+6 source
2 parents 74ce86e + 5021265 commit 6955728

35 files changed

+543
-221
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## v1.0.0+6
2+
3+
- **NEW** Dark Theme
4+
- **NEW** LAF of the entire app
5+
- App Picker Dialog can be optionally kept open.
6+
- Reload Manager from Disk
7+
- Pretty Write Configurations
8+
- Option to keep launcher Alive After Workspace Launch
9+
- Option to specify which workspace should be switched to after launch completes.
10+
111
## v1.0.0+5
212

313
- Added App Support Method (Buy Me a Coffee).

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ Here comes App Fleet,
5252
If you have really liked the project and want to support the development of App Fleet.
5353
Then, please consider buying me a coffee.
5454

55-
<div>
56-
<img src="github/images/qr-code.png" alt="GitHub Banner" width="350">
57-
</div>
55+
It helps me to work on the project in my free time.
5856

59-
Scan this Qr Code or <br>
57+
Scan this [**Qr Code**](github/images/qr-code.png) or <br>
6058

6159
Click the button below to Buy Me a Coffee.
6260

assets/themes/dark.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"background": "0xFF191A1E",
33
"foreground": "0xFFFFFFFF",
44
"window-drop-shadow": "0x661E1E1E",
5-
"dialog-drop-shadow": "0x1A9E9E9E",
5+
"dialog-drop-shadow": "0x66000000",
66
"create-button-border-color": "0xFF448AFF",
77
"create-button-background": "0x33448AFF",
88
"create-button-foreground": "0xFF2196F3",
@@ -30,13 +30,13 @@
3030
"app-tile-foreground": "0xFFFFFFFF",
3131
"app-tile-background": "0xFF9E9E9E",
3232
"app-workspace-indicator-foreground": "0xFFFFFFFF",
33-
"app-workspace-indicator-background": "0xFF69F0AE",
33+
"app-workspace-indicator-background": "0xFF305EAD",
3434
"selected-workspace-indicator-foreground": "0xFFFFFFFF",
35-
"selected-workspace-indicator-background": "0xFF69F0AE",
35+
"selected-workspace-indicator-background": "0xFF47A376",
3636
"unselected-workspace-indicator-foreground": "0xFFFFFFFF",
37-
"unselected-workspace-indicator-background": "0xFF448AFF",
37+
"unselected-workspace-indicator-background": "0xFF305EAD",
3838
"workspace-dialog-background": "0xFF1E1E1E",
39-
"workspace-dialog-drop-shadow-color": "0x669E9E9E",
39+
"workspace-dialog-drop-shadow-color": "0x66000000",
4040
"config-label-foreground": "0xFFB9B9B9",
4141
"config-label-background": "0xFF2E2E2E",
4242
"save-label-background": "0xFF448AFF",

lib/app/config/domain/workspace_entity.dart

+17-4
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,33 @@ import 'package:app_fleet/utils/utils.dart';
55
class WorkspaceEntity {
66
late String name;
77
late String iconPath;
8-
Set<App> apps = {};
8+
int defaultWorkspace; // Since v1.0.0+6
9+
Set<App> apps;
910

1011
WorkspaceEntity({
1112
required this.name,
1213
required this.iconPath,
14+
int? defaultWorkspace,
1315
Set<App>? applications,
14-
}) : apps = applications ?? {};
16+
}) : apps = applications ?? {},
17+
defaultWorkspace = defaultWorkspace ?? -1;
1518

1619
WorkspaceEntity.clone(
1720
WorkspaceEntity entity, {
1821
String? name,
1922
String? iconPath,
23+
int? defaultWorkspace,
2024
Set<App>? applications,
2125
}) : name = name ?? entity.name,
2226
iconPath = iconPath ?? entity.iconPath,
27+
defaultWorkspace = defaultWorkspace ?? entity.defaultWorkspace,
2328
apps = (applications != null ? {...applications} : {...entity.apps});
2429

2530
Map<String, dynamic> toMap() {
2631
return {
2732
StorageKeys.nameKey: name,
2833
StorageKeys.iconPathKey: iconPath,
34+
StorageKeys.defaultWorkspaceKey: defaultWorkspace,
2935
StorageKeys.appsKey: apps.map((e) => e.toMap()).toList(),
3036
};
3137
}
@@ -47,6 +53,7 @@ class WorkspaceEntity {
4753
return WorkspaceEntity(
4854
name: data[StorageKeys.nameKey],
4955
iconPath: data[StorageKeys.iconPathKey],
56+
defaultWorkspace: data[StorageKeys.defaultWorkspaceKey],
5057
applications: apps.toSet(),
5158
);
5259
}
@@ -55,7 +62,9 @@ class WorkspaceEntity {
5562
bool operator ==(Object other) {
5663
if (other.runtimeType == WorkspaceEntity) {
5764
other = other as WorkspaceEntity;
58-
if (name == other.name && iconPath == other.iconPath) {
65+
if (name == other.name &&
66+
iconPath == other.iconPath &&
67+
defaultWorkspace == other.defaultWorkspace) {
5968
if (apps.length != other.apps.length) {
6069
return false;
6170
}
@@ -76,7 +85,11 @@ class WorkspaceEntity {
7685

7786
@override
7887
int get hashCode =>
79-
super.hashCode ^ name.hashCode ^ iconPath.hashCode ^ apps.hashCode;
88+
super.hashCode ^
89+
name.hashCode ^
90+
iconPath.hashCode ^
91+
defaultWorkspace.hashCode ^
92+
apps.hashCode;
8093
}
8194

8295
class App {

lib/app/config/presentation/config_controller.dart

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import 'package:app_fleet/app/config/presentation/config_state_machine.dart';
66
import 'package:app_fleet/constants/request_status.dart';
77
import 'package:app_fleet/core/dependency_manager.dart';
88
import 'package:app_fleet/core/route_service.dart';
9+
import 'package:app_fleet/utils/utils.dart';
10+
import 'package:url_launcher/url_launcher_string.dart';
911

1012
class ConfigController {
1113
final VoidCallback _onRebuildRequested;
@@ -34,6 +36,11 @@ class ConfigController {
3436
}
3537
}
3638

39+
void openInDesktop(WorkspaceEntity workspaceEntity) {
40+
launchUrlString(getWorkspacePath(workspaceEntity.name));
41+
gotoHomeRoute();
42+
}
43+
3744
void onEvent(ConfigEvent event) {
3845
switch (event.runtimeType) {
3946
case ConfigInitializationEvent:

lib/app/config/presentation/states/config_initialized_state_view.dart

+29-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'package:app_fleet/utils/bottom_bar.dart';
1111
import 'package:app_fleet/utils/show_app_selection_dialog.dart';
1212
import 'package:app_fleet/utils/show_confirm_delete_dialog.dart';
1313
import 'package:app_fleet/utils/show_discard_edits_dialog.dart';
14+
import 'package:app_fleet/utils/snack_bar_builder.dart';
1415
import 'package:flutter/material.dart';
1516
import 'package:flutter_animate/flutter_animate.dart';
1617

@@ -77,7 +78,7 @@ class _ConfigInitializedStateViewState
7778
const CharacterActivator('f', control: true): () {
7879
showAppSelectionDialog(
7980
context: context,
80-
onClose: (app) {
81+
onClick: (app) {
8182
setState(
8283
() {
8384
if (app != null) {
@@ -175,7 +176,33 @@ class _ConfigInitializedStateViewState
175176
if (widget.configUIMode ==
176177
ConfigUIMode.edit)
177178
AppTooltipBuilder.wrap(
178-
text: "Mark as Default Workspace",
179+
text: "Edit in your system",
180+
child: IconButton(
181+
onPressed: () {
182+
showSnackbar(
183+
icon: Icon(
184+
Icons.info,
185+
color: AppTheme.foreground,
186+
),
187+
message:
188+
"Opening Config in your system ...");
189+
widget.controller.openInDesktop(
190+
widget.workspaceEntity);
191+
},
192+
icon: const Icon(
193+
Icons.open_in_new_rounded,
194+
color: Colors.grey,
195+
size: 22,
196+
),
197+
).animate().scale(
198+
delay:
199+
const Duration(seconds: 1)),
200+
),
201+
if (widget.configUIMode ==
202+
ConfigUIMode.edit)
203+
AppTooltipBuilder.wrap(
204+
text:
205+
"Execute this workspace on Startup",
179206
child: IconButton(
180207
onPressed: () {
181208
setState(() {

lib/app/config/presentation/widgets/workspace_app_box.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class _WorkspaceAppBoxState extends State<WorkspaceAppBox> {
182182
onPressed: () {
183183
showAppSelectionDialog(
184184
context: context,
185-
onClose: (app) {
185+
onClick: (app) {
186186
setState(
187187
() {
188188
if (app != null) {

lib/app/home/presentation/states/home_initialized_state_view.dart

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ class _HomeInitializedStateViewState extends State<HomeInitializedStateView> {
2929
@override
3030
void initState() {
3131
super.initState();
32+
onUpdate();
33+
}
34+
35+
@override
36+
void didUpdateWidget(covariant HomeInitializedStateView oldWidget) {
37+
super.didUpdateWidget(oldWidget);
38+
onUpdate();
39+
}
40+
41+
void onUpdate() {
3242
workspaces = widget.controller.getWorkspaces();
3343
}
3444

lib/app/home/presentation/widgets/workspace_tile.dart

+9-4
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,14 @@ class _WorkspaceTileState extends State<WorkspaceTile> {
114114
borderRadius: BorderRadius.circular(20),
115115
boxShadow: [
116116
BoxShadow(
117-
color: accentColorMap[
118-
widget.workspaceEntity.name[0].toUpperCase()]!
117+
color: (AppTheme.isDarkMode()
118+
? AppTheme.dialogDropShadow
119+
: accentColorMap[
120+
getAccentChar(widget.workspaceEntity.name)
121+
.toUpperCase()]!)
119122
.withOpacity(hover ? 0.6 : 0.2),
120123
blurRadius: 16,
121-
)
124+
),
122125
],
123126
),
124127
child: Center(
@@ -160,7 +163,9 @@ class _WorkspaceTileState extends State<WorkspaceTile> {
160163
scale: hover ? 0.8 : 1.0,
161164
child: Container(
162165
decoration: BoxDecoration(
163-
color: accentColorMap[widget.workspaceEntity.name[0]] ??
166+
color: accentColorMap[
167+
getAccentChar(widget.workspaceEntity.name)
168+
.toUpperCase()] ??
164169
Colors.amber.shade700,
165170
borderRadius: BorderRadius.circular(20),
166171
boxShadow: [

lib/app/launcher/presentation/states/launcher_empty_state_view.dart

+4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import 'package:app_fleet/main.dart';
66
import 'package:app_fleet/utils/app_tooltip_builder.dart';
77
import 'package:app_fleet/utils/app_window_buttons.dart';
88
import 'package:app_fleet/utils/bottom_bar.dart';
9+
import 'package:bitsdojo_window/bitsdojo_window.dart';
910
import 'package:flutter/material.dart';
11+
import 'package:flutter/services.dart';
1012
import 'package:lottie/lottie.dart';
1113

1214
class LauncherEmptyStateView extends StatefulWidget {
@@ -114,6 +116,8 @@ class _LauncherEmptyStateViewState extends State<LauncherEmptyStateView> {
114116
child: appWindowButton(
115117
color: Colors.red,
116118
onPressed: () {
119+
appWindow.close();
120+
SystemNavigator.pop();
117121
Navigator.pop(context);
118122
},
119123
),

lib/app/launcher/presentation/states/launcher_initialized_state_view.dart

+50-31
Original file line numberDiff line numberDiff line change
@@ -113,36 +113,50 @@ class _LauncherInitializedStateViewState
113113
child: MouseRegion(
114114
onEnter: (e) => setContentState(() => hover = true),
115115
onExit: (e) => setContentState(() => hover = false),
116-
child: AppTooltipBuilder.wrap(
117-
text: workspaceEntity.name,
118-
child: AnimatedContainer(
119-
duration: const Duration(milliseconds: 250),
120-
width: 80,
121-
height: 80,
122-
padding: const EdgeInsets.all(16.0),
123-
margin: const EdgeInsets.all(16.0),
124-
decoration: BoxDecoration(
125-
color: AppTheme.background,
126-
borderRadius: BorderRadius.circular(20),
127-
boxShadow: [
128-
BoxShadow(
129-
color: accentColorMap[
130-
workspaceEntity.name[0].toUpperCase()]!
131-
.withOpacity(hover ? 0.6 : 0.2),
132-
blurRadius: 16,
133-
)
134-
],
135-
),
136-
child: Center(
137-
child: AnimatedScale(
138-
duration: const Duration(milliseconds: 500),
139-
scale: hover ? 0.8 : 1.0,
140-
child: getWorkspaceIcon(
141-
workspaceEntity.iconPath,
116+
child: Column(
117+
mainAxisSize: MainAxisSize.min,
118+
children: [
119+
AnimatedContainer(
120+
duration: const Duration(milliseconds: 250),
121+
width: 80,
122+
height: 80,
123+
padding: const EdgeInsets.all(16.0),
124+
margin: EdgeInsets.only(
125+
top: 16.0,
126+
bottom: hover ? 6.0 : 16.0,
127+
right: 16.0,
128+
left: 16.0,
129+
),
130+
decoration: BoxDecoration(
131+
color: AppTheme.background,
132+
borderRadius: BorderRadius.circular(20),
133+
boxShadow: [
134+
BoxShadow(
135+
color: (AppTheme.isDarkMode()
136+
? AppTheme.dialogDropShadow
137+
: accentColorMap[
138+
getAccentChar(workspaceEntity.name)
139+
.toUpperCase()]!)
140+
.withOpacity(hover ? 0.6 : 0.2),
141+
blurRadius: 16,
142+
)
143+
],
144+
),
145+
child: Center(
146+
child: AnimatedScale(
147+
duration: const Duration(milliseconds: 500),
148+
scale: hover ? 0.8 : 1.0,
149+
child: getWorkspaceIcon(
150+
workspaceEntity.iconPath,
151+
),
142152
),
143153
),
144154
),
145-
),
155+
Text(
156+
workspaceEntity.name,
157+
style: AppTheme.fontSize(12).makeBold(),
158+
),
159+
],
146160
),
147161
),
148162
);
@@ -230,12 +244,17 @@ class _LauncherInitializedStateViewState
230244
),
231245
if (launchStatus != null)
232246
Align(
233-
alignment: Alignment.bottomCenter,
247+
alignment: Alignment.topCenter,
234248
child: Padding(
235249
padding: const EdgeInsets.all(16.0),
236-
child: Text(
237-
launchStatus!,
238-
style: AppTheme.fontSize(14).makeBold(),
250+
child: SizedBox(
251+
width: 300,
252+
child: Text(
253+
launchStatus!,
254+
textAlign: TextAlign.center,
255+
overflow: TextOverflow.ellipsis,
256+
style: AppTheme.fontSize(13),
257+
),
239258
),
240259
),
241260
),

lib/app/settings/data/settings_repository.dart

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ import 'package:http/http.dart';
99
class SettingsRepository {
1010
final storage = DependencyInjection.find<AppConfiguration>();
1111

12+
void setKeepAppPickerOpen(bool value) {
13+
storage.put('keep-app-picker-open', value);
14+
}
15+
16+
bool getKeepAppPickerOpen() {
17+
return storage.get('keep-app-picker-open') ?? false;
18+
}
19+
20+
void setKeepAliveLauncher(bool value) {
21+
storage.put('keep-alive-launcher', value);
22+
}
23+
24+
bool getKeepAliveLauncher() {
25+
return storage.get('keep-alive-launcher') ?? false;
26+
}
27+
1228
void setDefaultWorkspace(String? name) {
1329
storage.put('default-workspace', name);
1430
}

0 commit comments

Comments
 (0)