mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
added fs platform list to platform bind/version dialog
This commit is contained in:
@@ -8,6 +8,7 @@ from config import (
|
||||
)
|
||||
from endpoints.responses.heartbeat import HeartbeatResponse
|
||||
from fastapi import APIRouter
|
||||
from handler.filesystem import fs_platform_handler
|
||||
from handler.metadata.igdb_handler import IGDB_API_ENABLED
|
||||
from handler.metadata.moby_handler import MOBY_API_ENABLED
|
||||
from utils import get_version
|
||||
@@ -30,6 +31,7 @@ def heartbeat() -> HeartbeatResponse:
|
||||
"IGDB_API_ENABLED": IGDB_API_ENABLED,
|
||||
"MOBY_API_ENABLED": MOBY_API_ENABLED,
|
||||
},
|
||||
"FS_PLATFORMS": fs_platform_handler.get_platforms(),
|
||||
"WATCHER": {
|
||||
"ENABLED": ENABLE_RESCAN_ON_FILESYSTEM_CHANGE,
|
||||
"TITLE": "Rescan on filesystem change",
|
||||
|
||||
@@ -27,3 +27,4 @@ class HeartbeatResponse(TypedDict):
|
||||
SCHEDULER: SchedulerDict
|
||||
ANY_SOURCE_ENABLED: bool
|
||||
METADATA_SOURCES: MetadataSourcesDict
|
||||
FS_PLATFORMS: list
|
||||
|
||||
@@ -13,4 +13,5 @@ export type HeartbeatResponse = {
|
||||
SCHEDULER: SchedulerDict;
|
||||
ANY_SOURCE_ENABLED: boolean;
|
||||
METADATA_SOURCES: MetadataSourcesDict;
|
||||
FS_PLATFORMS: Array<any>;
|
||||
};
|
||||
|
||||
@@ -3,6 +3,7 @@ import PlatformIcon from "@/components/common/Platform/Icon.vue";
|
||||
import RDialog from "@/components/common/RDialog.vue";
|
||||
import configApi from "@/services/api/config";
|
||||
import platformApi from "@/services/api/platform";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import storeConfig from "@/stores/config";
|
||||
import { type Platform } from "@/stores/platforms";
|
||||
import type { Events } from "@/types/emitter";
|
||||
@@ -16,7 +17,8 @@ const show = ref(false);
|
||||
const configStore = storeConfig();
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
const supportedPlatforms = ref<Platform[]>();
|
||||
const fsSlugToCreate = ref("");
|
||||
const heartbeat = storeHeartbeat();
|
||||
const fsSlugToCreate = ref<string>("");
|
||||
const selectedPlatform = ref<Platform>();
|
||||
emitter?.on(
|
||||
"showCreatePlatformBindingDialog",
|
||||
@@ -96,7 +98,8 @@ function closeDialog() {
|
||||
<template #content>
|
||||
<v-row class="py-2 px-4 align-center" no-gutters>
|
||||
<v-col cols="6">
|
||||
<v-text-field
|
||||
<v-select
|
||||
:items="heartbeat.value.FS_PLATFORMS"
|
||||
v-model="fsSlugToCreate"
|
||||
label="Folder name"
|
||||
variant="outlined"
|
||||
@@ -106,7 +109,7 @@ function closeDialog() {
|
||||
<template #append>
|
||||
<v-icon icon="mdi-menu-right" class="mr-4 text-romm-gray" />
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-select>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<v-autocomplete
|
||||
|
||||
@@ -6,6 +6,7 @@ import platformApi from "@/services/api/platform";
|
||||
import storeConfig from "@/stores/config";
|
||||
import { type Platform } from "@/stores/platforms";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject, ref } from "vue";
|
||||
import { useDisplay } from "vuetify";
|
||||
@@ -16,7 +17,8 @@ const show = ref(false);
|
||||
const configStore = storeConfig();
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
const supportedPlatforms = ref<Platform[]>();
|
||||
const fsSlugToCreate = ref();
|
||||
const heartbeat = storeHeartbeat();
|
||||
const fsSlugToCreate = ref<string>("");
|
||||
const selectedPlatform = ref<Platform>();
|
||||
emitter?.on(
|
||||
"showCreatePlatformVersionDialog",
|
||||
@@ -96,7 +98,8 @@ function closeDialog() {
|
||||
<template #content>
|
||||
<v-row class="py-2 px-4 align-center" no-gutters>
|
||||
<v-col cols="6">
|
||||
<v-text-field
|
||||
<v-select
|
||||
:items="heartbeat.value.FS_PLATFORMS"
|
||||
v-model="fsSlugToCreate"
|
||||
label="Platform version"
|
||||
variant="outlined"
|
||||
@@ -106,7 +109,7 @@ function closeDialog() {
|
||||
<template #append>
|
||||
<v-icon icon="mdi-menu-right" class="mr-4 text-romm-gray" />
|
||||
</template>
|
||||
</v-text-field>
|
||||
</v-select>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<v-autocomplete
|
||||
|
||||
Reference in New Issue
Block a user