Skip to content

Commit

Permalink
Added a view to the changelog toaster.
Browse files Browse the repository at this point in the history
  • Loading branch information
SunburnedGoose committed Apr 11, 2016
1 parent 7824266 commit 3282c0a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 30 deletions.
58 changes: 28 additions & 30 deletions app/scripts/dimApp.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@


angular.module('dimApp')
.run(['$rootScope', 'loadingTracker', '$timeout', 'toaster',
function($rootScope, loadingTracker, $timeout, toaster) {
.run(['$rootScope', 'loadingTracker', '$timeout', 'toaster', '$http',
function($rootScope, loadingTracker, $timeout, toaster, $http) {
$rootScope.loadingTracker = loadingTracker;

//1 Hour
Expand All @@ -73,38 +73,36 @@
//Track Our Initial Activity of Starting the App
$rootScope.trackActivity();

chrome.storage.sync.get('2016.03.13-v3.4.0', function(data) {
chrome.storage.sync.get('20160411v35', function(data) {
if(_.isNull(data) || _.isEmpty(data)) {

$timeout(function() {
toaster.pop({
type: 'info',
title: 'DIM v3.5 Released',
body: [
"<p>You've been asking about it since DIM was first released, and it's finally here: you can now move partial quantities of stacked items! Hold shift when dragging, hover over the drop point, or use the popup to choose how much to move. New \"take\" and \"split\" commands and the ability to add consumables to your loadouts rounds out the new functionality.</p>",
'<p>On top of that, DIM has gotten faster! You should notice transfers, especially with loadouts, zipping along more smoothly now.</p>',
'<p>Our <a href="https://github.com/DestinyItemManager/DIM/blob/dev/CHANGELOG.md" target="_blank">changelog</a> is available if you would like to know more.',
'<p>Visit us on Twitter and Reddit to learn more about these and other updates in v3.5',
'<p>Follow us on: <a style="margin: 0 5px;" href="http://destinyitemmanager.reddit.com" target="_blank"><i<i class="fa fa-reddit fa-2x"></i></a> <a style="margin: 0 5px;" href="http://twitter.com/ThisIsDIM" target="_blank"><i class="fa fa-twitter fa-2x"></i></a>',
'<p><input style="margin-top: 1px; vertical-align: middle;" id="20160304v332" type="checkbox"> <label for="20160304v332">Hide This Popup</label></p>'
].join(''),
timeout: 0,
bodyOutputType: 'trustedHtml',
showCloseButton: true,
clickHandler: function(a, b, c, d, e, f, g) {
if(b) {
return true;
$http.get('views/changelog-toaster.html?v=v3.5')
.then(function(changelog) {
toaster.pop({
type: 'info',
title: 'DIM v3.5 Released',
body: changelog.data,
timeout: 0,
bodyOutputType: 'trustedHtml',
showCloseButton: true,
clickHandler: function(a, b, c, d, e, f, g) {
if(b) {
return true;
}

return false;
},
onHideCallback: function() {
if($('#20160411v35')
.is(':checked')) {
chrome.storage.sync.set({
"20160411v35": 1
}, function(e) {});
}
}
});

return false;
},
onHideCallback: function() {
if($('#20160304v332')
.is(':checked')) {
chrome.storage.sync.set({
"2016.03.13-v3.4.0": 1
}, function(e) {});
}
}
});
}, 3000);
}
Expand Down
20 changes: 20 additions & 0 deletions app/views/changelog-toaster.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<p>
Have you been carrying a lot of loot lately? DIM v3.5 has a significant
QoL change where it will clear the way for transfers automatically if you have
full vault or inventories. This means you spend less time in our app and more time playing. <3
<p>Multiple item moves and loadouts will now wait for each to complete sequentially
to prevent errors from occurring if the vault was full.
<p>We've saved several seconds when applying loadouts by equipping and dequipping
all items at once.</p>
<p>
Our <a href="https://github.com/DestinyItemManager/DIM/blob/dev/CHANGELOG.md"
target="_blank">changelog</a> is available if you would like to know more...
<p>
Visit us on Twitter and Reddit to learn more about these and other updates in v3.5
<p>
Follow us on: <a style="margin: 0 5px;" href="http://destinyitemmanager.reddit.com"
target="_blank"><i<i class="fa fa-reddit fa-2x"></i></a> <a style="margin: 0 5px;"
href="http://twitter.com/ThisIsDIM" target="_blank"><i class="fa fa-twitter fa-2x"></i></a>
<p>
<input style="margin-top: 1px; vertical-align: middle;" id="20160411v35" type="checkbox">
<label for="20160411v35">Hide This Popup</label></p>

0 comments on commit 3282c0a

Please sign in to comment.