mirror of
https://github.com/rommapp/romm.git
synced 2026-03-03 02:27:00 +00:00
dark mode is now stored in local storage
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useTheme } from "vuetify";
|
||||
|
||||
import PlatformsBar from '@/components/PlatformsBar.vue'
|
||||
const currentPlatform = ref("")
|
||||
|
||||
var currentPlatform = ref("")
|
||||
useTheme().global.name.value = localStorage.getItem('theme')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -15,5 +19,5 @@ const currentPlatform = ref("")
|
||||
</v-container>
|
||||
</v-main>
|
||||
|
||||
</v-app>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
@@ -27,9 +27,10 @@ const scan = (overwrite) => {
|
||||
}
|
||||
|
||||
const theme = useTheme();
|
||||
const darkMode = ref(true);
|
||||
const darkMode = (localStorage.getItem('theme') == 'dark') ? ref(true) : ref(false)
|
||||
const toggleTheme = () => {
|
||||
theme.global.name.value = darkMode.value ? "dark" : "light"
|
||||
theme.global.name.value = darkMode.value ? "dark" : "light"
|
||||
darkMode.value ? localStorage.setItem('theme', 'dark') : localStorage.setItem('theme', 'light')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup>
|
||||
import axios from 'axios'
|
||||
|
||||
defineProps({ currentPlatform: { type: String, required: false } })
|
||||
|
||||
const mockRoms = {
|
||||
|
||||
Reference in New Issue
Block a user