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
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElButton } from 'element-plus';
|
||||
import TypeSelector from './config/TypeSelector.vue';
|
||||
|
||||
@@ -99,7 +99,11 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange(val: number) {
|
||||
handleChange(val: number | undefined) {
|
||||
if (val === undefined) {
|
||||
this.value = undefined;
|
||||
return;
|
||||
}
|
||||
if (val < 0) {
|
||||
this.value = 0;
|
||||
// @ts-ignore
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElInput } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
@@ -48,7 +48,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.lyric;
|
||||
},
|
||||
set(val) {
|
||||
set(val: string) {
|
||||
console.debug('set lyric', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
@@ -61,8 +61,8 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.value) {
|
||||
this.value = DEFAULT_LYRIC;
|
||||
if (!this.lyric) {
|
||||
this.lyric = DEFAULT_LYRIC;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElInput, ElSwitch } from 'element-plus';
|
||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||
@@ -45,7 +45,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.prompt;
|
||||
},
|
||||
set(val) {
|
||||
set(val: string) {
|
||||
console.debug('set prompt', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
@@ -57,7 +57,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.instrumental;
|
||||
},
|
||||
set(val) {
|
||||
set(val: boolean) {
|
||||
console.debug('set instrumental', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
@@ -67,8 +67,8 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.value) {
|
||||
this.value = DEFAULT_PROMPT;
|
||||
if (!this.prompt) {
|
||||
this.prompt = DEFAULT_PROMPT;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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';
|
||||
@@ -35,7 +35,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.style;
|
||||
},
|
||||
set(val) {
|
||||
set(val: string) {
|
||||
console.debug('set style', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
|
||||
@@ -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';
|
||||
@@ -37,7 +37,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.title;
|
||||
},
|
||||
set(val) {
|
||||
set(val: string) {
|
||||
console.debug('set title', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
@@ -49,7 +49,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.instrumental;
|
||||
},
|
||||
set(val) {
|
||||
set(val: boolean) {
|
||||
console.debug('set instrumental', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
@@ -57,11 +57,6 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.value) {
|
||||
this.value = DEFAULT_PROMPT;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElSelect, ElOption, ElSwitch } from 'element-plus';
|
||||
import { SUNO_DEFAULT_MODEL } from '@/constants';
|
||||
@@ -58,7 +58,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.custom;
|
||||
},
|
||||
set(val) {
|
||||
set(val: string) {
|
||||
console.debug('set custom', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
@@ -70,7 +70,7 @@ export default defineComponent({
|
||||
get() {
|
||||
return this.$store.state.suno?.config?.model;
|
||||
},
|
||||
set(val) {
|
||||
set(val: string) {
|
||||
console.debug('set model', val);
|
||||
this.$store.commit('suno/setConfig', {
|
||||
...this.$store.state.suno?.config,
|
||||
|
||||
@@ -33,7 +33,7 @@ const duration = computed({
|
||||
});
|
||||
|
||||
const onSliderInput = () => {};
|
||||
const onSliderChange = (val: number) =>
|
||||
const onSliderChange = (val: any) =>
|
||||
store.dispatch('suno/setAudio', {
|
||||
...store.state.suno.audio,
|
||||
progress: val
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { OpticalDisk } from '@/assets/img';
|
||||
import OpticalDisk from '@/assets/images/disk.png';
|
||||
import { computed, watch } from 'vue';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ const muted = computed({
|
||||
|
||||
const toggleMuted = () => store.dispatch('suno/toggleMuted');
|
||||
|
||||
const setVolume = (value: number) => store.dispatch('suno/setVolume', value);
|
||||
const setVolume = (value: any) => store.dispatch('suno/setVolume', value);
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-popover.el-popper {
|
||||
|
||||
@@ -78,13 +78,13 @@
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="onGetStems($event, audio?.id)">
|
||||
<el-dropdown-item v-if="audio.id" @click="onGetStems(audio.id)">
|
||||
{{ $t('suno.button.get_stems') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="onCover($event, audio)">
|
||||
<el-dropdown-item @click="onCover(audio)">
|
||||
{{ $t('suno.button.cover_music') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="audio?.action === 'extend'" @click="onConcatMusic($event, audio?.id)">
|
||||
<el-dropdown-item v-if="audio?.id && audio?.action === 'extend'" @click="onConcatMusic(audio?.id)">
|
||||
{{ $t('suno.button.concat_music') }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -244,14 +244,10 @@ export default defineComponent({
|
||||
// preview url here
|
||||
window.open(videoUrl, '_blank');
|
||||
},
|
||||
async onGetStems(event: MouseEvent, audioId: string) {
|
||||
event.stopPropagation();
|
||||
console.log('on get stems', audioId);
|
||||
|
||||
async onGetStems(audioId: string) {
|
||||
await this.onGenerateAudioUrl('stems', audioId);
|
||||
},
|
||||
onCover(event: MouseEvent, audio: ISunoAudio) {
|
||||
event.stopPropagation();
|
||||
onCover(audio: ISunoAudio) {
|
||||
console.log('on cover');
|
||||
// download url here
|
||||
console.debug('set config', audio);
|
||||
@@ -266,9 +262,7 @@ export default defineComponent({
|
||||
audio_id: audio.id
|
||||
});
|
||||
},
|
||||
async onConcatMusic(event: MouseEvent, audioId: string) {
|
||||
event.stopPropagation();
|
||||
console.log('on get concat', audioId);
|
||||
async onConcatMusic(audioId: string) {
|
||||
await this.onGenerateAudioUrl('concat', audioId);
|
||||
},
|
||||
async onGenerateAudioUrl(action: string, audioId: string) {
|
||||
|
||||
Reference in new issue
Block a user