diff --git a/.prettierignore b/.prettierignore
index 1e7121f..3c9727c 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1 @@
-drop-base/
+drop-base/
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1cc3faf..5bb8636 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -148,7 +148,6 @@ type(scope)!: subject
```
- `type`: the type of the commit is one of the following:
-
- `feat`: new features.
- `fix`: bug fixes.
- `docs`: documentation changes.
@@ -165,7 +164,6 @@ type(scope)!: subject
- `scope`: section of the codebase that the commit makes changes to. If it makes changes to
many sections, or if no section in particular is modified, leave blank without the parentheses.
Examples:
-
- Commit that changes the `git` plugin:
```
@@ -179,7 +177,6 @@ type(scope)!: subject
```
For changes to plugins or themes, the scope should be the plugin or theme name:
-
- ✅ `fix(agnoster): commit subject`
- ❌ `fix(theme/agnoster): commit subject`
@@ -209,7 +206,6 @@ type(scope)!: subject
to specify other details, you can use the commit body, but it won't be visible.
Formatting tricks: the commit subject may contain:
-
- Links to related issues or PRs by writing `#issue`. This will be highlighted by the changelog tool:
```
diff --git a/components/AddLibraryButton.vue b/components/AddLibraryButton.vue
index 526e2eb..0db4d0e 100644
--- a/components/AddLibraryButton.vue
+++ b/components/AddLibraryButton.vue
@@ -84,7 +84,7 @@
-
@@ -122,20 +122,9 @@ async function toggleLibrary() {
body: {
id: props.gameId,
},
+ failTitle: t("errors.library.add.title"),
});
await refreshLibrary();
- } catch (e) {
- createModal(
- ModalType.Notification,
- {
- title: t("errors.library.add.title"),
- description: t("errors.library.add.desc", [
- // @ts-expect-error attempt to display statusMessage on error
- e?.statusMessage ?? t("errors.unknown"),
- ]),
- },
- (_, c) => c(),
- );
} finally {
isLibraryLoading.value = false;
}
@@ -147,26 +136,18 @@ async function toggleCollection(id: string) {
if (!collection) return;
const index = collection.entries.findIndex((e) => e.gameId == props.gameId);
- await $dropFetch(`/api/v1/collection/${id}/entry`, {
+ await $dropFetch(`/api/v1/collection/:id/entry`, {
method: index == -1 ? "POST" : "DELETE",
+ params: { id },
body: {
id: props.gameId,
},
+ failTitle: t("errors.library.add.title"),
});
await refreshCollection(id);
- } catch (e) {
- createModal(
- ModalType.Notification,
- {
- title: t("errors.library.add.title"),
- description: t("errors.library.add.desc", [
- // @ts-expect-error attempt to display statusMessage on error
- e?.statusMessage ?? t("errors.unknown"),
- ]),
- },
- (_, c) => c(),
- );
+ } finally {
+ /* empty */
}
}
diff --git a/components/LibraryDirectory.vue b/components/Directory/Library.vue
similarity index 89%
rename from components/LibraryDirectory.vue
rename to components/Directory/Library.vue
index 40ddf8c..ced13de 100644
--- a/components/LibraryDirectory.vue
+++ b/components/Directory/Library.vue
@@ -31,11 +31,11 @@
diff --git a/components/NewsDirectory.vue b/components/Directory/News.vue
similarity index 100%
rename from components/NewsDirectory.vue
rename to components/Directory/News.vue
diff --git a/components/GameCarousel.vue b/components/GameCarousel.vue
index 4190b85..6b2cc3e 100644
--- a/components/GameCarousel.vue
+++ b/components/GameCarousel.vue
@@ -44,9 +44,7 @@ const props = defineProps<{
width?: number;
}>();
-const { showGamePanelTextDecoration } = await $dropFetch(
- `/api/v1/admin/settings`,
-);
+const { showGamePanelTextDecoration } = await $dropFetch(`/api/v1/settings`);
const currentComponent = ref
();
diff --git a/components/GameEditor/Metadata.vue b/components/GameEditor/Metadata.vue
index 0494901..5dfa85f 100644
--- a/components/GameEditor/Metadata.vue
+++ b/components/GameEditor/Metadata.vue
@@ -23,10 +23,14 @@
class="relative inline-flex gap-x-3 items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
@click="() => (showEditCoreMetadata = true)"
>
- {{ $t("edit") }}
+ {{ $t("common.edit") }}
+
+
+
+
-
- {{ $t("close") }}
+ {{ $t("common.close") }}
@@ -335,7 +339,7 @@
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 transition-all duration-200 hover:scale-105 hover:shadow-lg hover:shadow-blue-500/25 active:scale-95 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
@click="() => insertImageAtCursor(image)"
>
- {{ $t("insert") }}
+ {{ $t("common.insert") }}
@@ -424,7 +428,7 @@
:class="['inline-flex w-full shadow-sm sm:ml-3 sm:w-auto']"
@click="() => coreMetadataUpdate_wrapper()"
>
- {{ $t("save") }}
+ {{ $t("common.save") }}