Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
5c48aa8c
Verified
Commit
5c48aa8c
authored
May 11, 2021
by
Chocobozzz
Browse files
Default to dark theme if requested by user
parent
3914a50b
Pipeline
#414122
passed with stages
in 14 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
5c48aa8c
...
...
@@ -67,7 +67,7 @@
### Features
*
:tada: Mo
st
robust uploads using a resumable upload endpoint
[
#3933
](
https://github.com/Chocobozzz/PeerTube/pull/3933
)
*
:tada: Mo
re
robust uploads using a resumable upload endpoint
[
#3933
](
https://github.com/Chocobozzz/PeerTube/pull/3933
)
*
Accessibility/UI:
*
:tada: Redesign channel and account page
*
:tada: Increase video miniature size
...
...
client/src/app/core/theme/theme.service.ts
View file @
5c48aa8c
...
...
@@ -82,7 +82,19 @@ export class ThemeService {
:
this
.
userService
.
getAnonymousUser
().
theme
if
(
theme
!==
'
instance-default
'
)
return
theme
return
this
.
serverConfig
.
theme
.
default
const
instanceTheme
=
this
.
serverConfig
.
theme
.
default
if
(
instanceTheme
!==
'
default
'
)
return
instanceTheme
// Default to dark theme if available and wanted by the user
if
(
this
.
themes
.
find
(
t
=>
t
.
name
===
'
dark
'
)
&&
window
.
matchMedia
&&
window
.
matchMedia
(
'
(prefers-color-scheme: dark)
'
).
matches
)
{
return
'
dark
'
}
return
instanceTheme
}
private
loadTheme
(
name
:
string
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment