Skip to content

Commit 75c86d9

Browse files
Merge pull request #1 from FabulousCodingFox/feat/save-editor
Feat/save editor
2 parents fb66f70 + 6cdb94d commit 75c86d9

25 files changed

+1090
-755
lines changed

messages/de.json

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,9 @@
77
"theme_dark": "Dunkles Design",
88
"page_save_title": "Spielstand-Editor",
99
"page_save_description": "Bearbeite No Man's Sky Spielstände. Lade eine save.hg-Datei hoch.",
10-
"page_save_warning_notimplemented_title": "Noch nicht verfügbar",
11-
"page_save_warning_notimplemented_description": "Der Spielstand-Editor ist noch in Arbeit.",
1210
"page_account_title": "Konto-Editor",
1311
"page_account_description": "Verwalte Expeditions-Belohnungen, Twitch-Drops und Plattform-Boni. Lade deine Konto-Datei hoch.",
14-
"page_account_draganddrop_title": "Zum Hochladen klicken oder Datei hierher ziehen",
15-
"page_account_error_uploadmultiplefiles_title": "Mehrere Dateien erkannt",
16-
"page_account_error_uploadmultiplefiles_description": "Bitte nur eine Datei hochladen.",
17-
"page_account_error_invalidfile_title": "Ungültige Datei",
18-
"page_account_error_invalidfile_description": "Bitte eine gültige .hg-Datei hochladen.",
19-
"page_account_error_filesize_title": "Datei zu groß",
20-
"page_account_error_filesize_description": "Maximale Größe: {maxSize}MB.",
21-
"page_account_error_nofile_title": "Keine Datei",
22-
"page_account_error_nofile_description": "Bitte wähle eine Datei aus.",
23-
"page_account_error_filetype_title": "Ungültiger Typ",
24-
"page_account_error_filetype_description": "Bitte eine .hg-Datei hochladen.",
25-
"page_account_error_corrupted_title": "Datei beschädigt",
26-
"page_account_error_corrupted_description": "Die Datei ist fehlerhaft oder hat ein ungültiges Format.",
27-
"page_account_error_download_title": "Download fehlgeschlagen",
28-
"page_account_error_download_description": "Kontodaten konnten nicht exportiert werden.",
29-
"page_account_toast_loading_title": "Lädt...",
30-
"page_account_toast_loading_description": "Datei wird verarbeitet.",
31-
"page_account_toast_uploadsuccess_title": "Verarbeitung abgeschlossen",
32-
"page_account_toast_uploadsuccess_description": "Datei erfolgreich verarbeitet.",
33-
"page_account_export": "Kontodaten exportieren",
12+
"page_account_tab_start": "Start",
3413
"page_account_tab_season_rewards": "Expeditions-Belohnungen",
3514
"page_account_tab_twitch_rewards": "Twitch-Belohnungen",
3615
"page_account_tab_platform_rewards": "Plattform-Belohnungen",
@@ -40,23 +19,6 @@
4019
"page_account_table_platform": "Plattform",
4120
"page_account_table_expedition": "Expedition",
4221
"page_account_table_drop": "Drop",
43-
"page_account_success_download_title": "Download gestartet",
44-
"page_account_success_download_description": "Datei wird heruntergeladen.",
45-
"page_account_reset_title": "Editor zurückgesetzt",
46-
"page_account_reset_description": "Neue Datei kann hochgeladen werden.",
47-
"page_account_processing": "Verarbeite Datei...",
48-
"page_account_upload_failed": "Upload fehlgeschlagen – erneut versuchen",
49-
"page_account_file_loaded": "Datei geladen: {filename}",
50-
"page_account_ready_edit": "Bereit zur Bearbeitung",
51-
"page_account_load_different": "Andere Datei laden",
52-
"page_account_processing_button": "Verarbeite...",
53-
"page_account_location_title": "Speicherort der Kontodaten",
54-
"page_account_location_description": "Die Spielstände für {gameName} liegen hier:",
55-
"page_account_location_linux": "Linux (Proton):",
56-
"page_account_location_windows": "Windows:",
57-
"page_account_location_linux_path": "/home/<benutzername>/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/",
58-
"page_account_location_windows_path": "C:/users/<benutzername>/AppData/Roaming/HelloGames/NMS/",
59-
"page_account_location_instructions": "Dort findest du die Datei {filename}, die die Kontodaten enthält.",
6022
"page_home_title": "Start",
6123
"page_home_description": "No Man's Sky Spielstand- & Konto-Editor",
6224
"page_home_hero_title": "Quelloffener No Man's Sky Spielstand-Editor",
@@ -66,5 +28,51 @@
6628
"page_home_feature_local_title": "Lokal",
6729
"page_home_feature_local_description": "Alle Änderungen erfolgen nur auf deinem PC.",
6830
"page_home_feature_ui_title": "Einfache Oberfläche",
69-
"page_home_feature_ui_description": "Übersichtliches Design für schnelle Bearbeitung."
31+
"page_home_feature_ui_description": "Übersichtliches Design für schnelle Bearbeitung.",
32+
"upload_error_multiple_files_title": "Mehrere Dateien erkannt",
33+
"upload_error_multiple_files_description": "Bitte nur eine Datei hochladen.",
34+
"upload_error_no_file_title": "Keine Datei",
35+
"upload_error_no_file_description": "Bitte wähle eine Datei aus.",
36+
"upload_error_invalid_file_type_title": "Ungültiger Typ",
37+
"upload_error_invalid_file_type_description": "Bitte eine .hg-Datei hochladen.",
38+
"upload_error_file_too_large_title": "Datei zu groß",
39+
"upload_error_file_too_large_description": "Maximale Größe: {maxSize}MB.",
40+
"upload_error_file_corrupted_title": "Datei beschädigt",
41+
"upload_error_file_corrupted_description": "Die Datei ist fehlerhaft oder hat ein ungültiges Format.",
42+
"upload_loading_title": "Lädt...",
43+
"upload_loading_description": "Datei wird verarbeitet.",
44+
"upload_success_title": "Verarbeitung abgeschlossen",
45+
"upload_success_description": "Datei erfolgreich verarbeitet.",
46+
"upload_input": "Zum Hochladen klicken oder Datei hierher ziehen",
47+
"upload_input_error": "Upload fehlgeschlagen – erneut versuchen",
48+
"upload_input_processing": "Verarbeite Datei...",
49+
"upload_location_account_title": "Speicherort der Kontodaten",
50+
"upload_location_account_description": "Die Spielstände für No Man's Sky liegen hier:",
51+
"upload_location_account_linux": "Linux (Proton):",
52+
"upload_location_account_windows": "Windows:",
53+
"upload_location_account_linux_path": "/home/<benutzername>/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/",
54+
"upload_location_account_windows_path": "C:/users/<benutzername>/AppData/Roaming/HelloGames/NMS/",
55+
"upload_location_account_instructions": "Dort findest du die Datei accountdata.hg, die die Kontodaten enthält.",
56+
"upload_location_save_title": "Speicherort der Spielstände",
57+
"upload_location_save_description": "Die Spielstände für No Man's Sky liegen hier:",
58+
"upload_location_save_linux": "Linux (Proton):",
59+
"upload_location_save_windows": "Windows:",
60+
"upload_location_save_linux_path": "/home/<benutzername>/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/",
61+
"upload_location_save_windows_path": "C:/users/<benutzername>/AppData/LocalLow/HelloGames/NMS/",
62+
"upload_location_save_instructions": "Dort findest du die Datei save.hg, die deine Spielstände enthält.",
63+
"fileinfo_loaded": "Datei geladen: {filename}",
64+
"fileinfo_load_different": "Andere Datei laden",
65+
"fileinfo_ready_edit": "Bereit zur Bearbeitung",
66+
"fileinfo_load_different_success_title": "Andere Datei laden",
67+
"fileinfo_load_different_success_description": "Der Editor wurde zurückgesetzt. Du kannst eine neue Datei hochladen.",
68+
"fileinfo_load_different_failed_title": "Fehler",
69+
"fileinfo_load_different_failed_description": "Der Editor konnte nicht zurückgesetzt werden.",
70+
"export_button": "Herunterladen",
71+
"export_button_processing": "Exportiere...",
72+
"export_processing_title": "Exportiere...",
73+
"export_processing_description": "Datei wird exportiert.",
74+
"export_failed_title": "Download fehlgeschlagen",
75+
"export_failed_description": "Export ist fehlgeschlagen.",
76+
"export_success_title": "Download gestartet",
77+
"export_success_description": "Datei wird heruntergeladen."
7078
}

messages/en.json

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,9 @@
77
"theme_dark": "Dark",
88
"page_save_title": "Save Game Editor",
99
"page_save_description": "Edit No Man's Sky save games. Upload a save.hg file.",
10-
"page_save_warning_notimplemented_title": "Not available yet",
11-
"page_save_warning_notimplemented_description": "The save game editor is still in development.",
1210
"page_account_title": "Account Editor",
1311
"page_account_description": "Manage expedition rewards, Twitch drops, and platform bonuses. Upload your account file.",
14-
"page_account_draganddrop_title": "Click to upload or drag file here",
15-
"page_account_error_uploadmultiplefiles_title": "Multiple files detected",
16-
"page_account_error_uploadmultiplefiles_description": "Please upload only one file.",
17-
"page_account_error_invalidfile_title": "Invalid file",
18-
"page_account_error_invalidfile_description": "Please upload a valid .hg file.",
19-
"page_account_error_filesize_title": "File too large",
20-
"page_account_error_filesize_description": "Maximum size: {maxSize}MB.",
21-
"page_account_error_nofile_title": "No file",
22-
"page_account_error_nofile_description": "Please select a file to upload.",
23-
"page_account_error_filetype_title": "Invalid type",
24-
"page_account_error_filetype_description": "Please upload a .hg file.",
25-
"page_account_error_corrupted_title": "Corrupted file",
26-
"page_account_error_corrupted_description": "The file is damaged or invalid.",
27-
"page_account_error_download_title": "Download failed",
28-
"page_account_error_download_description": "Could not prepare account data for download.",
29-
"page_account_toast_loading_title": "Loading...",
30-
"page_account_toast_loading_description": "Processing file.",
31-
"page_account_toast_uploadsuccess_title": "Done",
32-
"page_account_toast_uploadsuccess_description": "File processed successfully.",
33-
"page_account_export": "Export account data",
12+
"page_account_tab_start": "Start",
3413
"page_account_tab_season_rewards": "Expedition rewards",
3514
"page_account_tab_twitch_rewards": "Twitch rewards",
3615
"page_account_tab_platform_rewards": "Platform rewards",
@@ -40,23 +19,6 @@
4019
"page_account_table_platform": "Platform",
4120
"page_account_table_expedition": "Expedition",
4221
"page_account_table_drop": "Drop",
43-
"page_account_success_download_title": "Download started",
44-
"page_account_success_download_description": "File is ready to download.",
45-
"page_account_reset_title": "Editor reset",
46-
"page_account_reset_description": "You can upload a new file.",
47-
"page_account_processing": "Processing file...",
48-
"page_account_upload_failed": "Upload failed – Try again",
49-
"page_account_file_loaded": "File loaded: {filename}",
50-
"page_account_ready_edit": "Ready to edit",
51-
"page_account_load_different": "Load another file",
52-
"page_account_processing_button": "Processing...",
53-
"page_account_location_title": "Account data location",
54-
"page_account_location_description": "{gameName} save games are located here:",
55-
"page_account_location_linux": "Linux (Proton):",
56-
"page_account_location_windows": "Windows:",
57-
"page_account_location_linux_path": "/home/<username>/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/",
58-
"page_account_location_windows_path": "C:/users/<username>/AppData/Roaming/HelloGames/NMS/",
59-
"page_account_location_instructions": "Look for {filename} in these folders. It contains the account data.",
6022
"page_home_title": "Home",
6123
"page_home_description": "No Man's Sky Save Game & Account Editor",
6224
"page_home_hero_title": "Open Source No Man's Sky Save Game Editor",
@@ -66,5 +28,51 @@
6628
"page_home_feature_local_title": "Local",
6729
"page_home_feature_local_description": "All edits happen only on your computer.",
6830
"page_home_feature_ui_title": "Simple Interface",
69-
"page_home_feature_ui_description": "Clear design for easy editing."
31+
"page_home_feature_ui_description": "Clear design for easy editing.",
32+
"upload_error_multiple_files_title": "Multiple files detected",
33+
"upload_error_multiple_files_description": "Please upload only one file.",
34+
"upload_error_no_file_title": "No file",
35+
"upload_error_no_file_description": "Please select a file.",
36+
"upload_error_invalid_file_type_title": "Invalid type",
37+
"upload_error_invalid_file_type_description": "Please upload a .hg file.",
38+
"upload_error_file_too_large_title": "File too large",
39+
"upload_error_file_too_large_description": "Maximum size: {maxSize}MB.",
40+
"upload_error_file_corrupted_title": "Corrupted file",
41+
"upload_error_file_corrupted_description": "The file is damaged or invalid.",
42+
"upload_loading_title": "Loading...",
43+
"upload_loading_description": "File is being processed.",
44+
"upload_success_title": "Processing complete",
45+
"upload_success_description": "File processed successfully.",
46+
"upload_input": "Click to upload or drag file here",
47+
"upload_input_error": "Upload failed – try again",
48+
"upload_input_processing": "Processing file...",
49+
"upload_location_account_title": "Account data location",
50+
"upload_location_account_description": "No Man's Sky save games are located here:",
51+
"upload_location_account_linux": "Linux (Proton):",
52+
"upload_location_account_windows": "Windows:",
53+
"upload_location_account_linux_path": "/home/<username>/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/",
54+
"upload_location_account_windows_path": "C:/users/<username>/AppData/Roaming/HelloGames/NMS/",
55+
"upload_location_account_instructions": "Look for the accountdata.hg file in these folders. It contains the account data.",
56+
"upload_location_save_title": "Save game location",
57+
"upload_location_save_description": "No Man's Sky save games are located here:",
58+
"upload_location_save_linux": "Linux (Proton):",
59+
"upload_location_save_windows": "Windows:",
60+
"upload_location_save_linux_path": "/home/<username>/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/",
61+
"upload_location_save_windows_path": "C:/users/<username>/AppData/LocalLow/HelloGames/NMS/",
62+
"upload_location_save_instructions": "Look for the save.hg file in these folders. It contains the save data.",
63+
"fileinfo_loaded": "File loaded: {filename}",
64+
"fileinfo_load_different": "Load another file",
65+
"fileinfo_ready_edit": "Ready to edit",
66+
"fileinfo_load_different_success_title": "Load another file",
67+
"fileinfo_load_different_success_description": "The editor has been reset. You can upload a new file.",
68+
"fileinfo_load_different_failed_title": "Error",
69+
"fileinfo_load_different_failed_description": "The editor could not be reset.",
70+
"export_button": "Download",
71+
"export_button_processing": "Exporting...",
72+
"export_processing_title": "Exporting...",
73+
"export_processing_description": "File is being exported.",
74+
"export_failed_title": "Download failed",
75+
"export_failed_description": "Export failed.",
76+
"export_success_title": "Download started",
77+
"export_success_description": "File is being downloaded."
7078
}

src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
document.documentElement.classList.toggle('light', localStorage.getItem('theme') === 'light');
1010
</script>
1111
</head>
12-
<body data-sveltekit-preload-data="hover">
12+
<body data-sveltekit-preload-data="hover" class="size-full pt-16">
1313
<div style="display: contents">%sveltekit.body%</div>
1414
</body>
1515
</html>

src/components/ExportButton.svelte

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<script lang="ts">
2+
import { m } from '$lib/paraglide/messages';
3+
import toast from '$lib/toast/index.svelte';
4+
import { ArrowPath, DocumentArrowDown, DocumentArrowUp } from '@steeze-ui/heroicons';
5+
import { Icon } from '@steeze-ui/svelte-icon';
6+
7+
let { callback = async () => {} }: { callback: () => Promise<void> } = $props();
8+
9+
let blocked = $state(false);
10+
11+
async function handleClick() {
12+
if (blocked) return;
13+
blocked = true;
14+
try {
15+
toast.info(m.export_processing_title(), m.export_processing_description());
16+
await callback();
17+
toast.success(m.export_success_title(), m.export_success_description());
18+
} catch (e) {
19+
toast.error(m.export_failed_title(), m.export_failed_description());
20+
}
21+
blocked = false;
22+
}
23+
</script>
24+
25+
<div class="flex flex-col gap-3 sm:flex-row sm:justify-center">
26+
<button
27+
onclick={handleClick}
28+
disabled={blocked}
29+
type="button"
30+
class="flex items-center justify-center gap-x-2 rounded-md bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:cursor-not-allowed disabled:opacity-50"
31+
>
32+
{#if blocked}
33+
<Icon src={ArrowPath} aria-hidden="true" class="-ml-0.5 size-5 animate-spin" />
34+
{m.export_button_processing()}
35+
{:else}
36+
<Icon src={DocumentArrowDown} aria-hidden="true" class="-ml-0.5 size-5" />
37+
{m.export_button()}
38+
{/if}
39+
</button>
40+
</div>

src/components/FileInfo.svelte

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<script lang="ts">
2+
import { m } from '$lib/paraglide/messages';
3+
import toast from '$lib/toast/index.svelte';
4+
import { DocumentArrowUp } from '@steeze-ui/heroicons';
5+
import { Icon } from '@steeze-ui/svelte-icon';
6+
7+
let { fileName, callback = async () => {} }: { fileName: string; callback: () => Promise<void> } = $props();
8+
9+
let blocked = $state(false);
10+
11+
async function handleClick() {
12+
if (blocked) return;
13+
blocked = true;
14+
try {
15+
await callback();
16+
toast.info(m.fileinfo_load_different_success_title(), m.fileinfo_load_different_success_description());
17+
} catch (e) {
18+
toast.error(m.fileinfo_load_different_failed_title(), m.fileinfo_load_different_failed_description());
19+
}
20+
blocked = false;
21+
}
22+
</script>
23+
24+
<div class="rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20">
25+
<div class="flex items-center justify-between">
26+
<div class="flex items-center space-x-3">
27+
<div class="flex-shrink-0">
28+
<Icon src={DocumentArrowUp} class="size-5 text-green-600 dark:text-green-400" />
29+
</div>
30+
<div class="min-w-0 flex-1">
31+
<p class="text-sm font-medium text-green-800 dark:text-green-200">
32+
{m.fileinfo_loaded({ filename: fileName })}
33+
</p>
34+
<p class="text-sm text-green-600 dark:text-green-300">
35+
{m.fileinfo_ready_edit()}
36+
</p>
37+
</div>
38+
</div>
39+
<button type="button" onclick={handleClick} disabled={blocked} class="text-sm font-medium text-green-700 hover:text-green-900 disabled:cursor-not-allowed disabled:opacity-50 dark:text-green-300 dark:hover:text-green-100">
40+
{m.fileinfo_load_different()}
41+
</button>
42+
</div>
43+
</div>

src/components/Nav.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{/if}
2222
{/snippet}
2323

24-
<nav class="relative bg-white dark:dark:bg-gray-800/50 dark:after:pointer-events-none dark:after:absolute dark:after:inset-x-0 dark:after:bottom-0 dark:after:h-px dark:after:bg-white/10 light:shadow-sm">
24+
<nav class="fixed top-0 left-0 z-10 w-full bg-white dark:bg-gray-900 dark:after:pointer-events-none dark:after:absolute dark:after:inset-x-0 dark:after:bottom-0 dark:after:h-px dark:after:bg-white/10 light:shadow-sm">
2525
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
2626
<div class="flex h-16 justify-between">
2727
<div class="flex">
@@ -51,7 +51,7 @@
5151
</svg>
5252
</Select.Trigger>
5353
<Select.Portal>
54-
<Select.Content class="max-h-56 overflow-auto rounded-md bg-white py-1 text-base shadow-lg outline-1 outline-black/5 sm:text-sm dark:bg-gray-800 dark:outline-white/10">
54+
<Select.Content class="z-10 max-h-56 overflow-auto rounded-md bg-white py-1 text-base shadow-lg outline-1 outline-black/5 sm:text-sm dark:bg-gray-800 dark:outline-white/10">
5555
{#each Object.values(themes) as theme (theme.id)}
5656
<Select.Item
5757
value={theme.id}
@@ -96,7 +96,7 @@
9696
</svg>
9797
</Select.Trigger>
9898
<Select.Portal>
99-
<Select.Content class="max-h-56 overflow-auto rounded-md bg-white py-1 text-base shadow-lg outline-1 outline-black/5 sm:text-sm dark:bg-gray-800 dark:outline-white/10">
99+
<Select.Content class="z-10 max-h-56 overflow-auto rounded-md bg-white py-1 text-base shadow-lg outline-1 outline-black/5 sm:text-sm dark:bg-gray-800 dark:outline-white/10">
100100
{#each Object.values(languages) as lang (lang.id)}
101101
<Select.Item
102102
value={lang.id}

0 commit comments

Comments
 (0)