Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
06fab427aa | |||
e3c2627fc5 | |||
e4b93b94b1 | |||
6e235a28c1 |
4 changed files with 27 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "v0.7.0",
|
"version": "v0.7.1",
|
||||||
"url": "ui/dist/index.html",
|
"url": "ui/dist/index.html",
|
||||||
"log_level": "INFO",
|
"log_level": "INFO",
|
||||||
"debug": false
|
"debug": false
|
||||||
|
|
|
@ -43,7 +43,7 @@ command_list = {
|
||||||
"clone": lambda: f"git\\bin\\git -c lfs.concurrenttransfers=100 clone {build_base_url(mower_ng_git_url)} --branch slow",
|
"clone": lambda: f"git\\bin\\git -c lfs.concurrenttransfers=100 clone {build_base_url(mower_ng_git_url)} --branch slow",
|
||||||
"set_remote": lambda: f"..\\git\\bin\\git remote set-url origin {build_base_url(mower_ng_git_url)}",
|
"set_remote": lambda: f"..\\git\\bin\\git remote set-url origin {build_base_url(mower_ng_git_url)}",
|
||||||
"set_lfs": lambda: f"..\\git\\bin\\git config lfs.url {build_base_url(mower_ng_git_url)}/info/lfs",
|
"set_lfs": lambda: f"..\\git\\bin\\git config lfs.url {build_base_url(mower_ng_git_url)}/info/lfs",
|
||||||
"fetch": lambda: f"..\\git\\bin\\git fetch {build_base_url(mower_ng_git_url)} {config.conf.branch} --progress",
|
"fetch": lambda: f"..\\git\\bin\\git fetch origin {config.conf.branch} --progress",
|
||||||
"switch": lambda: f"..\\git\\bin\\git -c lfs.concurrenttransfers=100 switch -f {config.conf.branch} --progress",
|
"switch": lambda: f"..\\git\\bin\\git -c lfs.concurrenttransfers=100 switch -f {config.conf.branch} --progress",
|
||||||
"reset": lambda: f"..\\git\\bin\\git -c lfs.concurrenttransfers=200 reset --hard origin/{config.conf.branch}",
|
"reset": lambda: f"..\\git\\bin\\git -c lfs.concurrenttransfers=200 reset --hard origin/{config.conf.branch}",
|
||||||
"pip_tools_install": lambda: f"..\\python\\Scripts\\pip install --no-cache-dir -i {mirror_list[config.conf.mirror]} pip-tools --no-warn-script-location",
|
"pip_tools_install": lambda: f"..\\python\\Scripts\\pip install --no-cache-dir -i {mirror_list[config.conf.mirror]} pip-tools --no-warn-script-location",
|
||||||
|
@ -279,7 +279,9 @@ class Api:
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
self.run("cli", "mower-ng", {"command": command, "path": path})
|
ret = self.run("cli", "mower-ng", {"command": command, "path": path})
|
||||||
|
if command == "launch" and ret == "success":
|
||||||
|
self.run("cli", "mower-ng", {"command": "webui", "path": path})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
custom_event(LogType.error, f"{cli_command[command]} 失败 {repr(e)}")
|
custom_event(LogType.error, f"{cli_command[command]} 失败 {repr(e)}")
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import 'vfonts/Lato.css'
|
|
||||||
import 'vfonts/FiraCode.css'
|
import 'vfonts/FiraCode.css'
|
||||||
import './styles/global.css'
|
import './styles/global.css'
|
||||||
|
|
||||||
|
|
|
@ -175,8 +175,8 @@ async function handle_migrate(key) {
|
||||||
显示日志
|
显示日志
|
||||||
</div>
|
</div>
|
||||||
</n-space>
|
</n-space>
|
||||||
<n-list class="instance-list" bordered>
|
<n-list class="instance_list" bordered>
|
||||||
<n-list-item>
|
<n-list-item class="instance_list_item">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<n-checkbox
|
<n-checkbox
|
||||||
v-model:checked="check_all"
|
v-model:checked="check_all"
|
||||||
|
@ -187,29 +187,26 @@ async function handle_migrate(key) {
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</n-list-item>
|
</n-list-item>
|
||||||
<n-list-item v-for="(item, index) in conf.instances" :key="index">
|
<n-list-item class="instance_list_item" v-for="(item, index) in conf.instances" :key="index">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<n-checkbox v-model:checked="item.checked"></n-checkbox>
|
<n-checkbox v-model:checked="item.checked"></n-checkbox>
|
||||||
</template>
|
</template>
|
||||||
<n-space vertical>
|
<n-space vertical>
|
||||||
<n-space v-if="update_instance_name_index != index">
|
<n-space v-if="update_instance_name_index != index">
|
||||||
<n-text>{{ item.name }}</n-text>
|
<n-text class="instance_name">{{ item.name }}</n-text>
|
||||||
<n-button size="tiny" @click="start_update_instance_name(index)">
|
<n-button size="tiny" @click="start_update_instance_name(index)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="Pencil"></n-icon>
|
<n-icon :component="Pencil"></n-icon>
|
||||||
</template>
|
</template>
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button @click="open_folder(item.path)" size="tiny">
|
|
||||||
<template #icon>
|
|
||||||
<n-icon :component="Folder"></n-icon>
|
|
||||||
</template>
|
|
||||||
</n-button>
|
|
||||||
</n-space>
|
</n-space>
|
||||||
<n-input
|
<n-input
|
||||||
v-else
|
v-else
|
||||||
|
class="instance_name_input"
|
||||||
:ref="(el) => setInstanceNameInputRef(el, index)"
|
:ref="(el) => setInstanceNameInputRef(el, index)"
|
||||||
v-model:value="item.name"
|
v-model:value="item.name"
|
||||||
@blur="end_update_instance_name"
|
@blur="end_update_instance_name"
|
||||||
|
clearable
|
||||||
></n-input>
|
></n-input>
|
||||||
</n-space>
|
</n-space>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
|
@ -234,6 +231,11 @@ async function handle_migrate(key) {
|
||||||
<n-icon :component="Stop"></n-icon>
|
<n-icon :component="Stop"></n-icon>
|
||||||
</template>
|
</template>
|
||||||
</n-button>
|
</n-button>
|
||||||
|
<n-button type="primary" ghost size="small" @click="open_folder(item.path)">
|
||||||
|
<template #icon>
|
||||||
|
<n-icon :component="Folder"></n-icon>
|
||||||
|
</template>
|
||||||
|
</n-button>
|
||||||
<n-popconfirm @positive-click="delete_instance(index, item.path)">
|
<n-popconfirm @positive-click="delete_instance(index, item.path)">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-button type="error" ghost size="small">
|
<n-button type="error" ghost size="small">
|
||||||
|
@ -256,9 +258,18 @@ async function handle_migrate(key) {
|
||||||
.launch-btn {
|
.launch-btn {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
.instance-list {
|
.instance_list {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
.instance_list_item {
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
.instance_name {
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
|
.instance_name_input {
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
.log {
|
.log {
|
||||||
min-height: 40vh;
|
min-height: 40vh;
|
||||||
max-height: 40vh;
|
max-height: 40vh;
|
||||||
|
@ -269,5 +280,6 @@ async function handle_migrate(key) {
|
||||||
}
|
}
|
||||||
.is_show_log_switch {
|
.is_show_log_switch {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Add table
Reference in a new issue