mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 19:38:51 +00:00
move theme converter function to a separate file
This commit is contained in:
12
src/invidious/user/converters.cr
Normal file
12
src/invidious/user/converters.cr
Normal file
@@ -0,0 +1,12 @@
|
||||
def convert_theme(theme)
|
||||
case theme
|
||||
when "true"
|
||||
"dark"
|
||||
when "false"
|
||||
"light"
|
||||
when "", nil
|
||||
nil
|
||||
else
|
||||
theme
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user