update prompt
This commit is contained in:
1 parent
e4bd995e6c
commit
80bafd4c8d
20 files changed
+231
-33
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="title">忽略元素</h2>
|
||||
<el-input v-model="value" :rows="1" type="textarea" placeholder="Please input" />
|
||||
<h2 class="title">{{ $t('midjourney.name.ignore') }}</h2>
|
||||
<el-input v-model="value" :rows="1" type="textarea" :placeholder="$t('midjourney.placeholder.ignore')" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
<translation-selector v-model="preset.translation" class="mb-4" />
|
||||
<advanced-selector v-model="preset.advanced" class="mb-4" />
|
||||
<stylize-selector v-if="preset.advanced" v-model="preset.stylize" class="mb-4" />
|
||||
<wired-selector v-if="preset.advanced" v-model="preset.wired" class="mb-4" />
|
||||
<weird-selector v-if="preset.advanced" v-model="preset.wired" class="mb-4" />
|
||||
<chaos-selector v-if="preset.advanced" v-model="preset.chaos" class="mb-4" />
|
||||
<image-weight-selector v-if="preset.advanced" v-model="preset.iw" class="mb-4" />
|
||||
<niji-selector v-if="preset.advanced" v-model="preset.niji" class="mb-4" />
|
||||
<raw-selector v-if="preset.advanced" v-model="preset.raw" class="mb-4" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,11 +24,11 @@ import ChaosSelector from './preset/ChaosSelector.vue';
|
||||
import ModelSelector from './preset/ModelSelector.vue';
|
||||
import QualitySelector from './preset/QualitySelector.vue';
|
||||
import ImageWeightSelector from './preset/ImageWeightSelector.vue';
|
||||
import WiredSelector from './preset/WiredSelector.vue';
|
||||
import WeirdSelector from './preset/WeirdSelector.vue';
|
||||
import RawSelector from './preset/RawSelector.vue';
|
||||
import AdvancedSelector from './preset/AdvancedSelector.vue';
|
||||
import TranslationSelector from './preset/TranslationSelector.vue';
|
||||
|
||||
import NijiSelector from './preset/NijiSelector.vue';
|
||||
export default defineComponent({
|
||||
name: 'PresetPanel',
|
||||
components: {
|
||||
@@ -37,11 +38,12 @@ export default defineComponent({
|
||||
VersionSelector,
|
||||
StylizeSelector,
|
||||
ChaosSelector,
|
||||
WiredSelector,
|
||||
WeirdSelector,
|
||||
RawSelector,
|
||||
AdvancedSelector,
|
||||
ImageWeightSelector,
|
||||
TranslationSelector
|
||||
TranslationSelector,
|
||||
NijiSelector
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2 class="title">绘图描述</h2>
|
||||
<el-input v-model="value" :rows="3" type="textarea" placeholder="Please input" />
|
||||
<h2 class="title">{{ $t('midjourney.name.prompt') }}</h2>
|
||||
<el-input v-model="value" :rows="5" type="textarea" :placeholder="$t('midjourney.placeholder.prompt')" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">高级模式</h2>
|
||||
<el-switch v-model="value" class="ml-2" />
|
||||
<h2 class="title">{{ $t('midjourney.name.advanced') }}</h2>
|
||||
<el-switch v-model="value" class="value" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSwitch } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_ADVANCED = false;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'AdvancedSelector',
|
||||
components: {
|
||||
ElSwitch
|
||||
ElSwitch,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
@@ -61,5 +63,8 @@ export default defineComponent({
|
||||
.value {
|
||||
flex: 1;
|
||||
}
|
||||
.info {
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,19 +1,23 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">变异度</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.chaos') }}</h2>
|
||||
<el-slider v-model="value" :min="0" :max="100" :step="1" class="value" />
|
||||
<info-icon :content="$t('midjourney.description.chaos')" class="info" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSlider } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_CHAOS = 0;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ChaosSelector',
|
||||
components: {
|
||||
ElSlider
|
||||
ElSlider,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">图片权重</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.imageWeight') }}</h2>
|
||||
<el-slider v-model="value" :min="0" :max="2" :step="0.1" class="value" />
|
||||
<info-icon :content="$t('midjourney.description.imageWeight')" class="info" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSlider } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_IW = 1;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ImageWeightSelector',
|
||||
components: {
|
||||
ElSlider
|
||||
ElSlider,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">{{ $t('midjourney.name.niji') }}</h2>
|
||||
<el-switch v-model="value" class="value" />
|
||||
<info-icon :content="$t('midjourney.description.niji')" class="info" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSwitch } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_NIJI = false;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'RawSelector',
|
||||
components: {
|
||||
ElSwitch,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
data() {
|
||||
return {
|
||||
value: this.modelValue
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
modelValue(val) {
|
||||
if (val !== this.value) {
|
||||
this.value = val;
|
||||
}
|
||||
},
|
||||
value(val) {
|
||||
this.$emit('update:modelValue', val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.value === undefined) {
|
||||
this.value = DEFAULT_NIJI;
|
||||
}
|
||||
this.$emit('update:modelValue', this.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
width: 30%;
|
||||
}
|
||||
.value {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,19 +1,23 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">艺术化</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.stylize') }}</h2>
|
||||
<el-slider v-model="value" :min="0" :max="1000" :step="1" class="value" />
|
||||
<info-icon :content="$t('midjourney.description.stylize')" class="info" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSlider } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_STYLIZE = 100;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'StylizeSelector',
|
||||
components: {
|
||||
ElSlider
|
||||
ElSlider,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">自动翻译</h2>
|
||||
<el-switch v-model="value" class="ml-2" />
|
||||
<h2 class="title">{{ $t('midjourney.name.translation') }}</h2>
|
||||
<el-switch v-model="value" class="value" />
|
||||
<info-icon :content="$t('midjourney.description.translation')" class="info" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSwitch } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_ADVANCED = false;
|
||||
const DEFAULT_TRANSLATION = true;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TranslationSelector',
|
||||
components: {
|
||||
ElSwitch
|
||||
ElSwitch,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: DEFAULT_TRANSLATION
|
||||
}
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
@@ -40,7 +43,7 @@ export default defineComponent({
|
||||
},
|
||||
mounted() {
|
||||
if (this.value === undefined) {
|
||||
this.value = DEFAULT_ADVANCED;
|
||||
this.value = DEFAULT_TRANSLATION;
|
||||
}
|
||||
this.$emit('update:modelValue', this.value);
|
||||
}
|
||||
|
||||
+9
-5
@@ -1,19 +1,23 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">怪异度</h2>
|
||||
<h2 class="title">{{ $t('midjourney.name.weird') }}</h2>
|
||||
<el-slider v-model="value" :min="0" :max="1000" :step="1" class="value" />
|
||||
<info-icon :content="$t('midjourney.description.weird')" class="info" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSlider } from 'element-plus';
|
||||
const DEFAULT_WIRED = 0;
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
|
||||
const DEFAULT_WEIRD = 0;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'WiredSelector',
|
||||
name: 'WeirdSelector',
|
||||
components: {
|
||||
ElSlider
|
||||
ElSlider,
|
||||
InfoIcon
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
@@ -39,7 +43,7 @@ export default defineComponent({
|
||||
},
|
||||
mounted() {
|
||||
if (!this.value) {
|
||||
this.value = DEFAULT_WIRED;
|
||||
this.value = DEFAULT_WEIRD;
|
||||
}
|
||||
this.$emit('update:modelValue', this.value);
|
||||
}
|
||||
Reference in new issue
Block a user