fix sync issue, frontend improvement
This commit is contained in:
@@ -10,7 +10,7 @@ const message = ref('')
|
||||
const showModal = ref(false)
|
||||
const viewMode = ref('list') // 'list' | 'article' — toggled from the hamburger menu
|
||||
const currentIndex = ref(0)
|
||||
const layout = ref('list') // 'list' | 'cards' — list-view display style, toggled from the hamburger menu
|
||||
const layout = ref(localStorage.getItem('layout') || 'list') // 'list' | 'cards' — list-view display style, toggled from the hamburger menu
|
||||
|
||||
let observer; // Declare observer outside the setup function
|
||||
let initialLoad = false
|
||||
@@ -219,6 +219,7 @@ function toggleViewMode() {
|
||||
|
||||
function toggleLayout() {
|
||||
layout.value = layout.value === 'list' ? 'cards' : 'list'
|
||||
localStorage.setItem('layout', layout.value)
|
||||
}
|
||||
|
||||
function nextArticle() {
|
||||
|
||||
Reference in New Issue
Block a user