From b0819659baf18853fd0ef6616f44ed0afe20f558 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Tue, 16 Oct 2018 23:34:18 -0400 Subject: [PATCH 01/40] fix(assets): security fix --- src/middleware/index.js | 5 ++--- src/webserver.js | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/middleware/index.js b/src/middleware/index.js index d7164798d..6bba96588 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -98,9 +98,8 @@ module.exports = function(app, db, callback) { //Mobile app.use('/mobile', express.static(path.join(__dirname, '../../', 'mobile'))); - app.use('/uploads/tickets', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads/tickets'))); - app.use('/uploads/users', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads/users'))); - + app.use('/uploads', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads'))); + app.use(express.static(path.join(__dirname, '../../', 'public'))); //Remove to enable plugins diff --git a/src/webserver.js b/src/webserver.js index ac491b400..36f203b52 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -96,6 +96,9 @@ var async = require('async'), app.set('view engine', 'hbs'); hbsHelpers.register(hbs.handlebars); + // Prevent unauth from uploads + app.use('/uploads', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads'))); + app.use(express.static(path.join(__dirname, '../', 'public'))); app.use(favicon(path.join(__dirname, '../', 'public/img/favicon.ico'))); app.use(bodyParser.urlencoded({ extended: false })); From 93c138743171089e76e607ad1db192436d2b3fbe Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 17 Oct 2018 00:12:49 -0400 Subject: [PATCH 02/40] style(logo): logo to image --- public/img/defaultLogoDark.png | Bin 0 -> 12688 bytes public/img/defaultLogoLight.png | Bin 0 -> 12695 bytes public/uploads/assets/.gitkeep | 0 src/middleware/index.js | 16 ++--- src/sass/partials/common.sass | 5 ++ src/views/login.hbs | 109 ++++++++++++++++---------------- src/views/partials/topbar.hbs | 21 +++--- src/webserver.js | 9 +-- 8 files changed, 80 insertions(+), 80 deletions(-) create mode 100644 public/img/defaultLogoDark.png create mode 100644 public/img/defaultLogoLight.png create mode 100644 public/uploads/assets/.gitkeep diff --git a/public/img/defaultLogoDark.png b/public/img/defaultLogoDark.png new file mode 100644 index 0000000000000000000000000000000000000000..cb7541d65e86edbea0c625809d758594a1c56b9d GIT binary patch literal 12688 zcmaKTbwE_#*7g|&hXyI>?xDLoWM~ON1nKVX?ha{{kVaBLDTf9@N?N*8=|-4u{M~!s z_xt0!-~2JN&pB&7>shh)+57A>aatNraWKg-0RX^(DJy6L01C1R1ffHa-%~FahLJyH zo{9#ZIxg0pK4$J#fUKp9xfLzU$;`$|+se$+&u!330sz3wcDe?h2I^{J7A{U)W`AY4 ze4SkXVgVA;zOH5#4pyGD=2kX#&XV*;Z5{Nqc9xR#`hw~_>aOxuwsy+??p8Yf8oCz# z4i=)8^wLta624+c04FO?Gg@CKM`sT)UrG9ZaK(`Azo)tBY5x)NbdaR~7bydEEn0aO zcPm;!E+I|}UI9K@VNot#As$ga0S;O|9$sN?9${`?eoh`vuD=I3=&BMpd$H$43;Pmiw_B8Y5boOBQ z4}yY~hlRVHtEZidGwokQGjkU&Pf2{+rzYE7|`! zg{+{z&HpJ~3w|4+V=O!8r0H^0tO-)5L~8f(D}`9O5L#LS;fCA`a5jLVCUU*a}ue zdwxquvT*sYtKXyfk~^b!5_d*J_n(J9=l*2VbC|6a#EgX=7sj7mOCd)k= z(=s;x%62~&t)dU5s&rH;1!oHB8tT}=O34tnv3YrU5gGRJ1l5z5=fxCtdexI7e(yey z8kVbH&!!Z5-D(Au=}XCWK#xLL!G&77w{)%e_j3^{E>LkdyUfCPm&(S{9f%)yU#Ln*)~T@@DOGI>)QdQO)-L2#`F(}s zj=`3X?)cNg*X1ya8M>^ zrP^~9b|jmrZ26|VU~H1*9pj7%%mJ@>K|{`V4RJPb>KlG-R-(+fX;99e85L_qvg*l; zjNu`GmFNP)1KjvScd**Ew;6D1)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*SXhxAa@ZA;6SHcf4%C#2%frIpT_>u?RtRIdma zeu1-@0QyExDdKH#NxzEK{Ft#fRK=aiq@?+H#S9k@>+I{ey>K7iHkM1;w1kOr+MnBQ~fOK`NIw3d<&Z>ey9(D!2=X64yfXkb>;s3 Pj|5CnL!nmAH2nVnmI#2k literal 0 HcmV?d00001 diff --git a/public/img/defaultLogoLight.png b/public/img/defaultLogoLight.png new file mode 100644 index 0000000000000000000000000000000000000000..4faf93d4367c5d952ae0be93749a7c1be1c14ef0 GIT binary patch literal 12695 zcmaL8WmuG57dCv+&Co~n%cS=a7lr)G8Akxf>_Y>du z<9*)wF|)6|*E(07YxXhw*b}X$B8P)XjtKw&j)J_jIshO(4FP|2)Tj43{nhcO4>ETd zU3U$rmAj{@t0nNt0%~SSqu^+2ZK-Z)YT@lNYAFf;NQ}0cy6(ElO2Xz)M|RV{GVETC z&VR80Q3)?+Q*(PucN#NGYg;EVy3_VWuIp}Eq5plN{qx+Xry2@%aQczb* z8a{S@HghgsZW;k0b}oKSA#Pq)8g5Q50S-<94lW)xPA*|ieqkOVnt#9Oo~*fASP833 z%l_Ne(~}sTjk~+EFb9XHrzg874?EP=nuAM7NQi@zn}eI1?MZ^o&D+V{)Qio@js8Cf z(w1)KuC~tZwooUUzlf%0P!D%8x+hQn6@sJle_@^6{+*_$gmHM8I&*NbbN&tKKZ452 z|8G%8$Nx&ZxvN|LfBybof!#E{oh>=kE#06VuI5jLv!efN%2`;-)zZ`*>Z%EaI{YV# zYBo@JsGAMcnMO+LZ`K59n00KOETEolFaFU{Ru)!pa&tFzGPhKa7NdJYVYjul5a#6< zl;!2-mX+p$$Z&DV2)^Rym6qX>dBxAgEiKC@Ap0L(X{fn}qotGke{?PWtINarKXw1o z!O{82vb3eE?K?{gSy!kd%|Bra+x~A~r2i-0zjZDCr!U+x|5KOa$r+Bn#r^*k`#)1p z4Ej6#FLj?D{!4yKrzgg{K2cl4BJCUi*wGZEUuk-+{4_*sNgkXB<8kEC$h=`?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hIR zr7&*04AvpbMlEo06*SlLAZZI}Lm!4ye9AN&4VqDQFg}%gd|6*55G;9qs8JH?sgqBK zoX59pe6&`rYxkznT%0rrRD!8Gcjmu3dmnbOnKyzfV?e-;_tyB@cjm%J+Bc!(NQeE- z{u66YL$Dg(wcw6Fa*QKpwiJ09UUXR=%8K@t{D$rJ=>iYWi*;ui-aEE2cOubO9GFuI z=|O0RTc;Y1P3hyFa-`IGC@pCQXvjEWI*u&cDFa&=Te=RpiPj!GBHX5lCA<`Xfvuykk13~F;ysv*xmVrRSE7EoO z44-_`ssAKwu&S^E%#-e;+rMVbLSB~G(fV&}`_{XJUmHg7VrFu8)Ir@7UO_t}g}Xr^ zyrS1zJBw6Y(+UEh%PmPt{{9@?VEnRGgco(GmWMjyT03XdvVzXgd8Df_hGyi>1Q4x5 z2fD|qe0T{c!%Y*t`B$ZZ*RU44i#3)9Ay`ElM>Wa=!}nyb4XR0RJuKkE6?Cy27slwl zPU^R1Pn;YdgTz=+)y1nOGlcBBBc8*DFhxYyP~Dsy7ztvtK%q6M!%W-l<4<7ma=ZD} zKKQs~b~ppQSo%EZX}p}(ZGwMJLZ8fXT5eIZ|GgUNp0z$S9z_XSW_#9(%Rs_Hf+>8X zyjHRP#@A|Y3QdK5a_Mo%%Xs*>P1KHc7bE9#Bs!bv%_u>(R2r59J>u2NYuW4hR`y&% z=DE9Obi?P4UL5osoXR~#i$ZABSdAYPFSUt$a+>BofjhOA9}7AS7lo$mUcQ3@pyn~;YbWiI_N6AUAXM%I_P&RQ^Ye9Re2O#E1b%!fW{zt zYNg(_O?Bi*lW86v0%Bc!UwPFm4oEYg`&58TqRena^!X{KT}J%pPPQ^NoT&%Uz4*G@ExMHS_pcHPGAhzl5R;Jq12QkA A>i_@% literal 0 HcmV?d00001 diff --git a/public/uploads/assets/.gitkeep b/public/uploads/assets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/middleware/index.js b/src/middleware/index.js index 6bba96588..e70e3e478 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -27,7 +27,8 @@ var _ = require('lodash'), favicon = require('serve-favicon'), session = require('express-session'), MongoStore = require('connect-mongo')(session), - passportConfig = require('../passport')(); + passportConfig = require('../passport')(), + nconf = require('nconf'); var middleware = {}; @@ -85,22 +86,15 @@ module.exports = function(app, db, callback) { app.use(passportConfig.session()); app.use(flash()); - //Load after Passport!! - app.use('/uploads/tickets', function(req, res, next) { - if (!req.user) - return res.redirect('/'); - - return next(); - }); - //CORS app.use(allowCrossDomain); //Mobile app.use('/mobile', express.static(path.join(__dirname, '../../', 'mobile'))); - app.use('/uploads', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads'))); + app.use('/assets', express.static(nconf.get('base_dir') + '/public/uploads/assets')); + app.use('/uploads', middleware.redirectToLogin, express.static(nconf.get('base_dir') + '/public/uploads')); - app.use(express.static(path.join(__dirname, '../../', 'public'))); + app.use(express.static(nconf.get('base_dir') + '/public')); //Remove to enable plugins //next(null, store); diff --git a/src/sass/partials/common.sass b/src/sass/partials/common.sass index a7bd7f15c..81f566ba0 100644 --- a/src/sass/partials/common.sass +++ b/src/sass/partials/common.sass @@ -1,3 +1,8 @@ +.site-logo + width: 140px !important +.site-logo-login + width: 400px !important + .accent-text color: $accent_color !important diff --git a/src/views/login.hbs b/src/views/login.hbs index c5166135d..afeedc47f 100644 --- a/src/views/login.hbs +++ b/src/views/login.hbs @@ -24,7 +24,7 @@ } img { - margin-bottom: 55px; + margin-bottom: 50px; } label { @@ -160,60 +160,59 @@

{{#if flash.message}} {{{flash.message}}} {{else}} {{{flash}}}{{/if}}

').appendTo("body")),this.on({focus:function(e){$this.show()},blur:function(e){$this.hide()},mouseenter:function(e){$this.show()},mouseleave:function(e){$this.hide()}})},show:function(){if(this.tip="function"==typeof this.options.src?this.options.src(this.element):this.options.src,tooltipdelay&&clearTimeout(tooltipdelay),checkdelay&&clearTimeout(checkdelay),"string"==typeof this.tip&&this.tip.length){$tooltip.stop().css({top:-2e3,visibility:"hidden"}).removeClass(this.options.activeClass).show(),$tooltip.html('
'+this.tip+"
");var $this=this,pos=UI.$.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),width=$tooltip[0].offsetWidth,height=$tooltip[0].offsetHeight,offset="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,position="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,tmppos=position.split("-"),tcss={display:"none",visibility:"visible",top:pos.top+pos.height+height,left:pos.left};if("fixed"==UI.$html.css("position")||"fixed"==UI.$body.css("position")){var bodyoffset=UI.$("body").offset(),htmloffset=UI.$("html").offset(),docoffset_top=htmloffset.top+bodyoffset.top,docoffset_left=htmloffset.left+bodyoffset.left;pos.left-=docoffset_left,pos.top-=docoffset_top}"left"!=tmppos[0]&&"right"!=tmppos[0]||"right"!=UI.langdirection||(tmppos[0]="left"==tmppos[0]?"right":"left");var variants={bottom:{top:pos.top+pos.height+offset,left:pos.left+pos.width/2-width/2},top:{top:pos.top-height-offset,left:pos.left+pos.width/2-width/2},left:{top:pos.top+pos.height/2-height/2,left:pos.left-width-offset},right:{top:pos.top+pos.height/2-height/2,left:pos.left+pos.width+offset}};UI.$.extend(tcss,variants[tmppos[0]]),2==tmppos.length&&(tcss.left="left"==tmppos[1]?pos.left:pos.left+pos.width-width);var boundary=this.checkBoundary(tcss.left,tcss.top,width,height);if(boundary){switch(boundary){case"x":position=2==tmppos.length?tmppos[0]+"-"+(tcss.left<0?"left":"right"):tcss.left<0?"right":"left";break;case"y":position=2==tmppos.length?(tcss.top<0?"bottom":"top")+"-"+tmppos[1]:tcss.top<0?"bottom":"top";break;case"xy":position=2==tmppos.length?(tcss.top<0?"bottom":"top")+"-"+(tcss.left<0?"left":"right"):tcss.left<0?"right":"left"}tmppos=position.split("-"),UI.$.extend(tcss,variants[tmppos[0]]),2==tmppos.length&&(tcss.left="left"==tmppos[1]?pos.left:pos.left+pos.width-width)}tcss.left-=UI.$body.position().left,tooltipdelay=setTimeout(function(){$tooltip.css(tcss).attr("class",["uk-tooltip","uk-tooltip-"+position,$this.options.cls].join(" ")),$this.options.animation?$tooltip.css({opacity:0,display:"block"}).addClass($this.options.activeClass).animate({opacity:1},parseInt($this.options.animation,10)||400):$tooltip.show().addClass($this.options.activeClass),tooltipdelay=!1,checkdelay=setInterval(function(){$this.element.is(":visible")||$this.hide()},150)},parseInt(this.options.delay,10)||0)}},hide:function(){if(!this.element.is("input")||this.element[0]!==document.activeElement)if(tooltipdelay&&clearTimeout(tooltipdelay),checkdelay&&clearTimeout(checkdelay),$tooltip.stop(),this.options.animation){var $this=this;$tooltip.fadeOut(parseInt(this.options.animation,10)||400,function(){$tooltip.removeClass($this.options.activeClass)})}else $tooltip.hide().removeClass(this.options.activeClass)},content:function(){return this.tip},checkBoundary:function(left,top,width,height){var axis="";return(left<0||left-UI.$win.scrollLeft()+width>window.innerWidth)&&(axis+="x"),(top<0||top-UI.$win.scrollTop()+height>window.innerHeight)&&(axis+="y"),axis}}),UI.tooltip}),function(addon){var component;window.UIkit&&(component=addon(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return component||addon(UIkit)})}(function(UI){"use strict";var xhr,fi;function xhrupload(files,settings){if(!UI.support.ajaxupload)return this;if(settings=UI.$.extend({},xhrupload.defaults,settings),files.length){if("*.*"!==settings.allow)for(var file,i=0;file=files[i];i++)if(!matchName(settings.allow,file.name))return void("string"==typeof settings.notallowed?alert(settings.notallowed):settings.notallowed(file,settings));var complete=settings.complete;if(settings.single){var count=files.length,uploaded=0,allow=!0;settings.beforeAll(files),settings.complete=function(response,xhr){uploaded+=1,complete(response,xhr),settings.filelimit&&uploaded>=settings.filelimit&&(allow=!1),allow&&uploaded
',$body.on("show.uk.modal",".uk-modal-dialog-replace",function(){setTimeout(function(){var dialogReplace=$(".uk-modal-dialog-replace");if(dialogReplace.find(".uk-button-primary").length){var actionBtn=dialogReplace.find(".uk-button-primary").toggleClass("uk-button-primary md-btn-flat-primary");actionBtn.next("button")&&actionBtn.next("button").after(actionBtn)}dialogReplace.find(".uk-button").length&&dialogReplace.find(".uk-button").toggleClass("uk-button md-btn md-btn-flat"),dialogReplace.find(".uk-margin-small-top").length&&dialogReplace.find(".uk-margin-small-top").toggleClass("uk-margin-small-top uk-margin-top"),dialogReplace.find("input.uk-width-1-1").length&&dialogReplace.find("input.uk-width-1-1").toggleClass("uk-width-1-1 md-input"),dialogReplace.find(".uk-form").length&&dialogReplace.find(".uk-form").removeClass("uk-form")},50)})}void 0!==UIkit.components.tooltip&&$.extend(UIkit.components.tooltip.prototype.defaults,{animation:280,offset:8}),void 0!==UIkit.components.sortable&&Modernizr.touch&&$("[data-uk-sortable]").children().addClass("needsclick")}); \ No newline at end of file diff --git a/src/sass/partials/common.sass b/src/sass/partials/common.sass index 845b8de50..7a5cdf8c9 100644 --- a/src/sass/partials/common.sass +++ b/src/sass/partials/common.sass @@ -344,7 +344,7 @@ a.button font-size: 24px font-weight: 500 line-height: 30px - color: #444 + color: automatic-text-color(lighten($page_content_right_bg, 10%)) .action-link background: transparent @@ -379,20 +379,20 @@ a.button li float: none !important width: 100% !important - background: #f5f5f5 !important - color: #444 + background: $page_content_button_color !important + color: $page_content_button_text_color !important line-height: 1.4em !important height: auto !important a display: block width: 100% - background: #f5f5f5 !important + background: $page_content_button_color !important line-height: 1.4em !important padding: 5px 15px !important - color: #212121 !important + color: $page_content_button_text_color !important &:hover background: rgba(0,0,0, 0.085) !important - color: #212121 !important + color: $page_content_button_text_color !important .disconnected z-index: 10000 @@ -676,6 +676,15 @@ div.hoverAction background: lighten($page_content_title_bg, 10%) border-top: $page_content_border_top +.search-box input.ticket-top-search + background: $page_content_button_color + height: 30px + border: 1px solid $page_content_button_color + border-radius: 5px + color: $page_content_button_text_color + &::placeholder + color: automatic-text-color($page_content_button_color, 'muted') + .pagination margin-right: 8px diff --git a/src/sass/partials/messages.sass b/src/sass/partials/messages.sass index b052cce31..8e37a957e 100644 --- a/src/sass/partials/messages.sass +++ b/src/sass/partials/messages.sass @@ -23,11 +23,11 @@ text-overflow: '...' &:hover - background: white + background: lighten($page_content_left_bg, 5%) cursor: pointer &.message-folder:hover - background: $page_content_left_bg + background: lighten($page_content_left_bg, 5%) cursor: default //&:last-child diff --git a/src/sass/partials/mg.sass b/src/sass/partials/mg.sass index 0d14e3992..b28120339 100644 --- a/src/sass/partials/mg.sass +++ b/src/sass/partials/mg.sass @@ -2,8 +2,10 @@ .mGraph .mg-x-axis text, .mGraph .mg-y-axis text font-size: 11px + fill: $text_color .mGraph .mg-active-datapoint + fill: $text_color font-size: 13px .mGraph-panel diff --git a/src/sass/partials/selectize.sass b/src/sass/partials/selectize.sass index 8609e44e2..4f390d7b8 100644 --- a/src/sass/partials/selectize.sass +++ b/src/sass/partials/selectize.sass @@ -297,7 +297,7 @@ margin: 0 4px 0 -2px !important .selectize-input.disabled opacity: 0.5 - background-color: #fafafa + background-color: darken($page_content_right_bg, 5%) .selectize-input border-color: rgba(0, 0, 0, 0.12) diff --git a/src/sass/partials/topnav.sass b/src/sass/partials/topnav.sass index 76afe79b2..21f4cd382 100644 --- a/src/sass/partials/topnav.sass +++ b/src/sass/partials/topnav.sass @@ -152,8 +152,8 @@ visibility: hidden opacity: 0 z-index: 99999 - background: #ffffff - border: 1px solid rgba(100,100,100,0.4) + background: lighten($page_content_right_bg, 10%) + border: 1px solid rgba(0,0,0,0.2) //padding: 10px position: relative +boxShadow(0px 3px 8px 0px rgba(0,0,0,0.247059)) @@ -172,7 +172,7 @@ &:after border-color: rgba(255, 255, 255, 0) - border-bottom-color: #fff + border-bottom-color: lighten($page_content_right_bg, 10%) border-width: 8px margin-left: -8px @@ -204,10 +204,10 @@ .actions width: 100% height: auto - border-bottom: 1px solid rgba(100,100,100,0.4) + border-bottom: 1px solid rgba(0,0,0,0.2) line-height: 24px font-size: 12px - color: #000 + color: $text_color font-family: "Roboto", sans-serif a width: 100% @@ -239,13 +239,13 @@ li width: 100% - background: #ffffff !important - border-bottom: 1px solid rgba(100,100,100,0.4) + background: lighten($page_content_right_bg, 10%) !important + border-bottom: 1px solid rgba(0,0,0,0.2) height: 72px max-height: 80px line-height: normal &:hover - background: darken(#fff, 4%) !important + background: darken(lighten($page_content_right_bg, 10%), 4%) !important &:last-child border-bottom: none @@ -254,22 +254,21 @@ width: 100% height: 71px padding: 10px !important - background: #ffffff !important + background: lighten($page_content_right_bg, 10%) !important line-height: normal !important font-size: 12px - color: black !important + color: $text_color !important position: relative &:hover background: transparent !important - color: #000 !important .messageUnread width: 16px height: 16px font-size: 12px font-family: "FontAwesome" - color: #646464 + color: automatic-text-color(lighten($page_content_right_bg, 10%), 'muted') position: absolute top: 8px right: 3px @@ -286,7 +285,7 @@ margin-bottom: 3px div.messageDate - color: #646464 !important + color: automatic-text-color(lighten($page_content_right_bg, 10%), 'muted') !important div.messageSnippet width: 218px @@ -300,7 +299,7 @@ font-size: 25px line-height: 59px text-align: center - color: black + color: automatic-text-color(lighten($page_content_right_bg, 10%)) background: transparent !important &.warn color: #e7a13c diff --git a/src/sass/partials/ui.sass b/src/sass/partials/ui.sass index 49a026d74..0852e9f15 100644 --- a/src/sass/partials/ui.sass +++ b/src/sass/partials/ui.sass @@ -336,7 +336,7 @@ label.md-label &.uk-badge-danger background: #e53935 &.uk-badge-grey - background: #ccc + background: darken($page_content_right_bg, 5%) &.uk-badge-small font-size: 10px padding: 2px 4px @@ -362,7 +362,9 @@ label.md-label padding-right: 12px !important .uk-dropdown - background: #f5f5f5 + background: $page_content_button_color + & >ul > li > a + color: $page_content_button_text_color .uk-dropdown.uk-datepicker opacity: 1 @@ -575,13 +577,19 @@ textarea.review-list .no-data-available-text font-size: 2em - color: grey + color: automatic-text-color(lighten($page_content_right_bg, 10%), 'muted') font-weight: 300 position: absolute top: 50% left: 50% transform: translate(-50%, -50%) +.c3 text, .c3-text.c3-empty + fill: $text_color !important + +.uk-table thead th + color: automatic-text-color(lighten($page_content_right_bg, 10%), 'muted') + .danger-zone, .zone border: 1px solid rgba(0,0,0,0.175) diff --git a/src/views/dashboard.hbs b/src/views/dashboard.hbs index 113b8e38d..c4ebca068 100644 --- a/src/views/dashboard.hbs +++ b/src/views/dashboard.hbs @@ -15,8 +15,10 @@ -
Last - Updated: Cache Still Loading...
+
+ Last Updated: + Cache Still Loading... +
diff --git a/src/views/partials/topbar/notifications.hbs b/src/views/partials/topbar/notifications.hbs index 65c537333..7436ad2a4 100644 --- a/src/views/partials/topbar/notifications.hbs +++ b/src/views/partials/topbar/notifications.hbs @@ -31,7 +31,7 @@ {{/each}}
-
+
diff --git a/src/views/settings.hbs b/src/views/settings.hbs index 1221420e9..1363f80c2 100644 --- a/src/views/settings.hbs +++ b/src/views/settings.hbs @@ -281,7 +281,7 @@
Header Background

Background color of the header

-
+
@@ -298,7 +298,7 @@
Header Primary

Text and icon color within the header

-
+
@@ -315,7 +315,7 @@
Primary

Most text and icons. Choose a darker color.

-
+
@@ -332,7 +332,7 @@
Secondary

The main background color

-
+
@@ -349,7 +349,7 @@
Tertiary

Accent color, used for links, some buttons, and notifications

-
+
@@ -366,7 +366,7 @@
Quaternary

Sidebar background color

-
+
@@ -810,7 +810,7 @@
-
+
@@ -829,7 +829,7 @@
-
+
diff --git a/src/views/tickets.hbs b/src/views/tickets.hbs index 6271e3bf5..9a8c669ac 100644 --- a/src/views/tickets.hbs +++ b/src/views/tickets.hbs @@ -87,8 +87,8 @@
- From 5edfb0f68e92c3509db538353579d6d134c8880f Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Mon, 5 Nov 2018 03:06:22 -0500 Subject: [PATCH 15/40] fix(style): incorrect border style --- src/sass/partials/selectize.sass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sass/partials/selectize.sass b/src/sass/partials/selectize.sass index 4f390d7b8..2e0388597 100644 --- a/src/sass/partials/selectize.sass +++ b/src/sass/partials/selectize.sass @@ -127,7 +127,8 @@ display: inline-block .selectize-input - border: 1px solid darken($selectize_bg, 10%) + border: 0 solid darken($selectize_bg, 10%) + border-bottom-width: 1px padding: 8px 8px display: inline-block width: 100% From a76747d889eced77c0d34b3f98fd54880a3ef523 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Mon, 5 Nov 2018 19:24:14 -0500 Subject: [PATCH 16/40] style(sass): updates for darker colors --- .../js/angularjs/controllers/settings.js | 2 +- src/sass/partials/common.sass | 2 +- src/sass/partials/messages.sass | 16 ++++++--- src/sass/partials/tLoader.sass | 24 +++++++++++-- src/sass/partials/ui.sass | 19 ++++++++++ src/views/layout/main.hbs | 36 ++++++++++++++----- src/views/partials/createGroupWindow.hbs | 4 +-- src/views/partials/deletePriorityWindow.hbs | 2 +- src/views/partials/deleteTicketTypeWindow.hbs | 2 +- src/views/partials/newMessageWindow.hbs | 2 +- src/views/partials/ticketFilterWindow.hbs | 10 +++--- .../report_TicketsByGroup.hbs | 2 +- .../report_TicketsByPriorities.hbs | 4 +-- .../report_TicketsByStatus.hbs | 4 +-- .../report_TicketsByTags.hbs | 4 +-- .../report_TicketsByTypes.hbs | 4 +-- .../report_TicketsByUsers.hbs | 4 +-- 17 files changed, 102 insertions(+), 39 deletions(-) diff --git a/src/public/js/angularjs/controllers/settings.js b/src/public/js/angularjs/controllers/settings.js index 13c6e2952..8f66f84d0 100644 --- a/src/public/js/angularjs/controllers/settings.js +++ b/src/public/js/angularjs/controllers/settings.js @@ -1467,7 +1467,7 @@ define([ '
\n' + '
\n' + ' \n' + - ' \n'; priorities.forEach(function(p) { if (p._id.toString() !== savedPriority._id) diff --git a/src/sass/partials/common.sass b/src/sass/partials/common.sass index 7a5cdf8c9..b7bcccf70 100644 --- a/src/sass/partials/common.sass +++ b/src/sass/partials/common.sass @@ -621,7 +621,7 @@ div.hoverAction span font-size: 0.875rem - color: #4d4d4d + color: automatic-text-color(lighten($page_content_right_bg, 10%), 'muted') font-weight: normal line-height: 1.5 margin-bottom: 0 diff --git a/src/sass/partials/messages.sass b/src/sass/partials/messages.sass index 8e37a957e..3cf67abde 100644 --- a/src/sass/partials/messages.sass +++ b/src/sass/partials/messages.sass @@ -34,7 +34,7 @@ // border-bottom: none &.active - background: white + background: $page_content_right_bg &.active:before, &.message-tag:before @@ -152,8 +152,8 @@ right: 0 height: 40px border: none - border-top: 1px solid #ddd - background: #fff + border-top: 1px solid $page_content_border_color + background: darken($page_content_right_bg, 5%) button border: none margin: 0 @@ -175,6 +175,10 @@ height: 40px font-size: 14px font-family: "Source Sans Pro", sans-serif + background: darken($page_content_right_bg, 5%) + color: automatic-text-color(darken($page_content_right_bg, 5%)) + &::placeholder + color: automatic-text-color(darken($page_content_right_bg, 5%)) a display: block float: right @@ -259,7 +263,7 @@ input[type="checkbox"]:checked.poloCheckbox + label display: block padding: 10px 5px 5px 5px font-size: 11px - color: #989898 + color: automatic-text-color($page_content_right_bg, 'muted') font-family: "Roboto", sans-serif .conversation-deleted font-weight: 700 @@ -351,10 +355,12 @@ input[type="checkbox"]:checked.poloCheckbox + label border: 1px solid $page_content_border_color background: lighten($page_bg_color, 20%) padding: 5px 15px - color: #222 + color: automatic-text-color(lighten($page_bg_color, 20%)) font-size: 13px font-weight: 300 +borderRadius(15px) + &::placeholder + color: automatic-text-color(lighten($page_bg_color, 20%), 'muted') &.withSeperator padding-left: 33px &::before diff --git a/src/sass/partials/tLoader.sass b/src/sass/partials/tLoader.sass index 63d1abcdd..9fffe6fc0 100644 --- a/src/sass/partials/tLoader.sass +++ b/src/sass/partials/tLoader.sass @@ -1,4 +1,5 @@ -#loader-wrapper +#loader-wrapper, +#dot-loader background: $page_content_bg position: absolute top: 0 @@ -9,6 +10,14 @@ height: 100% z-index: 999999 +@keyframes bigdotbounce + 0% + -webkit-transform: translateY(0%) + 50% + -webkit-transform: translateY(-150%) + 100% + -webkit-transform: translateY(0%) + @keyframes bounceC 0% -webkit-transform: translateY(0%) @@ -38,6 +47,10 @@ .t circle -webkit-animation: bounceC .7s infinite alternate ease-in-out +.bigdot circle + animation: bigdotbounce .7s infinite alternate ease-in-out + -webkit-animation: bigdotbounce .7s infinite alternate ease-in-out + //p // font-family: $fontFamily // font-size: 22px @@ -52,10 +65,12 @@ left: 50% transform: translate(-50%, -50%) -.loader-wrapper +.loader-wrapper, +.dot-loader-wrapper width: 100% height: 100% - svg.t + svg.t, + svg.bigdot position: absolute top: 0 left: 30% @@ -76,6 +91,9 @@ path fill: #323232 +svg.bigdot circle + fill: $accent_color !important + .shadow animation: expand .35s infinite alternate ease-in-out -webkit-animation: expand .35s infinite alternate ease-in-out diff --git a/src/sass/partials/ui.sass b/src/sass/partials/ui.sass index 0852e9f15..5d262dd2a 100644 --- a/src/sass/partials/ui.sass +++ b/src/sass/partials/ui.sass @@ -361,6 +361,25 @@ label.md-label padding-left: 12px !important padding-right: 12px !important +.uk-datepicker-table th + color: automatic-text-color($page_content_right_bg, 'muted') +.uk-datepicker-table a + color: $text_color + &:hover, &:active, &:focus + color: $text_color +a.uk-datepicker-table-muted + color: darken(automatic-text-color($page_content_right_bg, 'muted'), 5%) + &:hover, &:active, &:focus + color: darken(automatic-text-color($page_content_right_bg, 'muted'), 5%) + +.uk-tooltip + background: mix(black, $page_content_bg, 65%) + color: automatic-text-color(mix(black, $page_content_bg, 65%)) +.uk-tooltip-top-left:after, +.uk-tooltip-top-right:after, +.uk-tooltip-top:after + border-top-color: mix(black, $page_content_bg, 65%) !important + .uk-dropdown background: $page_content_button_color & >ul > li > a diff --git a/src/views/layout/main.hbs b/src/views/layout/main.hbs index 2267405df..5dd40d331 100644 --- a/src/views/layout/main.hbs +++ b/src/views/layout/main.hbs @@ -25,23 +25,43 @@ -
+ + + + + + + + + + + + + + + + + + + + + +
- - - + + + - +
- + - - +
diff --git a/src/views/partials/createGroupWindow.hbs b/src/views/partials/createGroupWindow.hbs index 8db6cac16..099d4051f 100644 --- a/src/views/partials/createGroupWindow.hbs +++ b/src/views/partials/createGroupWindow.hbs @@ -7,7 +7,7 @@
- {{#each data.users}} {{/each}} @@ -15,7 +15,7 @@
- {{#each data.users}} {{/each}} diff --git a/src/views/partials/deletePriorityWindow.hbs b/src/views/partials/deletePriorityWindow.hbs index a01a335c0..26454da55 100644 --- a/src/views/partials/deletePriorityWindow.hbs +++ b/src/views/partials/deletePriorityWindow.hbs @@ -10,7 +10,7 @@
- {{#each @root.data.common.priorities}} {{#isnot name ../name}} diff --git a/src/views/partials/deleteTicketTypeWindow.hbs b/src/views/partials/deleteTicketTypeWindow.hbs index 8933f9c49..f5b755473 100644 --- a/src/views/partials/deleteTicketTypeWindow.hbs +++ b/src/views/partials/deleteTicketTypeWindow.hbs @@ -10,7 +10,7 @@
- {{#each @root.data.common.ticketTypes}} {{#isnot name ../name}} diff --git a/src/views/partials/newMessageWindow.hbs b/src/views/partials/newMessageWindow.hbs index e63d52e83..9cb202b3f 100644 --- a/src/views/partials/newMessageWindow.hbs +++ b/src/views/partials/newMessageWindow.hbs @@ -7,7 +7,7 @@
- + + + + + diff --git a/src/views/subviews/reports/generate_partials/report_TicketsByPriorities.hbs b/src/views/subviews/reports/generate_partials/report_TicketsByPriorities.hbs index 1f4f59e76..904132f44 100644 --- a/src/views/subviews/reports/generate_partials/report_TicketsByPriorities.hbs +++ b/src/views/subviews/reports/generate_partials/report_TicketsByPriorities.hbs @@ -38,7 +38,7 @@
- diff --git a/src/views/subviews/reports/generate_partials/report_TicketsByStatus.hbs b/src/views/subviews/reports/generate_partials/report_TicketsByStatus.hbs index 8a01e7157..adb9ccd99 100644 --- a/src/views/subviews/reports/generate_partials/report_TicketsByStatus.hbs +++ b/src/views/subviews/reports/generate_partials/report_TicketsByStatus.hbs @@ -38,7 +38,7 @@
- + @@ -50,7 +50,7 @@
- @@ -50,7 +50,7 @@
- @@ -50,7 +50,7 @@
- +
    {{#each data.common.users}} From 08904cf2c22b2b42c4102bdaf1897fa4bb4f78fa Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Mon, 5 Nov 2018 19:39:44 -0500 Subject: [PATCH 18/40] style(sass): issue where colors were rending incorrectly --- src/sass/partials/ui.sass | 2 +- src/views/dashboard.hbs | 4 ++-- src/views/layout/main.hbs | 21 --------------------- src/views/partials/nav.hbs | 2 +- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/sass/partials/ui.sass b/src/sass/partials/ui.sass index 5d262dd2a..9ba8907ff 100644 --- a/src/sass/partials/ui.sass +++ b/src/sass/partials/ui.sass @@ -603,7 +603,7 @@ textarea.review-list left: 50% transform: translate(-50%, -50%) -.c3 text, .c3-text.c3-empty +.c3-legend-item text, .c3-text.c3-empty fill: $text_color !important .uk-table thead th diff --git a/src/views/dashboard.hbs b/src/views/dashboard.hbs index c4ebca068..e1357bf28 100644 --- a/src/views/dashboard.hbs +++ b/src/views/dashboard.hbs @@ -100,7 +100,7 @@
    -
    +
    Top 5 Groups

    @@ -109,7 +109,7 @@
    -
    +
    Top 10 Tags

    diff --git a/src/views/layout/main.hbs b/src/views/layout/main.hbs index 5dd40d331..ee9c7d363 100644 --- a/src/views/layout/main.hbs +++ b/src/views/layout/main.hbs @@ -25,27 +25,6 @@ - - - - - - - - - - - - - - - - - - - - -
    diff --git a/src/views/partials/nav.hbs b/src/views/partials/nav.hbs index 58e4ed364..01b603ca9 100644 --- a/src/views/partials/nav.hbs +++ b/src/views/partials/nav.hbs @@ -99,7 +99,7 @@ {{#canUser data.user "notices:view"}} -
  • Notices
  • +
  • warningNotices
  • {{/canUser}}
    From d02b1ecccf27811a6a18873ee923adb049a0054e Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Mon, 5 Nov 2018 20:07:47 -0500 Subject: [PATCH 19/40] style(sass): more dark theme fixes --- src/sass/partials/common.sass | 2 +- src/sass/partials/ui.sass | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sass/partials/common.sass b/src/sass/partials/common.sass index b7bcccf70..4b7a40d59 100644 --- a/src/sass/partials/common.sass +++ b/src/sass/partials/common.sass @@ -151,7 +151,7 @@ font-size: 14px line-height: 18px display: block - color: #727272 + color: automatic-text-color($page_content_right_bg, 'muted') .cursor-pointer cursor: default !important diff --git a/src/sass/partials/ui.sass b/src/sass/partials/ui.sass index 9ba8907ff..0233c353d 100644 --- a/src/sass/partials/ui.sass +++ b/src/sass/partials/ui.sass @@ -288,6 +288,8 @@ label.md-label .uk-modal-dialog background: $page_content_right_bg +.uk-file-upload + background: lighten($page_content_right_bg, 2%) .uk-accordion-title-small font-size: 13px From d22e91461ae7414d0104417335fc48445de9a548 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 7 Nov 2018 01:07:19 -0500 Subject: [PATCH 20/40] chore(code): cleanup --- src/sass/functions.sass | 2 +- src/sass/partials/common.sass | 2 +- src/views/partials/nav.hbs | 27 +-------------------------- src/views/pub_createTicket.hbs | 1 + src/views/pub_signup.hbs | 1 + 5 files changed, 5 insertions(+), 28 deletions(-) diff --git a/src/sass/functions.sass b/src/sass/functions.sass index 96bb95070..88870932a 100644 --- a/src/sass/functions.sass +++ b/src/sass/functions.sass @@ -17,7 +17,7 @@ @if (lightness($bgColor) > 50 and lightness($accent_color) > 75) @return darken($accent_color, 40%) @else - @return $accent_color + @return lighten($accent_color, 10%) @function pace-color() @if ($topbar_bg == #42464d) diff --git a/src/sass/partials/common.sass b/src/sass/partials/common.sass index 4b7a40d59..7d8bf5ae7 100644 --- a/src/sass/partials/common.sass +++ b/src/sass/partials/common.sass @@ -169,7 +169,7 @@ margin: 0 a.blackLink - color: #222 !important + color: automatic-link-color($page_content_right_bg) !important a.hoverUnderline &:hover diff --git a/src/views/partials/nav.hbs b/src/views/partials/nav.hbs index 01b603ca9..f7f81e9b3 100644 --- a/src/views/partials/nav.hbs +++ b/src/views/partials/nav.hbs @@ -30,19 +30,8 @@
  • chatMessages
  • - - - - - - - - - {{#canUser data.user "accounts:view"}}
  • Accounts
  • {{/canUser}} {{#canUser data.user "groups:view"}}
  • supervisor_accountGroups
  • {{/canUser}} - - {{#canUser data.user "reports:view"}} {{/canUser}} @@ -144,15 +128,10 @@
  • Closed
\ No newline at end of file diff --git a/src/views/pub_createTicket.hbs b/src/views/pub_createTicket.hbs index d9c7ce492..600092e74 100644 --- a/src/views/pub_createTicket.hbs +++ b/src/views/pub_createTicket.hbs @@ -40,6 +40,7 @@ height: 500px; background: #f6f6f6; border: 1px solid #ccc; + color: #222; padding: 15px; overflow: auto; } diff --git a/src/views/pub_signup.hbs b/src/views/pub_signup.hbs index c04716ee9..8f4f46f45 100644 --- a/src/views/pub_signup.hbs +++ b/src/views/pub_signup.hbs @@ -42,6 +42,7 @@ border: 1px solid #ccc; padding: 15px; overflow: auto; + color: #222; } p { From f01cf82e0f67c5326e9aa76aa9c1a6b00d3f5400 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 7 Nov 2018 01:21:43 -0500 Subject: [PATCH 21/40] chore(sass): building of dynamic sass --- app.js | 4 + src/controllers/api/v1/settings.js | 9 ++ src/helpers/viewdata/index.js | 66 +-------------- .../js/angularjs/controllers/settings.js | 9 +- src/routes/index.js | 1 + src/sass/buildsass.js | 82 +++++++++++++++++++ 6 files changed, 104 insertions(+), 67 deletions(-) create mode 100644 src/sass/buildsass.js diff --git a/app.js b/app.js index a79fec1f0..6fcb6549d 100644 --- a/app.js +++ b/app.js @@ -178,6 +178,10 @@ function dbCallback(err, db) { function(next) { require('./src/settings/defaults').init(next); }, + function(next) { + winston.debug('Building dynamic sass...'); + require('./src/sass/buildsass').build(next); + }, function(next) { //Start Task Runners require('./src/taskrunner'); diff --git a/src/controllers/api/v1/settings.js b/src/controllers/api/v1/settings.js index 559b48399..d0ea49646 100644 --- a/src/controllers/api/v1/settings.js +++ b/src/controllers/api/v1/settings.js @@ -99,5 +99,14 @@ apiSettings.testMailer = function(req, res) { }); }; +apiSettings.buildsass = function(req, res) { + var buildsass = require('../../../sass/buildsass'); + buildsass.build(function(err) { + if (err) return res.status(400).json({success: false, error: err}); + + return res.json({success: true}); + }); +}; + module.exports = apiSettings; \ No newline at end of file diff --git a/src/helpers/viewdata/index.js b/src/helpers/viewdata/index.js index d14db12b1..5b07cc18a 100644 --- a/src/helpers/viewdata/index.js +++ b/src/helpers/viewdata/index.js @@ -17,79 +17,15 @@ var async = require('async'), winston = require('winston'), moment = require('moment'), permissions = require('../../permissions'), - settingSchema = require('../../models/setting'), - settingUtil = require('../../settings/settingsUtil'), - - sass = require('node-sass'); - + settingSchema = require('../../models/setting'); var viewController = {}; var viewdata = {}; viewdata.notifications = {}; viewdata.users = {}; -var nconf = require('nconf'); -var sassOptionsDefaults = { - indentedSyntax: true, - includePaths: [ - nconf.get('base_dir') + '/src/sass' - ], - outputStyle: 'compressed' -}; - -function sassVariable(name, value) { - return '$' + name + ': ' + value + '\n'; -} - -function sassVariables(variablesObj) { - return Object.keys(variablesObj).map(function (name) { - return sassVariable(name, variablesObj[name]); - }).join('\n'); -} - -function sassImport(path) { - return '@import \'' + path + '\'\n'; -} - -function dynamicSass(entry, vars, success, error) { - var dataString = - sassVariables(vars) + - sassImport(entry); - var sassOptions = _.assign({}, sassOptionsDefaults, { - data: dataString - }); - - sass.render(sassOptions, function (err, result) { - return (err) - ? error(err) - : success(result.css.toString()); - }); -} - viewController.getData = function(request, cb) { async.parallel([ - function(callback) { - settingUtil.getSettings(function(err, s) { - if (!err && s) { - var settings = s.data.settings; - - dynamicSass('app.sass', { - header_background: settings.colorHeaderBG.value, - header_primary: settings.colorHeaderPrimary.value, - primary: settings.colorPrimary.value, - secondary: settings.colorSecondary.value, - tertiary: settings.colorTertiary.value, - quaternary: settings.colorQuaternary.value - }, function(result) { - var fs = require('fs'); - var themeCss = nconf.get('base_dir') + '/public/css/app.min.css'; - fs.writeFileSync(themeCss, result); - return callback(); - }, callback); - } else - return callback(); - }); - }, function(callback) { settingSchema.getSetting('gen:sitetitle', function(err, setting) { if (!err && setting && setting.value) diff --git a/src/public/js/angularjs/controllers/settings.js b/src/public/js/angularjs/controllers/settings.js index 8f66f84d0..5ae1da151 100644 --- a/src/public/js/angularjs/controllers/settings.js +++ b/src/public/js/angularjs/controllers/settings.js @@ -1616,9 +1616,14 @@ define([ 'Content-Type': 'application/json' } }).then(function successCallback() { - helpers.UI.showSnackbar('Color Scheme Saved. Reloading...', false); // Call rebuild of app.min.css - $timeout(function() { $window.location.reload(); }, 1000); + $http.get('/api/v1/settings/buildsass') + .then(function successCallback() { + helpers.UI.showSnackbar('Color Scheme Saved. Reloading...', false); + $timeout(function() { $window.location.reload(); }, 1000); + }, function errorCallback(err) { + helpers.UI.showSnackbar(err, true); + }); }, function errorCallback(err) { helpers.UI.showSnackbar(err, true); }); diff --git a/src/routes/index.js b/src/routes/index.js index 9269291e5..f51f26142 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -231,6 +231,7 @@ function mainRoutes(router, middleware, controllers) { router.put('/api/v1/settings', middleware.api, controllers.api.settings.updateSetting); router.post('/api/v1/settings/testmailer', middleware.api, controllers.api.settings.testMailer); + router.get('/api/v1/settings/buildsass', middleware.api, controllers.api.settings.buildsass); router.get('/api/v1/plugins/list/installed', middleware.api, function(req, res) { return res.json({success: true, loadedPlugins: global.plugins}); }); router.get('/api/v1/plugins/install/:packageid', middleware.api, middleware.isAdmin, controllers.api.plugins.installPlugin); diff --git a/src/sass/buildsass.js b/src/sass/buildsass.js new file mode 100644 index 000000000..58a69f181 --- /dev/null +++ b/src/sass/buildsass.js @@ -0,0 +1,82 @@ +/* + . .o8 oooo + .o8 "888 `888 + .o888oo oooo d8b oooo oooo .oooo888 .ooooo. .oooo.o 888 oooo + 888 `888""8P `888 `888 d88' `888 d88' `88b d88( "8 888 .8P' + 888 888 888 888 888 888 888ooo888 `"Y88b. 888888. + 888 . 888 888 888 888 888 888 .o o. )88b 888 `88b. + "888" d888b `V88V"V8P' `Y8bod88P" `Y8bod8P' 8""888P' o888o o888o + ======================================================================== + Created: 11/7/2018 + Author: Chris Brame + + */ + +var _ = require('lodash'); +var sass = require('node-sass'); +var nconf = require('nconf'); +var settingUtil = require('../settings/settingsUtil'); + +var buildsass = {}; + +var sassOptionsDefaults = { + indentedSyntax: true, + includePaths: [ + nconf.get('base_dir') + '/src/sass' + ], + outputStyle: 'compressed' +}; + +function sassVariable(name, value) { + return '$' + name + ': ' + value + '\n'; +} + +function sassVariables(variablesObj) { + return Object.keys(variablesObj).map(function (name) { + return sassVariable(name, variablesObj[name]); + }).join('\n'); +} + +function sassImport(path) { + return '@import \'' + path + '\'\n'; +} + +function dynamicSass(entry, vars, success, error) { + var dataString = + sassVariables(vars) + + sassImport(entry); + var sassOptions = _.assign({}, sassOptionsDefaults, { + data: dataString + }); + + sass.render(sassOptions, function (err, result) { + return (err) + ? error(err) + : success(result.css.toString()); + }); +} + +buildsass.build = function(callback) { + settingUtil.getSettings(function(err, s) { + if (!err && s) { + var settings = s.data.settings; + + dynamicSass('app.sass', { + header_background: settings.colorHeaderBG.value, + header_primary: settings.colorHeaderPrimary.value, + primary: settings.colorPrimary.value, + secondary: settings.colorSecondary.value, + tertiary: settings.colorTertiary.value, + quaternary: settings.colorQuaternary.value + }, function(result) { + var fs = require('fs'); + var themeCss = nconf.get('base_dir') + '/public/css/app.min.css'; + fs.writeFileSync(themeCss, result); + return callback(); + }, callback); + } else + return callback(); + }); +}; + +module.exports = buildsass; \ No newline at end of file From 88367d9a8f743ca79f77beca5a225be8a8060f2d Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 7 Nov 2018 01:34:20 -0500 Subject: [PATCH 22/40] fix(install): server crash due to invalid middleware --- src/views/install.hbs | 4 ++++ src/webserver.js | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/views/install.hbs b/src/views/install.hbs index 52efab804..174c97f13 100644 --- a/src/views/install.hbs +++ b/src/views/install.hbs @@ -29,6 +29,10 @@ padding: 15px 0; } + h2 { + color: #444 !important; + } + p { font-family: "Roboto", Arial, sans-serif; font-weight: 300; diff --git a/src/webserver.js b/src/webserver.js index 3625ee53a..eb15c0f2a 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -97,11 +97,11 @@ var async = require('async'), app.set('view engine', 'hbs'); hbsHelpers.register(hbs.handlebars); - app.use('/assets', express.static(nconf.get('base_dir') + '/public/uploads/assets')); - app.use('/uploads', middleware.redirectToLogin, express.static(nconf.get('base_dir') + '/public/uploads')); + app.use('/assets', express.static(path.join(__dirname, '../public/uploads/assets'))); + app.use('/uploads', routeMiddleware.redirectToLogin, express.static(path.join(__dirname, '../public/uploads'))); - app.use(express.static(nconf.get('base_dir') + '/public')); - app.use(favicon(nconf.get('base_dir') + '/public/img/favicon.ico')); + app.use(express.static(path.join(__dirname, '../public'))); + app.use(favicon(path.join(__dirname, '../public/img/favicon.ico'))); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); From 20c06d80af7cbb0b23861d7f3a2c3f3f4be95b1e Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 7 Nov 2018 01:36:45 -0500 Subject: [PATCH 23/40] style(sass): invalid spinner background --- src/views/partials/createTicketWindow.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/partials/createTicketWindow.hbs b/src/views/partials/createTicketWindow.hbs index ea0849586..a7b529a0d 100644 --- a/src/views/partials/createTicketWindow.hbs +++ b/src/views/partials/createTicketWindow.hbs @@ -52,7 +52,7 @@