style(header): ajouter bouton toggle dark mode dans le header
All checks were successful
Deploy / deploy (push) Successful in 2m46s
All checks were successful
Deploy / deploy (push) Successful in 2m46s
feat(conversion): simplifier ConversionPage et brancher les toasts style(manga): réécriture de la liste de résultats dans AddManga chore(task): ajouter tâche conversion CBR→CBZ dans TASK.md
This commit is contained in:
parent
b609fe0a45
commit
cc702cff19
@@ -20,15 +20,36 @@
|
||||
</router-link>
|
||||
<SearchBar />
|
||||
</div>
|
||||
<button
|
||||
@click="toggleDarkMode"
|
||||
class="mr-4 text-white p-2 hover:text-green-200 transition-colors"
|
||||
:title="isDark ? 'Passer en mode clair' : 'Passer en mode sombre'"
|
||||
>
|
||||
<SunIcon v-if="isDark" class="h-6 w-6" />
|
||||
<MoonIcon v-else class="h-6 w-6" />
|
||||
</button>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Bars3Icon } from '@heroicons/vue/24/outline';
|
||||
import { computed } from 'vue';
|
||||
import { Bars3Icon, SunIcon, MoonIcon } from '@heroicons/vue/24/outline';
|
||||
import { useHeaderStore } from '../../stores/headerStore';
|
||||
import { useUserPreferencesStore } from '../../../domain/setting/application/store/userPreferencesStore';
|
||||
import SearchBar from './SearchBar.vue';
|
||||
|
||||
const headerStore = useHeaderStore();
|
||||
const preferencesStore = useUserPreferencesStore();
|
||||
|
||||
const isDark = computed(() => {
|
||||
if (preferencesStore.theme === 'dark') return true;
|
||||
if (preferencesStore.theme === 'light') return false;
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
});
|
||||
|
||||
function toggleDarkMode() {
|
||||
preferencesStore.setTheme(isDark.value ? 'light' : 'dark');
|
||||
}
|
||||
|
||||
defineProps({
|
||||
showMenuButton: {
|
||||
|
||||
Reference in New Issue
Block a user