Update app.js
#4
by
charlie002
- opened
app.js
CHANGED
|
@@ -1,60 +1,55 @@
|
|
| 1 |
-
const { createApp } = Vue
|
| 2 |
-
|
| 3 |
-
const app = createApp({
|
| 4 |
-
data() {
|
| 5 |
-
return {
|
| 6 |
-
videoDescription: '',
|
| 7 |
-
charCount: 0,
|
| 8 |
-
selectedStyle: null,
|
| 9 |
-
showProModal: false,
|
| 10 |
-
generationCount: 0,
|
| 11 |
-
videoStyles: [
|
| 12 |
-
{ id: 'mountain', name: 'Mountain Landscape' },
|
| 13 |
-
{ id: 'city', name: 'City Timelapse' },
|
| 14 |
-
{ id: 'ocean', name: 'Ocean Waves' },
|
| 15 |
-
{ id: 'dance', name: 'Dancing Performance' },
|
| 16 |
-
{ id: 'nature', name: 'Nature Wildlife' },
|
| 17 |
-
{ id: 'space', name: 'Space Journey' }
|
| 18 |
-
]
|
| 19 |
-
}
|
| 20 |
-
},
|
| 21 |
-
methods: {
|
| 22 |
-
updateCharCount() {
|
| 23 |
-
this.charCount = this.videoDescription.length
|
| 24 |
-
if (this.charCount > 1000) {
|
| 25 |
-
this.videoDescription = this.videoDescription.slice(0, 1000)
|
| 26 |
-
this.charCount = 1000
|
| 27 |
-
}
|
| 28 |
-
},
|
| 29 |
-
selectStyle(styleId) {
|
| 30 |
-
this.selectedStyle = styleId
|
| 31 |
-
},
|
| 32 |
-
enhanceText() {
|
| 33 |
-
if (this.generationCount >= 3) {
|
| 34 |
-
this.showProModal = true
|
| 35 |
-
return
|
| 36 |
-
}
|
| 37 |
-
// Placeholder for text enhancement functionality
|
| 38 |
-
console.log('Enhancing text...')
|
| 39 |
-
},
|
| 40 |
-
generateVideo() {
|
| 41 |
-
if (this.generationCount >= 3) {
|
| 42 |
-
this.showProModal = true
|
| 43 |
-
return
|
| 44 |
-
}
|
| 45 |
-
this.generationCount++
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
this.showProModal = false
|
| 56 |
-
}
|
| 57 |
-
}
|
| 58 |
-
})
|
| 59 |
-
|
| 60 |
app.mount('#app')
|
|
|
|
| 1 |
+
const { createApp } = Vue
|
| 2 |
+
|
| 3 |
+
const app = createApp({
|
| 4 |
+
data() {
|
| 5 |
+
return {
|
| 6 |
+
videoDescription: '',
|
| 7 |
+
charCount: 0,
|
| 8 |
+
selectedStyle: null,
|
| 9 |
+
showProModal: false,
|
| 10 |
+
generationCount: 0,
|
| 11 |
+
videoStyles: [
|
| 12 |
+
{ id: 'mountain', name: 'Mountain Landscape' },
|
| 13 |
+
{ id: 'city', name: 'City Timelapse' },
|
| 14 |
+
{ id: 'ocean', name: 'Ocean Waves' },
|
| 15 |
+
{ id: 'dance', name: 'Dancing Performance' },
|
| 16 |
+
{ id: 'nature', name: 'Nature Wildlife' },
|
| 17 |
+
{ id: 'space', name: 'Space Journey' }
|
| 18 |
+
]
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
methods: {
|
| 22 |
+
updateCharCount() {
|
| 23 |
+
this.charCount = this.videoDescription.length
|
| 24 |
+
if (this.charCount > 1000) {
|
| 25 |
+
this.videoDescription = this.videoDescription.slice(0, 1000)
|
| 26 |
+
this.charCount = 1000
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
selectStyle(styleId) {
|
| 30 |
+
this.selectedStyle = styleId
|
| 31 |
+
},
|
| 32 |
+
enhanceText() {
|
| 33 |
+
if (this.generationCount >= 3) {
|
| 34 |
+
this.showProModal = true
|
| 35 |
+
return
|
| 36 |
+
}
|
| 37 |
+
// Placeholder for text enhancement functionality
|
| 38 |
+
console.log('Enhancing text...')
|
| 39 |
+
},
|
| 40 |
+
generateVideo() {
|
| 41 |
+
if (this.generationCount >= 3) {
|
| 42 |
+
this.showProModal = true
|
| 43 |
+
return
|
| 44 |
+
}
|
| 45 |
+
this.generationCount++
|
| 46 |
+
console.log('Generating video...')
|
| 47 |
+
window.location.href = 'https://saifs.ai/text-to-video'
|
| 48 |
+
},
|
| 49 |
+
closeProModal() {
|
| 50 |
+
this.showProModal = false
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
})
|
| 54 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
app.mount('#app')
|