feat: add settings export preview
这个提交存在于:
父节点
0013c6d2bf
当前提交
ff4678a9fe
共有 6 个文件被更改,包括 36 次插入 和 21 次删除
|
|
@ -266,6 +266,7 @@ const signedMedia = ref<MediaSignResult | null>(null)
|
|||
const settingsDraft = ref("")
|
||||
const settingsImportDraft = ref("")
|
||||
const settingsSnapshots = ref<SettingsSnapshot[]>([])
|
||||
const settingsExportResult = ref<ExportSettingsResult | null>(null)
|
||||
const settingsValidation = ref<ValidateSettingsResult | null>(null)
|
||||
const settingsDiff = ref<DiffSettingsResult | null>(null)
|
||||
const profileDraft = ref({
|
||||
|
|
@ -1146,7 +1147,14 @@ function reloadSettings() {
|
|||
}
|
||||
|
||||
function exportSettings() {
|
||||
return runOperation(text.exportSettings, () => getJson<ExportSettingsResult>(endpoints.settingsExport), false)
|
||||
return runOperation(
|
||||
text.exportSettings,
|
||||
async () => {
|
||||
settingsExportResult.value = await getJson<ExportSettingsResult>(endpoints.settingsExport)
|
||||
return settingsExportResult.value
|
||||
},
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
function resetSettingsDraft(config = currentSettings.value?.config ?? {}) {
|
||||
|
|
@ -2469,6 +2477,13 @@ function storageRootBytes(uriPrefix: string) {
|
|||
<pre>{{ JSON.stringify(settingsDiff ?? {}, null, 2) }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<section v-if="settingsExportResult" class="editor-panel">
|
||||
<header>
|
||||
<h2>{{ text.exportSettings }}</h2>
|
||||
<span>{{ settingsExportResult.redacted }}</span>
|
||||
</header>
|
||||
<pre>{{ JSON.stringify(settingsExportResult.config, null, 2) }}</pre>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
</section>
|
||||
|
|
|
|||
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
17
web/assets/index-DaDSiDJ9.js
普通文件
17
web/assets/index-DaDSiDJ9.js
普通文件
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
|
|
@ -1,3 +1,3 @@
|
|||
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-tce9D-Z6.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-BdP4se3A.css">
|
||||
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DaDSiDJ9.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DQQWiMdf.css">
|
||||
<div id="app"></div>
|
||||
|
|
|
|||
正在加载…
添加表格
在新工单中引用