fix: info panel (#3859)

This commit is contained in:
IMB11
2025-06-28 22:54:56 +01:00
committed by GitHub
parent db963eb5de
commit 14a7787e3d

View File

@@ -104,7 +104,7 @@
<tr v-for="property in properties" :key="property.name">
<td v-if="property.value !== 'Unknown'" class="py-3">{{ property.name }}</td>
<td v-if="property.value !== 'Unknown'" class="px-4">
<UiCopyCode :text="property.value" />
<CopyCode :text="property.value" />
</td>
</tr>
</tbody>
@@ -115,13 +115,10 @@
</template>
<script setup lang="ts">
import { ButtonStyled } from "@modrinth/ui";
import { ButtonStyled, CopyCode } from "@modrinth/ui";
import { CopyIcon, ExternalIcon, EyeIcon, EyeOffIcon } from "@modrinth/assets";
import { ModrinthServer } from "~/composables/servers/modrinth-servers.ts";
const route = useNativeRoute();
const serverId = route.params.id as string;
const props = defineProps<{
server: ModrinthServer;
}>();
@@ -147,8 +144,8 @@ const copyToClipboard = (name: string, textToCopy?: string) => {
};
const properties = [
{ name: "Server ID", value: serverId ?? "Unknown" },
{ name: "Node", value: data.value?.datacenter ?? "Unknown" },
{ name: "Server ID", value: props.server.serverId ?? "Unknown" },
{ name: "Node", value: data.value?.node?.instance ?? "Unknown" },
{ name: "Kind", value: data.value?.upstream?.kind ?? data.value?.loader ?? "Unknown" },
{ name: "Project ID", value: data.value?.upstream?.project_id ?? "Unknown" },
{ name: "Version ID", value: data.value?.upstream?.version_id ?? "Unknown" },