Add Force MetroUI labs experiment

This commit is contained in:
Daniel Supernault 2019-12-14 01:41:37 -07:00
parent b94af397c9
commit 295e80eb72
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 36 additions and 15 deletions

View file

@ -569,20 +569,17 @@
}
},
beforeMount() {
if(window.outerWidth < 576) {
$('nav.navbar').hide();
this.isMobile = true;
}
this.fetchRelationships();
this.fetchProfile();
let u = new URLSearchParams(window.location.search);
let forceMetro = localStorage.getItem('pf_metro_ui.exp.forceMetro') == 'true';
if(forceMetro == true || u.has('ui') && u.get('ui') == 'metro' && this.layout != 'metro') {
this.layout = 'metro';
}
if(u.has('ui') && u.get('ui') == 'moment' && this.layout != 'moment') {
Vue.use(VueMasonry);
this.layout = 'moment';
}
if(u.has('ui') && u.get('ui') == 'metro' && this.layout != 'metro') {
this.layout = 'metro';
}
if(this.layout == 'metro' && u.has('t')) {
if(this.modes.indexOf(u.get('t')) != -1) {
if(u.get('t') == 'bookmarks') {
@ -607,6 +604,10 @@
this.user = res.data;
});
}
if(window.outerWidth < 576) {
$('nav.navbar').hide();
this.isMobile = true;
}
},
updated() {