File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 88 < link rel ="icon " href ="./static/graphicarts/favicon.svg " type ="image/svg+xml ">
99 < link rel ="alternate icon " href ="./static/graphicarts/favicon.png " type ="image/png ">
1010 < link rel ="manifest " href ="./manifest.json " />
11+ < meta name ="theme-color " content ="" />
1112 < meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
1213 < script >
1314 window . app = window . app || { }
Original file line number Diff line number Diff line change @@ -211,6 +211,7 @@ var vm = new Vue({
211211 api . feeds . list_errors ( ) . then ( function ( errors ) {
212212 vm . feed_errors = errors
213213 } )
214+ this . updateMetaTheme ( app . settings . theme_name )
214215 } ,
215216 data : function ( ) {
216217 var s = app . settings
@@ -249,6 +250,11 @@ var vm = new Vue({
249250 'font' : s . theme_font ,
250251 'size' : s . theme_size ,
251252 } ,
253+ 'themeColors' : {
254+ 'night' : '#0e0e0e' ,
255+ 'sepia' : '#f4f0e5' ,
256+ 'light' : '#fff' ,
257+ } ,
252258 'refreshRate' : s . refresh_rate ,
253259 'authenticated' : app . authenticated ,
254260 'feed_errors' : { } ,
@@ -330,6 +336,7 @@ var vm = new Vue({
330336 'theme' : {
331337 deep : true ,
332338 handler : function ( theme ) {
339+ this . updateMetaTheme ( theme . name )
333340 document . body . classList . value = 'theme-' + theme . name
334341 api . settings . update ( {
335342 theme_name : theme . name ,
@@ -405,6 +412,9 @@ var vm = new Vue({
405412 } ,
406413 } ,
407414 methods : {
415+ updateMetaTheme : function ( theme ) {
416+ document . querySelector ( "meta[name='theme-color']" ) . content = this . themeColors [ theme ]
417+ } ,
408418 refreshStats : function ( loopMode ) {
409419 return api . status ( ) . then ( function ( data ) {
410420 if ( loopMode && ! vm . itemSelected ) vm . refreshItems ( )
You can’t perform that action at this time.
0 commit comments