Created theme switcher #270

Merged
bema merged 4 commits from widlam/enhancement/add_theme_switcher into master 2023-12-04 12:11:27 +01:00
Collaborator
No description provided.
widlam added 1 commit 2023-11-23 13:58:28 +01:00
widlam requested review from bema 2023-11-23 13:58:41 +01:00
bema changed title from Created theme switcher to WIP: Created theme switcher 2023-11-23 14:01:41 +01:00
bema requested changes 2023-11-23 14:30:53 +01:00
bema left a comment
Collaborator

App.vue:

  • newtheme name doesn't follow camelCase
  • Unused "computed" import

CodeEditorComponent.vue:

  • Move to "common" directory
  • Remove unused imports
  • Line 14 >> const theme : string = inject('theme')! ;
  • Remove "viewUpdate : any" from line 33.

ThemeSwitcherComponent.vue:

  • For God's sake, extract those svgs to separate files
  • I would substitute functions toDarkMode and toLightMode with one function with argument theme : Theme, where Theme is type with two possible values "light" and "dark"

SidebarComponent.vue:

  • Switch in changeTheme is unnecessary.

FooterComponent.vue:

  • I would extract this lambda: "(theme)=>emit('theme',theme)" to function to make code mode readable

Operation

  • If browser is set to dark preference it messes up light mode
#### App.vue: - newtheme name doesn't follow camelCase - Unused "computed" import #### CodeEditorComponent.vue: - Move to "common" directory - Remove unused imports - Line 14 >> const theme : string = inject('theme')! ; - Remove "viewUpdate : any" from line 33. #### ThemeSwitcherComponent.vue: - For God's sake, extract those svgs to separate files - I would substitute functions toDarkMode and toLightMode with one function with argument theme : Theme, where Theme is type with two possible values "light" and "dark" #### SidebarComponent.vue: - Switch in changeTheme is unnecessary. #### FooterComponent.vue: - I would extract this lambda: "(theme)=>emit('theme',theme)" to function to make code mode readable #### Operation - If browser is set to dark preference it messes up light mode
widlam added 1 commit 2023-11-28 11:26:04 +01:00
bema requested changes 2023-11-30 09:18:45 +01:00
bema left a comment
Collaborator
  • Remove unneeded assets (svgs)
  • Fix formatting in App.vue
- Remove unneeded assets (svgs) - Fix formatting in App.vue
widlam added 2 commits 2023-12-04 12:04:49 +01:00
bema approved these changes 2023-12-04 12:10:59 +01:00
bema left a comment
Collaborator

OK

OK
bema changed title from WIP: Created theme switcher to Created theme switcher 2023-12-04 12:11:20 +01:00
bema merged commit 50c44fc9a8 into master 2023-12-04 12:11:27 +01:00
bema deleted branch widlam/enhancement/add_theme_switcher 2023-12-04 12:11:28 +01:00
bema referenced this issue from a commit 2023-12-04 12:11:29 +01:00
Sign in to join this conversation.
No description provided.