-
-
-
-
- {{ value.displayName }}
-
-
-
-
-
-
-
+
+
+
+
+ {{ option.displayName }}
+
+
@@ -39,9 +28,7 @@ import {
export default defineComponent({
name: 'ModelSelector',
components: {
- ElDropdown,
ElButton,
- ElDropdownItem,
FontAwesomeIcon
},
props: {
@@ -50,7 +37,7 @@ export default defineComponent({
required: true
}
},
- emits: ['update:modelValue'],
+ emits: ['update:modelValue', 'select'],
data() {
return {
value: this.modelValue,
@@ -64,22 +51,30 @@ export default defineComponent({
}
}
},
+ mounted() {
+ this.$emit('update:modelValue', this.value);
+ this.$emit('select', this.value);
+ },
methods: {
- onCommandChange(command: IMidjourneyChannel) {
- this.value = command;
- this.$emit('update:modelValue', command);
+ onSelect(option: IMidjourneyChannel) {
+ this.value = option;
+ this.$emit('update:modelValue', option);
+ this.$emit('select', option);
}
}
});
diff --git a/src/components/midjourney/PresetPanel.vue b/src/components/midjourney/PresetPanel.vue
index 59eb97ae..ce510ac8 100644
--- a/src/components/midjourney/PresetPanel.vue
+++ b/src/components/midjourney/PresetPanel.vue
@@ -1,10 +1,14 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -15,14 +19,23 @@ import VersionSelector from './VersionSelector.vue';
import StylizeSelector from './StylizeSelector.vue';
import ChaosSelector from './ChaosSelector.vue';
import ModelSelector from './ModelSelector.vue';
+import QualitySelector from './QualitySelector.vue';
+import WiredSelector from './WiredSelector.vue';
+import RawSelector from './RawSelector.vue';
+import AdvancedSelector from './AdvancedSelector.vue';
+
export default defineComponent({
name: 'PresetPanel',
components: {
ModelSelector,
+ QualitySelector,
RatioSelector,
VersionSelector,
StylizeSelector,
- ChaosSelector
+ ChaosSelector,
+ WiredSelector,
+ RawSelector,
+ AdvancedSelector
},
props: {
modelValue: {
diff --git a/src/components/midjourney/QualitySelector.vue b/src/components/midjourney/QualitySelector.vue
new file mode 100644
index 00000000..5dac4da8
--- /dev/null
+++ b/src/components/midjourney/QualitySelector.vue
@@ -0,0 +1,85 @@
+
+
+
画质
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
diff --git a/src/components/midjourney/RawSelector.vue b/src/components/midjourney/RawSelector.vue
new file mode 100644
index 00000000..87e2dd8b
--- /dev/null
+++ b/src/components/midjourney/RawSelector.vue
@@ -0,0 +1,65 @@
+
+
+
原生
+
+
+
+
+
+
+
diff --git a/src/components/midjourney/VersionSelector.vue b/src/components/midjourney/VersionSelector.vue
index f56fc5e6..cdb18215 100644
--- a/src/components/midjourney/VersionSelector.vue
+++ b/src/components/midjourney/VersionSelector.vue
@@ -1,7 +1,7 @@
版本
-
+
diff --git a/src/components/midjourney/WiredSelector.vue b/src/components/midjourney/WiredSelector.vue
new file mode 100644
index 00000000..5d41ac7b
--- /dev/null
+++ b/src/components/midjourney/WiredSelector.vue
@@ -0,0 +1,64 @@
+
+
+
怪异度
+
+
+
+
+
+
+
diff --git a/src/operators/midjourney/constants.ts b/src/operators/midjourney/constants.ts
index 746bb928..07bb2552 100644
--- a/src/operators/midjourney/constants.ts
+++ b/src/operators/midjourney/constants.ts
@@ -1,29 +1,29 @@
import { IMidjourneyChannel } from './models';
-export const MIDJOURNEY_CHANNEL_NAME_FAST = 'Fast';
-export const MIDJOURNEY_CHANNEL_NAME_RELAX = 'Relax';
-export const MIDJOURNEY_CHANNEL_NAME_TURBO = 'Turbo';
+export const MIDJOURNEY_CHANNEL_NAME_FAST = 'fast';
+export const MIDJOURNEY_CHANNEL_NAME_RELAX = 'relax';
+export const MIDJOURNEY_CHANNEL_NAME_TURBO = 'turbo';
export const API_ID_MIDJOURNEY_FAST = '9a628863-8879-462b-bbee-5dc46505b733';
export const API_ID_MIDJOURNEY_RELAX = 'c58713f3-fef7-4c18-824c-9f76b5a07a7f';
export const API_ID_MIDJOURNEY_TURBO = '62ec82bd-7de3-427f-b71a-ab3551ac7677';
export const MIDJOURNEY_CHANNEL_FAST: IMidjourneyChannel = {
- icon: 'fa-bolt fa-regular',
+ icon: 'fa-solid fa-wind',
apiId: API_ID_MIDJOURNEY_FAST,
name: MIDJOURNEY_CHANNEL_NAME_FAST,
displayName: 'Fast'
};
export const MIDJOURNEY_CHANNEL_RELAX: IMidjourneyChannel = {
- icon: 'fa-bolt fa-regular',
+ icon: 'fa-solid fa-mug-saucer',
apiId: API_ID_MIDJOURNEY_RELAX,
name: MIDJOURNEY_CHANNEL_NAME_RELAX,
displayName: 'Relax'
};
export const MIDJOURNEY_CHANNEL_TURBO: IMidjourneyChannel = {
- icon: 'fa-bolt fa-regular',
+ icon: 'fa-solid fa-bolt',
apiId: API_ID_MIDJOURNEY_TURBO,
name: MIDJOURNEY_CHANNEL_NAME_TURBO,
displayName: 'Turbo'
diff --git a/src/pages/midjourney/Index.vue b/src/pages/midjourney/Index.vue
index 4be69c6c..bab45445 100644
--- a/src/pages/midjourney/Index.vue
+++ b/src/pages/midjourney/Index.vue
@@ -1,10 +1,11 @@
+
+
@@ -34,6 +35,7 @@ import {
midjourneyOperator,
MidjourneyImagineState
} from '@/operators';
+import ApiStatus from '@/components/common/ApiStatus.vue';
interface IData {
channel: IMidjourneyChannel;
@@ -57,7 +59,8 @@ export default defineComponent({
ElementsSelector,
IgnoreSelector,
ElButton,
- ImaginePreview
+ ImaginePreview,
+ ApiStatus
},
data(): IData {
return {
@@ -77,6 +80,9 @@ export default defineComponent({
this.onFetchChannel();
},
methods: {
+ async onSelectChannel() {
+ await this.onFetchChannel();
+ },
async onFetchChannel() {
this.initializing = true;
const { data: applications } = await applicationOperator.getAll({
diff --git a/src/plugins/font-awesome.ts b/src/plugins/font-awesome.ts
index 1836e671..fa180175 100644
--- a/src/plugins/font-awesome.ts
+++ b/src/plugins/font-awesome.ts
@@ -13,11 +13,13 @@ import {
faPalette as faSolidPalette,
faBars as faSolidBars,
faGear as faSolidGear,
+ faMugSaucer as faSolidMugSaucer,
faRotateRight as faSolidRotateRight,
faCheck as faSolidCheck,
faPlus as faSolidPlus,
faBolt as faSolidBolt,
faQuestion as faSolidQuestion,
+ faWind as faSolidWind,
faTrash as faSolidTrash,
faChevronDown as faSolidChevronDown,
faArrowsRotate as faSolidArrowsRotate,
@@ -45,9 +47,11 @@ library.add(faSolidTriangleExclamation);
library.add(faSolidUpRightFromSquare);
library.add(faSolidArrowsRotate);
library.add(faRegularPaperPlane);
+library.add(faSolidWind);
library.add(faRegularComment);
library.add(faSolidArrowRightFromBracket);
library.add(faSolidTrash);
library.add(faSolidChevronDown);
library.add(faSolidPalette);
library.add(faSolidWandMagicSparkles);
+library.add(faSolidMugSaucer);