mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Moved some db things to db file
- Changed some visuals on scaling website
This commit is contained in:
@@ -135,16 +135,4 @@ app.use(function (req, res, next) {
|
|||||||
res.redirect("/404");
|
res.redirect("/404");
|
||||||
})
|
})
|
||||||
|
|
||||||
db.on('error',function(err) {
|
|
||||||
console.log("\n" + new Date().toString() + "\n Database error: ", err);
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Resetting usernames, and connected users */
|
|
||||||
db.collection("unique_ids").update({"_id": "unique_ids"}, {$set: {unique_ids: []}}, {multi: true, upsert: true}, function(err, docs){});
|
|
||||||
db.collection("user_names").remove({"guid": {$exists: true}}, {multi: true, upsert: true}, function(err, docs){});
|
|
||||||
db.collection("user_names").update({"_id": "all_names"}, {$set: {names: []}}, {multi: true, upsert: true}, function(err, docs){});
|
|
||||||
db.collection("connected_users").update({users: {$exists: true}}, {$set: {users: []}}, {multi: true, upsert: true}, function(err, docs){});
|
|
||||||
db.collection("connected_users").update({"_id": "total_users"}, {$set: {total_users: []}}, {multi: true, upsert: true}, function(err, docs) {});
|
|
||||||
db.collection("frontpage_lists").update({viewers: {$ne: 0}}, {$set: {"viewers": 0}}, {multi: true, upsert: true}, function(err, docs) {});
|
|
||||||
|
|
||||||
module.exports = app;
|
module.exports = app;
|
||||||
|
|||||||
@@ -22,4 +22,18 @@ db.on('error',function(err) {
|
|||||||
console.log("\n" + new Date().toString() + "\n Database error: ", err);
|
console.log("\n" + new Date().toString() + "\n Database error: ", err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
db.on('error',function(err) {
|
||||||
|
console.log("\n" + new Date().toString() + "\n Database error: ", err);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Resetting usernames, and connected users */
|
||||||
|
db.collection("unique_ids").update({"_id": "unique_ids"}, {$set: {unique_ids: []}}, {multi: true, upsert: true}, function(err, docs){});
|
||||||
|
db.collection("user_names").remove({"guid": {$exists: true}}, {multi: true, upsert: true}, function(err, docs){});
|
||||||
|
db.collection("user_names").update({"_id": "all_names"}, {$set: {names: []}}, {multi: true, upsert: true}, function(err, docs){});
|
||||||
|
db.collection("connected_users").update({users: {$exists: true}}, {$set: {users: []}}, {multi: true, upsert: true}, function(err, docs){});
|
||||||
|
db.collection("connected_users").update({"_id": "total_users"}, {$set: {total_users: []}}, {multi: true, upsert: true}, function(err, docs) {});
|
||||||
|
db.collection("frontpage_lists").update({viewers: {$ne: 0}}, {$set: {"viewers": 0}}, {multi: true, upsert: true}, function(err, docs) {});
|
||||||
|
|
||||||
|
|
||||||
module.exports = db;
|
module.exports = db;
|
||||||
|
|||||||
@@ -796,7 +796,7 @@ nav .zbrand{
|
|||||||
|
|
||||||
.navbar-fixed {
|
.navbar-fixed {
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
height: 128px;
|
height: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullwidth{
|
.fullwidth{
|
||||||
@@ -1622,10 +1622,10 @@ nav .zbrand.channel-logo-container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title-container{
|
.title-container{
|
||||||
position: absolute;
|
position: initial;
|
||||||
display: block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 100%;
|
width: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
@@ -3339,6 +3339,7 @@ nav ul li:hover, nav ul li.active {
|
|||||||
|
|
||||||
.title-container{
|
.title-container{
|
||||||
top:64px;
|
top:64px;
|
||||||
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,20 +103,6 @@ var Channel = {
|
|||||||
$(".not-imported-container").empty();
|
$(".not-imported-container").empty();
|
||||||
$(".not-exported-container").empty();
|
$(".not-exported-container").empty();
|
||||||
|
|
||||||
$(".video-container").resizable({
|
|
||||||
start: function(event, ui) {
|
|
||||||
$('iframe').css('pointer-events','none');
|
|
||||||
},
|
|
||||||
stop: function(event, ui) {
|
|
||||||
$('iframe').css('pointer-events','auto');
|
|
||||||
Crypt.set_width($(this).width());
|
|
||||||
Channel.set_title_width();
|
|
||||||
},
|
|
||||||
handles: "e",
|
|
||||||
minWidth: 280,
|
|
||||||
maxWidth: $(window).width()-241
|
|
||||||
});
|
|
||||||
|
|
||||||
if(socket === undefined){
|
if(socket === undefined){
|
||||||
no_socket = false;
|
no_socket = false;
|
||||||
socket = io.connect(''+add+':8080', connection_options);
|
socket = io.connect(''+add+':8080', connection_options);
|
||||||
@@ -382,7 +368,7 @@ var Channel = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set_title_width: function(start){
|
set_title_width: function(start){
|
||||||
if($(window).width() > 760){
|
if($(window).width() > 600){
|
||||||
var add_width = $(".brand-logo").outerWidth()
|
var add_width = $(".brand-logo").outerWidth()
|
||||||
if(start){
|
if(start){
|
||||||
add_width = $(window).width()*0.15;
|
add_width = $(window).width()*0.15;
|
||||||
@@ -580,9 +566,7 @@ var Channel = {
|
|||||||
$("meta[name=theme-color]").attr("content", "#2D2D2D");
|
$("meta[name=theme-color]").attr("content", "#2D2D2D");
|
||||||
|
|
||||||
if(!Helper.mobilecheck() && !user_auth_avoid){
|
if(!Helper.mobilecheck() && !user_auth_avoid){
|
||||||
$(".video-container").resizable("destroy");
|
|
||||||
$("#playbar").remove();
|
$("#playbar").remove();
|
||||||
$(".ui-resizable-handle").remove();
|
|
||||||
$("#main_components").remove();
|
$("#main_components").remove();
|
||||||
$("#player").addClass("player_bottom");
|
$("#player").addClass("player_bottom");
|
||||||
$("#main-row").addClass("frontpage_modified_heights");
|
$("#main-row").addClass("frontpage_modified_heights");
|
||||||
|
|||||||
Reference in New Issue
Block a user