fix: improve system setting editors

This commit is contained in:
kuaifan 2026-08-13 11:08:06 +00:00
parent 139a7a168b
commit f49d6d604f
19 changed files with 97 additions and 30 deletions

View File

@ -129,6 +129,7 @@ class SystemController extends AbstractController
if (isset($setting['reg_invite'])) unset($setting['reg_invite']);
}
//
$setting['system_alias'] = ($setting['system_alias'] ?? '') ?: config('app.name');
$setting['reg'] = $setting['reg'] ?: 'open';
$setting['reg_identity'] = $setting['reg_identity'] ?: 'normal';
$setting['temp_account_alias'] = $setting['temp_account_alias'] ?: '';

View File

@ -2735,3 +2735,5 @@ WebDAV 路径冲突
消息设置
文件与存储
上传与媒体处理
至少保留一项
确定要删除该优先级吗?

View File

@ -39538,5 +39538,29 @@
"fr": "Importation et traitement des medias",
"id": "Unggah dan Pemrosesan Media",
"ru": "Загрузка и обработка медиа"
},
{
"key": "至少保留一项",
"zh": "",
"zh-CHT": "至少保留一項",
"en": "Keep at least one item",
"ko": "하나 이상의 항목을 유지하세요",
"ja": "少なくとも1項目は残してください",
"de": "Mindestens einen Eintrag beibehalten",
"fr": "Conservez au moins un element",
"id": "Pertahankan setidaknya satu item",
"ru": "Оставьте хотя бы один элемент"
},
{
"key": "确定要删除该优先级吗?",
"zh": "",
"zh-CHT": "確定要刪除該優先級嗎?",
"en": "Are you sure you want to delete this priority?",
"ko": "이 우선순위를 삭제하시겠습니까?",
"ja": "この優先度を削除しますか?",
"de": "Möchten Sie diese Priorität wirklich löschen?",
"fr": "Voulez-vous vraiment supprimer cette priorite ?",
"id": "Yakin ingin menghapus prioritas ini?",
"ru": "Удалить этот приоритет?"
}
]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -67,6 +67,8 @@ last_verified: v1.8.89
4. 重复添加多个模板
5. 点击页面底部「提交」,与同页项目设置一起保存并立即生效
删除某一行时点击最右侧的删除图标并确认;删除先保留在当前表单中,点击「提交」后才会生效,点击「重置」可撤销未提交的删除。系统至少保留一个项目模板。
## 与项目创建的关系
用户「新建项目」对话框 →「选择模板」下拉就是这里维护的列表。选某个模板后,项目创建时按列名顺序生成空列,无任务卡。

View File

@ -67,6 +67,7 @@ last_verified: v1.8.89
**外观**
- `system_alias` / `system_welcome` — 系统名称别名与欢迎语
- 系统别名与部署的默认应用名称相同时,服务端使用空值存储以表示“沿用默认名称”,但保存响应和后续读取仍显示实际默认名称
## 操作步骤
1. 进入「系统设置」,选择需要修改的领域 tab

View File

@ -55,10 +55,12 @@ last_verified: v1.8.89
## 操作步骤
1. 进入「任务设置」tab 的「任务优先级」区块
2. 「新增」追加一行 → 填写名称 / 颜色 / 天数 / 权重
2. 「添加优先级」追加一行 → 填写名称 / 颜色 / 天数 / 权重
3. 拖拽或修改 `priority` 字段调整顺序
4. 点击页面底部「提交」,与同页任务设置一起保存并即时生效
删除某一行时点击最右侧的删除图标并确认;删除先保留在当前表单中,点击「提交」后才会生效,点击「重置」可撤销未提交的删除。系统至少保留一个优先级;删除默认优先级后,剩余第一项自动成为默认项。
## 默认数据
首次访问会返回系统默认的优先级(紧急 / 高 / 普通 / 低)。修改后保存即覆盖默认。

View File

@ -2,21 +2,30 @@
<div :class="{'setting-component-item': !embedded}">
<div>
<Row class="setting-template">
<Col span="8">{{$L('名称')}}</Col>
<Col span="7">{{$L('名称')}}</Col>
<Col span="16">{{$L('项目模板')}}</Col>
<Col span="1" class="setting-row-action"></Col>
</Row>
<Row v-for="(item, key) in formDatum" :key="key" class="setting-template">
<Col span="8">
<Col span="7">
<Input
v-model="item.name"
:maxlength="20"
:placeholder="$L('请输入名称')"
clearable
@on-clear="delDatum(key)"/>
clearable/>
</Col>
<Col span="16">
<TagInput v-model="item.columns"/>
</Col>
<Col span="1" class="setting-row-action">
<Tooltip :content="formDatum.length > 1 ? $L('删除') : $L('至少保留一项')" placement="top" transfer>
<Button
type="text"
icon="ios-trash-outline"
:disabled="formDatum.length <= 1"
@click="delDatum(key)"/>
</Tooltip>
</Col>
</Row>
<Button class="setting-add-action" type="default" icon="md-add" @click="addDatum">{{$L('添加模板')}}</Button>
</div>
@ -82,10 +91,16 @@ export default {
},
delDatum(key) {
this.formDatum.splice(key, 1);
if (this.formDatum.length === 0) {
this.addDatum();
if (this.formDatum.length <= 1) {
return;
}
$A.modalConfirm({
title: '确认删除',
content: '确定要删除该模板吗?',
onOk: () => {
this.formDatum.splice(key, 1);
},
});
},
systemSetting(save, silent = false) {

View File

@ -3,7 +3,7 @@
<div>
<Row class="setting-color color-label-box">
<Col span="2">{{$L('默认')}}</Col>
<Col span="10">{{$L('名称')}}</Col>
<Col span="9">{{$L('名称')}}</Col>
<Col span="4">
<ETooltip :content="$L('数值越小级别越高')" max-width="auto" placement="top" transfer>
<div><Icon class="information" type="ios-information-circle-outline" /> {{$L('级别')}}</div>
@ -15,19 +15,19 @@
</ETooltip>
</Col>
<Col span="4">{{$L('颜色')}}</Col>
<Col span="1" class="setting-row-action"></Col>
</Row>
<RadioGroup v-model="defaultIndex">
<Row v-for="(item, key) in formDatum" :key="key" class="setting-color">
<Col span="2" class="priority-default-col">
<Radio :label="key"><span></span></Radio>
</Col>
<Col span="10">
<Col span="9">
<Input
v-model="item.name"
:maxlength="20"
:placeholder="$L('请输入名称')"
clearable
@on-clear="delDatum(key)"/>
clearable/>
</Col>
<Col span="4">
<Input v-model="item.priority" type="number"/>
@ -38,6 +38,15 @@
<Col span="4">
<ColorPicker v-model="item.color" recommend transfer/>
</Col>
<Col span="1" class="setting-row-action">
<Tooltip :content="formDatum.length > 1 ? $L('删除') : $L('至少保留一项')" placement="top" transfer>
<Button
type="text"
icon="ios-trash-outline"
:disabled="formDatum.length <= 1"
@click="delDatum(key)"/>
</Tooltip>
</Col>
</Row>
</RadioGroup>
<div class="setting-add-action">
@ -123,15 +132,23 @@ export default {
},
delDatum(key) {
this.formDatum.splice(key, 1);
if (this.formDatum.length === 0) {
this.addDatum();
if (this.formDatum.length <= 1) {
return;
}
if (this.defaultIndex >= this.formDatum.length) {
this.defaultIndex = 0;
}
this.applyDefaultIndex();
$A.modalConfirm({
title: '确认删除',
content: '确定要删除该优先级吗?',
onOk: () => {
const deletingDefault = key === this.defaultIndex;
this.formDatum.splice(key, 1);
if (deletingDefault) {
this.defaultIndex = 0;
} else if (key < this.defaultIndex) {
this.defaultIndex--;
}
this.applyDefaultIndex();
},
});
},
applyDefaultIndex() {

View File

@ -226,13 +226,16 @@
> div {
flex-shrink: 0;
text-align: left;
&:last-child {
&:nth-last-child(2) {
flex: 1;
width: auto;
max-width: none;
}
}
}
.setting-row-action .ivu-btn {
color: #ed4014;
}
.setting-add-action {
margin-bottom: 12px;
}