Remove unused logs page
This commit is contained in:
parent
7c18258b8c
commit
2f9eabc3db
@ -748,18 +748,12 @@ import { copyToClipboard } from '@/utils/utils'
|
||||
import BaseAccordion from '@/components/globals/BaseAccordion.vue'
|
||||
import { fetchData, postToServer } from '@/utils/api'
|
||||
import { getFormItem } from '@/utils/forms'
|
||||
import { useLogs } from '@/use/logs'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BaseAccordion,
|
||||
TemplateVariablesList
|
||||
},
|
||||
setup() {
|
||||
const { areLogsActive, saveLogsSettings } = useLogs()
|
||||
|
||||
return { areLogsActive, saveLogsSettings }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flags,
|
||||
@ -925,8 +919,6 @@ export default {
|
||||
localStorage.setItem('locale', newLocale)
|
||||
},
|
||||
saveSettings() {
|
||||
this.saveLogsSettings()
|
||||
|
||||
this.lastSettings = JSON.parse(JSON.stringify(this.settings))
|
||||
this.lastCredentials = JSON.parse(JSON.stringify(this.spotifyFeatures))
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user