Skip to content

Commit 0de7d05

Browse files
authored
fix: remove tasks menu and set widget inactive as default (#9328)
2 parents 70292d7 + 7947b8c commit 0de7d05

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

apps/agent/src/main/init/app.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,15 @@ async function appReady() {
167167
await ensureScreenshotDir();
168168
const configs: any = store.get('configs');
169169
const settings = getAppSetting();
170-
if (!settings) {
170+
if (!settings || (!Object.keys(settings).length)) {
171171
launchAtStartup(true, false);
172172
LocalStore.setAllDefaultConfig();
173173

174174
/* Set default application setting for agent app. */
175175
LocalStore.updateApplicationSetting({
176176
screenshotNotification: false,
177-
simpleScreenshotNotification: false
177+
simpleScreenshotNotification: false,
178+
alwaysOn: false
178179
});
179180
}
180181

apps/agent/src/main/init/ipcMain.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ export default function AppIpcMain() {
190190
throw new AppError('GET_EMP_SETTING', error);
191191
}
192192
listenIO(false);
193-
await handleAlwaysOnWindow(true);
193+
const appSetting = getAppSetting();
194+
if (appSetting?.alwaysOn) {
195+
await handleAlwaysOnWindow(true);
196+
}
194197
await closeLoginWindow();
195198
});
196199

packages/desktop-ui-lib/src/lib/agent-dashboard/agent-dashboard-routing.module.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ export const agentDashboardRoutes: Routes = [
99
path: 'sync-activity',
1010
loadComponent: () => import('./activity-sync/activity-sync.component').then((m) => m.SyncPageComponent),
1111
},
12-
{
13-
path: 'tasks',
14-
loadChildren: () => import('../time-tracker/task-table/task-table.routing.module').then((m) => m.taskTableRoutes)
15-
},
1612
{
1713
path: '',
1814
redirectTo: 'logs',

packages/desktop-ui-lib/src/lib/agent-dashboard/agent-dashboard.component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ import { TasksService } from './services/tasks-service';
1414
})
1515
export class AgentDashboardComponent implements OnInit, OnDestroy {
1616
menu: NbMenuItem[] = [
17-
{
18-
title: 'Tasks',
19-
link: '/server-dashboard/tasks',
20-
icon: 'checkmark-square-2-outline',
21-
pathMatch: 'prefix'
22-
},
2317
{
2418
title: 'Logs',
2519
link: '/server-dashboard/logs', // Assuming this will be the route for logs

0 commit comments

Comments
 (0)