Skip to content

Commit

Permalink
fix(nuxt3): user config change defaultConfig values
Browse files Browse the repository at this point in the history
  • Loading branch information
LarchLiu committed Jun 21, 2023
1 parent 1277b7c commit 5f828b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 2 additions & 0 deletions server/nuxt3/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ select.vue-flow {
color: #636161;
padding: 2px;
text-overflow: ellipsis;
background-color: field;
}
input.vue-flow {
width: 100%;
border: 1px solid #636161;
border-radius: 4px;
color: #636161;
padding: 2px;
height: inherit;
}
textarea.vue-flow {
width: 100%;
Expand Down
3 changes: 0 additions & 3 deletions server/nuxt3/components/UserConfigFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ function onConfirm() {
</div>
<div flex flex-col text-10px>
<select v-model="model.select" autocomplete="off" class="vue-flow">
<option value="" disabled>
Please Select
</option>
<option v-for="o in model.options" :key="o.value" :value="o.value">
{{ o.label }}
</option>
Expand Down
3 changes: 0 additions & 3 deletions server/nuxt3/components/vue-flow/SelectConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ function updateHandler() {
</div>
<div flex flex-col text-10px>
<select ref="inputEl" v-model="model.select" autocomplete="off" class="vue-flow" @change="updateHandler">
<option value="" disabled>
Please Select
</option>
<option v-for="o in options" :key="o.value" :value="o.value">
{{ o.label }}
</option>
Expand Down
8 changes: 4 additions & 4 deletions server/nuxt3/pages/user-config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ const appConfig = computed(() => {
const showAppSelect = false
for (let i = 0; i < keys.length; i++) {
const key = keys[i] as keyof ServerConfig<OutUserConfig>
const value = defaultConfig[key]
const value = JSON.parse(JSON.stringify(defaultConfig[key])) as BasicConfig<ModelsConfig>
if (key === 'app') {
if (showAppSelect)
config[key] = { ...defaultConfig[key] }
config[key] = value
}
else if (value.userConfig && !value.public) {
config[key] = { ...defaultConfig[key] }
config[key] = value
}
if (config[key]) {
const info = defaultConfig[key].info
const info = value.info
const infoKeys = Object.keys(info)
const options = infoKeys.map((m) => {
return {
Expand Down

1 comment on commit 5f828b8

@vercel
Copy link

@vercel vercel bot commented on 5f828b8 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

star-nexus – ./

star-nexus-git-main-larchliu.vercel.app
star-nexus-larchliu.vercel.app
star-nexus.vercel.app

Please sign in to comment.