Skip to content

Commit 397271a

Browse files
committed
SettingsTable tooltips
1 parent c1a0947 commit 397271a

File tree

1 file changed

+56
-52
lines changed

1 file changed

+56
-52
lines changed

src/components/options-page/SettingsTable.vue

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@
1414
</thead>
1515
<tbody>
1616
<tr>
17-
<td class="tooltip">
17+
<td class="tooltip flex">
1818
<p>{{ $t("skipIntroSwitch") }}</p>
19-
<p class="tooltiptext">{{ $t("skipIntroDescription") }}</p>
19+
<i-mdi-help-circle height="1rem" />
20+
<div
21+
class="tooltip-content text-primary-content"
22+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
23+
>
24+
{{ $t("skipIntroDescription") }}
25+
</div>
2026
</td>
2127
<td>
2228
<Switch
@@ -62,9 +68,15 @@
6268
</td>
6369
</tr>
6470
<tr>
65-
<td class="tooltip">
71+
<td class="tooltip flex">
6672
<p>{{ $t("skipCreditsSwitch") }}</p>
67-
<p class="tooltiptext">{{ $t("skipCreditsDescription") }}</p>
73+
<i-mdi-help-circle height="1rem" />
74+
<div
75+
class="tooltip-content text-primary-content"
76+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
77+
>
78+
{{ $t("skipCreditsDescription") }}
79+
</div>
6880
</td>
6981
<td>
7082
<Switch
@@ -110,9 +122,15 @@
110122
</td>
111123
</tr>
112124
<tr>
113-
<td class="tooltip">
125+
<td class="tooltip flex">
114126
<p>{{ $t("watchCreditsSwitch") }}</p>
115-
<p class="tooltiptext">{{ $t("watchCreditsDescription") }}</p>
127+
<i-mdi-help-circle height="1rem" />
128+
<div
129+
class="tooltip-content text-primary-content"
130+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
131+
>
132+
{{ $t("watchCreditsDescription") }}
133+
</div>
116134
</td>
117135
<td>
118136
<Switch
@@ -153,9 +171,15 @@
153171
</td>
154172
</tr>
155173
<tr>
156-
<td class="tooltip">
174+
<td class="tooltip flex">
157175
<p>{{ $t("skipAdSwitch") }}</p>
158-
<p class="tooltiptext">{{ $t("skipAdDescription") }}</p>
176+
<i-mdi-help-circle height="1rem" />
177+
<div
178+
class="tooltip-content text-primary-content"
179+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
180+
>
181+
{{ $t("skipAdDescription") }}
182+
</div>
159183
</td>
160184
<td>
161185
<Switch
@@ -191,9 +215,15 @@
191215
</td>
192216
</tr>
193217
<tr>
194-
<td class="tooltip">
218+
<td class="tooltip flex">
195219
<p>{{ $t("showRatingSwitch") }}</p>
196-
<p class="tooltiptext">{{ $t("showRatingDescription") }}</p>
220+
<i-mdi-help-circle height="1rem" />
221+
<div
222+
class="tooltip-content text-primary-content"
223+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
224+
>
225+
{{ $t("showRatingDescription") }}
226+
</div>
197227
</td>
198228
<td>
199229
<Switch
@@ -234,9 +264,15 @@
234264
</td>
235265
</tr>
236266
<tr>
237-
<td class="tooltip">
267+
<td class="tooltip flex">
238268
<p>{{ $t("speedSliderSwitch") }}</p>
239-
<p class="tooltiptext">{{ $t("speedSliderDescription") }}</p>
269+
<i-mdi-help-circle height="1rem" />
270+
<div
271+
class="tooltip-content text-primary-content"
272+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
273+
>
274+
{{ $t("speedSliderDescription") }}
275+
</div>
240276
</td>
241277
<td>
242278
<Switch
@@ -282,9 +318,15 @@
282318
</td>
283319
</tr>
284320
<tr>
285-
<td class="tooltip">
321+
<td class="tooltip flex">
286322
<p>{{ $t("hideTitlesSwitch") }}</p>
287-
<p class="tooltiptext">{{ $t("hideTitlesDescription") }}</p>
323+
<i-mdi-help-circle height="1rem" />
324+
<div
325+
class="tooltip-content text-primary-content"
326+
style="transform: unset; inset: auto auto var(--tt-off) 0%"
327+
>
328+
{{ $t("hideTitlesDescription") }}
329+
</div>
288330
</td>
289331
<td>
290332
<Switch
@@ -494,14 +536,7 @@ p {
494536
@apply m-0;
495537
}
496538
497-
.tooltip {
498-
border-bottom: 1px dotted white;
499-
@apply whitespace-nowrap inline-block relative;
500-
}
501539
@media only screen and (max-width: 800px), only screen and (max-height: 600px) {
502-
.tooltip {
503-
white-space: wrap;
504-
}
505540
/* label {
506541
transform: scale(0.8);
507542
} */
@@ -512,35 +547,4 @@ p {
512547
display: none;
513548
}
514549
}
515-
516-
.tooltip .tooltiptext {
517-
visibility: hidden;
518-
width: 300px;
519-
color: #000;
520-
text-align: center;
521-
border-radius: 6px;
522-
padding: 5px 0;
523-
position: absolute;
524-
z-index: 1;
525-
bottom: 100%;
526-
left: 0%;
527-
@apply bg-primary-content text-primary;
528-
}
529-
.tooltiptext {
530-
white-space: normal;
531-
}
532-
.tooltip .tooltiptext::after {
533-
content: "";
534-
position: absolute;
535-
top: 100%;
536-
left: 50%;
537-
margin-left: -5px;
538-
border-width: 5px;
539-
border-style: solid;
540-
border-color: #fff transparent transparent transparent;
541-
}
542-
543-
.tooltip:hover .tooltiptext {
544-
visibility: visible;
545-
}
546550
</style>

0 commit comments

Comments
 (0)