Skip to content

Commit 6219982

Browse files
committed
refactor: Replace switch statements with constant maps for labels, tooltips, and icons, and refine Nautilus component styling.
Feat: Ready for next release.
1 parent cd7b0d0 commit 6219982

18 files changed

Lines changed: 193 additions & 195 deletions

File tree

assets/general-home.png

3.66 KB
Loading

assets/general-remote.png

2.61 KB
Loading

assets/mount-control.png

-12.1 KB
Loading

assets/serve-control.png

-5.45 KB
Loading

src-tauri/linux/flatpak.metainfo.xml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,37 +62,67 @@
6262
<url type="vcs-browser">https://github.com/Zarestia-Dev/rclone-manager</url>
6363
<screenshots>
6464
<screenshot type="default">
65-
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.8/assets/desktop-ui.png</image>
65+
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.9/assets/desktop-ui.png</image>
6666
<caption>Desktop UI</caption>
6767
</screenshot>
6868
<screenshot>
69-
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.8/assets/general-home.png</image>
69+
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.9/assets/general-home.png</image>
7070
<caption>General Home View</caption>
7171
</screenshot>
7272
<screenshot>
73-
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.8/assets/general-remote.png</image>
73+
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.9/assets/general-remote.png</image>
7474
<caption>Remote Management Interface</caption>
7575
</screenshot>
7676
<screenshot>
77-
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.8/assets/serve-control.png</image>
77+
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.9/assets/serve-control.png</image>
7878
<caption>Serve Management Interface</caption>
7979
</screenshot>
8080
<screenshot>
81-
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.8/assets/job-watcher.png</image>
81+
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.9/assets/job-watcher.png</image>
8282
<caption>Job Watcher - Monitor your operations</caption>
8383
</screenshot>
8484
<screenshot>
85-
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.8/assets/mount-control.png</image>
85+
<image>https://raw.githubusercontent.com/Zarestia-Dev/rclone-manager/refs/tags/v0.1.9/assets/mount-control.png</image>
8686
<caption>Mount Control Panel</caption>
8787
</screenshot>
8888
</screenshots>
8989
<releases>
90-
<release version="0.1.8" date="2025-12-6">
90+
<release version="0.1.9" date="2025-12-20">
91+
<description>
92+
<p>Warning</p>
93+
<ul>
94+
<li>Since multiple profiles support, the old profiles are automatically migrated to the new profile system. But before the update, please backup your old profiles. If there is a any problem with the new profile system, you can restore your old profiles from the backup and app try the re-migration to the new profile system.</li>
95+
</ul>
96+
<p>Added</p>
97+
<ul>
98+
<li>Multiple profiles support added for all operations (Sync, Copy, Move, Bisync, Mount, Serve). Now you can create multiple profiles for each operation and run them separately. Also operation UI has been changed to show profiles. User can configure it from the detailed remote setup modal. User also can select the shared settings and also add a multiple profiles for shared settings to. Quick Remote Access only works with default profile (When you start a action, it uses the default profile).</li>
99+
<li>Added special Flatpak autostart entry for Flatpak version. Now it creates a desktop entry for Flatpak version of the app. This entry is not handled by Tauri. (Fixed #63)</li>
100+
<li>Nautilus Component: Added hash calculation support for files. Now you can calculate the hash of a file and copy it to clipboard on the properties dialog.</li>
101+
<li>Nautilus Component: Added public link generation support for files and directories. If remote supports public link generation, it will be available in the properties dialog.</li>
102+
<li>Nautilus Component: Enabled download button for remote files. Now you can download remote files to your local machine.</li>
103+
</ul>
104+
<p>Changed</p>
105+
<ul>
106+
<li>On linux remove the rclone to required dependencies when installing via deb or rpm packages. Because app handle the rclone binary installation and update itself correctly.</li>
107+
<li>Encrypted export not required standalone 7zip binary anymore. Changed to sevenz-rust crate. Not break the old encrypted exports.</li>
108+
<li>On tray icon when remote not mounted, it shows the Browse (In App). Basically it opens the RClone Manager's Nautilus with that remote.</li>
109+
<li>Angular and Angular Material updated to v21 and other dependencies updated to latest stable versions.</li>
110+
<li>Small design changes on Quick Remote Modal.</li>
111+
</ul>
112+
<p>Fixed</p>
113+
<ul>
114+
<li>Remote configuration step provider selection fixed. Now it correctly filters the provider-specific fields when Provider selected. (issue #59 and #1)</li>
115+
<li>Broken reduce animations fixed. (issue #60)</li>
116+
<li>Links openning in the about modal fixed. Now it opens the links in the default browser.</li>
117+
</ul>
118+
</description>
119+
</release>
120+
<release version="0.1.8" date="2025-11-06">
91121
<description>
92122
<p>Added</p>
93123
<ul>
94-
<li>Developer Setting: Memory Optimization (Destroy Window on Close). Added a new experimental option in Developer Settings that destroys the main window instead of hiding it when closed. This significantly reduces background RAM usage. On Linux, this also actively cleans up lingering WebKit "zombie" processes to prevent memory leaks over long sessions.</li>
95-
<li>Nautilus file manager component added for file browsing. This new file manager component provides a more native and integrated file browsing experience within the app, leveraging Nautilus' capabilities. Currently, it does not support all features like copy, move, delete, etc. They will be added in future updates.</li>
124+
<li>Developer Setting: Memory Optimization (Destroy Window on Close). Added a new experimental option in Developer Settings that destroys the main window instead of hiding it when closed. This significantly reduces background RAM usage. On Linux, this also actively cleans up lingering WebKit "zombie" processes to prevent memory leaks over long sessions. On MacOS, this not so effective because MacOS version dont use a lot of memory for background processes. But its useful linux and windows.</li>
125+
<li>Nautilus file manager component added for file browsing. This new file manager component provides a more native and integrated file browsing experience within the app, leveraging Nautilus' capabilities. Currently, it is not supports all features like copy, move, delete, etc. They will be added in future updates. Also support the preview for images, text files and pdf files.</li>
96126
<li>marked dependency added for markdown rendering in the About modal. This allows us to display formatted release notes fetched from GitHub in a user-friendly manner.</li>
97127
<li>Support for local path navigation on the remote config. User can now navigate to local paths when configuring remotes that use local file systems.</li>
98128
<li>Added Flatpak detection and warning banner. If the app is running as a Flatpak, a warning banner will be displayed to inform the user about permission limitations. The banner can be dismissed and will not show again once dismissed.</li>

src/app/features/components/dashboard/app-detail/app-detail.component.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ <h2 class="remote-name" matTooltip="{{ selectedRemote().remoteSpecs.name }}">
2525
</div>
2626
</div>
2727
</div>
28-
<div class="header-divider"></div>
2928
</div>
3029

3130
<!-- Main Content Area -->
@@ -67,7 +66,7 @@ <h2 class="remote-name" matTooltip="{{ selectedRemote().remoteSpecs.name }}">
6766
@if (showProfileSelector()) {
6867
<div class="profile-selector-container" [class.operation-sync]="isSyncType()">
6968
<div class="profile-selector-header">
70-
<span class="profile-selector-label">Active Profile</span>
69+
<span class="profile-selector-label">Selected Profile</span>
7170
<span class="profile-count">{{ enrichedProfiles().length }} profiles</span>
7271
</div>
7372
<mat-chip-set aria-label="Profile selection" class="profile-chips">
@@ -81,11 +80,11 @@ <h2 class="remote-name" matTooltip="{{ selectedRemote().remoteSpecs.name }}">
8180
@if (profile.status === 'running') {
8281
<mat-icon
8382
svgIcon="refresh"
84-
class="chip-icon animate-spin"
83+
class="primary animate-spin"
8584
matChipAvatar
8685
></mat-icon>
8786
} @else if (profile.status === 'scheduled') {
88-
<mat-icon svgIcon="clock" class="chip-icon" matChipAvatar></mat-icon>
87+
<mat-icon svgIcon="clock" class="orange" matChipAvatar></mat-icon>
8988
}
9089
{{ profile.label }}
9190
</mat-chip-option>
@@ -249,7 +248,7 @@ <h3 class="group-title">{{ sharedSettingsHeading }}</h3>
249248
@if (showProfileSelector()) {
250249
<div class="profile-selector-container operation-serve">
251250
<div class="profile-selector-header">
252-
<span class="profile-selector-label">Active Profile</span>
251+
<span class="profile-selector-label">Selected Profile</span>
253252
<span class="profile-count">{{ enrichedProfiles().length }} profiles</span>
254253
</div>
255254
<mat-chip-set aria-label="Profile selection" class="profile-chips">
@@ -261,7 +260,7 @@ <h3 class="group-title">{{ sharedSettingsHeading }}</h3>
261260
[class.chip-scheduled]="profile.status === 'scheduled'"
262261
>
263262
@if (profile.status === 'running') {
264-
<mat-icon svgIcon="serve" class="chip-icon" matChipAvatar></mat-icon>
263+
<mat-icon svgIcon="serve" class="accent" matChipAvatar></mat-icon>
265264
}
266265
{{ profile.label }}
267266
</mat-chip-option>
@@ -295,11 +294,11 @@ <h3 class="group-title">{{ sharedSettingsHeading }}</h3>
295294
}
296295

297296
<!-- Active Serves List -->
298-
@if (runningServes().length > 0) {
297+
@if (filteredRunningServes().length > 0) {
299298
<div class="active-serves-list">
300299
<h3>Active Serves</h3>
301300
<div class="serves-grid">
302-
@for (serve of runningServes(); track serve.id) {
301+
@for (serve of filteredRunningServes(); track serve.id) {
303302
<app-serve-card
304303
[serve]="serve"
305304
(stopServe)="
@@ -327,7 +326,7 @@ <h3>Active Serves</h3>
327326
@if (showProfileSelector()) {
328327
<div class="profile-selector-container operation-mount">
329328
<div class="profile-selector-header">
330-
<span class="profile-selector-label">Active Profile</span>
329+
<span class="profile-selector-label">Selected Profile</span>
331330
<span class="profile-count">{{ enrichedProfiles().length }} profiles</span>
332331
</div>
333332
<mat-chip-set aria-label="Profile selection" class="profile-chips">
@@ -339,7 +338,7 @@ <h3>Active Serves</h3>
339338
[class.chip-scheduled]="profile.status === 'scheduled'"
340339
>
341340
@if (profile.status === 'running') {
342-
<mat-icon svgIcon="mount" class="chip-icon" matChipAvatar></mat-icon>
341+
<mat-icon svgIcon="mount" class="accent" matChipAvatar></mat-icon>
343342
}
344343
{{ profile.label }}
345344
</mat-chip-option>

src/app/features/components/dashboard/app-detail/app-detail.component.scss

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
flex-direction: column;
1717
align-items: center;
1818
gap: var(--header-gap);
19-
margin-bottom: var(--header-gap);
2019
}
2120

2221
.remote-info-section {
@@ -174,8 +173,13 @@
174173

175174
.serves-grid {
176175
display: grid;
177-
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
178-
gap: 16px;
176+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
177+
gap: var(--space-md);
178+
padding: var(--space-md);
179+
background: var(--secondary-background);
180+
border-radius: var(--card-border-radius);
181+
border: 1px solid var(--theme-border);
182+
box-shadow: var(--shadow-light);
179183
}
180184
}
181185

@@ -239,17 +243,11 @@
239243
.profile-chips {
240244
display: flex;
241245
flex-wrap: wrap;
242-
gap: var(--space-xs);
243246

244247
mat-chip-option {
245248
// Running state (not selected)
246249
&.chip-running:not(.mat-mdc-chip-selected) {
247250
--mdc-chip-label-text-color: var(--primary-color);
248-
border: 1.5px solid rgba(var(--primary-color-rgb), 0.4);
249-
250-
.chip-icon {
251-
color: var(--primary-color);
252-
}
253251
}
254252

255253
// Running state (selected)

src/app/features/components/dashboard/app-detail/app-detail.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@ export class AppDetailComponent {
321321

322322
remoteName = computed(() => this.selectedRemote().remoteSpecs.name);
323323

324+
/** Filters running serves to only show those belonging to the selected remote */
325+
filteredRunningServes = computed(() => {
326+
const remoteName = this.remoteName();
327+
return this.runningServes().filter(serve => serve.params.fs.startsWith(remoteName + ':'));
328+
});
329+
324330
isSyncType = computed(() => this.mainOperationType() === 'sync');
325331

326332
currentOperation = computed(

src/app/features/components/dashboard/general-detail/general-detail.component.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ <h2 class="remote-name" matTooltip="{{ selectedRemote().remoteSpecs.name }}">
5454
}
5555
</div>
5656
</div>
57-
<div class="header-divider"></div>
5857
</div>
5958

6059
<div class="detail-content">
@@ -119,15 +118,7 @@ <h2 class="remote-name" matTooltip="{{ selectedRemote().remoteSpecs.name }}">
119118
<div class="task-info">
120119
<div class="task-title-row">
121120
<mat-icon
122-
[svgIcon]="
123-
task.taskType === 'sync'
124-
? 'sync'
125-
: task.taskType === 'copy'
126-
? 'copy'
127-
: task.taskType === 'move'
128-
? 'move'
129-
: 'right-left'
130-
"
121+
[svgIcon]="getTaskTypeIcon(task.taskType)"
131122
class="task-type-icon"
132123
[class.sync-color]="task.taskType === 'sync'"
133124
[class.copy-color]="task.taskType === 'copy'"

src/app/features/components/dashboard/general-detail/general-detail.component.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ export class GeneralDetailComponent {
151151
readonly maxPrimaryActions = 3;
152152
readonly actionConfigs = ACTION_CONFIGS;
153153

154+
private readonly TASK_TYPE_ICONS: Record<string, string> = {
155+
sync: 'sync',
156+
copy: 'copy',
157+
move: 'move',
158+
bisync: 'right-left',
159+
};
160+
161+
getTaskTypeIcon(taskType: string): string {
162+
return this.TASK_TYPE_ICONS[taskType] || 'circle-info';
163+
}
164+
154165
constructor() {
155166
// Initial load of all tasks
156167
this.schedulerService.getScheduledTasks().catch(err => {
@@ -293,51 +304,40 @@ export class GeneralDetailComponent {
293304
this.currentTaskCardIndex.set(index);
294305
}
295306

307+
private readonly TASK_STATUS_TOOLTIPS: Record<string, string> = {
308+
enabled: 'Task is enabled and will run on schedule.',
309+
disabled: 'Task is disabled and will not run.',
310+
running: 'Task is currently running.',
311+
failed: 'Task failed on its last run.',
312+
stopping: 'Task is stopping and will be disabled after the current run finishes.',
313+
};
314+
315+
private readonly TOGGLE_TOOLTIPS: Record<string, string> = {
316+
enabled: 'Disable task',
317+
running: 'Disable task',
318+
disabled: 'Enable task',
319+
failed: 'Enable task',
320+
stopping: 'Task is stopping...',
321+
};
322+
323+
private readonly TOGGLE_ICONS: Record<string, string> = {
324+
enabled: 'pause',
325+
running: 'pause',
326+
disabled: 'play',
327+
failed: 'play',
328+
stopping: 'stop',
329+
};
330+
296331
// Tooltip and icon helpers
297332
getTaskStatusTooltip(status: string): string {
298-
switch (status) {
299-
case 'enabled':
300-
return 'Task is enabled and will run on schedule.';
301-
case 'disabled':
302-
return 'Task is disabled and will not run.';
303-
case 'running':
304-
return 'Task is currently running.';
305-
case 'failed':
306-
return 'Task failed on its last run.';
307-
case 'stopping':
308-
return 'Task is stopping and will be disabled after the current run finishes.';
309-
default:
310-
return '';
311-
}
333+
return this.TASK_STATUS_TOOLTIPS[status] || '';
312334
}
313335

314336
getToggleTooltip(status: string): string {
315-
switch (status) {
316-
case 'enabled':
317-
case 'running':
318-
return 'Disable task';
319-
case 'disabled':
320-
case 'failed':
321-
return 'Enable task';
322-
case 'stopping':
323-
return 'Task is stopping...';
324-
default:
325-
return '';
326-
}
337+
return this.TOGGLE_TOOLTIPS[status] || '';
327338
}
328339

329340
getToggleIcon(status: string): string {
330-
switch (status) {
331-
case 'enabled':
332-
case 'running':
333-
return 'pause';
334-
case 'disabled':
335-
case 'failed':
336-
return 'play';
337-
case 'stopping':
338-
return 'stop';
339-
default:
340-
return 'help';
341-
}
341+
return this.TOGGLE_ICONS[status] || 'help';
342342
}
343343
}

0 commit comments

Comments
 (0)