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");
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
 
 | 
			
		||||
@@ -22,4 +22,18 @@ db.on('error',function(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;
 | 
			
		||||
 
 | 
			
		||||
@@ -796,7 +796,7 @@ nav .zbrand{
 | 
			
		||||
 | 
			
		||||
.navbar-fixed {
 | 
			
		||||
    z-index: 999999;
 | 
			
		||||
    height: 128px;
 | 
			
		||||
    height: 64px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.fullwidth{
 | 
			
		||||
@@ -1622,10 +1622,10 @@ nav .zbrand.channel-logo-container {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.title-container{
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    display: block;
 | 
			
		||||
    position: initial;
 | 
			
		||||
    display: inline-block;
 | 
			
		||||
    overflow: hidden;
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    width: auto;
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    left: 0;
 | 
			
		||||
}
 | 
			
		||||
@@ -3339,6 +3339,7 @@ nav ul li:hover, nav ul li.active {
 | 
			
		||||
 | 
			
		||||
    .title-container{
 | 
			
		||||
        top:64px;
 | 
			
		||||
        top: 0px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -103,20 +103,6 @@ var Channel = {
 | 
			
		||||
        $(".not-imported-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){
 | 
			
		||||
            no_socket = false;
 | 
			
		||||
            socket = io.connect(''+add+':8080', connection_options);
 | 
			
		||||
@@ -382,7 +368,7 @@ var Channel = {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    set_title_width: function(start){
 | 
			
		||||
        if($(window).width() > 760){
 | 
			
		||||
        if($(window).width() > 600){
 | 
			
		||||
            var add_width = $(".brand-logo").outerWidth()
 | 
			
		||||
            if(start){
 | 
			
		||||
                add_width = $(window).width()*0.15;
 | 
			
		||||
@@ -580,9 +566,7 @@ var Channel = {
 | 
			
		||||
                    $("meta[name=theme-color]").attr("content", "#2D2D2D");
 | 
			
		||||
 | 
			
		||||
                    if(!Helper.mobilecheck() && !user_auth_avoid){
 | 
			
		||||
                        $(".video-container").resizable("destroy");
 | 
			
		||||
                        $("#playbar").remove();
 | 
			
		||||
                        $(".ui-resizable-handle").remove();
 | 
			
		||||
                        $("#main_components").remove();
 | 
			
		||||
                        $("#player").addClass("player_bottom");
 | 
			
		||||
                        $("#main-row").addClass("frontpage_modified_heights");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user