Skip to content

Commit

Permalink
feat: #319 PicGO图形化配置界面-配置表单展示
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Feb 8, 2023
1 parent ff5a997 commit 7587fa8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
6 changes: 3 additions & 3 deletions components/picgo/setting/ConfigForm.vue
Expand Up @@ -189,7 +189,7 @@ function handleConfig(val: IPicGoPluginConfig[]) {
const config = props.isNewForm ? {} : getCurConfigFormData()
const configId = props.isNewForm ? undefined : props.configId
Object.assign(ruleForm, config)
logger.debug("form属性=>", config)
logger.debug("form属性=>", ruleForm)
logger.debug("configId=>", configId)
// 追加form属性
Expand Down Expand Up @@ -222,8 +222,8 @@ function handleConfig(val: IPicGoPluginConfig[]) {
})
}
logger.debug("完整form属性=>", config)
logger.debug("动态配置configList=>", toRaw(configList))
logger.debug("完整form属性=>", ruleForm)
logger.debug("动态配置configList=>", configList.value)
logger.debug("追加form完成.")
}
Expand Down
15 changes: 8 additions & 7 deletions components/picgo/setting/PicbedSetting.vue
Expand Up @@ -208,7 +208,8 @@ function selectItem(id: string) {
* 新增配置
*/
function addNewConfig() {
profileData.curConfig = {}
const configObj = picgoUtil.getPicBedConfig(type.value)
profileData.curConfig = configObj.config
isNewForm.value = true
showConfigForm.value = true
Expand All @@ -217,18 +218,18 @@ function addNewConfig() {
"editConfig profileData.defaultConfigId=>",
profileData.defaultConfigId
)
logger.debug("editConfig id=>", undefined)
logger.debug("editConfig type=>", toRaw(type))
logger.debug("editConfig config=>", toRaw(profileData.curConfig))
logger.debug("addNewConfig id=>", undefined)
logger.debug("addNewConfig type=>", type.value)
logger.debug("addNewConfig config=>", toRaw(profileData.curConfig))
}
/**
* 编辑配置
* @param id 配置ID
*/
function editConfig(id: string) {
const config = picgoUtil.getPicBedConfig(type.value)
profileData.curConfig = config
const configObj = picgoUtil.getPicBedConfig(type.value)
profileData.curConfig = configObj.config
isNewForm.value = false
showConfigForm.value = true
Expand All @@ -238,7 +239,7 @@ function editConfig(id: string) {
profileData.defaultConfigId
)
logger.debug("editConfig id=>", id)
logger.debug("editConfig type=>", toRaw(type))
logger.debug("editConfig type=>", type.value)
logger.debug("editConfig config=>", toRaw(profileData.curConfig))
}
Expand Down
15 changes: 0 additions & 15 deletions layouts/default/DefaultHeader.vue
Expand Up @@ -199,7 +199,6 @@ import {
import { ElMessage } from "element-plus"
import { getWidgetId, isInSiyuan } from "~/utils/platform/siyuan/siyuanUtil"
import { getPublishCfg } from "~/utils/publishUtil"
import { getBooleanEnv } from "~/utils/envUtil"
import { appendStr } from "~/utils/strUtil"
import { useI18n } from "vue-i18n"
import { LogFactory } from "~/utils/logUtil"
Expand Down Expand Up @@ -368,20 +367,6 @@ onMounted(() => {
showTitle.value = true
}
// ==================
// Debug mode start
// ==================
const debugMode = getBooleanEnv("VITE_DEBUG_MODE")
if (debugMode) {
showOpenBtn.value = true
showCloseBtn.value = true
showTitle.value = false
}
// ==================
// Debug mode end
// ==================
})
</script>

Expand Down

0 comments on commit 7587fa8

Please sign in to comment.