Add round style for button and fix model name (#17)

This commit is contained in:
AceDataCloud committed 2024-04-05 06:39:40 +00:00
1 parent 1d4b42aefb
commit b2036fc477
9 files changed
+41 -31

No files matched your search

@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix wrong model name",
"packageName": "@acedatacloud/hub",
"email": "germey@acedata.cloud",
"dependentChangeType": "patch"
}
+9 -1
View File
@@ -97,7 +97,15 @@ export default defineComponent({
},
computed: {
model() {
return this.$store.state.chat.model;
const modelName = this.$store.state.chat.model.name;
const model = [
CHAT_MODEL_GPT_3_5,
CHAT_MODEL_GPT_3_5_BROWSING,
CHAT_MODEL_GPT_4,
CHAT_MODEL_GPT_4_BROWSING,
CHAT_MODEL_GPT_4_VISION
].find((model) => model.name === modelName);
return model;
}
},
methods: {
+1 -8
View File
@@ -40,14 +40,7 @@ import axios from 'axios';
import { defineComponent } from 'vue';
import Message from '@/components/chat/Message.vue';
import { ROLE_ASSISTANT, ROLE_USER } from '@/constants';
import {
IChatModel,
IApplication,
IChatMessageState,
IChatConversationResponse,
IChatConversation,
IChatMessage
} from '@/models';
import { IChatModel, IChatMessageState, IChatConversationResponse, IChatConversation, IChatMessage } from '@/models';
import InputBox from '@/components/chat/InputBox.vue';
import ModelSelector from '@/components/chat/ModelSelector.vue';
import { ERROR_CODE_CANCELED, ERROR_CODE_NOT_APPLIED, ERROR_CODE_UNKNOWN } from '@/constants/errorCode';
+1 -1
View File
@@ -52,7 +52,7 @@
<el-table-column fixed="right" width="120px">
<template #default="scope">
<div class="float-right">
<el-button type="primary" size="small" @click="onBuyMore(scope?.row)">
<el-button type="primary" round size="small" @click="onBuyMore(scope?.row)">
{{ $t('application.button.buyMore') }}
</el-button>
</div>
+2 -2
View File
@@ -90,12 +90,12 @@
</div>
</div>
<div v-if="!order?.pay_way">
<el-button :loading="prepaying" type="primary" size="large" class="btn-pay" @click="onPay">{{
<el-button :loading="prepaying" round type="primary" size="large" class="btn-pay" @click="onPay">{{
$t('common.button.pay')
}}</el-button>
</div>
<div v-else>
<el-button type="primary" size="large" class="btn-repay" @click="onRepay">{{
<el-button type="primary" round size="large" class="btn-repay" @click="onRepay">{{
$t('common.button.repay')
}}</el-button>
</div>
+14 -12
View File
@@ -23,17 +23,7 @@
<span class="price">¥{{ scope.row?.price?.toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('order.field.createdAt')" width="180px">
<template #default="scope">
<span class="created-at">{{ $dayjs.format(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('order.field.description')" width="300px">
<template #default="scope">
<span class="description">{{ scope.row.description }}</span>
</template>
</el-table-column>
<el-table-column prop="state" :label="$t('order.field.state')" class-name="text-center">
<el-table-column prop="state" :label="$t('order.field.state')" class-name="text-center" width="120px">
<template #default="scope">
<span v-if="scope.row.state === OrderState?.PENDING">
<el-tag type="info" class="mx-1" effect="dark">{{ $t('order.state.pending') }}</el-tag>
@@ -49,13 +39,24 @@
</span>
</template>
</el-table-column>
<el-table-column min-width="120px">
<el-table-column :label="$t('order.field.description')" width="300px">
<template #default="scope">
<span class="description">{{ scope.row.description }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('order.field.createdAt')" width="180px">
<template #default="scope">
<span class="created-at">{{ $dayjs.format(scope.row.created_at) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" min-width="120px">
<template #default="scope">
<div class="float-right">
<el-button
v-if="scope.row.state !== OrderState.PAID"
type="primary"
size="small"
round
@click="
$router.push({
name: 'console-order-detail',
@@ -70,6 +71,7 @@
<el-button
v-else
size="small"
round
@click="
$router.push({
name: 'console-order-detail',
+5 -5
View File
@@ -18,7 +18,7 @@
<p class="description">{{ $t('distribution.title.price') }}</p>
<p class="value">${{ distributionStatus?.price?.toFixed(2) }}</p>
</div>
<el-button type="primary" size="small" class="btn" @click="goHistory"
<el-button type="primary" round size="small" class="btn" @click="goHistory"
>{{ $t('distribution.button.detail') }}
</el-button>
</div>
@@ -36,7 +36,7 @@
<p class="value">${{ distributionStatus?.reward?.toFixed(2) }}</p>
</div>
<el-tooltip effect="dark" :content="$t('distribution.message.developingWithDrawal')" placement="top">
<el-button type="primary" size="small" class="btn"
<el-button type="primary" round size="small" class="btn"
>{{ $t('distribution.button.withdrawal') }}
</el-button>
</el-tooltip>
@@ -68,7 +68,7 @@
<p class="description">{{ $t('distribution.title.inviteesCount') }}</p>
<p class="value">{{ inviteesCount }}</p>
</div>
<el-button type="primary" size="small" class="btn" @click="goInvitees"
<el-button type="primary" round size="small" class="btn" @click="goInvitees"
>{{ $t('distribution.button.detail') }}
</el-button>
</div>
@@ -364,7 +364,7 @@ export default defineComponent({
margin: 0;
}
.description {
color: var(--el-text-color-secondary);
color: var(--el-text-color-regular);
font-size: 14px;
margin-bottom: 5px;
}
@@ -406,7 +406,7 @@ export default defineComponent({
font-size: 14px;
margin-bottom: 10px;
.more {
color: var(--el-color-primary);
color: var(--el-color-regular);
cursor: pointer;
}
}
+1 -1
View File
@@ -10,7 +10,7 @@
@refresh="onGetApplications"
/>
<task-full-list @custom="onCustom" />
<el-button type="primary" class="btn btn-generate" @click="onGenerateNew">
<el-button type="primary" round class="btn btn-generate" @click="onGenerateNew">
<font-awesome-icon icon="fa-solid fa-chevron-left" class="icon icon-rotate mr-1" />
{{ $t('midjourney.button.generateNew') }}
</el-button>
+1 -1
View File
@@ -19,7 +19,7 @@
<elements-selector v-model="elements" :advanced="preset?.advanced" class="mb-4" />
<ignore-selector v-if="preset?.advanced" v-model="ignore" class="mb-4" />
<final-prompt v-if="finalPrompt" :model-value="finalPrompt" />
<el-button type="primary" class="btn btn-generate" :disabled="!finalPrompt" @click="onGenerate">
<el-button type="primary" round class="btn btn-generate" :disabled="!finalPrompt" @click="onGenerate">
{{ $t('midjourney.button.generate') }}
</el-button>
</div>