Fix experience bugs (#9)

This commit is contained in:
AceDataCloud committed 2024-03-24 23:27:13 +08:00
1 parent c300500135
commit b35d5a926a
260 files changed
+36865 -16290

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@
>
<application-policy v-model.visible="showPolicy" />
</div>
<el-button type="primary" @click="onApply">{{ $t('common.button.apply') }}</el-button>
<el-button round type="primary" @click="onApply">{{ $t('common.button.apply') }}</el-button>
</div>
</el-dialog>
</template>
+17 -8
View File
@@ -15,7 +15,7 @@
{{ $t(`service.unit.` + application?.service?.unit + 's') }}
</span>
<span class="actions">
<el-button size="small" type="primary" @click="onBuyMore(application)">{{
<el-button round size="small" type="primary" @click="onBuyMore(application)">{{
$t('common.button.buyMore')
}}</el-button>
</span>
@@ -23,7 +23,7 @@
<div v-if="needApply && service" class="text-center info">
<span class="mr-2">{{ $t('chat.message.notApplied') }}</span>
<span>
<el-button type="primary" class="btn btn-apply" size="small" @click="confirming = true">
<el-button round type="primary" class="btn btn-apply" size="small" @click="confirming = true">
{{ $t('common.button.apply') }}
</el-button>
</span>
@@ -34,7 +34,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { applicationOperator } from '@/operators';
import { applicationOperator, credentialOperator } from '@/operators';
import { ElButton, ElMessage, ElSkeleton, ElSkeletonItem } from 'element-plus';
import ApplicationConfirm from '@/components/application/Confirm.vue';
import { IApplicationType, IApplication, IApplicationDetailResponse, IService } from '@/models';
@@ -67,7 +67,7 @@ export default defineComponent({
default: false
}
},
emits: ['apply', 'refresh'],
emits: ['apply', 'refresh', 'applied', 'update:application'],
data(): IData {
return {
confirming: this.needApply,
@@ -106,10 +106,19 @@ export default defineComponent({
})
.then(({ data: data }: { data: IApplicationDetailResponse }) => {
ElMessage.success(this.$t('application.message.applySuccessfully'));
setTimeout(() => {
this.$emit('refresh');
}, 2000);
this.confirming = false;
credentialOperator
.create({
application_id: data.id
})
.then(() => {
setTimeout(() => {
this.$emit('refresh');
}, 2000);
this.confirming = false;
})
.finally(() => {
this.$emit('applied');
});
})
.catch((error) => {
if (error?.response?.data?.code === ERROR_CODE_DUPLICATION) {
+12 -13
View File
@@ -34,7 +34,7 @@
</span>
<el-input
v-model="questionValue"
:rows="1"
:rows="3"
:disabled="disabled"
class="input"
type="textarea"
@@ -42,8 +42,8 @@
@keydown.enter.exact.prevent="onSubmit"
>
</el-input>
<p class="info">{{ $t('chat.message.howToUse') }}</p>
</div>
<p class="info">{{ $t('chat.message.howToUse') }}</p>
</template>
<script lang="ts">
@@ -140,6 +140,7 @@ export default defineComponent({
<style lang="scss">
.input-box {
position: relative;
.input {
textarea {
border: none;
@@ -147,7 +148,6 @@ export default defineComponent({
box-shadow: none;
resize: none;
line-height: 30px;
height: 40px;
}
}
.el-upload-list {
@@ -164,13 +164,11 @@ export default defineComponent({
<style lang="scss" scoped>
.input-box {
position: relative;
width: 100%;
border: 1px solid #eee;
border-radius: 10px;
background: none;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
top: 30px;
.upload {
display: inline-block;
&.disabled {
@@ -187,14 +185,6 @@ export default defineComponent({
width: calc(100% - 80px);
margin-left: 30px;
}
.info {
display: block;
position: absolute;
font-size: 12px;
color: #666;
margin-top: 5px;
margin-left: 3px;
}
.btn {
display: block;
z-index: 100;
@@ -223,4 +213,13 @@ export default defineComponent({
}
}
}
.info {
display: block;
font-size: 12px;
color: #666;
margin-top: 5px;
margin-left: 3px;
margin-bottom: 0;
}
</style>
+1
View File
@@ -114,6 +114,7 @@ export default defineComponent({
.subtitle {
text-align: center;
font-size: 18px;
margin-top: 10px;
margin-bottom: 40px;
}
.introduction-item {
+1 -1
View File
@@ -22,7 +22,7 @@
</div>
</div>
<el-alert v-if="errorText" class="error" :title="errorText" type="error" :closable="false" />
<el-button v-if="showBuyMore" type="primary" class="btn btn-buy" size="small" @click="onBuyMore">
<el-button v-if="showBuyMore" round type="primary" class="btn btn-buy" size="small" @click="onBuyMore">
{{ $t('common.button.buyMore') }}
</el-button>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="panel">
<el-skeleton v-if="loading && conversations === undefined" />
<el-skeleton v-if="conversations === undefined" />
<div v-else class="conversations">
<div class="conversation" @click="onNewConversation">
<div class="icons">
+1 -1
View File
@@ -8,7 +8,7 @@
<el-input v-model="form.description" :placeholder="$t('chatdoc.message.inputRepositoryDescription')" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">{{ $t('common.button.create') }}</el-button>
<el-button type="primary" round @click="onSubmit">{{ $t('common.button.create') }}</el-button>
</el-form-item>
</el-form>
</el-dialog>
+12 -12
View File
@@ -12,7 +12,7 @@
</span>
<el-input
v-model="questionValue"
:rows="1"
:rows="3"
:disabled="disabled"
class="input"
type="textarea"
@@ -20,8 +20,8 @@
@keydown.enter.exact.prevent="onSubmit"
>
</el-input>
<p class="info">{{ $t('chat.message.howToUse') }}</p>
</div>
<p class="info">{{ $t('chat.message.howToUse') }}</p>
</template>
<script lang="ts">
@@ -94,7 +94,6 @@ export default defineComponent({
box-shadow: none;
resize: none;
line-height: 30px;
height: 40px;
}
}
.el-upload-list {
@@ -117,20 +116,12 @@ export default defineComponent({
border-radius: 10px;
background: none;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
top: 30px;
.input {
border: none;
width: calc(100% - 80px);
margin-left: 5px;
}
.info {
display: block;
position: absolute;
font-size: 12px;
color: #666;
margin-top: 5px;
margin-left: 3px;
}
.btn {
display: block;
z-index: 100;
@@ -152,4 +143,13 @@ export default defineComponent({
}
}
}
.info {
display: block;
font-size: 12px;
color: #666;
margin-top: 5px;
margin-left: 3px;
margin-bottom: 0;
}
</style>
+1 -1
View File
@@ -16,7 +16,7 @@
</div>
</div>
<el-alert v-if="errorText" class="error" :title="errorText" type="error" :closable="false" />
<el-button v-if="showBuyMore" type="primary" class="btn btn-buy" size="small" @click="onBuyMore">
<el-button v-if="showBuyMore" round type="primary" class="btn btn-buy" size="small" @click="onBuyMore">
{{ $t('common.button.buyMore') }}
</el-button>
</template>
+1 -1
View File
@@ -25,7 +25,7 @@
<div v-if="learning">{{ $t('chatdoc.message.learningDocument') }}</div>
</el-upload>
</el-dialog>
<el-button type="primary" @click="dialogVisible = true">{{ $t('chatdoc.button.uploadDocuments') }}</el-button>
<el-button type="primary" round @click="dialogVisible = true">{{ $t('chatdoc.button.uploadDocuments') }}</el-button>
</template>
<script lang="ts">
@@ -2133,11 +2133,11 @@ export default defineComponent({
$height: 100px;
$width: 100px;
position: relative;
width: $height;
height: $width;
width: $width;
height: $height;
margin-right: 8px;
margin-bottom: 8px;
border-width: 2px;
border-width: 3px;
border-style: solid;
border-color: #eee;
border-radius: 5px;
@@ -2161,12 +2161,12 @@ export default defineComponent({
bottom: 0;
left: 0;
right: 0;
height: 20px;
width: $width;
background-color: rgba(0, 0, 0, 0.5);
color: white;
font-size: 10px;
text-align: center;
padding: 0 5px;
}
}
}
@@ -55,6 +55,7 @@ export default defineComponent({
},
async mounted() {
await this.$store.dispatch('midjourney/setImagineTasks', undefined);
this.getImagineTasks();
// @ts-ignore
this.job = setInterval(() => {
this.getImagineTasks();
@@ -78,6 +78,7 @@ export default defineComponent({
},
async mounted() {
await this.$store.dispatch('midjourney/setImagineTasks', undefined);
this.getImagineTasks();
// @ts-ignore
this.job = setInterval(() => {
this.getImagineTasks();
+5 -5
View File
@@ -2,13 +2,13 @@
<el-form label-width="100px">
<el-form-item :label="$t('application.field.service')">
<span v-if="application.type === applicationType.API">
{{ application?.api?.title }}
{{ application?.service?.title }}
</span>
</el-form-item>
<el-form-item :label="$t('application.field.package')">
<el-radio-group v-if="application.type === applicationType.API" v-model="form.packageId">
<el-radio-button v-for="(pkg, pkgIndex) in application?.api?.packages" :key="pkgIndex" :label="pkg.id">
{{ pkg.amount }}{{ $t(`api.unit.${application?.api?.unit}`) }}
<el-radio-button v-for="(pkg, pkgIndex) in application?.service?.packages" :key="pkgIndex" :label="pkg.id">
{{ pkg.amount }}{{ $t(`api.unit.${application?.service?.unit}`) }}
</el-radio-button>
<el-radio-button label="custom">
{{ $t('application.button.custom') }}
@@ -22,8 +22,8 @@
<div v-if="application.type === applicationType.API">
<price
v-if="form.packageId === 'custom'"
:price="application?.api?.price"
:unit="$t(`api.unit.${application?.api?.unit}`)"
:price="application?.service?.price"
:unit="$t(`api.unit.${application?.service?.unit}`)"
/>
<price v-else :price="package?.price" />
</div>