Skip to content

Commit

Permalink
* Update tooltip text
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Nov 22, 2023
1 parent d8b149c commit 94f0463
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/renderer/components/data-settings/data-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
:compact="true"
:default-value="shouldExportPlaylistForOlderVersions"
:tooltip="$t('Settings.Data Settings.Export Playlists For Older FreeTube Versions.Tooltip')"
:tooltip-allow-newlines="true"
@change="shouldExportPlaylistForOlderVersions = !shouldExportPlaylistForOlderVersions"
/>
</ft-flex-box>
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/components/ft-toggle-switch/ft-toggle-switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export default defineComponent({
tooltipPosition: {
type: String,
default: 'bottom-left'
}
},
tooltipAllowNewlines: {
type: Boolean,
default: false,
},
},
data: function () {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
class="selectTooltip"
:position="tooltipPosition"
:tooltip="tooltip"
:allow-newlines="tooltipAllowNewlines"
/>
</label>
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/ft-tooltip/ft-tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
transform: translate(calc(-50% * var(--horizontal-directionality-coefficient)), 1em);
}

.text.allowNewlines {
white-space: pre;
}

.tooltip {
display: inline-block;
position: relative;
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/components/ft-tooltip/ft-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export default defineComponent({
tooltip: {
type: String,
required: true
}
},
allowNewlines: {
type: Boolean,
default: false,
},
},
data() {
const id = `ft-tooltip-${++idCounter}`
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/components/ft-tooltip/ft-tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
<p
:id="id"
class="text"
:class="position"
:class="{
[position]: true,
allowNewlines,
}"
role="tooltip"
>
{{ tooltip }}
Expand Down
12 changes: 7 additions & 5 deletions static/locales/en-US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,13 @@ Settings:
Export Playlists: Export Playlists
Export Playlists For Older FreeTube Versions:
Label: Export Playlists For Older FreeTube Versions
Tooltip: Older FreeTube versions cannot import playlist exports from newer versions
due to old code and assumption on single playlist.
Enable this option & export playlists if you intend to downgrade FreeTube.
You should also remove all playlists after export & before downgrade
to ensure that the older versions of FreeTube would regenerate playlist data compatible for those versions.
# |- = Keep newlines, No newline at end
Tooltip: |-
This option exports videos from all playlists into one playlist named `Favorites`.
How to export & import videos in playlists for an older version of FreeTube:
1. Export your playlists with this option enabled.
2. Delete all of your existing playlists using the Remove All Playlists option under Privacy Settings.
3. Launch the older version of FreeTube and import the exported playlists."
Profile object has insufficient data, skipping item: Profile object has insufficient
data, skipping item
All subscriptions and profiles have been successfully imported: All subscriptions
Expand Down

0 comments on commit 94f0463

Please sign in to comment.