-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
242 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,3 +103,7 @@ html.dark { | |
color: var(--primary); | ||
} | ||
} | ||
|
||
.k-group { | ||
display: inline-block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<svg class="k-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"> | ||
<path fill="currentColor" d="M425.7 256c-16.9 0-32.8-9-41.4-23.4L320 126l-64.2 106.6c-8.7 14.5-24.6 23.5-41.5 23.5-4.5 0-9-.6-13.3-1.9L64 215v178c0 14.7 10 27.5 24.2 31l216.2 54.1c10.2 2.5 20.9 2.5 31 0L551.8 424c14.2-3.6 24.2-16.4 24.2-31V215l-137 39.1c-4.3 1.3-8.8 1.9-13.3 1.9zm212.6-112.2L586.8 41c-3.1-6.2-9.8-9.8-16.7-8.9L320 64l91.7 152.1c3.8 6.3 11.4 9.3 18.5 7.3l197.9-56.5c9.9-2.9 14.7-13.9 10.2-23.1zM53.2 41L1.7 143.8c-4.6 9.2.3 20.2 10.1 23l197.9 56.5c7.1 2 14.7-1 18.5-7.3L320 64 69.8 32.1c-6.9-.8-13.5 2.7-16.6 8.9z"/> | ||
</svg> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<template> | ||
<nav> | ||
<k-button solid>下载全部</k-button> | ||
</nav> | ||
<k-card class="frameless"> | ||
<table class="table-header"> | ||
<colgroup> | ||
<col width="auto"> | ||
<col width="160px"> | ||
<col width="200px"> | ||
</colgroup> | ||
<thead> | ||
<tr> | ||
<th>插件名称</th> | ||
<th>当前版本</th> | ||
<th>目标版本</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
<el-scrollbar> | ||
<table class="table-body"> | ||
<colgroup> | ||
<col width="auto"> | ||
<col width="160px"> | ||
<col width="200px"> | ||
</colgroup> | ||
<tbody> | ||
<template v-for="name in names" :key="name"> | ||
<tr> | ||
<td>{{ name }}</td> | ||
<td>{{ store.packages[name]?.version || '-' }}</td> | ||
<td> | ||
<el-select v-model="config.override[name]"> | ||
<el-option | ||
v-for="({ version }, index) in store.market[name].versions" | ||
:key="version" :label="version + (index ? '' : ' (最新)')" :value="version" | ||
></el-option> | ||
</el-select> | ||
</td> | ||
</tr> | ||
</template> | ||
</tbody> | ||
</table> | ||
</el-scrollbar> | ||
</k-card> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { store } from '~/client' | ||
import { config } from '../utils' | ||
const names = computed(() => { | ||
const data = Object.values(store.packages).filter(item => !item.workspace && store.market[item.name]).map(item => item.name) | ||
for (const key in config.override) { | ||
if (!data.includes(key) && store.market[key]) data.push(key) | ||
} | ||
return data.sort((a, b) => a > b ? 1 : -1) | ||
}) | ||
</script> | ||
|
||
<style lang="scss"> | ||
.route-versions nav { | ||
margin-top: 2rem; | ||
padding: 0 2rem; | ||
.right { | ||
float: right; | ||
} | ||
} | ||
.route-versions .k-card { | ||
position: absolute; | ||
bottom: 0; | ||
height: calc(100vh - 8rem); | ||
left: var(--aside-width); | ||
right: 0; | ||
.k-card-body { | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
table { | ||
tr:first-child { | ||
border-top: none; | ||
} | ||
} | ||
tbody { | ||
tr { | ||
transition: 0.3s ease; | ||
} | ||
tr:hover { | ||
background-color: var(--bg1); | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.