mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Updating the materialize library and calls.
This commit is contained in:
parent
a118bf38fc
commit
e44ef98be4
17 changed files with 10582 additions and 15529 deletions
|
|
@ -1,11 +1,27 @@
|
|||
|
||||
import { UserConfig } from "../imports/api/userConfig";
|
||||
|
||||
Template.MainLayout.onCreated(function() {
|
||||
|
||||
this.subscribe("UserConfigPrefs");
|
||||
});
|
||||
|
||||
Template.MainLayout.onRendered(function() {
|
||||
|
||||
this.autorun(() => {
|
||||
let myId = Meteor.userId();
|
||||
let myprefs = UserConfig.findOne({ user: myId });
|
||||
if (typeof myprefs != 'undefined') {
|
||||
if (myprefs.darkPref == "light") {
|
||||
console.log("Found theme as light");
|
||||
// Session.set("myTheme", "light");
|
||||
document.documentElement.setAttribute('theme', "light");
|
||||
} else {
|
||||
console.log("Found theme as dark");
|
||||
// Session.set("myTheme", "dark");
|
||||
document.documentElement.setAttribute('theme', "dark");
|
||||
}
|
||||
} else {
|
||||
console.log("User Prefs appear undefined.");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.MainLayout.helpers({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue