move
This commit is contained in:
1 parent
3e5e158b27
commit
1e837571e2
17 files changed
+172
-22
No files matched your search
@@ -96,7 +96,7 @@ export default defineComponent({
|
||||
// console.log('taskid', taskId);
|
||||
return {
|
||||
id: apiUsage.metadata?.conversation_id,
|
||||
title: 'dsdsd'
|
||||
title: apiUsage.metadata?.conversation_id
|
||||
} as IConversation;
|
||||
})
|
||||
);
|
||||
@@ -153,6 +153,7 @@ export default defineComponent({
|
||||
.title {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.operations {
|
||||
width: 45px;
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
<template>
|
||||
<span v-if="application" class="info">
|
||||
{{ $t('conversation.message.usedCount') }}: {{ application?.used_amount }}
|
||||
{{ $t('conversation.message.remainingCount') }}: {{ application?.remaining_amount }}
|
||||
</span>
|
||||
<div v-if="application" class="status">
|
||||
<span class="info">
|
||||
{{ $t('conversation.message.usedCount') }}: {{ application?.used_amount }}
|
||||
{{ $t('conversation.message.remainingCount') }}: {{ application?.remaining_amount }}
|
||||
</span>
|
||||
<span class="actions">
|
||||
<el-button size="small" type="primary" @click="onBuy">Buy</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { IApplication } from '@/operators';
|
||||
|
||||
import { ElButton } from 'element-plus';
|
||||
export default defineComponent({
|
||||
name: 'ApiStatus',
|
||||
components: {},
|
||||
components: { ElButton },
|
||||
props: {
|
||||
application: {
|
||||
type: Object as () => IApplication | undefined,
|
||||
@@ -22,15 +27,32 @@ export default defineComponent({
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
methods: {
|
||||
onBuy() {
|
||||
const url = `https://data.zhishuyun.com/console/applications/${this.application?.id}/buy`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.status {
|
||||
display: block;
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
}
|
||||
.info {
|
||||
font-size: 14px;
|
||||
color: var(--el-text-color-regular);
|
||||
display: block;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.actions {
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
.el-button {
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="price-text">
|
||||
<span v-if="price > 0" class="unfree"
|
||||
>¥{{ price }} {{ unit ? ` / ${unit}` : '' }}{{ start ? $t('common.message.startPrice') : ''
|
||||
}}{{ $t('service.message.fromPrice') }}
|
||||
</span>
|
||||
<span v-else class="free">
|
||||
{{ $t('common.message.free') }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
export default defineComponent({
|
||||
name: 'ApiPrice',
|
||||
props: {
|
||||
price: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
},
|
||||
unit: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: undefined
|
||||
},
|
||||
start: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.price-text {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
.unfree {
|
||||
color: #ff5441;
|
||||
|
||||
.value {
|
||||
font-weight: bold;
|
||||
color: #ff5441;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.free {
|
||||
color: #29c287;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,6 +4,7 @@
|
||||
<ratio-selector v-model="preset.ratio" class="mb-4" />
|
||||
<quality-selector v-model="preset.quality" class="mb-4" />
|
||||
<version-selector v-model="preset.version" class="mb-4" />
|
||||
<translation-selector v-model="preset.translation" class="mb-4" />
|
||||
<advanced-selector v-model="preset.advanced" class="mb-4" />
|
||||
<stylize-selector v-if="preset.advanced" v-model="preset.stylize" class="mb-4" />
|
||||
<wired-selector v-if="preset.advanced" v-model="preset.wired" class="mb-4" />
|
||||
@@ -15,16 +16,17 @@
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import RatioSelector from './RatioSelector.vue';
|
||||
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 ImageWeightSelector from './ImageWeightSelector.vue';
|
||||
import WiredSelector from './WiredSelector.vue';
|
||||
import RawSelector from './RawSelector.vue';
|
||||
import AdvancedSelector from './AdvancedSelector.vue';
|
||||
import RatioSelector from './preset/RatioSelector.vue';
|
||||
import VersionSelector from './preset/VersionSelector.vue';
|
||||
import StylizeSelector from './preset/StylizeSelector.vue';
|
||||
import ChaosSelector from './preset/ChaosSelector.vue';
|
||||
import ModelSelector from './preset/ModelSelector.vue';
|
||||
import QualitySelector from './preset/QualitySelector.vue';
|
||||
import ImageWeightSelector from './preset/ImageWeightSelector.vue';
|
||||
import WiredSelector from './preset/WiredSelector.vue';
|
||||
import RawSelector from './preset/RawSelector.vue';
|
||||
import AdvancedSelector from './preset/AdvancedSelector.vue';
|
||||
import TranslationSelector from './preset/TranslationSelector.vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'PresetPanel',
|
||||
@@ -38,7 +40,8 @@ export default defineComponent({
|
||||
WiredSelector,
|
||||
RawSelector,
|
||||
AdvancedSelector,
|
||||
ImageWeightSelector
|
||||
ImageWeightSelector,
|
||||
TranslationSelector
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div class="field">
|
||||
<h2 class="title">自动翻译</h2>
|
||||
<el-switch v-model="value" class="ml-2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSwitch } from 'element-plus';
|
||||
|
||||
const DEFAULT_ADVANCED = false;
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TranslationSelector',
|
||||
components: {
|
||||
ElSwitch
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
data() {
|
||||
return {
|
||||
value: this.modelValue
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
modelValue(val) {
|
||||
if (val !== this.value) {
|
||||
this.value = val;
|
||||
}
|
||||
},
|
||||
value(val) {
|
||||
this.$emit('update:modelValue', val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.value === undefined) {
|
||||
this.value = DEFAULT_ADVANCED;
|
||||
}
|
||||
this.$emit('update:modelValue', this.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
width: 30%;
|
||||
}
|
||||
.value {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user