Skip to content

Commit 1b0c337

Browse files
problemas com o top do sidebar
1 parent 643d19c commit 1b0c337

File tree

4 files changed

+67
-63
lines changed

4 files changed

+67
-63
lines changed

background.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
chrome.app.runtime.onLaunched.addListener(function() {
2-
chrome.app.window.create('body.html', {
3-
'outerBounds': {
4-
'width': 1000,
5-
'height': 600,
6-
// 'left': 0,
7-
// 'top' : 0,
8-
}
9-
});
102

11-
// chrome.notifications.create({
12-
// type: 'MESSAGE',
13-
// message: message,
14-
// title: title || "Notificação",
15-
// iconUrl: 'img/icon.png'
16-
// })
3+
chrome.app.window.create('body.html', {
4+
'outerBounds': {
5+
'width': 1000,
6+
'height': 600,
7+
}
8+
});
9+
10+
chrome.notifications.onClicked.addListener(function(id, byUser) {
11+
12+
if (/^(http|https):\/\//.test(id)) {
13+
14+
setTimeout(function() {
15+
chrome.tabs.create({
16+
"url": id
17+
});
18+
}, 1);
19+
}
20+
21+
chrome.notifications.clear(id);
22+
});
1723
});

body.html

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -41,57 +41,55 @@
4141
<div class="col s3 sidebar teal lighten-1">
4242
<ul class="collection">
4343
<li class="collection-item"
44-
ng-repeat="item in feeds.items"
45-
ng-click="showPost(item)"
46-
style="cursor: pointer"
47-
ng-class="{active: item.title == feed.title}"
44+
ng-repeat="item in feeds.items"
45+
ng-click="showPost(item)"
46+
style="cursor: pointer"
47+
ng-class="{active: item.title == feed.title}"
4848
>
49-
<span ng-bind-html="html(item.title)"></span>
50-
<div class="secondary-content">
51-
<i class="material-icons tiny yellow-text" ng-if="containsAnyTag(item)">grade</i>
52-
</div>
53-
</li>
54-
</ul>
49+
<span ng-bind-html="html(item.title)"></span>
50+
<div class="secondary-content">
51+
<i class="material-icons tiny yellow-text" ng-if="containsAnyTag(item)">grade</i>
52+
</div>
53+
</li>
54+
</ul>
55+
</div>
56+
<div class="col s9 push-s3">
57+
<div class="progress" ng-show="loading">
58+
<div class="indeterminate"></div>
5559
</div>
56-
<div class="col s9 push-s3">
57-
<div class="progress" ng-show="loading">
58-
<div class="indeterminate"></div>
59-
</div>
60-
<div ng-hide="loading">
61-
<header>
62-
<h3>
63-
<a class="black-text" ng-href="{{ feed.link }}" target="_blank" ng-bind-html="html(feed.title)"></a>
64-
</h3>
65-
</header>
66-
<section class='box'>
67-
<div ng-bind-html="html(feed.content)"></div>
68-
<div>
69-
<a ng-repeat="category in feed.categories"
70-
ng-bind="category"
71-
class="chip"
72-
href
73-
ng-click="toggleTag(category)"
74-
ng-class="{'teal white-text': tags.indexOf(category) != -1}"></a>
75-
</div>
76-
</section>
60+
<div ng-hide="loading">
61+
<header>
62+
<h3>
63+
<a class="black-text" ng-href="{{ feed.link }}" target="_blank" ng-bind-html="html(feed.title)"></a>
64+
</h3>
65+
</header>
66+
<section class='box'>
67+
<div ng-bind-html="html(feed.content)"></div>
68+
<div>
69+
<a ng-repeat="category in feed.categories"
70+
ng-bind="category"
71+
class="chip"
72+
href
73+
ng-click="toggleTag(category)"
74+
ng-class="{'teal white-text': tags.indexOf(category) != -1}"></a>
75+
</div>
76+
</section>
7777
</div>
78+
<!-- Modal Trigger -->
79+
</div>
80+
</section>
7881

79-
<!-- Modal Trigger -->
80-
81-
</div>
82-
</section>
83-
84-
<div id="tags-modal" class="modal bottom-sheet">
85-
<div class="modal-content">
86-
<h4>Tags Selecionadas</h4>
87-
<div>
88-
<a ng-repeat="tag in tags.sort()" class="chip teal white-text" ng-click="toggleTag(tag)" href>
89-
<span ng-bind="tag"></span>
90-
<i class="close material-icons">close</i>
91-
</a>
92-
</div>
82+
<div id="tags-modal" class="modal bottom-sheet">
83+
<div class="modal-content">
84+
<h4>Tags Selecionadas</h4>
85+
<div>
86+
<a ng-repeat="tag in tags.sort()" class="chip teal white-text" ng-click="toggleTag(tag)" href>
87+
<span ng-bind="tag"></span>
88+
<i class="close material-icons">close</i>
89+
</a>
9390
</div>
9491
</div>
95-
</main>
92+
</div>
93+
</main>
9694
</body>
9795
</html>

css/default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ html, body {
3838
width: 100%;
3939
}
4040

41-
.total-height{height: 100%; }
41+
.total-height{height: 100%; position: relative;}

js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ angular.module('app', [])
2727

2828
$scope.feed || $scope.showPost(response.data.items[0]);
2929

30-
$scope.getFiltererByTags();
30+
$scope.notifyByTags();
3131

3232
$scope.loading = false;
3333
});
3434

3535

3636
};
3737

38-
$scope.getFiltererByTags = function () {
38+
$scope.notifyByTags = function () {
3939

4040
chrome.storage.sync.get('notifieds', function (object) {
4141

0 commit comments

Comments
 (0)