diff --git a/server/components/GameEditor/Metadata.vue b/server/components/GameEditor/Metadata.vue
index d4bb1657..ebb4ff30 100644
--- a/server/components/GameEditor/Metadata.vue
+++ b/server/components/GameEditor/Metadata.vue
@@ -30,7 +30,11 @@
-
+
@@ -85,6 +129,7 @@ import {
} from "@headlessui/vue";
const props = defineProps<{
items: Array;
+ create?: (value: string) => Promise;
}>();
const model = defineModel<{ [key: string]: boolean }>();
@@ -102,7 +147,37 @@ const enabledItems = computed(() =>
props.items.filter((e) => model.value?.[e.param]),
);
+// I do not love how this works, but it's okay for now
+const CREATE_PREFIX = "CREATE";
+
+const createLoading = ref(false);
function add(item: string) {
+ if (item.startsWith(CREATE_PREFIX)) {
+ if (!props.create) return;
+ const value = item.substring(CREATE_PREFIX.length);
+ createLoading.value = true;
+ props
+ .create(value)
+ .then(
+ (result) => {
+ add(result);
+ },
+ (err) => {
+ createModal(
+ ModalType.Notification,
+ {
+ title: "Failed to create value",
+ description: err,
+ },
+ (_, c) => c(),
+ );
+ },
+ )
+ .finally(() => {
+ createLoading.value = false;
+ });
+ return;
+ }
search.value = "";
model.value ??= {};
model.value[item] = true;
diff --git a/server/i18n/locales/en_us.json b/server/i18n/locales/en_us.json
index a56417fc..196128ed 100644
--- a/server/i18n/locales/en_us.json
+++ b/server/i18n/locales/en_us.json
@@ -181,7 +181,13 @@
"servers": "Servers",
"srLoading": "Loading…",
"tags": "Tags",
- "today": "Today"
+ "today": "Today",
+ "components": {
+ "multiitem": {
+ "placeholder": "Start typing...",
+ "new": "Create new: \"{0}\""
+ }
+ }
},
"drop": {
"desc": "An open-source game distribution platform built for speed, flexibility and beauty.",
diff --git a/server/server/api/v1/store/index.get.ts b/server/server/api/v1/store/index.get.ts
index 23c15e7a..5e38581d 100644
--- a/server/server/api/v1/store/index.get.ts
+++ b/server/server/api/v1/store/index.get.ts
@@ -53,24 +53,34 @@ export default defineEventHandler(async (h3) => {
: undefined;
const platformFilter = filterPlatforms
? ({
- versions: {
- some: {
- launches: {
+ OR: [
+ {
+ versions: {
some: {
- platform: {
- in: filterPlatforms,
- },
- },
- },
- setups: {
- some: {
- platform: {
- in: filterPlatforms,
+ setups: {
+ some: {
+ platform: {
+ in: filterPlatforms,
+ },
+ },
},
},
},
},
- },
+ {
+ versions: {
+ some: {
+ launches: {
+ some: {
+ platform: {
+ in: filterPlatforms,
+ },
+ },
+ },
+ },
+ },
+ },
+ ],
} satisfies Prisma.GameWhereInput)
: undefined;
diff --git a/server/server/internal/auth/oidc/index.ts b/server/server/internal/auth/oidc/index.ts
index 32750f1a..b8cd8eb6 100644
--- a/server/server/internal/auth/oidc/index.ts
+++ b/server/server/internal/auth/oidc/index.ts
@@ -153,14 +153,14 @@ export class OIDCManager {
this.JWKS = jose.createRemoteJWKSet(this.oidcConfiguration.jwks_uri);
this.redirectUrl = new URL(
- `${this.externalUrl.toString()}api/v1/auth/odic/callback`,
+ `${this.externalUrl.toString()}api/v1/auth/oidc/callback`,
);
}
static async create() {
if (!systemConfig.shouldOidcRequireHttps()) {
console.warn(
- "Disabling HTTPS requirement for ODIC provider, not recommened in production enviroments",
+ "Disabling HTTPS requirement for OIDC provider, not recommened in production enviroments",
);
}
diff --git a/server/server/internal/config/sys-conf.ts b/server/server/internal/config/sys-conf.ts
index 72cb980d..75ddbdde 100644
--- a/server/server/internal/config/sys-conf.ts
+++ b/server/server/internal/config/sys-conf.ts
@@ -12,7 +12,7 @@ class SystemConfig {
);
private dropVersion: string;
private gitRef: string;
- private odicRequireHttps;
+ private oidcRequireHttps;
private checkForUpdates = getUpdateCheckConfig();
@@ -22,14 +22,14 @@ class SystemConfig {
this.dropVersion = config.dropVersion;
this.gitRef = config.gitRef;
- const odicRequireHttps = process.env.OIDC_REQUIRE_HTTPS as
+ const oidcRequireHttps = process.env.OIDC_REQUIRE_HTTPS as
| string
| undefined;
// default to true if not set
- this.odicRequireHttps =
- odicRequireHttps !== undefined &&
- odicRequireHttps.toLocaleLowerCase() === "false"
+ this.oidcRequireHttps =
+ oidcRequireHttps !== undefined &&
+ oidcRequireHttps.toLocaleLowerCase() === "false"
? false
: true;
}
@@ -64,7 +64,7 @@ class SystemConfig {
// if oidc should require https for endpoints
shouldOidcRequireHttps() {
- return this.odicRequireHttps;
+ return this.oidcRequireHttps;
}
}