Changed to materlializeCSS beta-1, that doesn't use jQuery

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-06 15:51:04 +02:00
parent 9164541750
commit bd9b42fd9e
18 changed files with 186 additions and 143 deletions

View File

@@ -15,7 +15,7 @@ function requested_change(type, string, channel) {
var message = "A " + type + " change was requested on <b>" + channel + "</b><br><br>New supposed value is: <br><br><b>" + string + "</b><br><br><br> \
Go to <a href='https://admin.zoff.me/'>https://admin.zoff.me/</a> to accept or decline the request.";
var msg = {
from: notify_mail.from,
from: mailconfig.from,
to: mailconfig.notify_mail,
subject: 'ZOFF: Requested new ' + type,
text: message,

View File

@@ -35,7 +35,7 @@ function thumbnail(msg, coll, guid, offline, socket) {
msg.thumbnail = msg.thumbnail.replace(/^https?\:\/\//i, "");
if(msg.thumbnail.substring(0,2) != "//") msg.thumbnail = "//" + msg.thumbnail;
var channel = msg.channel.toLowerCase();
var hash = Functions.hash_pass(Functions.decrypt_string(msg.adminpass));
var hash = Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(msg.adminpass),true));
db.collection(channel + "_settings").find({id: "config"}, function(err, docs){
if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (msg.hasOwnProperty('pass') && docs[0].userpass == crypto.createHash('sha256').update(Functions.decrypt_string(msg.pass)).digest("base64")))) {
if(docs !== null && docs.length !== 0 && docs[0].adminpass !== "" && docs[0].adminpass == hash){
@@ -87,7 +87,7 @@ function description(msg, coll, guid, offline, socket) {
msg.adminpass = adminpass;
}
var channel = msg.channel.toLowerCase();
var hash = Functions.hash_pass(Functions.decrypt_string(msg.adminpass));
var hash = Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(msg.adminpass), true));
db.collection(channel + "_settings").find({id: "config"}, function(err, docs){
if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (msg.hasOwnProperty('pass') && docs[0].userpass == crypto.createHash('sha256').update(Functions.decrypt_string(msg.pass)).digest("base64")))) {
if(docs !== null && docs.length !== 0 && docs[0].adminpass !== "" && docs[0].adminpass == hash){