Skip to content

Commit

Permalink
feat: change to flex grid
Browse files Browse the repository at this point in the history
  • Loading branch information
SeddonShen committed Jan 5, 2025
1 parent f5f0b63 commit b30e481
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions docs/components/Agents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,34 +66,30 @@ async function applyISSPA(password: string): Promise<void> {
}
}
onMounted(() => {
const host_url = 'https://node.seddon.lol/http/121.43.183.241:8000/nodelist/';
get_nodelist(host_url);
});
</script>

<template>
<div :style="{
boxSizing: 'border-box',
width: '100%',
padding: '30px',
backgroundColor: 'var(--color-fill-2)',
display: 'flex',
flexWrap: 'wrap',
gap: '20px', // 设置卡片之间的间距
}">
<div v-for="node in nodeList" :key="node.name">
<Card :style="{ width: '200px' }" :title="node.name.toUpperCase()" class="card-isspa">
<div v-for="node in nodeList" :key="node.name" :style="{ width: 'calc(33.33% - 20px)' }">
<Card :style="{ width: '100%' }" :title="node.name.toUpperCase()" class="card-isspa">
<template #extra>
<!-- <a-link>申请使用</a-link> -->
<!-- <a-link :style="{ color: node.status === 'Unknown' ? 'red' : 'inherit' }">申请使用</a-link> -->
<a-link :style="{ color: node.status === 'Unknown' ? 'red' : 'inherit' }">{{ node.status === 'Unknown' ? 'Offline'
: 'Online' }}</a-link>
<a-link :style="{ color: node.status === 'Unknown' ? 'red' : 'inherit' }">{{ node.status === 'Unknown' ? 'Offline' : 'Online' }}</a-link>
</template>
<p v-if="node.nodeInfo">
<b>Arch:</b> {{ node.nodeInfo.architecture }}<br>
<b>Operating System:</b> {{ node.nodeInfo.operatingSystem.charAt(0).toUpperCase() +
node.nodeInfo.operatingSystem.slice(1) }}<br>
<b>Operating System:</b> {{ node.nodeInfo.operatingSystem.charAt(0).toUpperCase() + node.nodeInfo.operatingSystem.slice(1) }}<br>
<b>OS Image:</b> {{ node.nodeInfo.osImage }}<br>
<b>Kernel Version:</b> {{ node.nodeInfo.kernelVersion }}<br>
<b>Container Runtime Version:</b> {{ node.nodeInfo.containerRuntimeVersion }}<br>
Expand All @@ -108,9 +104,10 @@ onMounted(() => {
<Button @click="handleApplyISSPA" type="primary" long :style="{ width: '30%' }">Apply for ISS Cloud</Button>
</div>
</template>

<style scoped>
.card-isspa {
width: 360px;
width: 100%;
margin-left: 24px;
transition-property: all;
}
Expand Down

0 comments on commit b30e481

Please sign in to comment.