diff --git a/ui/src/HomePage2/GamesList.svelte b/ui/src/HomePage2/GamesList.svelte
index 1bb38b6..5c768c1 100644
--- a/ui/src/HomePage2/GamesList.svelte
+++ b/ui/src/HomePage2/GamesList.svelte
@@ -49,6 +49,10 @@
gameSpace.change({ type: 'set-is-archived', value: false }, true);
}
+ function handleExport(gameSpace: GameSpaceSyn) {
+ gameSpace.exportAsJson();
+ }
+
let showArchive = false;
@@ -60,6 +64,7 @@
onDuplicate={() => handleDuplicate($state)}
onArchive={() => handleArchive(gameSpace)}
onDelete={() => handleDelete(gameSpace.hash)}
+ onExport={() => handleExport(gameSpace)}
/>
{/each}
diff --git a/ui/src/HomePage2/GamesListItem.svelte b/ui/src/HomePage2/GamesListItem.svelte
index e089f19..631b55c 100644
--- a/ui/src/HomePage2/GamesListItem.svelte
+++ b/ui/src/HomePage2/GamesListItem.svelte
@@ -15,6 +15,7 @@
export let onArchive = () => {};
export let onDelete = () => {};
export let onUnarchive = () => {};
+ export let onExport = () => {};
let menuOpen = false;
let menuButtonEl: HTMLButtonElement;
@@ -40,7 +41,7 @@
// },
// );
- type MenuCommands = 'duplicate' | 'edit' | 'archive' | 'delete' | 'unarchive';
+ type MenuCommands = 'duplicate' | 'edit' | 'archive' | 'delete' | 'unarchive' | 'export';
function onSelectMenu(command: MenuCommands) {
switch (command) {
@@ -59,6 +60,9 @@
case 'unarchive':
onUnarchive();
break;
+ case 'export':
+ onExport();
+ break;
}
menuOpen = false;
}
@@ -130,6 +134,7 @@
]
: [
['duplicate', 'Duplicate'],
+ ['export', 'Export'],
['archive', 'Archive'],
['delete', 'Delete'],
]}
diff --git a/ui/src/HomePage2/HomePage2.svelte b/ui/src/HomePage2/HomePage2.svelte
index 2cc6adf..889e9e8 100644
--- a/ui/src/HomePage2/HomePage2.svelte
+++ b/ui/src/HomePage2/HomePage2.svelte
@@ -54,10 +54,15 @@