Upgrade build libs and fixed lints (#235)

This commit is contained in:
Germey authored and GitHub committed 2025-07-27 15:09:06 +08:00
1 parent 8bf60b4b05
commit 03244e096f
197 files changed
+3924 -3714

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
.loading,
.loading div {
box-sizing: border-box;
}
.loading {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(1);
}
.loading div {
position: absolute;
top: 33.33333px;
width: 13.33333px;
height: 13.33333px;
border-radius: 50%;
background-color: #277186;
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.loading div:nth-child(1) {
left: 8px;
animation: loading1 0.6s infinite;
}
.loading div:nth-child(2) {
left: 8px;
animation: loading2 0.6s infinite;
}
.loading div:nth-child(3) {
left: 32px;
animation: loading2 0.6s infinite;
}
.loading div:nth-child(4) {
left: 56px;
animation: loading3 0.6s infinite;
}
@keyframes loading1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes loading3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes loading2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

-3
View File
@@ -1,3 +0,0 @@
import OpticalDisk from './disk.png';
export { OpticalDisk };
+2 -2
View File
@@ -10,5 +10,5 @@
);
$--font-path: 'element-plus/theme-chalk/src/fonts';
@import 'element-plus/theme-chalk/src/index.scss';
@import 'element-plus/theme-chalk/dark/css-vars.css';
@use 'element-plus/theme-chalk/src/index.scss';
@use 'element-plus/theme-chalk/dark/css-vars.css';
+3 -3
View File
@@ -1,3 +1,3 @@
@import './element';
@import './common';
@import './markdown';
@use './element';
@use './common';
@use './markdown';
+1 -2
View File
@@ -22,8 +22,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { ElDialog, ElDescriptions, ElDescriptionsItem, ElDivider, ElCheckbox, ElButton, ElMessage } from 'element-plus';
import { IService } from '@/models';
import { ElDialog, ElDivider, ElCheckbox, ElButton, ElMessage } from 'element-plus';
import { getBaseUrlPlatform } from '@/utils';
interface IData {
+3 -23
View File
@@ -26,12 +26,12 @@
</div>
<div class="flex flex-col justify-center align-middle gap-2">
<div class="flex">
<el-button size="small" round @click.stop="onGoUsage">
<el-button size="small" round @click.stop="$emit('usage', application)">
{{ $t('application.button.usage') }}
</el-button>
</div>
<div class="flex">
<el-button type="primary" round size="small" @click.stop="onBuyMore">
<el-button type="primary" round size="small" @click.stop="$emit('buy', application)">
{{ $t('application.button.buyMore') }}
</el-button>
</div>
@@ -44,7 +44,6 @@ import { IApplication } from '@/models';
import { defineComponent } from 'vue';
import { ElButton, ElIcon } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { ROUTE_CONSOLE_APPLICATION_EXTRA, ROUTE_CONSOLE_USAGE_LIST } from '@/router';
import { Check } from '@element-plus/icons-vue';
export default defineComponent({
@@ -69,26 +68,7 @@ export default defineComponent({
default: false
}
},
methods: {
onGoUsage() {
this.$router.push({
name: ROUTE_CONSOLE_USAGE_LIST,
query: {
application_id: this.application.id
}
});
},
onBuyMore() {
// open in new tab for this url
const url = this.$router.resolve({
name: ROUTE_CONSOLE_APPLICATION_EXTRA,
params: {
id: this.application.id
}
}).href;
window.open(url, '_blank');
}
}
emits: ['buy', 'usage']
});
</script>
+16 -9
View File
@@ -1,6 +1,6 @@
<template>
<div class="status">
<el-dialog v-model="showInfo">
<el-dialog v-model="visible" class="mt-12" width="600px">
<div v-if="application">
<p class="text-center mb-4">
{{ $t('application.message.applicationSelection') }}
@@ -15,11 +15,13 @@
}"
:application="app"
@click="onSelectApplication(app)"
@usage="onGoUsage(app)"
@buy="onBuyMore(app)"
/>
</div>
</div>
</el-dialog>
<el-button circle @click="showInfo = true">
<el-button circle @click="visible = true">
<font-awesome-icon icon="fa-solid fa-wallet" class="icon" />
</el-button>
</div>
@@ -29,12 +31,12 @@
import { defineComponent } from 'vue';
import { ElButton, ElDialog } from 'element-plus';
import { IApplicationType, IApplication, IService } from '@/models';
import { ROUTE_CONSOLE_APPLICATION_EXTRA, ROUTE_CONSOLE_APPLICATION_SUBSCRIBE } from '@/router';
import { ROUTE_CONSOLE_APPLICATION_EXTRA, ROUTE_CONSOLE_USAGE_LIST } from '@/router';
import ApplicationInfo from './Info.vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
export interface IData {
showInfo: boolean;
visible: boolean;
applicationType: typeof IApplicationType;
}
@@ -55,10 +57,6 @@ export default defineComponent({
type: Array as () => IApplication[] | undefined,
default: undefined
},
showPrice: {
type: Boolean,
default: true
},
service: {
type: Object as () => IService | undefined,
required: true
@@ -67,7 +65,7 @@ export default defineComponent({
emits: ['select'],
data(): IData {
return {
showInfo: false,
visible: false,
applicationType: IApplicationType
};
},
@@ -80,6 +78,15 @@ export default defineComponent({
}
},
methods: {
onGoUsage(application: IApplication) {
const url = this.$router.resolve({
name: ROUTE_CONSOLE_USAGE_LIST,
query: {
application_id: application.id
}
});
window.open(url.href, '_blank');
},
onBuyMore(application: IApplication) {
// open in new tab for this url
const url = this.$router.resolve({
+2 -2
View File
@@ -21,7 +21,7 @@
<template #file="{ file }">
<image-preview
v-if="isImageUrl(file.name)"
:url="file.url || file.response?.file_url"
:url="file.url || (file.response as any)?.file_url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
@@ -77,7 +77,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { ElMessage, ElTooltip, ElUpload, UploadFile, UploadFiles, UploadProgressEvent } from 'element-plus';
import { ElMessage, ElTooltip, ElUpload, UploadFile, UploadProgressEvent } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { IChatModel } from '@/models';
import { getBaseUrlPlatform, isImageUrl } from '@/utils';
+13 -1
View File
@@ -60,7 +60,19 @@
</div>
<answering-mark v-if="message.state === messageState.PENDING" />
</div>
<div class="operations">
<div
v-motion
:initial="{ opacity: 0, y: 5 }"
:enter="{ opacity: 1, y: 0, scale: 1 }"
:delay="300"
:duration="400"
:layout="true"
:transition="{
enter: { delay: 0.3, duration: 0.5 },
layout: { duration: 0.4, easing: 'ease-in-out' }
}"
class="operations"
>
<edit-message
v-if="message.role === 'user' && !isEditing && !Array.isArray(message.content)"
class="btn-edit"
+7 -3
View File
@@ -21,8 +21,9 @@ export default defineComponent({
},
props: {
content: {
type: String,
required: true
type: [String, Number],
required: false,
default: ''
}
},
data() {
@@ -32,7 +33,10 @@ export default defineComponent({
},
methods: {
onCopy() {
copy(this.content, {
if (!this.content) {
return;
}
copy(this.content.toString(), {
debug: true
});
this.copied = true;
-75
View File
@@ -1,75 +0,0 @@
<template>
<el-dialog :model-value="visible" :width="200" class="text-center" @close="$emit('close')">
<dark-switch class="switch" dark-background="#333" light-background="#fff" />
</el-dialog>
</template>
<script lang="ts">
import { getDomain } from '@/utils';
import { getCookie, setCookie } from 'typescript-cookie';
import { defineComponent } from 'vue';
import { Switch as DarkSwitch, toggleDark, isDark } from 'vue-dark-switch';
import { ElDialog } from 'element-plus';
export default defineComponent({
components: {
DarkSwitch,
ElDialog
},
props: {
visible: {
type: Boolean,
default: true
}
},
emits: ['update:dark', 'close'],
computed: {
dark() {
return getCookie('THEME') === 'dark';
},
switchValue() {
return isDark.value;
}
},
watch: {
switchValue(val) {
this.setCookie(val);
},
dark(val) {
document.documentElement.classList.toggle('dark', val);
this.setCookie(this.dark);
}
},
mounted() {
if (this.dark) {
toggleDark(true);
document.documentElement.classList.add('dark');
} else {
toggleDark(false);
document.documentElement.classList.remove('dark');
}
},
methods: {
setCookie(isDark: boolean) {
setCookie('THEME', isDark ? 'dark' : 'light', {
path: '/',
domain: getDomain()
});
}
}
});
</script>
<style lang="scss">
.switch {
--n-rail-color-active: var(--el-color-primary) !important;
--n-loading-color: var(--el-color-primary) !important;
border-radius: 10px !important;
border: 1px solid var(--el-border-color);
overflow: hidden;
.n-switch__button {
border-radius: 50% !important;
box-shadow: none !important;
}
}
</style>
+2 -1
View File
@@ -40,7 +40,8 @@ export default defineComponent({
},
percentage: {
type: Number,
required: true
required: false,
default: undefined
},
closable: {
type: Boolean,
+2 -1
View File
@@ -36,7 +36,8 @@ export default defineComponent({
},
percentage: {
type: Number,
required: true
required: false,
default: undefined
},
closable: {
type: Boolean,
+1 -1
View File
@@ -10,7 +10,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { getPriceString } from '@/utils';
+4 -3
View File
@@ -5,9 +5,9 @@
</el-col>
<el-col :md="16" :xs="13">
<el-menu :default-active="active" mode="horizontal" class="menu" :ellipsis="true" @select="onSelect">
<el-sub-menu :index="1">
<el-sub-menu :index="products">
<template #title>{{ $t('common.nav.products') }}</template>
<el-menu-item v-if="site?.features?.chat?.enabled" v-t="'index.title.chat'" index="/chat"></el-menu-item>
<el-menu-item v-if="site?.features?.chatgpt?.enabled" v-t="'index.title.chat'" index="/chat"></el-menu-item>
<el-menu-item
v-if="site?.features?.midjourney?.enabled"
v-t="'index.title.midjourney'"
@@ -88,7 +88,8 @@ export default defineComponent({
},
data() {
return {
defaultAvatar
defaultAvatar,
products: 'chat'
};
},
computed: {
+1 -1
View File
@@ -14,7 +14,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
+2 -2
View File
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { FLUX_DEFAULT_MODEL } from '@/constants';
@@ -64,7 +64,7 @@ export default defineComponent({
get() {
return this.$store.state.flux?.config?.model;
},
set(val) {
set(val: string) {
this.$store.commit('flux/setConfig', {
...this.$store.state.flux.config,
model: val
+4 -4
View File
@@ -16,7 +16,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.flux?.config?.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('flux/setConfig', {
...this.$store.state.flux?.config,
@@ -44,8 +44,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_PROMPT;
}
}
});
@@ -15,7 +15,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSlider, ElInputNumber } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -31,9 +31,9 @@ export default defineComponent({
computed: {
value: {
get() {
return this.$store.state.flux.config.quality;
return this.$store.state.flux.config?.quality;
},
set(val) {
set(val: string) {
console.debug('set quality', val);
this.$store.commit('flux/setConfig', {
...this.$store.state.flux.config,
+2 -2
View File
@@ -19,7 +19,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { FLUX_DEFAULT_ASPECT_RATIO } from '@/constants';
@@ -81,7 +81,7 @@ export default defineComponent({
get() {
return this.$store.state.flux?.config?.aspect_ratio;
},
set(val) {
set(val: string) {
console.debug('set ratio', val);
this.$store.commit('flux/setConfig', {
...this.$store.state.flux.config,
+1 -1
View File
@@ -88,7 +88,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { ElImage, ElAlert, ElButton, ElTooltip } from 'element-plus';
import { ElImage, ElAlert } from 'element-plus';
import { IFluxTask, IFluxImage } from '@/models';
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
+1 -1
View File
@@ -24,7 +24,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
@@ -9,7 +9,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { HAILUO_DEFAULT_MODEL } from '@/constants';
@@ -40,7 +40,7 @@ export default defineComponent({
get() {
return this.$store.state.hailuo?.config?.model;
},
set(val) {
set(val: string) {
this.$store.commit('hailuo/setConfig', {
...this.$store.state.hailuo?.config,
model: val
+4 -4
View File
@@ -16,7 +16,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.hailuo?.config?.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('hailuo/setConfig', {
...this.$store.state.hailuo?.config,
@@ -44,8 +44,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_PROMPT;
}
}
});
@@ -23,22 +23,23 @@
>
<template #file="{ file }">
<image-preview
:url="file.url || file.response?.file_url"
v-if="file.url && file.percentage !== undefined"
:url="file.url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
/>
</template>
<el-button size="small" type="primary" class="btn btn-upload" round>{{
$t('hailuo.button.uploadStartImageUrl')
}}</el-button>
<el-button size="small" type="primary" class="btn btn-upload" round>
{{ $t('hailuo.button.uploadStartImageUrl') }}
</el-button>
</el-upload>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton, ElUpload, ElMessage, UploadFiles } from 'element-plus';
import { ElButton, ElUpload, ElMessage, UploadFiles, UploadFile } from 'element-plus';
import { getBaseUrlPlatform } from '@/utils';
import InfoIcon from '@/components/common/InfoIcon.vue';
import ImagePreview from '@/components/common/ImagePreview.vue';
@@ -71,8 +72,7 @@ export default defineComponent({
};
},
urls(): string[] {
// @ts-ignore
return this.fileList.map((file: UploadFile) => file?.response?.file_url);
return this.fileList.map((file: UploadFile) => file.url).filter((url: string | undefined) => url !== undefined);
},
value: {
get() {
+4 -4
View File
@@ -36,7 +36,7 @@
type="info"
size="small"
class="mb-2"
@click.stop="onDownload($event, video?.video_url)"
@click.stop="onDownload(video?.video_url)"
>
{{ $t('hailuo.button.download') }}
</el-button>
@@ -140,9 +140,9 @@ export default defineComponent({
}
},
methods: {
onDownload(event: MouseEvent, video_url: string) {
console.debug('on download hailuo video', video_url);
window.open(video_url, '_blank');
onDownload(videoUrl: string) {
console.debug('on download hailuo video', videoUrl);
window.open(videoUrl, '_blank');
}
}
});
+1 -1
View File
@@ -14,7 +14,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
-23
View File
@@ -1,23 +0,0 @@
<template>
<div class="panel detail">
<task-detail />
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import TaskDetail from './task/Detail.vue';
export default defineComponent({
name: 'DetailPanel',
components: {
TaskDetail
},
data() {
return {
job: 0
};
},
computed: {}
});
</script>
@@ -1,77 +0,0 @@
<template>
<div>
<el-card v-show="operating">
<content-input class="mb-4" />
<prompt-input class="mb-4" />
<preset-selector class="mb-4" />
<div class="actions">
<el-button type="primary" class="btn w-full" round @click="onGenerate">
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
{{ $t('headshots.button.generate') }}
</el-button>
</div>
</el-card>
<div>
<el-button type="primary" class="btn btn-operate" @click="operating = !operating">+</el-button>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton, ElCard } from 'element-plus';
import PresetSelector from './config/PresetSelector2.vue';
import ContentInput from './config/ContentInput.vue';
import PromptInput from './config/PromptInput.vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
export default defineComponent({
name: 'OperationPanel',
components: {
ElButton,
ElCard,
PresetSelector,
ContentInput,
PromptInput,
FontAwesomeIcon
},
emits: ['generate'],
data() {
return {
operating: false
};
},
methods: {
onGenerate() {
this.$emit('generate');
this.operating = false;
}
}
});
</script>
<style lang="scss" scoped>
.el-card {
width: 580px;
height: fit-content;
overflow-y: scroll;
position: absolute;
bottom: 70px;
left: calc(50% - 300px);
@media (max-width: 767px) {
width: 100%;
left: 0;
}
}
.btn-operate {
width: 50px;
height: 50px;
border-radius: 50%;
font-size: 24px;
line-height: 40px;
padding: 0;
margin: auto;
display: block;
}
</style>
@@ -64,7 +64,7 @@ export default defineComponent({
get() {
return this.$store.state.headshots?.config?.image_urls;
},
set(val: string) {
set() {
const url = this.urls;
this.$store.commit('headshots/setConfig', {
...this.$store.state.headshots?.config,
@@ -9,7 +9,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElRadioButton, ElRadioGroup } from 'element-plus';
@@ -40,7 +40,7 @@ export default defineComponent({
get() {
return this.$store.state.headshots.config?.mode;
},
set(val) {
set(val: string) {
console.debug('set mode', val);
this.$store.commit('headshots/setConfig', {
...this.$store.state.headshots.config,
+1 -1
View File
@@ -7,7 +7,7 @@
<div class="bot">
{{ $t('headshots.name.headshotsBot') }}
<span class="datetime">
{{ $dayjs.format('' + new Date(parseFloat(modelValue?.created_at || '') * 1000)) }}
{{ $dayjs.format('' + new Date(parseFloat((modelValue?.created_at || '').toString()) * 1000)) }}
</span>
</div>
<div class="info">
+3 -2
View File
@@ -30,7 +30,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
@@ -43,8 +43,9 @@ import EndImage from './config/EndImage.vue';
import CfgScaleSelector from './config/CfgScaleSelector.vue';
import PromptInput from './config/PromptInput.vue';
import NegativePromptInput from './config/NegativePromptInput.vue';
export default defineComponent({
name: 'PresetPanel',
name: 'ConfigPanel',
components: {
ElButton,
FontAwesomeIcon,
@@ -15,7 +15,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSlider, ElInputNumber } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -33,7 +33,7 @@ export default defineComponent({
get() {
return this.$store.state?.kling?.config?.cfg_scale;
},
set(val) {
set(val: string) {
console.debug('set cfg_scale', val);
this.$store.commit('kling/setConfig', {
...this.$store.state?.kling?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { KLING_DEFAULT_DURATION } from '@/constants';
@@ -44,7 +44,7 @@ export default defineComponent({
get() {
return this.$store.state.kling?.config?.duration;
},
set(val) {
set(val: string) {
this.$store.commit('kling/setConfig', {
...this.$store.state.kling.config,
duration: val
+3 -2
View File
@@ -22,7 +22,8 @@
>
<template #file="{ file }">
<image-preview
:url="file.url || file.response?.file_url"
v-if="file.url && file.percentage !== undefined"
:url="file.url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
@@ -78,7 +79,7 @@ export default defineComponent({
get() {
return this.$store.state?.kling?.config?.start_image_url;
},
set(val: string) {
set() {
// this.$store.commit('kling/setConfig', {
// ...this.$store.state?.kling?.config,
// start_image_url: val
+2 -2
View File
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { KLING_DEFAULT_MODE } from '@/constants';
@@ -44,7 +44,7 @@ export default defineComponent({
get() {
return this.$store.state.kling?.config?.mode;
},
set(val) {
set(val: string) {
this.$store.commit('kling/setConfig', {
...this.$store.state.kling.config,
mode: val
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { KLING_DEFAULT_MODEL } from '@/constants';
@@ -48,7 +48,7 @@ export default defineComponent({
get() {
return this.$store.state.kling?.config?.model;
},
set(val) {
set(val: string) {
this.$store.commit('kling/setConfig', {
...this.$store.state.kling.config,
model: val
@@ -16,7 +16,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.kling?.config?.negative_prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('kling/setConfig', {
...this.$store.state.kling?.config,
@@ -44,8 +44,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_NEGATIVE_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_NEGATIVE_PROMPT;
}
}
});
+4 -4
View File
@@ -16,7 +16,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.kling?.config?.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('kling/setConfig', {
...this.$store.state.kling?.config,
@@ -44,8 +44,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_PROMPT;
}
}
});
@@ -19,7 +19,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { KLING_DEFAULT_ASPECT_RATIO } from '@/constants';
@@ -57,7 +57,7 @@ export default defineComponent({
get() {
return this.$store.state?.kling?.config?.aspect_ratio;
},
set(val) {
set(val: string) {
console.debug('set ratio', val);
this.$store.commit('kling/setConfig', {
...this.$store.state?.kling?.config,
+3 -2
View File
@@ -22,7 +22,8 @@
>
<template #file="{ file }">
<image-preview
:url="file.url || file.response?.file_url"
v-if="file.url && file.percentage !== undefined"
:url="file.url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
@@ -79,7 +80,7 @@ export default defineComponent({
get() {
return this.$store.state?.kling?.config?.start_image_url;
},
set(val: string) {
set() {
// this.$store.commit('kling/setConfig', {
// ...this.$store.state?.kling?.config,
// start_image_url: val
+2 -2
View File
@@ -29,7 +29,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
@@ -44,7 +44,7 @@ import PromptInput from './config/PromptInput.vue';
import ExtendFromInput from './config/ExtendFromInput.vue';
export default defineComponent({
name: 'PresetPanel',
name: 'ConfigPanel',
components: {
LoopSelector,
StartImageInput,
-23
View File
@@ -1,23 +0,0 @@
<template>
<div class="panel detail">
<task-detail />
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import TaskDetail from './task/Detail.vue';
export default defineComponent({
name: 'DetailPanel',
components: {
TaskDetail
},
data() {
return {
job: 0
};
},
computed: {}
});
</script>
@@ -12,7 +12,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import { LUMA_DEFAULT_CUSTOM } from '@/constants';
@@ -29,7 +29,7 @@ export default defineComponent({
get() {
return this.$store.state.luma?.config?.custom;
},
set(val) {
set(val: boolean) {
console.debug('set custom', val);
this.$store.commit('luma/setConfig', {
...this.$store.state.luma?.config,
+2 -1
View File
@@ -22,7 +22,8 @@
>
<template #file="{ file }">
<image-preview
:url="file.url || file.response?.file_url"
v-if="file.url && file.percentage !== undefined"
:url="file.url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
@@ -12,7 +12,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import { LUMA_DEFAULT_ENHANCEMENT } from '@/constants';
@@ -28,7 +28,7 @@ export default defineComponent({
get() {
return this.$store.state.luma?.config?.enhancement;
},
set(val) {
set(val: boolean) {
console.debug('set enhancement', val);
this.$store.commit('luma/setConfig', {
...this.$store.state.luma?.config,
@@ -21,7 +21,8 @@ export default defineComponent({
props: {
modelValue: {
type: Object as () => ILumaTask | undefined,
required: true
required: false,
default: undefined
}
},
data() {
+2 -2
View File
@@ -12,7 +12,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import { LUMA_DEFAULT_LOOP } from '@/constants';
@@ -29,7 +29,7 @@ export default defineComponent({
get() {
return this.$store.state.luma?.config?.loop;
},
set(val) {
set(val: boolean) {
console.debug('set loop', val);
this.$store.commit('luma/setConfig', {
...this.$store.state.luma?.config,
+4 -4
View File
@@ -16,7 +16,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.luma?.config?.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('luma/setConfig', {
...this.$store.state.luma?.config,
@@ -44,8 +44,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_PROMPT;
}
}
});
@@ -22,7 +22,8 @@
>
<template #file="{ file }">
<image-preview
:url="file.url || file.response?.file_url"
v-if="file.percentage != undefined"
:url="file.url || (file.response as any).file_url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
+2 -1
View File
@@ -23,7 +23,8 @@
>
<template #file="{ file }">
<file-preview
:url="file.url || file.response?.file_url"
v-if="file.percentage != undefined"
:url="file.url || (file.response as any)?.file_url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
+3 -3
View File
@@ -35,7 +35,7 @@
type="info"
size="small"
class="btn-action"
@click.stop="onDownload($event, modelValue?.response?.video_url)"
@click.stop="onDownload(modelValue?.response?.video_url)"
>
{{ $t('luma.button.download') }}
</el-button>
@@ -143,7 +143,7 @@ export default defineComponent({
}
},
methods: {
onExtend(event: MouseEvent, response: ILumaGenerateResponse) {
onExtend(_event: MouseEvent, response: ILumaGenerateResponse) {
// extend url here
console.debug('set config', response);
this.$store.commit('luma/setConfig', {
@@ -155,7 +155,7 @@ export default defineComponent({
video_url: response.video_url
});
},
onDownload(event: MouseEvent, video_url: string) {
onDownload(video_url: string) {
// download url here
window.open(video_url, '_blank');
}
+1 -1
View File
@@ -26,7 +26,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import RatioSelector from './config/RatioSelector.vue';
import AdvancedSelector from './config/AdvancedSelector.vue';
@@ -5,7 +5,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
@@ -21,7 +21,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.advanced;
},
set(val) {
set(val: boolean) {
console.debug('set advanced', val);
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
@@ -15,7 +15,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSlider, ElInputNumber } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.chaos;
},
set(val) {
set(val: number) {
console.debug('set quality', val);
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
@@ -11,7 +11,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
@@ -15,7 +15,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSlider } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -32,7 +32,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.iw;
},
set(val) {
set(val: number) {
console.debug('set iw', val);
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
@@ -9,7 +9,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElRadioButton, ElRadioGroup } from 'element-plus';
@@ -44,7 +44,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.mode;
},
set(val) {
set(val: string) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
mode: val
@@ -37,7 +37,7 @@
</el-dropdown>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElDropdown, ElDropdownItem, ElButton, ElIcon } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
@@ -87,7 +87,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.mode;
},
set(val) {
set(val: string) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
mode: val
@@ -101,7 +101,7 @@ export default defineComponent({
}
},
methods: {
onCommand(command) {
onCommand(command: string) {
console.log('command', command);
this.value = command;
}
@@ -20,7 +20,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElImage } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -55,7 +55,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.model;
},
set(val) {
set(val: string) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
model: val
@@ -17,7 +17,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -38,7 +38,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney?.config.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney?.config,
@@ -48,8 +48,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_PROMPT;
}
}
});
@@ -9,7 +9,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElRadioButton, ElRadioGroup } from 'element-plus';
import { MIDJOURNEY_DEFAULT_QUALITY } from '@/constants';
@@ -43,7 +43,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.quality;
},
set(val) {
set(val: string) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
quality: val
@@ -19,7 +19,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { MIDJOURNEY_DEFAULT_RATIO } from '@/constants';
@@ -69,7 +69,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.ratio;
},
set(val) {
set(val: string) {
console.debug('set ratio', val);
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
@@ -21,7 +21,7 @@
>
<template #file="{ file }">
<image-preview
:url="file.url || file.response?.file_url"
:url="file.url || (file.response as any)?.file_url"
:name="file.name"
:percentage="file.percentage"
@remove="fileList.splice(fileList.indexOf(file), 1)"
@@ -10,7 +10,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -62,7 +62,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.style;
},
set(val) {
set(val: string) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
style: val
@@ -15,7 +15,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSlider, ElInputNumber } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -33,7 +33,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.stylize;
},
set(val) {
set(val: number) {
console.debug('set stylize', val);
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
@@ -6,7 +6,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -24,7 +24,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.translation;
},
set(val) {
set(val: boolean) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
translation: val
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -77,7 +77,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.version;
},
set(val) {
set(val: string) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
version: val
@@ -15,7 +15,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSlider, ElInputNumber } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -33,7 +33,7 @@ export default defineComponent({
get() {
return this.$store.state.midjourney.config.weird;
},
set(val) {
set(val: number) {
this.$store.commit('midjourney/setConfig', {
...this.$store.state.midjourney.config,
weird: val
+1 -1
View File
@@ -7,7 +7,7 @@
<div class="bot">
{{ $t('midjourney.name.midjourneyBot') }}
<span class="datetime">
{{ $dayjs.format('' + new Date(parseFloat(modelValue?.created_at || '') * 1000)) }}
{{ $dayjs.format('' + new Date(parseFloat((modelValue?.created_at || '').toString()) * 1000)) }}
</span>
</div>
<div class="info">
+2 -12
View File
@@ -8,17 +8,7 @@
<image-url-input v-if="config?.ingredients" class="mb-4" />
<ingredients-model-selector v-if="config?.ingredients" class="mb-4" />
<div class="actions">
<el-button
v-if="config?.video_url !== undefined || config?.custom"
type="primary"
class="btn w-full"
round
@click="onGenerate"
>
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
{{ $t('pika.button.extend') }}
</el-button>
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
<el-button type="primary" class="btn w-full" round @click="onGenerate">
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
{{ $t('pika.button.generate') }}
</el-button>
@@ -27,7 +17,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
-23
View File
@@ -1,23 +0,0 @@
<template>
<div class="panel detail">
<task-detail />
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import TaskDetail from './task/Detail.vue';
export default defineComponent({
name: 'DetailPanel',
components: {
TaskDetail
},
data() {
return {
job: 0
};
},
computed: {}
});
</script>
-77
View File
@@ -1,77 +0,0 @@
<template>
<div>
<el-card v-show="operating">
<content-input class="mb-4" />
<prompt-input class="mb-4" />
<preset-selector class="mb-4" />
<div class="actions">
<el-button type="primary" class="btn w-full" round @click="onGenerate">
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
{{ $t('pika.button.generate') }}
</el-button>
</div>
</el-card>
<div>
<el-button type="primary" class="btn btn-operate" @click="operating = !operating">+</el-button>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElButton, ElCard } from 'element-plus';
import PresetSelector from './config/PresetSelector2.vue';
import ContentInput from './config/ContentInput.vue';
import PromptInput from './config/PromptInput.vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
export default defineComponent({
name: 'OperationPanel',
components: {
ElButton,
ElCard,
PresetSelector,
ContentInput,
PromptInput,
FontAwesomeIcon
},
emits: ['generate'],
data() {
return {
operating: false
};
},
methods: {
onGenerate() {
this.$emit('generate');
this.operating = false;
}
}
});
</script>
<style lang="scss" scoped>
.el-card {
width: 580px;
height: fit-content;
overflow-y: scroll;
position: absolute;
bottom: 70px;
left: calc(50% - 300px);
@media (max-width: 767px) {
width: 100%;
left: 0;
}
}
.btn-operate {
width: 50px;
height: 50px;
border-radius: 50%;
font-size: 24px;
line-height: 40px;
padding: 0;
margin: auto;
display: block;
}
</style>
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<div>
<vue-plyr :options="options" class="video">
<video controls crossorigin playsinline :data-poster="modelValue?.image_url">
<video controls crossorigin="" playsinline :data-poster="modelValue?.image_url">
<source size="1080" :src="modelValue?.video_url" type="video/mp4" />
</video>
</vue-plyr>
@@ -10,7 +10,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -84,16 +84,14 @@ export default defineComponent({
get() {
return this.$store.state.pika?.config?.effect;
},
set(val) {
set(val: string) {
this.$store.commit('pika/setConfig', {
...this.$store.state.pika?.config,
effect: val
});
}
}
},
watch: {},
mounted() {}
}
});
</script>
@@ -9,7 +9,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElRadioButton, ElRadioGroup } from 'element-plus';
import { PIKA_DEFAULT_INGREDIENTS_MODEL } from '@/constants';
@@ -39,7 +39,7 @@ export default defineComponent({
get() {
return this.$store.state.pika?.config?.ingredients_mode;
},
set(val) {
set(val: string) {
this.$store.commit('pika/setConfig', {
...this.$store.state.pika?.config,
ingredients_mode: val
@@ -6,7 +6,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import { PIKA_DEFAULT_INGREDIENTS } from '@/constants';
@@ -22,7 +22,7 @@ export default defineComponent({
get() {
return this.$store.state.pika?.config?.ingredients;
},
set(val) {
set(val: string) {
console.debug('set ingredients', val);
if (!val) {
this.$store.commit('pika/setConfig', {
+2 -2
View File
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
import { PIKA_DEFAULT_MODEL } from '@/constants';
@@ -44,7 +44,7 @@ export default defineComponent({
get() {
return this.$store.state.pika?.config?.model;
},
set(val) {
set(val: string) {
this.$store.commit('pika/setConfig', {
...this.$store.state.pika.config,
model: val
+4 -4
View File
@@ -16,7 +16,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
@@ -34,7 +34,7 @@ export default defineComponent({
get() {
return this.$store.state.pika?.config?.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('pika/setConfig', {
...this.$store.state.pika?.config,
@@ -44,8 +44,8 @@ export default defineComponent({
}
},
mounted() {
if (!this.value) {
this.value = DEFAULT_PROMPT;
if (!this.prompt) {
this.prompt = DEFAULT_PROMPT;
}
}
});
+9 -4
View File
@@ -7,7 +7,7 @@
<div class="bot">
{{ $t('pika.name.pikaBot') }}
<span class="datetime">
{{ $dayjs.format('' + new Date(parseFloat(modelValue?.created_at || '') * 1000)) }}
{{ $dayjs.format('' + new Date(parseFloat((modelValue?.created_at || '').toString()) * 1000)) }}
</span>
</div>
<div class="info">
@@ -26,7 +26,13 @@
</div>
<div v-if="video" :class="{ operations: true, 'mt-2': true }">
<el-tooltip class="box-item" effect="dark" :content="$t('pika.message.downloadVideo')" placement="top-start">
<el-button type="info" size="small" class="btn-action" @click="onDownload($event, video?.video_url)">
<el-button
v-if="video?.video_url"
type="info"
size="small"
class="btn-action"
@click="onDownload(video?.video_url)"
>
{{ $t('pika.button.download') }}
</el-button>
</el-tooltip>
@@ -154,8 +160,7 @@ export default defineComponent({
// video_url: response.video_url
// });
// },
onDownload(event: MouseEvent, video_url: string) {
event.stopPropagation();
onDownload(video_url: string) {
console.log('on download');
// download url here
window.open(video_url, '_blank');
+1 -1
View File
@@ -28,7 +28,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import TypeSelector from './config/TypeSelector.vue';
import AspectRatioSelector from './config/AspectRatioSelector.vue';
@@ -5,7 +5,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import { QRART_DEFAULT_ADVANCED } from '@/constants';
@@ -20,7 +20,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.advanced;
},
set(val) {
set(val: boolean) {
console.debug('set advanced', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -19,7 +19,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { QRART_DEFAULT_ASPECT_RATIO } from '@/constants';
@@ -63,13 +63,13 @@ export default defineComponent({
},
computed: {
active() {
return this.options.findIndex((option) => option.value === this.value) || 0;
return this.options.findIndex((option) => option.value === String(this.value)) || 0;
},
value: {
get() {
return this.$store.state.qrart?.config?.aspect_ratio;
},
set(val) {
set(val: string) {
console.debug('set aspect ratio', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
+2 -2
View File
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_ECL } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -45,7 +45,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.ecl;
},
set(val) {
set(val: string) {
console.debug('set ecl', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_MARKER_SHAPE } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -57,7 +57,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.marker_shape;
},
set(val) {
set(val: string) {
console.debug('set marker_shape', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_PADDING_LEVEL } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -53,7 +53,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.padding_level;
},
set(val) {
set(val: number) {
console.debug('set padding_level', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_PADDING_NOISE } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -49,7 +49,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.padding_noise;
},
set(val) {
set(val: number) {
console.debug('set padding_noise', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_PIXEL_STYLE } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -53,7 +53,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.pixel_style;
},
set(val) {
set(val: string) {
console.debug('set pixel_style', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_POSITION } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -65,7 +65,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.position;
},
set(val) {
set(val: string) {
console.debug('set position', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_PRESET } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -125,8 +125,8 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.preset;
},
set(val) {
console.debug('set qrw', val);
set(val: string) {
console.debug('set qrart preset', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
preset: val
@@ -18,7 +18,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_PRESET } from '@/constants';
import { defineComponent } from 'vue';
import { ElImage } from 'element-plus';
@@ -159,7 +159,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.preset;
},
set(val) {
set(val: string) {
console.debug('set qrw', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
+2 -2
View File
@@ -12,7 +12,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
@@ -31,7 +31,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.prompt;
},
set(val) {
set(val: string) {
console.debug('set prompt', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
+2 -2
View File
@@ -6,7 +6,7 @@
</div>
</template>
<script>
<script lang="ts">
import { ElSlider } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
import { QRART_DEFAULT_QRW } from '@/constants';
@@ -23,7 +23,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.qrw || QRART_DEFAULT_QRW;
},
set(val) {
set(val: number) {
console.debug('set qrw', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -5,9 +5,10 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElSwitch } from 'element-plus';
import { QRART_DEFAULT_RAWURL } from '@/constants';
export default defineComponent({
name: 'RawurlSelector',
@@ -19,7 +20,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.rawurl;
},
set(val) {
set(val: boolean) {
console.debug('set rawurl', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_ROTATE } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -45,7 +45,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.rotate;
},
set(val) {
set(val: number) {
console.debug('set rotate', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
+2 -2
View File
@@ -5,7 +5,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent } from 'vue';
import { ElInput } from 'element-plus';
@@ -22,7 +22,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.seed;
},
set(val) {
set(val: string) {
console.debug('set seed', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -6,7 +6,7 @@
</div>
</template>
<script>
<script lang="ts">
import { ElSlider } from 'element-plus';
import InfoIcon from '@/components/common/InfoIcon.vue';
import { QRART_DEFAULT_STEPS } from '@/constants';
@@ -23,7 +23,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.steps || QRART_DEFAULT_STEPS;
},
set(val) {
set(val: number) {
console.debug('set steps', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
@@ -7,7 +7,7 @@
</div>
</template>
<script>
<script lang="ts">
import { QRART_DEFAULT_SUB_MARKER } from '@/constants';
import { defineComponent } from 'vue';
import { ElSelect, ElOption } from 'element-plus';
@@ -49,7 +49,7 @@ export default defineComponent({
get() {
return this.$store.state.qrart?.config?.sub_marker;
},
set(val) {
set(val: string) {
console.debug('set sub_marker', val);
this.$store.commit('qrart/setConfig', {
...this.$store.state.qrart?.config,
Loaded 100 of 197 files, more files were not shown because too many files have changed in this diff. Show more