Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove timer #361

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ Marinara is open source software and is built by volunteers from around the worl
- [Brian L](https://github.com/brianl9995): Spanish translation
- [Wesley Matos](https://github.com/wricke): Portuguese (Brazil) translation
- [Rachel Ng](https://github.com/rachelnml): Malay translation
- [Lui Rocha](https://github.com/LuiFr): Skip break button
- [Carolina Arenas](https://github.com/arenasoy): Remove timer
- [Ana Fainelo](http://github.com/anafainelo): Remove timer
133 changes: 52 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions package/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"message": "• Short & long breaks\n• Toolbar icon with countdown timer\n• Track Pomodoro history & stats\n• Configurable long break intervals\n• Configurable timer durations\n• Desktop & tab notifications\n• Audio notifications with over 20 sounds\n• Ticking timer sounds\n• Scheduled automatic timers\n• Open source software",
"description": "Detailed extension description shown to users in the Chrome Web Store."
},
"general_settings": {
"message": "General Settings",
"description": "General section header. Shown on the settings page."
},
"pomodoro_assistant": {
"message": "Pomodoro Assistant",
"description": "Marinara title tagline. Shown on the settings-feedback page."
Expand Down Expand Up @@ -51,6 +55,10 @@
"message": "Stop Timer",
"description": "Menu entry to stop the current timer. Shown in the dropdown menu."
},
"show_timer": {
"message": "Show Timer",
"description": "Show timer settings label. Shown on the settings page."
},
"pause_timer": {
"message": "Pause Timer",
"description": "Menu entry to pause the current timer. Shown in the dropdown menu."
Expand Down
6 changes: 6 additions & 0 deletions src/Messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ class Messages
get long_break() {
return chrome.i18n.getMessage('long_break', []);
}
get general_settings() {
return chrome.i18n.getMessage('general_settings', []);
}
get show_timer() {
return chrome.i18n.getMessage('show_timer', []);
}
get march() {
return chrome.i18n.getMessage('march', []);
}
Expand Down
10 changes: 9 additions & 1 deletion src/background/Observers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { SingletonPage, PageHost } from './SingletonPage';

class BadgeObserver
{
constructor(settings) {
this.settings = settings;
}
onStart({ phase, remaining }) {
this.updateBadge({ phase, minutes: Math.round(remaining / 60) });
}
Expand Down Expand Up @@ -42,7 +45,12 @@ class BadgeObserver
}[phase];

if (minutes != null) {
text = minutes < 1 ? M.less_than_minute : M.n_minutes(minutes);
if (!this.settings.showTimer) {
text = ' ';
}
else {
text = minutes < 1 ? M.less_than_minute : M.n_minutes(minutes);
}
tooltip = M.browser_action_tooltip(title, M.time_remaining(text));
} else {
tooltip = M.browser_action_tooltip(title, tooltip);
Expand Down
4 changes: 4 additions & 0 deletions src/background/Services.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ class PomodoroService extends Service
this.timer.start();
}

async startFocus() {
this.timer.startFocus();
}

async pause() {
this.timer.pause();
}
Expand Down
3 changes: 2 additions & 1 deletion src/background/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ class SettingsSchema
notifications: {
desktop: true,
tab: true,
sound: null
sound: null,
}
},
showTimer: true,
autostart: {
time: null,
},
Expand Down
2 changes: 1 addition & 1 deletion src/background/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function run() {

let menu = createPomodoroMenu(timer);
timer.observe(new HistoryObserver(history));
timer.observe(new BadgeObserver());
timer.observe(new BadgeObserver(settings));
timer.observe(new NotificationObserver(timer, settings, history));
timer.observe(new ExpirationSoundObserver(settings));
timer.observe(new TimerSoundObserver(settings));
Expand Down
1 change: 1 addition & 0 deletions src/countdown/Countdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default {
}[this.phase];
},
title() {

let phase = M.countdown;
let remaining = '';
if (this.checkpointStartAt) {
Expand Down
9 changes: 8 additions & 1 deletion src/expire/Expire.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
<button @click.prevent="startSession" class="button start-session" :class="phase">
{{ action }}
</button>
<button v-if="phase !== 'focus'" @click.prevent="startFocus" class="button start-session focus">
{{ M.start_focusing }}
</button>
<div class="pomodoros-today">
<p class="pomodoros">
<i v-for="_ of new Array(pomodoroCount)" class="icon-circle"></i>
<i v-for="i of new Array(pomodoroCount)" v-bind:key=i class="icon-circle"></i>
</p>
<p>{{ M.completed_today }}</p>
<button @click.prevent="showHistoryPage" class="view-history">{{ M.view_history }}</button>
Expand Down Expand Up @@ -102,6 +105,7 @@ body {
}
.start-session {
margin-top: 10px;
margin-left: 10px;
}
.pomodoros-today {
margin-top: 110px;
Expand Down Expand Up @@ -170,6 +174,9 @@ export default {
startSession() {
PomodoroClient.once.start();
},
startFocus() {
PomodoroClient.once.startFocus();
},
showHistoryPage() {
OptionsClient.once.showHistoryPage();
},
Expand Down
Loading