Skip to content

Commit 3282c0a

Browse files
Added a view to the changelog toaster.
1 parent 7824266 commit 3282c0a

File tree

2 files changed

+48
-30
lines changed

2 files changed

+48
-30
lines changed

app/scripts/dimApp.config.js

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353

5454
angular.module('dimApp')
55-
.run(['$rootScope', 'loadingTracker', '$timeout', 'toaster',
56-
function($rootScope, loadingTracker, $timeout, toaster) {
55+
.run(['$rootScope', 'loadingTracker', '$timeout', 'toaster', '$http',
56+
function($rootScope, loadingTracker, $timeout, toaster, $http) {
5757
$rootScope.loadingTracker = loadingTracker;
5858

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

76-
chrome.storage.sync.get('2016.03.13-v3.4.0', function(data) {
76+
chrome.storage.sync.get('20160411v35', function(data) {
7777
if(_.isNull(data) || _.isEmpty(data)) {
78+
7879
$timeout(function() {
79-
toaster.pop({
80-
type: 'info',
81-
title: 'DIM v3.5 Released',
82-
body: [
83-
"<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>",
84-
'<p>On top of that, DIM has gotten faster! You should notice transfers, especially with loadouts, zipping along more smoothly now.</p>',
85-
'<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.',
86-
'<p>Visit us on Twitter and Reddit to learn more about these and other updates in v3.5',
87-
'<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>',
88-
'<p><input style="margin-top: 1px; vertical-align: middle;" id="20160304v332" type="checkbox"> <label for="20160304v332">Hide This Popup</label></p>'
89-
].join(''),
90-
timeout: 0,
91-
bodyOutputType: 'trustedHtml',
92-
showCloseButton: true,
93-
clickHandler: function(a, b, c, d, e, f, g) {
94-
if(b) {
95-
return true;
80+
$http.get('views/changelog-toaster.html?v=v3.5')
81+
.then(function(changelog) {
82+
toaster.pop({
83+
type: 'info',
84+
title: 'DIM v3.5 Released',
85+
body: changelog.data,
86+
timeout: 0,
87+
bodyOutputType: 'trustedHtml',
88+
showCloseButton: true,
89+
clickHandler: function(a, b, c, d, e, f, g) {
90+
if(b) {
91+
return true;
92+
}
93+
94+
return false;
95+
},
96+
onHideCallback: function() {
97+
if($('#20160411v35')
98+
.is(':checked')) {
99+
chrome.storage.sync.set({
100+
"20160411v35": 1
101+
}, function(e) {});
102+
}
96103
}
104+
});
97105

98-
return false;
99-
},
100-
onHideCallback: function() {
101-
if($('#20160304v332')
102-
.is(':checked')) {
103-
chrome.storage.sync.set({
104-
"2016.03.13-v3.4.0": 1
105-
}, function(e) {});
106-
}
107-
}
108106
});
109107
}, 3000);
110108
}

app/views/changelog-toaster.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<p>
2+
Have you been carrying a lot of loot lately? DIM v3.5 has a significant
3+
QoL change where it will clear the way for transfers automatically if you have
4+
full vault or inventories. This means you spend less time in our app and more time playing. <3
5+
<p>Multiple item moves and loadouts will now wait for each to complete sequentially
6+
to prevent errors from occurring if the vault was full.
7+
<p>We've saved several seconds when applying loadouts by equipping and dequipping
8+
all items at once.</p>
9+
<p>
10+
Our <a href="https://github.com/DestinyItemManager/DIM/blob/dev/CHANGELOG.md"
11+
target="_blank">changelog</a> is available if you would like to know more...
12+
<p>
13+
Visit us on Twitter and Reddit to learn more about these and other updates in v3.5
14+
<p>
15+
Follow us on: <a style="margin: 0 5px;" href="http://destinyitemmanager.reddit.com"
16+
target="_blank"><i<i class="fa fa-reddit fa-2x"></i></a> <a style="margin: 0 5px;"
17+
href="http://twitter.com/ThisIsDIM" target="_blank"><i class="fa fa-twitter fa-2x"></i></a>
18+
<p>
19+
<input style="margin-top: 1px; vertical-align: middle;" id="20160411v35" type="checkbox">
20+
<label for="20160411v35">Hide This Popup</label></p>

0 commit comments

Comments
 (0)