feat: livecode settings

This commit is contained in:
Jannat Patel
2025-06-25 19:57:07 +05:30
parent e71275a0dc
commit b8981c249f
6 changed files with 92 additions and 35 deletions

View File

@@ -578,16 +578,17 @@ export const enablePlyr = () => {
})
}
export const openSettings = (category, close) => {
export const openSettings = (category, close = null) => {
const settingsStore = useSettings()
close()
if (close) {
close()
}
settingsStore.activeTab = category
settingsStore.isSettingsOpen = true
console.log(settingsStore.activeTab, settingsStore.isSettingsOpen)
}
export const cleanError = (message) => {
// Remove HTML tags but keep the text within the tags
const cleanMessage = message.replace(/<[^>]+>/g, (match) => {
return match.replace(/<\/?[^>]+(>|$)/g, '')
})