Skip to content

Commit

Permalink
Merge pull request #998 from janat08/developmentImage
Browse files Browse the repository at this point in the history
Problem: active development image is not global
  • Loading branch information
gsovereignty authored Apr 7, 2018
2 parents b86eadd + 0a2d524 commit 223cfc1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 26 deletions.
27 changes: 27 additions & 0 deletions imports/ui/layouts/mainLayout/mainLayout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@
<nav id="sidebar" class="{{openSidebar}}">
{{> sideNav}}
</nav>
<div class="modal underDev {{show}}" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="nauk-info-connections text-center">
<img src="https://user-images.githubusercontent.com/8143945/37496855-eec0cd58-28ef-11e8-9de3-b0df665daa67.png" style="width:200px"
class="pointer">
<br/>
</div>
<p>"Blockrazor is under active development. The site goes down often. Things break at least once a day. Bounty rewards
and wallets are reset often.
<br />
<br />Follow @Blockrazor on Twitter to be notified when we go 'live' and you can earn real Krazor. Check out the code
on Github."</p>
<a href="https://github.com/Blockrazor/blockrazor/">
<i class="fa fa-github" aria-hidden="true" style="font-size:32px;padding:10px"></i>
</a>
<a href="https://twitter.com/blockrazor">
<i class="fa fa-twitter" aria-hidden="true" style="font-size:32px;padding:10px"></i>
</a>
</div>
<div class="modal-footer">
<button type="button" id="hideDevelopmentNotification" class="btn btn-secondary" data-dismiss="modal">Hide for 5 days</button>
</div>
</div>
</div>
</div>
<div id="content" class="app-content container">
{{> Template.dynamic template=main}}
{{> Template.dynamic template=bottom}}
Expand Down
32 changes: 28 additions & 4 deletions imports/ui/layouts/mainLayout/mainLayout.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import { Template } from 'meteor/templating';
import { UserData } from '/imports/api/indexDB.js';
import { UserData, developmentValidationEnabledFalse } from '/imports/api/indexDB.js';
import './mainLayout.html'
import './mainLayout.scss'

import swal from 'sweetalert';
import Cookies from 'js-cookie';

import '../../components/topNav/topNav'
import '../../components/sideNav/sideNav'

// swal({
// icon: "error",
// title: "Please fix the following fields",
// text: error.error.map(i => i.split(/(?=[A-Z])/).join(' ').toLowerCase()).join(', '),
// button: { className: 'btn btn-primary' }
// });

// Cookies.set('don't, false, { expires: 1 })


//writes to DB preferences on change and window close/log out
//doesn't run on unload as it should as websocket closes before method reaches server, is an issue in meteor
Expand Down Expand Up @@ -45,15 +57,27 @@ Template.mainLayout.events({
saveSidebarPreference()
}
}
}
});
},
"click #hideDevelopmentNotification": (eve, templ)=>{
return Cookies.set('underDevelopmentShown', true, 5)
},
})

Template.mainLayout.helpers({
openSidebar() {
return Session.get('openedSidebar') ? "active" : "";
}
},
});

Template.mainLayout.onRendered(function(){
//used to toggle under development toggle
if (!developmentValidationEnabledFalse) {
return
} else if (!Cookies.get('underDevelopmentShown')){
$('.underDev').modal('show');
}
})

Template.mainLayout.onCreated(function () {
//is used to close sidebar on click outside sidebar
var handlerForSidebar = function (event) {
Expand Down
22 changes: 0 additions & 22 deletions imports/ui/pages/returnedCurrencies/returnedCurrencies.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
<template name="returnedCurrencies">
<div class="row">
<div class="col-3 mx-auto">
<div class="nauk-info-connections text-center">
<img src="https://user-images.githubusercontent.com/8143945/37496855-eec0cd58-28ef-11e8-9de3-b0df665daa67.png" style="width:200px" data-toggle="modal" data-target=".underDev" class="pointer">
<br/><br/>
</div>
</div>
</div>

<div class="modal underDev" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<p>"Blockrazor is under active development. The site goes down often. Things break at least once a day. Bounty rewards and wallets are reset often. <br /><br />Follow @Blockrazor on Twitter to be notified when we go 'live' and you can earn real Krazor. Check out the code on Github."</p>
<a href="https://github.com/Blockrazor/blockrazor/"><i class="fa fa-github" aria-hidden="true" style="font-size:32px;padding:10px"></i></a> <a href="https://twitter.com/blockrazor"><i class="fa fa-twitter" aria-hidden="true" style="font-size:32px;padding:10px"></i></a>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

<!--- Currency Filter -->
<div class="modal currencyFilterModal" tabindex="-1" role="dialog">
Expand Down

0 comments on commit 223cfc1

Please sign in to comment.