-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(manager): support multiple installer
- Loading branch information
Showing
14 changed files
with
303 additions
and
217 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
plugins/frontend/console/client/components/form/schema/form.vue
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
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,63 @@ | ||
<template> | ||
<transition name="fade"> | ||
<div class="loading-overlay" v-if="!state.downloading"> | ||
<div class="spinner"> | ||
<svg class="circular" viewBox="25 25 50 50"> | ||
<circle class="path" cx="50" cy="50" r="20" fill="none"></circle> | ||
</svg> | ||
<p>正在更新依赖……</p> | ||
</div> | ||
</div> | ||
</transition> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { state } from '../utils' | ||
</script> | ||
|
||
<style lang="scss"> | ||
.loading-overlay { | ||
position: fixed; | ||
left: 0; | ||
bottom: 0; | ||
top: 0; | ||
right: 0; | ||
z-index: 1000; | ||
transition: 0.4s opacity ease; | ||
user-select: none; | ||
background-color: #0009; | ||
.spinner { | ||
top: 50%; | ||
width: 100%; | ||
text-align: center; | ||
position: absolute; | ||
transform: translateY(-50%); | ||
p { | ||
color: var(--bg0); | ||
margin-bottom: 0; | ||
} | ||
svg { | ||
display: inline; | ||
height: 2.5rem; | ||
width: 2.5rem; | ||
animation: loading-rotate 2s linear infinite; | ||
circle { | ||
animation: loading-dash 1.5s ease-in-out infinite; | ||
stroke-dasharray: 90, 150; | ||
stroke-dashoffset: 0; | ||
stroke-width: 3; | ||
stroke: var(--el-color-primary); | ||
stroke-linecap: round; | ||
} | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template> | ||
<tr> | ||
<td>{{ name }}</td> | ||
<td>{{ current || '-' }}{{ current === remote[0].version ? ' (最新)' : '' }}</td> | ||
<td> | ||
<el-select v-model="value"> | ||
<el-option value="">移除插件</el-option> | ||
<el-option | ||
v-for="({ version }) in remote" | ||
:key="version" :value="version" | ||
>{{ version }}{{ version === current ? ' (当前)' : '' }}</el-option> | ||
</el-select> | ||
</td> | ||
</tr> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { store } from '~/client' | ||
import { config } from '../utils' | ||
const props = defineProps({ | ||
name: String, | ||
}) | ||
const value = computed({ | ||
get() { | ||
const target = config.override[props.name] | ||
return target === '' ? '移除插件' : target | ||
}, | ||
set(target: string) { | ||
if (target === '' && !current.value || target === current.value) { | ||
delete config.override[props.name] | ||
} else { | ||
config.override[props.name] = target | ||
} | ||
}, | ||
}) | ||
const current = computed(() => { | ||
return store.packages[props.name]?.version | ||
}) | ||
const remote = computed(() => { | ||
return store.market[props.name].versions | ||
}) | ||
</script> |
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
Oops, something went wrong.