Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update styles of buttons #21

Merged
merged 2 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix style bugs",
"packageName": "@acedatacloud/hub",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion src/components/midjourney/ReferenceImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:on-error="onError"
:headers="headers"
>
<el-button type="primary" class="btn btn-upload">
<el-button round type="primary" class="btn btn-upload">
<font-awesome-icon icon="fa-solid fa-upload" class="icon mr-2" />
{{ $t('midjourney.button.uploadReferences') }}
</el-button>
Expand Down
4 changes: 3 additions & 1 deletion src/components/midjourney/tasks/TaskBriefList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<div v-for="(task, taskKey) in tasks" :key="taskKey" class="task">
<task-preview :full="false" :model-value="task" @custom="$emit('custom', $event)" />
</div>
<el-button type="primary" class="btn mb-4" @click="onLoadHistory">{{ $t('midjourney.button.history') }}</el-button>
<el-button type="primary" round class="btn mb-4" @click="onLoadHistory">{{
$t('midjourney.button.history')
}}</el-button>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/components/order/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</span>
</el-form-item>
<el-form-item>
<el-button type="primary" size="large" class="btn-create" :loading="creating" @click="onCreateOrder">
<el-button type="primary" round size="large" class="btn-create" :loading="creating" @click="onCreateOrder">
{{ $t('application.button.createOrder') }}
</el-button>
</el-form-item>
Expand Down
6 changes: 5 additions & 1 deletion src/i18n/en/order.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"message": "Payment Successful",
"description": "The message of the successful payment."
},
"message.orderExpired": {
"message": "Order expired, please create a new order to pay.",
"description": "The message of the expired order."
},
"message.createFailed": {
"message": "Creation Failed",
"description": "The message of the failed creation."
Expand Down Expand Up @@ -131,4 +135,4 @@
"message": "Manage Order",
"description": "The title which used show as a title of website, means the manage order."
}
}
}
2 changes: 1 addition & 1 deletion src/pages/chatdoc/Manage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</el-table-column>
<el-table-column>
<template #default="scope">
<el-button type="danger" size="small" @click="onDelete(scope.row.id)">
<el-button type="danger" round size="small" @click="onDelete(scope.row.id)">
{{ $t('common.button.delete') }}
</el-button>
</template>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/console/application/Buy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default defineComponent({
application: undefined,
loading: false,
form: {
amount: 1000,
packageId: undefined
},
creating: false
Expand Down Expand Up @@ -165,13 +164,13 @@ export default defineComponent({
orderOperator
.create({
application_id: this.application?.id,
amount: this.form.amount,
amount: this.package?.amount,
...(this.form.packageId !== 'custom' && this.package
? {
package_id: this.package.id
}
: {}),
description: `${this.application?.service?.title} x ${this.form.amount} ${unit}`
description: `${this.application?.service?.title} x ${this.package?.amount} ${unit}`
})
.then(({ data: data }: { data: IOrderDetailResponse }) => {
this.creating = false;
Expand Down
10 changes: 10 additions & 0 deletions src/pages/console/order/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<el-descriptions-item v-if="order?.application?.service" :label="$t('order.field.api')">
{{ order?.application?.service?.title }}
</el-descriptions-item>
<el-descriptions-item v-if="order?.pay_way" :label="$t('order.field.payWay')">
<span v-if="order?.pay_way === PayWay.WechatPay">{{ $t('order.title.wechatPay') }}</span>
<span v-if="order?.pay_way === PayWay.Stripe">{{ $t('order.title.stripe') }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('order.field.amount')">
{{ order?.amount }} {{ $t(`service.unit.${order?.application?.service?.unit}`) }}
</el-descriptions-item>
Expand All @@ -48,6 +52,12 @@
<el-alert :title="$t('order.message.paidSuccessfully')" type="success" show-icon :closable="false" />
</el-col>
</el-row>
<el-row v-if="order?.state === OrderState.EXPIRED" class="mb-5">
<el-col :span="14" :offset="5">
<el-divider border-style="dashed" />
<el-alert :title="$t('order.message.orderExpired')" type="error" show-icon :closable="false" />
</el-col>
</el-row>
<el-row v-if="order?.state === OrderState.PENDING || order?.state === OrderState.FAILED">
<el-col :span="14" :offset="5">
<el-divider border-style="dashed" />
Expand Down
Loading