Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
let loading = $state<boolean>(true);

onMount(async () => {
report = await process.admin.getBugReport(id);
report = (await process.admin.getBugReport(id))?.report;

loading = false;
});
Expand Down
6 changes: 3 additions & 3 deletions src/apps/admin/adminportal/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const AdminPortalPageStore: AdminPortalPages = new Map<string, AdminPorta
props: async (process) => {
const id = process.switchPageProps().id;

return { report: await process.admin.getBugReport(id) };
return (await process.admin.getBugReport(id)) ?? {};
},
},
],
Expand All @@ -89,9 +89,9 @@ export const AdminPortalPageStore: AdminPortalPages = new Map<string, AdminPorta
props: async (process) => {
const id = process.switchPageProps().id;
const report = await process.admin.getBugReport(id);
if (!report) return { report };
if (!report) return report;

const source = await process.admin.getReportSourceFile(report);
const source = await process.admin.getReportSourceFile(report.report);

return { report, source };
},
Expand Down
4 changes: 2 additions & 2 deletions src/apps/components/messagecomposer/MessageComposer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const MessageComposerApp: App = {
appGroup: "multimedia",
},
position: { centered: true },
size: { w: 800, h: 650 },
minSize: { w: 800, h: 650 },
size: { w: 800, h: 500 },
minSize: { w: 800, h: 500 },
maxSize: { w: NaN, h: NaN },
state: {
maximized: false,
Expand Down
6 changes: 6 additions & 0 deletions src/apps/core/loginapp/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ export class LoginAppRuntime extends AppProcess implements ILoginAppRuntime {
};

if (userDaemon) {
broadcast("Notifying login activity");
await userDaemon.activity?.logActivity("shutdown");

broadcast("Stopping Service Host");
await userDaemon.serviceHost?.spinDown(broadcast);

Expand Down Expand Up @@ -268,6 +271,9 @@ export class LoginAppRuntime extends AppProcess implements ILoginAppRuntime {
this.loadingStatus.set(`Restarting...`);

if (userDaemon) {
broadcast("Notifying login activity");
await userDaemon.activity?.logActivity("shutdown");

broadcast("Stopping Service Host");
await userDaemon.serviceHost?.spinDown(broadcast);

Expand Down
2 changes: 1 addition & 1 deletion src/apps/core/newloginapp/NewLogin.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</p>
<button class="login-action" onclick={() => process.DismissError()}>Okay</button>
{:else if $Status.variant === LoginStatusVariant.Loading}
<p class="loading">
<p class="loading theme-dark">
<Spinner height={24} />
<span>{@html $Status.content}</span>
</p>
Expand Down
7 changes: 7 additions & 0 deletions src/apps/core/newloginapp/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
type LoginState,
type LoginStatus,
} from "./types";
import { LoginUserDaemonStartOptions } from "../loginapp/store";

export class NewLoginAppRuntime extends AppProcess implements INewLoginAppRuntime {
private readonly PERSISTENCE_LS_ID = "arcNewLoginPersistence";
Expand Down Expand Up @@ -222,6 +223,12 @@ export class NewLoginAppRuntime extends AppProcess implements INewLoginAppRuntim
this.ShowLoading("Saving token");
this.SaveToken(userDaemon!);

// await new Promise(async (r) => {
// while (true) {
// await Sleep(1);
// }
// });

const result = await userDaemon?.startUserDaemon(NewLoginUserDaemonStartOptions(this), broadcast.bind(this));

this.SaveUserPersistence(userDaemon?.userInfo!);
Expand Down
63 changes: 15 additions & 48 deletions src/apps/user/settings/Settings/Slides/ManageApps.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<script lang="ts">
import type { ISettingsRuntime } from "$interfaces/runtimes/ISettingsRuntime";
import Icon from "$lib/Icon.svelte";
import ActionBar from "$lib/Window/ActionBar.svelte";
import { Daemon } from "$ts/env";
import { isPopulatable } from "$ts/util/apps";
import { Store } from "$ts/writable";
import type { App, AppStorage } from "$types/apps/app";
import Fuse, { type IFuseOptions } from "fuse.js";
import { onMount } from "svelte";
import ViewMode from "./ManageApps/ViewMode.svelte";
import SearchBar from "./ManageApps/SearchBar.svelte";
import FIlter from "./ManageApps/FIlter.svelte";
import GridAppItem from "./ManageApps/GridAppItem.svelte";
import GridListItem from "./ManageApps/GridListItem.svelte";

const { process }: { process: ISettingsRuntime } = $props();
const { userPreferences } = process;
Expand All @@ -16,13 +19,13 @@
let store = Store<AppStorage>([]);
let search = Store<string>("");
let filter = Store<string>("visible");
let view = $state<string>("grid-small");
let view = $state<string>("grid");

function update() {
const options: IFuseOptions<App> = {
includeScore: true,
keys: ["metadata.name", "id"],
threshold: 0.4,
threshold: 0.2,
};

const fuse = new Fuse($buffer, options);
Expand Down Expand Up @@ -54,56 +57,20 @@
</script>

<div class="options">
<div class="search">
<span class="lucide icon-search"></span>
<input type="text" placeholder="Find apps..." bind:value={$search} />
</div>
<div class="view-mode">
<button
class="lucide icon-grid-2x2"
aria-label="Large grid"
class:suggested={view === "grid-large"}
onclick={() => (view = "grid-large")}
title="Grid view"
></button>
<button
class="lucide icon-grid-3x3"
aria-label="Small grid"
class:suggested={view === "grid-small"}
onclick={() => (view = "grid-small")}
title="Compact grid"
></button>
<button
class="lucide icon-list"
title="List view"
aria-label="List"
class:suggested={view === "list"}
onclick={() => (view = "list")}
></button>
</div>
<select class="filter" bind:value={$filter}>
<option value="all">All</option>
<option value="hidden">Hidden</option>
<option value="visible">Visible</option>
<option value="builtin">Built-in</option>
<option value="thirdparty">Third-party</option>
<option value="disabled">Disabled</option>
</select>
<SearchBar {search} />
<ViewMode bind:view />
<FIlter {filter} />
</div>
<div class="apps {view}">
{#if !$store.length}
<p class="no-results">No results!</p>
{:else}
{#each $store as app (`${app.originId}-${app.id}-${app.metadata.name}`)}
<button
class="app"
onclick={() => process.spawnOverlayApp("AppInfo", process.pid, app.id)}
class:disabled={Daemon?.apps?.checkDisabled(app.id, app.noSafeMode)}
>
<Icon icon="@app::{app.id}" />
<h1>{app.metadata.name}</h1>
<p class="author">{app.metadata.author} - v{app.metadata.version}</p>
</button>
{#if view === "grid"}
<GridAppItem {app} {process} />
{:else if view === "list"}
<GridListItem {app} {process} />
{/if}
{/each}
{/if}
</div>
Expand Down
14 changes: 14 additions & 0 deletions src/apps/user/settings/Settings/Slides/ManageApps/FIlter.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script lang="ts">
import type { ReadableStore } from "$types/shared/writable";

let { filter }: { filter: ReadableStore<string> } = $props();
</script>

<select class="filter" bind:value={$filter}>
<option value="all">All</option>
<option value="hidden">Hidden</option>
<option value="visible">Visible</option>
<option value="builtin">Built-in</option>
<option value="thirdparty">Third-party</option>
<option value="disabled">Disabled</option>
</select>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script lang="ts">
import type { ISettingsRuntime } from "$interfaces/runtimes/ISettingsRuntime";
import Icon from "$lib/Icon.svelte";
import { Daemon } from "$ts/env";
import type { App } from "$types/apps/app";

let { app, process }: { app: App; process: ISettingsRuntime } = $props();
</script>

<button
class="app grid-item"
onclick={() => process.spawnOverlayApp("AppInfo", process.pid, app.id)}
class:disabled={Daemon?.apps?.checkDisabled(app.id, app.noSafeMode)}
>
<Icon icon="@app::{app.id}" />
<h1>{app.metadata.name}</h1>
<p class="author">{app.metadata.author} - v{app.metadata.version}</p>
</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
import type { ISettingsRuntime } from "$interfaces/runtimes/ISettingsRuntime";
import Icon from "$lib/Icon.svelte";
import ActionIconButton from "$lib/Window/ActionBar/ActionIconButton.svelte";
import { Daemon } from "$ts/env";
import type { App } from "$types/apps/app";

let { app, process }: { app: App; process: ISettingsRuntime } = $props();
</script>

<button
class="app list-item"
onclick={() => process.spawnOverlayApp("AppInfo", process.pid, app.id)}
class:disabled={Daemon?.apps?.checkDisabled(app.id, app.noSafeMode)}
>
<Icon icon="@app::{app.id}" />
<div class="info">
<h1>{app.metadata.name}</h1>
<p class="author">v{app.metadata.version} &ndash; {app.metadata.author}</p>
</div>
<p class="type">
{app._internalOriginalPath ? "Built-in" : "Third-party"}
</p>
</button>
10 changes: 10 additions & 0 deletions src/apps/user/settings/Settings/Slides/ManageApps/SearchBar.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script lang="ts">
import type { ReadableStore } from "$types/shared/writable";

let { search }: { search: ReadableStore<string> } = $props();
</script>

<div class="search">
<span class="lucide icon-search"></span>
<input type="text" placeholder="Find apps..." bind:value={$search} />
</div>
20 changes: 20 additions & 0 deletions src/apps/user/settings/Settings/Slides/ManageApps/ViewMode.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script lang="ts">
let { view = $bindable() }: { view: string } = $props();
</script>

<div class="view-mode">
<button
class="lucide icon-grid-3x3"
aria-label="Grid view"
class:suggested={view === "grid"}
onclick={() => (view = "grid")}
title="Grid view"
></button>
<button
class="lucide icon-list"
title="List view"
aria-label="List view"
class:suggested={view === "list"}
onclick={() => (view = "list")}
></button>
</div>
10 changes: 5 additions & 5 deletions src/apps/user/settings/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const settingsPageStore: SettingsPages = new Map<string, SettingsPage>([
[
"wallpaper",
{
name: "Wallpaper",
name: "Desktop Wallpaper",
icon: "DesktopIcon",
content: Wallpaper,
description: "Change your desktop wallpaper",
Expand All @@ -54,7 +54,7 @@ export const settingsPageStore: SettingsPages = new Map<string, SettingsPage>([
[
"visuals",
{
name: "Visuals",
name: "Appearance",
icon: "PersonalizationIcon",
content: Visuals,
separator: true,
Expand All @@ -64,7 +64,7 @@ export const settingsPageStore: SettingsPages = new Map<string, SettingsPage>([
[
"shell",
{
name: "Shell",
name: "Taskbar and start menu",
icon: "TaskbarIcon",
content: Shell,
description: "The taskbar, start menu and action center",
Expand All @@ -73,7 +73,7 @@ export const settingsPageStore: SettingsPages = new Map<string, SettingsPage>([
[
"search",
{
name: "Search",
name: "ArcOS Search",
icon: "ArcFindIcon",
content: Search,
description: "The search functionality of ArcOS",
Expand All @@ -83,7 +83,7 @@ export const settingsPageStore: SettingsPages = new Map<string, SettingsPage>([
[
"apps",
{
name: "Apps",
name: "Applications",
icon: "AppsIcon",
content: Apps,
separator: true,
Expand Down
6 changes: 3 additions & 3 deletions src/apps/user/settings/systemSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import Settings from "./Settings.svelte";
export const SystemSettings: App = {
metadata: {
name: "System Settings",
author: "Izaak Kuipers",
author: "Izaak Kuipers",
version: "6.0.4",
icon: "SettingsIcon",
appGroup: "systemTools",
},
size: { w: 730, h: 560 },
minSize: { w: 730, h: 560 },
size: { w: 810, h: 560 },
minSize: { w: 810, h: 560 },
maxSize: { w: 1000, h: 800 },
position: { centered: true },
state: {
Expand Down
3 changes: 2 additions & 1 deletion src/css/apps/user/logging.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@
}

#logging > div.body div.log-list div.row div.segment.message {
max-width: calc(100% - 160px - 16px - 20px);
width: 0;
flex-grow: 1;
}

#logging > div.body div.log-list div.row div.segment:not(.icon) {
Expand Down
6 changes: 3 additions & 3 deletions src/css/apps/user/settings/page/loginbackground.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#systemSettings div.container.loginBackground div.upload-actions {
display: flex;
align-items: center;
gap: 5px;
gap: 8px;
}

#systemSettings div.container.loginBackground div.upload-actions button {
Expand Down Expand Up @@ -32,8 +32,8 @@
}

#systemSettings div.loginBackground div.wallpaper-section div.wallpapers {
display: grid;
grid-template-columns: repeat(5, 70px);
display: flex;
flex-wrap: wrap;
gap: 15px;
}

Expand Down
2 changes: 1 addition & 1 deletion src/css/apps/user/settings/page/wallpaper.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#systemSettings div.container.wallpaper div.upload-actions {
display: flex;
align-items: center;
gap: 5px;
gap: 8px;
}

#systemSettings div.container.wallpaper div.upload-actions button {
Expand Down
6 changes: 5 additions & 1 deletion src/css/apps/user/settings/section.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#systemSettings section {
width: 340px;
width: 350px;
margin: 0 auto;
margin-top: 20px;
}
Expand Down Expand Up @@ -127,3 +127,7 @@
outline: var(--button-glass-hover-bg) 1px solid;
outline-offset: -1px;
}

.theme-light #systemSettings section div.content select {
background-color: var(--win-bg) !important;
}
Loading
Loading