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
382 changes: 103 additions & 279 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "proton",
"version": "0.1.0",
"description": "",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite dev",
Expand All @@ -12,7 +13,6 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"tauri": "tauri"
},
"license": "MIT",
"dependencies": {
"@lucide/svelte": "^1.7.0",
"@profidev/pleiades": "^1.7.1",
Expand All @@ -33,16 +33,16 @@
},
"devDependencies": {
"@sveltejs/adapter-static": "3.0.10",
"@sveltejs/kit": "2.60.1",
"@sveltejs/vite-plugin-svelte": "7.0.0",
"@tailwindcss/vite": "4.2.2",
"@tauri-apps/cli": "2.10.1",
"@types/node": "25.6.0",
"@sveltejs/kit": "2.66.0",
"@sveltejs/vite-plugin-svelte": "7.1.2",
"@tailwindcss/vite": "4.3.1",
"@tauri-apps/cli": "2.11.3",
"@types/node": "26.0.0",
"svelte": "5.55.7",
"svelte-check": "4.4.6",
"tailwindcss": "4.2.2",
"svelte-check": "4.6.0",
"tailwindcss": "4.3.1",
"tw-animate-css": "1.4.0",
"typescript": "6.0.2",
"typescript": "6.0.3",
"vite": "8.0.16"
},
"optionalDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/components/form/FormImage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const { form: formData } = $derived(form);

const fileChange = (file?: File) => {
const fileChange = (file: File | undefined) => {
let store = get(formData);
// @ts-ignore
store[key] = file;
Expand Down
6 changes: 4 additions & 2 deletions app/src/lib/util.svelte.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DateTime } from '@profidev/pleiades/util/time.svelte';
import { DateTime as D } from '@profidev/pleiades/util/time.svelte';
import type { Profile } from './tauri/profile.svelte';

export const file_to_bytes = async (file: File) =>
Expand Down Expand Up @@ -55,7 +55,9 @@ export const debounce = <T extends (...args: any[]) => void>(
};

export const compareDateTimes = (a: string, b: string) =>
DateTime.fromISO(a).diff(DateTime.fromISO(b)).milliseconds > 0 ? -1 : 1;
(D.DateTime?.fromISO(a).diff(D.DateTime?.fromISO(b)).milliseconds ?? 0) > 0
? -1
: 1;

export const compareProfiles = (a: Profile, b: Profile) => {
if (!a.last_played && !b.last_played) {
Expand Down
6 changes: 3 additions & 3 deletions app/src/routes/instances/info/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import ProfileIcon from '$lib/components/profile/ProfileIcon.svelte';
import { instance_list, instance_stop } from '$lib/tauri/instance.svelte.js';
import { setInstance } from './store.svelte.js';
import { DateTime } from '@profidev/pleiades/util/time.svelte';
import { DateTime as D } from '@profidev/pleiades/util/time.svelte';
import DestroyDialog from '$lib/components/form/DestroyDialog.svelte';

let { data, children } = $props();
Expand Down Expand Up @@ -59,9 +59,9 @@
{instance.version}
</p>
<p class="text-muted-foreground whitespace-nowrap">
Launched at: {DateTime.fromISO(instance.launched_at)
Launched at: {D.DateTime?.fromISO(instance.launched_at)
.setLocale('de')
.toLocaleString(DateTime.DATETIME_SHORT)}
.toLocaleString(D.DateTime.DATETIME_SHORT)}
</p>
</div>
<div class="mr-2 ml-auto flex items-center gap-2">
Expand Down
10 changes: 5 additions & 5 deletions app/src/routes/profiles/info/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { setProfile } from './store.svelte.js';
import { FolderOpen, Menu, Play, Star, Trash, Wrench } from '@lucide/svelte';
import ProfileIcon from '$lib/components/profile/ProfileIcon.svelte';
import { DateTime } from '@profidev/pleiades/util/time.svelte';
import { DateTime as D } from '@profidev/pleiades/util/time.svelte';
import { account_active } from '$lib/tauri/account.svelte.js';
import { profile_favorites_set } from '$lib/tauri/home.svelte.js';
import DestroyDialog from '$lib/components/form/DestroyDialog.svelte';
Expand Down Expand Up @@ -75,15 +75,15 @@
</p>
<div class="flex flex-wrap">
<p class="text-muted-foreground mr-4 whitespace-nowrap">
Created at: {DateTime.fromISO(profile.created_at)
Created at: {D.DateTime?.fromISO(profile.created_at)
.setLocale('de')
.toLocaleString(DateTime.DATETIME_SHORT)}
.toLocaleString(D.DateTime.DATETIME_SHORT)}
</p>
<p class="text-muted-foreground whitespace-nowrap">
Last Played: {profile.last_played
? DateTime.fromISO(profile.last_played)
? D.DateTime?.fromISO(profile.last_played)
.setLocale('de')
.toLocaleString(DateTime.DATETIME_SHORT)
.toLocaleString(D.DateTime.DATETIME_SHORT)
: 'Never'}
</p>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/src/routes/profiles/info/instances/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { CircleStop } from '@lucide/svelte';
import { compareDateTimes } from '$lib/util.svelte';
import { goto } from '$app/navigation';
import { DateTime } from '@profidev/pleiades/util/time.svelte';
import { DateTime as D } from '@profidev/pleiades/util/time.svelte';
import DestroyDialog from '$lib/components/form/DestroyDialog.svelte';

let profile = $derived(getProfile());
Expand All @@ -35,9 +35,9 @@
<p class="ml-2 text-base">Instance {index + 1}</p>
<Separator orientation="vertical" class="mx-1 h-8!" />
<p class="text-muted-foreground">
Launched at {DateTime.fromISO(instance.launched_at)
Launched at {D.DateTime?.fromISO(instance.launched_at)
.setLocale('de')
.toLocaleString(DateTime.DATETIME_SHORT)}
.toLocaleString(D.DateTime.DATETIME_SHORT)}
</p>
<Button
variant="destructive"
Expand Down
6 changes: 3 additions & 3 deletions app/src/routes/profiles/info/logs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
profile_logs,
profile_clear_logs
} from '$lib/tauri/logs.svelte';
import { DateTime } from '@profidev/pleiades/util/time.svelte';
import { DateTime as D } from '@profidev/pleiades/util/time.svelte';
import Multiselect from '@profidev/pleiades/components/table/multiselect.svelte';
import { compareDateTimes } from '$lib/util.svelte';
import { Button } from '@profidev/pleiades/components/ui/button';
Expand All @@ -31,9 +31,9 @@
let logs_list_select = $derived(
logs_list
?.reduce((a: { label: string; value: string }[], run) => {
let label = DateTime.fromISO(run)
let label = D.DateTime?.fromISO(run)
.setLocale('de')
.toLocaleString(DateTime.DATETIME_SHORT);
.toLocaleString(D.DateTime.DATETIME_SHORT);

let count: number = a.filter(
(item) => item.label.trim() === label
Expand Down
6 changes: 3 additions & 3 deletions app/src/routes/profiles/info/quick_play/QuickPlayList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import * as Dialog from '@profidev/pleiades/components/ui/dialog';
import * as Tabs from '@profidev/pleiades/components/ui/tabs';
import { getProfile } from '../store.svelte';
import { DateTime } from '@profidev/pleiades/util/time.svelte';
import { DateTime as D } from '@profidev/pleiades/util/time.svelte';
import { Play, Star, Trash } from '@lucide/svelte';
import { account_active } from '$lib/tauri/account.svelte';
import { profile_launch } from '$lib/tauri/profile.svelte';
Expand Down Expand Up @@ -44,9 +44,9 @@
</div>
<Separator orientation="vertical" class="mx-1 h-8!" />
<p class="text-muted-foreground">
Last played at {DateTime.fromISO(item.lastPlayedTime)
Last played at {D.DateTime?.fromISO(item.lastPlayedTime)
.setLocale('de')
.toLocaleString(DateTime.DATETIME_SHORT)}
.toLocaleString(D.DateTime.DATETIME_SHORT)}
</p>
<Button
class="ml-auto cursor-pointer"
Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/profiles/info/settings/general/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
});
};

const update_icon = async (file?: File) => {
const update_icon = async (file: File | undefined) => {
if (!profile || !file) return;
let bytes = new Uint8Array(await file.arrayBuffer());

Expand Down
Loading
Loading