Upgrade build libs and fixed lints (#235)
This commit is contained in:
1 parent
8bf60b4b05
commit
03244e096f
197 files changed
+3924
-3714
No files matched your search
@@ -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';
|
||||
|
||||
@@ -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('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,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', {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user