Remove unused logs page

This commit is contained in:
RemixDev 2022-07-29 19:54:33 +02:00
parent 7c18258b8c
commit 2f9eabc3db
2 changed files with 0 additions and 35 deletions

View File

@ -748,18 +748,12 @@ import { copyToClipboard } from '@/utils/utils'
import BaseAccordion from '@/components/globals/BaseAccordion.vue' import BaseAccordion from '@/components/globals/BaseAccordion.vue'
import { fetchData, postToServer } from '@/utils/api' import { fetchData, postToServer } from '@/utils/api'
import { getFormItem } from '@/utils/forms' import { getFormItem } from '@/utils/forms'
import { useLogs } from '@/use/logs'
export default { export default {
components: { components: {
BaseAccordion, BaseAccordion,
TemplateVariablesList TemplateVariablesList
}, },
setup() {
const { areLogsActive, saveLogsSettings } = useLogs()
return { areLogsActive, saveLogsSettings }
},
data() { data() {
return { return {
flags, flags,
@ -925,8 +919,6 @@ export default {
localStorage.setItem('locale', newLocale) localStorage.setItem('locale', newLocale)
}, },
saveSettings() { saveSettings() {
this.saveLogsSettings()
this.lastSettings = JSON.parse(JSON.stringify(this.settings)) this.lastSettings = JSON.parse(JSON.stringify(this.settings))
this.lastCredentials = JSON.parse(JSON.stringify(this.spotifyFeatures)) this.lastCredentials = JSON.parse(JSON.stringify(this.spotifyFeatures))

View File

@ -1,27 +0,0 @@
import { ref } from '@vue/composition-api'
import { socket } from '@/utils/socket'
const messages = ref([])
const cached = localStorage.getItem('areLogsActive')
const areLogsActive = ref(cached ? cached === 'true' : false)
const saveLogsSettings = () => {
localStorage.setItem('areLogsActive', areLogsActive.value)
}
socket.addEventListener('message', event => {
if (!areLogsActive.value) {
return
}
const newMessage = JSON.parse(event.data)
messages.value.push(Object.freeze(newMessage))
})
export const useLogs = () => {
return {
messages,
areLogsActive,
saveLogsSettings
}
}