update mj panel

This commit is contained in:
AceDataCloud committed 2023-10-05 17:04:35 +08:00
1 parent 6c68c447c2
commit a4923acd46
11 files changed
+135 -31

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@
import { defineComponent } from 'vue';
import { ElTooltip, ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { ROUTE_CHAT_INDEX, ROUTE_PAINT_INDEX } from '@/router/constants';
import { ROUTE_CHAT_INDEX, ROUTE_MIDJOURNEY_INDEX } from '@/router/constants';
export default defineComponent({
name: 'Navigator',
@@ -34,7 +34,7 @@ export default defineComponent({
},
{
route: {
name: ROUTE_PAINT_INDEX
name: ROUTE_MIDJOURNEY_INDEX
},
icon: 'fa-solid fa-palette'
}
+32
View File
@@ -0,0 +1,32 @@
<template>
<ratio-selector />
</template>
<script>
import { defineComponent } from 'vue';
import RatioSelector from './RatioSelecor.vue';
export default defineComponent({
name: 'PresetPanel',
components: {
RatioSelector
},
data() {
return {
options: [
{
value: '1:1',
label: '1:1'
}
]
};
}
});
</script>
<style lang="scss">
.item {
width: 60px;
height: 100px;
}
</style>
@@ -0,0 +1,44 @@
<template>
<div>
<div v-for="(option, optionKey) in options" :key="optionKey" class="item">
<div class="preview" :class="option.label">
<div class="rect"></div>
</div>
<p>
{{ option.label }}
</p>
</div>
</div>
</template>
<script>
import { defineComponent } from 'vue';
export default defineComponent({
name: 'RatioSelector',
data() {
return {
options: [
{
value: '1:1',
label: '1:1'
}
]
};
}
});
</script>
<style lang="scss">
.item {
width: 30px;
height: 50px;
border: 2px solid red;
.preview {
width: 30px;
height: 30px;
border: 1px solid blue;
}
}
</style>
+1 -1
View File
@@ -19,7 +19,7 @@ export const API_ID_CHATGPT4_BROWSING = 'a61de51b-d0d0-48a2-9a17-1d4986d5d497';
export const CHAT_MODEL_CHATGPT: IChatModel = {
apiId: API_ID_CHATGPT,
name: CHAT_MODEL_NAME_CHATGPT,
displayName: '基础 - 3.5'
displayName: '基础 - 4k'
};
export const CHAT_MODEL_CHATGPT_16K: IChatModel = {
+1 -4
View File
@@ -1,11 +1,8 @@
import axios, { AxiosResponse, AxiosRequestConfig } from 'axios';
import axios, { AxiosResponse } from 'axios';
import {
IChatHistoryRequest,
IChatHistoryResponse,
IChatAskOptions,
IChatAskRequest,
IChatAskResponse,
IChatHistoryOptions,
IChatConversationRequest,
IChatConversationOptions,
IChatConversationResponse
+37
View File
@@ -0,0 +1,37 @@
<template>
<div class="page">
<div class="presets">
<preset-panel />
</div>
<div class="main"></div>
</div>
</template>
<script>
import { defineComponent } from 'vue';
import PresetPanel from '@/components/midjourney/PresetPanel.vue';
export default defineComponent({
name: 'MidjourneyIndex',
components: {
PresetPanel
}
});
</script>
<style lang="scss">
.page {
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
.presets {
width: 300px;
height: 100%;
background-color: var(--el-bg-color-page);
}
.main {
flex: 1;
}
}
</style>
-3
View File
@@ -1,3 +0,0 @@
<template>
<div>hi</div>
</template>
+2 -2
View File
@@ -7,8 +7,8 @@ export const ROUTE_CHAT_INDEX = 'chat-index';
export const ROUTE_CHAT_CONVERSATION = 'chat-conversation';
export const ROUTE_CHAT_CONVERSATION_NEW = 'chat-conversation-new';
export const ROUTE_PAINT_INDEX = 'paint-index';
export const ROUTE_PAINT_HISTORY = 'paint-history';
export const ROUTE_MIDJOURNEY_INDEX = 'midjourney-index';
// export const ROUTE_MIDJOURNEY_HISTORY = 'paint-history';
export const ROUTE_CONVERSATION_NEW = 'conversation-new';
export const ROUTE_CONVERSATION_DETAIL = 'conversation-detail';
+3 -6
View File
@@ -1,10 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router';
import auth from './auth';
import conversation from './conversation';
import store from '@/store';
import chat from './chat';
import paint from './paint';
import { ROUTE_AUTH_LOGIN, ROUTE_CONVERSATION_NEW, ROUTE_INDEX } from './constants';
import midjourney from './midjourney';
import { ROUTE_CONVERSATION_NEW, ROUTE_INDEX } from './constants';
const routes = [
{
@@ -15,7 +12,7 @@ const routes = [
}
},
chat,
paint
midjourney
];
const router = createRouter({
+13
View File
@@ -0,0 +1,13 @@
import { ROUTE_MIDJOURNEY_INDEX } from './constants';
export default {
path: '/midjourney',
component: () => import('@/layouts/Main.vue'),
children: [
{
path: '',
name: ROUTE_MIDJOURNEY_INDEX,
component: () => import('@/pages/midjourney/Index.vue')
}
]
};
-13
View File
@@ -1,13 +0,0 @@
import { ROUTE_PAINT_INDEX } from './constants';
export default {
path: '/paint',
component: () => import('@/layouts/Main.vue'),
children: [
{
path: '',
name: ROUTE_PAINT_INDEX,
component: () => import('@/pages/paint/Index.vue')
}
]
};