init: frontend

This commit is contained in:
snusxd
2026-04-10 00:41:21 +03:00
commit d2b5489001
26 changed files with 4022 additions and 0 deletions

19
src/utils/change-title.ts Normal file
View File

@@ -0,0 +1,19 @@
import type { Ref } from 'vue'
const sleep = (ms: number) => new Promise((res) => setTimeout(res, ms))
export async function ChangeTitle(refvar: Ref, old_string: string, new_string: string) {
const old_array = old_string.split(' ')
const new_array = new_string.split(' ')
for (let i = old_array.length; i >= 0; i -= 1) {
refvar.value = old_array.slice(0, i).join(' ')
await sleep(100)
}
for (let i = 0; i < new_array.length; i++) {
refvar.value = new_array.slice(0, i + 1).join(' ')
await sleep(100)
}
// refvar.value = new_string
}