Skip to content

Commit

Permalink
feat: add tooltips to various UI components
Browse files Browse the repository at this point in the history
- Settings, round skip, volume toggle, total round count, reset.
  • Loading branch information
Splode committed May 25, 2020
1 parent 92e7e43 commit 5bd03d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 41 deletions.
11 changes: 3 additions & 8 deletions src/renderer/components/Titlebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,18 @@
<div
class="Icon-wrapper Icon-wrapper--titlebar Icon-wrapper--single"
style="position: absolute;"
title="Settings"
@click="toggleDrawer"
>
<div
class="Menu-wrapper"
:class="drawerOpen ? 'is-collapsed' : ''"
>
<div class="Menu-wrapper" :class="drawerOpen ? 'is-collapsed' : ''">
<div class="Menu-line"></div>
<div class="Menu-line"></div>
</div>
</div>

<h1 class="Title">Pomotroid</h1>

<div
class="Icon-group"
style="position: absolute; top: 0; right: 0;"
>
<div class="Icon-group" style="position: absolute; top: 0; right: 0;">
<div
class="Icon-wrapper Icon-wrapper--titlebar Icon-wrapper--double--left"
style="padding-left: 18px"
Expand Down
56 changes: 23 additions & 33 deletions src/renderer/components/timer/Timer-footer.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<template>
<section class="Container Footer">
<div class="Round-wrapper">
<p>{{ round + '/' + workRounds }} <span v-if="totalWorkRounds > 0" class="Total-rounds">({{ totalWorkRounds }})</span></p>
<p
class="TextButton"
@click="callForReset"
>Reset</p>
<p>
{{ round + '/' + workRounds }}
<span
v-if="totalWorkRounds > 0"
class="Total-rounds"
title="Focus rounds completed"
>({{ totalWorkRounds }})</span
>
</p>
<p class="TextButton" title="Reset current round" @click="callForReset">
Reset
</p>
</div>
<div
class="Icon-group"
style="position: absolute; right: 0;"
>
<div class="Icon-group" style="position: absolute; right: 0;">
<!-- skip -->
<div
class="Icon-wrapper Icon-wrapper--double--left"
title="Skip the current round"
@click="skipRound"
>
<svg
Expand All @@ -29,29 +34,18 @@
height="15px"
class="Icon--skip"
>
<polygon
fill="#858C99"
points="0,0 0,12 6.1,5.9"
/>
<rect
x="6.9"
y="0"
fill="#858C99"
width="1.1"
height="12"
/>
<polygon fill="#858C99" points="0,0 0,12 6.1,5.9" />
<rect x="6.9" y="0" fill="#858C99" width="1.1" height="12" />
</svg>
</div>
<!-- mute -->
<div
class="Icon-wrapper Icon-wrapper--double--right"
:title="volume > 0 ? 'Mute' : 'Unmute'"
@click="toggleMute"
@mouseenter="volumeSliderHidden = false"
>
<transition
name="fade"
mode="out-in"
>
<transition name="fade" mode="out-in">
<svg
version="1.2"
baseProfile="tiny"
Expand Down Expand Up @@ -92,10 +86,7 @@
c0.7-1.2,1-2.6,1-4.1c0-4.3-3-7.9-7-8.8v2.1C-450.1,275.1-448,277.8-448,281z M-462.7,272l-1.3,1.3l4.7,4.7h-4.7v6h4l5,5v-6.7
l4.3,4.3c-0.7,0.5-1.4,0.9-2.3,1.2v2.1c1.4-0.3,2.6-1,3.7-1.8l2,2l1.3-1.3l-9-9L-462.7,272z M-455,273l-2.1,2.1l2.1,2.1V273z"
/>
<path
fill="none"
d="M-467,269h24v24h-24V269z"
/>
<path fill="none" d="M-467,269h24v24h-24V269z" />
</svg>
</transition>
</div>
Expand All @@ -112,11 +103,10 @@
class="Slider"
v-model="localVolume"
@change="setVolume"
>
/>
<div class="Slider-bar Slider-bar--blueGrey"></div>
</div>
</transition>

</div>
</section>
</template>
Expand Down Expand Up @@ -173,8 +163,8 @@ export default {
if (
this.currentMousePosition.x >= 305 &&
this.currentMousePosition.x <= 355 &&
(this.currentMousePosition.y >= 305 &&
this.currentMousePosition.y <= 455)
this.currentMousePosition.y >= 305 &&
this.currentMousePosition.y <= 455
) {
} else {
this.volumeSliderHidden = true
Expand Down Expand Up @@ -260,7 +250,7 @@ export default {
.Total-rounds {
color: #858c99;
font-size: .7rem;
font-size: 0.7rem;
}
}
Expand Down

0 comments on commit 5bd03d6

Please sign in to comment.