Skip to content

Commit

Permalink
Fix monitor mode for Safari / Remove counter output
Browse files Browse the repository at this point in the history
  • Loading branch information
scyv committed Aug 15, 2018
1 parent 18e139b commit c922870
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 27 deletions.
13 changes: 0 additions & 13 deletions client/js/pomodoro.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,6 @@ Template.pomodoro.helpers({
}
return undefined;
},
pomodoroCountToday() {
return Pomodoros.find({owner: Meteor.userId(), start: {$gte: moment().startOf("day").toDate()}}).count();
},
interruptionsToday() {
return Pomodoros.find({
owner: Meteor.userId(),
start: {$gte: moment().startOf("day").toDate()},
interrupted: true
}).count();
},
pomodoroCount() {
return Pomodoros.find({owner: Meteor.userId()}).count();
},
subscriptions() {
return Subscriptions.find({to: Meteor.userId()});
},
Expand Down
2 changes: 0 additions & 2 deletions client/js/team.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Template } from "meteor/templating";

resolveTeamMembers = (key) => {
console.log("resolve team", key);
const team = Teams.findOne({key: key});
if (!team) {
return [];
}
const memberIds = team.members;
console.log(memberIds);
return memberIds.map(id => Meteor.users.findOne(id)).sort((a, b)=> {
const aName = a.profile.name.toLowerCase();
const bName = b.profile.name.toLowerCase();
Expand Down
10 changes: 4 additions & 6 deletions client/js/teams.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Template.teams.helpers({

Template.teamMonitor.helpers({
teamsLoading() {
if (!teamsHandle.ready()) {
// hack for safari
Session.get("reactiveTimer");
}
return !teamsHandle.ready();
},
teams() {
Expand Down Expand Up @@ -44,12 +48,6 @@ Template.teamActivity.helpers({
},
isTeamOwner() {
return this.owner === Meteor.userId();
},
teamPomodoroCount() {
return Pomodoros.find({owner: {$in: this.members}}).count();
},
teamPomodoroInterruptions() {
return Pomodoros.find({owner: {$in: this.members}, interrupted: true}).count();
}
});

Expand Down
2 changes: 1 addition & 1 deletion client/views/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
</div>
{{> yield}}
</div>
<footer class="text-muted small text-center"><hr>Version: 1.5.0 | Powered by <a href="https://meteor.com">Meteor</a> | Having issues? Want to contribute? Got to the <a href="https://github.com/scyv/ketchup">Github Repository</a>!</footer>
<footer class="text-muted small text-center"><hr>Version: 1.6.0 | Powered by <a href="https://meteor.com">Meteor</a> | Having issues? Want to contribute? Go to the <a href="https://github.com/scyv/ketchup">Github Repository</a>!</footer>

</template>
3 changes: 0 additions & 3 deletions client/views/pomodoro.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
<i class="glyphicon glyphicon-bullhorn pull-left"></i> Anfrage von: {{from}}
</li>
{{/each}}
<li class="list-group-item">Pomodoros heute: {{pomodoroCountToday}}</li>
<li class="list-group-item">Unterbrechungen heute: {{interruptionsToday}}</li>
<li class="list-group-item">Pomodoros insgesamt: {{pomodoroCount}}</li>
</ul>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions client/views/teams.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
</button>
{{/if}}
{{/if}}
<h1>{{name}}<h5 class="text-sm text-muted">{{teamPomodoroCount}} Pomodoros | {{teamPomodoroInterruptions}}
Unterbrechungen</h5></h1>
<h1>{{name}}</h1>
{{#if membersLoading}}
<p class="text-center">Laden...</p>
{{else}}
Expand Down

0 comments on commit c922870

Please sign in to comment.