Skip to content

Feat/dark mode#4

Closed
rafaelgslima wants to merge 2 commits into
masterfrom
feat/dark-mode
Closed

Feat/dark mode#4
rafaelgslima wants to merge 2 commits into
masterfrom
feat/dark-mode

Conversation

@rafaelgslima
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/App.vue
<ToggleButton
:active="showDarkMode"
:bg="true"
@on-click-toggle-button="setToggleDarkMode"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vc pode chamar o toggleDarkMode direto aqui.

Suggested change
@on-click-toggle-button="setToggleDarkMode"
@on-click-toggle-button="toggleDarkMode"

Comment thread src/App.vue
updateSelectedFont(value)
},
showDarkMode(value){
value ? document.body.classList.add("dark-mode") : document.body.classList.remove("dark-mode");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acho que invés de colocar essa classe no body vc pode colocar no <div id="app"> mesmo já que todos os outros components da aplicação tão dentro dele, dai to pode fazer o app ser do tamanho da tela com css saca.

Comment thread src/App.vue
Comment on lines +59 to +61
setToggleDarkMode(){
this.toggleDarkMode()
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu pode usar o toggleDarkMode direto no template e remover esse metodo.

Suggested change
setToggleDarkMode(){
this.toggleDarkMode()
}

@isaaceliape
Copy link
Copy Markdown
Owner

isaaceliape commented May 18, 2021

Tava pensando que a gente poderia guarda a opção do usuário no localStorage quando ele clica no botão do dark mode, assim se o usuário der refresh na página ele mantem a ultima opção selecionada, o que tu acha?

Achei esse artigo que vai um pouco além e checa se o usuário tá usando dark-mode no sistema operacional dele pra ativar o modo.
https://www.ditdot.hr/en/dark-mode-website-tutorial

Mas a gente pode criar um outro card pra isso 😁

@isaaceliape
Copy link
Copy Markdown
Owner

Closed: Dark mode already implemented via PR #38 with localStorage persistence and system preference detection. This PR is superseded and can be closed.

@isaaceliape isaaceliape deleted the feat/dark-mode branch November 25, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants