1 parent
f987558884
commit
aab20f2364
35 files changed
+2336
-1729
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import VideoListRow from "lib/VideoFeed/VideoListRow.svelte";
|
||||
import { bookmarksStore, translate } from "lib/Stores";
|
||||
import { bookmarksStore, tr } from "lib/Stores";
|
||||
|
||||
export let visibility: boolean;
|
||||
</script>
|
||||
@@ -10,15 +10,13 @@
|
||||
<div
|
||||
class="flex flex-col items-center justify-start h-screen w-2/3 mx-auto"
|
||||
>
|
||||
<div class="text-2xl font-bold text-gray-500">
|
||||
{$translate("No Bookmarks")}
|
||||
</div>
|
||||
<div class="text-2xl font-bold text-gray-500">{$tr("No Bookmarks")}</div>
|
||||
<div class="text-gray-500 text-center">
|
||||
{$translate("You currently have no bookmarks.")}<br />
|
||||
{$translate(
|
||||
{$tr("You currently have no bookmarks.")}<br />
|
||||
{$tr(
|
||||
"To add bookmarks, select a video, playlist or channel, and add a bookmark."
|
||||
)}<br />
|
||||
{$translate("Please note that Bookmarks is an experimental feature.")}
|
||||
{$tr("Please note that Bookmarks is an experimental feature.")}
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { getHost } from "lib/Api/Host";
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { playletStateStore, translate } from "lib/Stores";
|
||||
import { playletStateStore, tr } from "lib/Stores";
|
||||
|
||||
export let visibility: boolean;
|
||||
|
||||
@@ -164,9 +164,9 @@ ${JSON.stringify(profilesInfo, null, 2)}
|
||||
|
||||
<div class={visibility ? "" : "hidden"}>
|
||||
<div class="text-base text-center m-8">
|
||||
{$translate("Thank you for using Playlet.")}
|
||||
{$tr("Thank you for using Playlet.")}
|
||||
<br />
|
||||
{@html $translate(feedbackMessageRaw)
|
||||
{@html $tr(feedbackMessageRaw)
|
||||
.replace(
|
||||
"%IssueStart%",
|
||||
`<a class="link" href="${githubUrlIssue}" target="_blank" rel="noopener noreferrer">`
|
||||
@@ -194,9 +194,11 @@ ${JSON.stringify(profilesInfo, null, 2)}
|
||||
</tr>
|
||||
{/each}
|
||||
|
||||
<tr>
|
||||
<th>App internal state</th>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>App internal state</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{#each internalStateLinks as item}
|
||||
<tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { translate } from "lib/Stores";
|
||||
import { tr } from "lib/Stores";
|
||||
|
||||
let modal;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
modal.close();
|
||||
}
|
||||
|
||||
export let label = $translate("Filters");
|
||||
export let label = $tr("Filters");
|
||||
|
||||
export const filters = {
|
||||
date: "",
|
||||
@@ -38,7 +38,7 @@
|
||||
count += filters.features.length;
|
||||
count += filters.sort ? 1 : 0;
|
||||
|
||||
label = $translate("Filters") + `${count > 0 ? ` (${count})` : ""}`;
|
||||
label = $tr("Filters") + `${count > 0 ? ` (${count})` : ""}`;
|
||||
}
|
||||
|
||||
const options = {
|
||||
@@ -181,37 +181,37 @@
|
||||
<h2 class="text-xl font-bold mb-4">{label}</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="text-lg font-bold mb-2">{$translate("Upload date")}</h3>
|
||||
<h3 class="text-lg font-bold mb-2">{$tr("Upload date")}</h3>
|
||||
<select class="input input-bordered w-full" bind:value={filters.date}>
|
||||
{#each options.date as { title, value }}
|
||||
<option {value}>{$translate(title)}</option>
|
||||
<option {value}>{$tr(title)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="text-lg font-bold mb-2">{$translate("Type")}</h3>
|
||||
<h3 class="text-lg font-bold mb-2">{$tr("Type")}</h3>
|
||||
<select class="input input-bordered w-full" bind:value={filters.type}>
|
||||
{#each options.type as { title, value }}
|
||||
<option {value}>{$translate(title)}</option>
|
||||
<option {value}>{$tr(title)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="text-lg font-bold mb-2">{$translate("Duration")}</h3>
|
||||
<h3 class="text-lg font-bold mb-2">{$tr("Duration")}</h3>
|
||||
<select
|
||||
class="input input-bordered w-full"
|
||||
bind:value={filters.duration}
|
||||
>
|
||||
{#each options.duration as { title, value }}
|
||||
<option {value}>{$translate(title)}</option>
|
||||
<option {value}>{$tr(title)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="text-lg font-bold mb-2">{$translate("Features")}</h3>
|
||||
<h3 class="text-lg font-bold mb-2">{$tr("Features")}</h3>
|
||||
{#each options.features as { title, value }}
|
||||
<label class="flex items-center">
|
||||
<input
|
||||
@@ -220,26 +220,26 @@
|
||||
class="form-checkbox"
|
||||
bind:checked={features_kv[value]}
|
||||
/>
|
||||
<span class="ml-2">{$translate(title)}</span>
|
||||
<span class="ml-2">{$tr(title)}</span>
|
||||
</label>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="text-lg font-bold mb-2">{$translate("Sort by")}</h3>
|
||||
<h3 class="text-lg font-bold mb-2">{$tr("Sort by")}</h3>
|
||||
<select class="input input-bordered w-full" bind:value={filters.sort}>
|
||||
{#each options.sort as { title, value }}
|
||||
<option {value}>{$translate(title)}</option>
|
||||
<option {value}>{$tr(title)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<button class="btn btn-outline">{$translate("Close")}</button>
|
||||
<button class="btn btn-outline">{$tr("Close")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>{$translate("Close")}</button>
|
||||
<button>{$tr("Close")}</button>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { InvidiousApi } from "lib/Api/InvidiousApi";
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { playletStateStore, searchHistoryStore, translate } from "lib/Stores";
|
||||
import { playletStateStore, searchHistoryStore, tr } from "lib/Stores";
|
||||
import VideoCell from "lib/VideoFeed/VideoCell.svelte";
|
||||
import PlaylistCell from "lib/VideoFeed/PlaylistCell.svelte";
|
||||
import ChannelCell from "lib/VideoFeed/ChannelCell.svelte";
|
||||
@@ -133,7 +133,7 @@
|
||||
<input
|
||||
type="search"
|
||||
dir="auto"
|
||||
placeholder="{$translate('Search')}..."
|
||||
placeholder="{$tr('Search')}..."
|
||||
class="join-item input w-full border border-neutral rounded-full"
|
||||
bind:this={searchBox}
|
||||
bind:value={searchBoxText}
|
||||
@@ -213,14 +213,14 @@
|
||||
await searchVideos(searchContinuation);
|
||||
}}
|
||||
>
|
||||
{$translate("Load more")}
|
||||
{$tr("Load more")}
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if isLoading}
|
||||
<div class="w-full h-1/2 z-50 flex justify-center items-center">
|
||||
<span class="loading loading-spinner loading-md"></span>
|
||||
<span class="loading loading-spinner loading-md" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate, userPreferencesStore } from "lib/Stores";
|
||||
import { tr, userPreferencesStore } from "lib/Stores";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<div class="form-control m-5">
|
||||
<label class="label p-0 cursor-pointer">
|
||||
<div class="label-text {textSizes[level]}">{$translate(displayText)}</div>
|
||||
<div class="label-text {textSizes[level]}">{$tr(displayText)}</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
name={key}
|
||||
@@ -32,5 +32,5 @@
|
||||
class="checkbox"
|
||||
/>
|
||||
</label>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { InvidiousApi } from "lib/Api/InvidiousApi";
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate } from "lib/Stores";
|
||||
import { tr } from "lib/Stores";
|
||||
import { get } from "svelte/store";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
@@ -16,14 +16,12 @@
|
||||
await PlayletApi.clearCache();
|
||||
InvidiousApi.clearCache();
|
||||
|
||||
alert(get(translate)("Cache cleared."));
|
||||
alert(get(tr)("Cache cleared."));
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<button class="btn m-1" on:click={clearCache}
|
||||
>{$translate("Clear cache")}</button
|
||||
>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
<button class="btn m-1" on:click={clearCache}>{$tr("Clear cache")}</button>
|
||||
</div>
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { searchHistoryStore, translate } from "lib/Stores";
|
||||
import { searchHistoryStore, tr } from "lib/Stores";
|
||||
import { get } from "svelte/store";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
@@ -15,14 +15,14 @@
|
||||
await PlayletApi.clearSearchHistory();
|
||||
searchHistoryStore.set([]);
|
||||
|
||||
alert(get(translate)("Search history cleared."));
|
||||
alert(get(tr)("Search history cleared."));
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
<button class="btn m-1" on:click={clearSeachHistory}
|
||||
>{$translate("Clear search history")}</button
|
||||
>{$tr("Clear search history")}</button
|
||||
>
|
||||
</div>
|
||||
@@ -2,7 +2,7 @@
|
||||
import {
|
||||
homeLayoutFileStore,
|
||||
homeLayoutStore,
|
||||
translate,
|
||||
tr,
|
||||
userPreferencesStore,
|
||||
} from "lib/Stores";
|
||||
import ArrowUpIcon from "assets/remote-control/arrow-up.svg.svelte";
|
||||
@@ -89,10 +89,10 @@
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
<button class="btn m-1" on:click={openHomeScreenEditor}
|
||||
>{$translate("Edit home screen")}</button
|
||||
>{$tr("Edit home screen")}</button
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -100,57 +100,51 @@
|
||||
<div class="modal-box bg-base-100">
|
||||
{#if value && homeLayout}
|
||||
<table class="w-full">
|
||||
<tbody>
|
||||
{#each value as item, i (i)}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="tooltip" data-tip="Move up">
|
||||
<button
|
||||
class="btn btn-outline btn-sm"
|
||||
on:click={() => moveUp(i)}
|
||||
disabled={i === 0}
|
||||
>
|
||||
<ArrowUpIcon />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<label class="label p-0 cursor-pointer">
|
||||
<div class="label-text">
|
||||
{$translate(homeLayout[item.id].title)}
|
||||
</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
name={item.id}
|
||||
bind:checked={item.enabled}
|
||||
class="toggle toggle-primary"
|
||||
/>
|
||||
</label>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="tooltip" data-tip="Move down">
|
||||
<button
|
||||
class="btn btn-outline btn-sm m-2"
|
||||
on:click={() => moveDown(i)}
|
||||
disabled={i === value.length - 1}
|
||||
>
|
||||
<ArrowDownIcon />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
{#each value as item, i (i)}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="tooltip" data-tip="Move up">
|
||||
<button
|
||||
class="btn btn-outline btn-sm"
|
||||
on:click={() => moveUp(i)}
|
||||
disabled={i === 0}
|
||||
>
|
||||
<ArrowUpIcon />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<label class="label p-0 cursor-pointer">
|
||||
<div class="label-text">{$tr(homeLayout[item.id].title)}</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
name={item.id}
|
||||
bind:checked={item.enabled}
|
||||
class="toggle toggle-primary"
|
||||
/>
|
||||
</label>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="tooltip" data-tip="Move down">
|
||||
<button
|
||||
class="btn btn-outline btn-sm m-2"
|
||||
on:click={() => moveDown(i)}
|
||||
disabled={i === value.length - 1}
|
||||
>
|
||||
<ArrowDownIcon />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</table>
|
||||
<form method="dialog" class="flex justify-center space-x-2">
|
||||
<button class="btn btn-primary" on:click={save}
|
||||
>{$translate("Save")}</button
|
||||
>
|
||||
<button class="btn btn-primary">{$translate("Close")}</button>
|
||||
<button class="btn btn-primary" on:click={save}>{$tr("Save")}</button>
|
||||
<button class="btn btn-primary">{$tr("Close")}</button>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>{$translate("Close")}</button>
|
||||
<button>{$tr("Close")}</button>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate, userPreferencesStore } from "lib/Stores";
|
||||
import { tr, userPreferencesStore } from "lib/Stores";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
const qualityLabels = {
|
||||
@@ -37,7 +37,7 @@
|
||||
}, {});
|
||||
displayValue = originalValue
|
||||
.split(",")
|
||||
.map((item) => $translate(qualityLabels[item] || item))
|
||||
.map((item) => $tr(qualityLabels[item] || item))
|
||||
.join(", ");
|
||||
}
|
||||
}
|
||||
@@ -117,42 +117,38 @@
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
<button class="btn m-1" on:click={openQualitySelector}>{displayValue}</button>
|
||||
</div>
|
||||
|
||||
<dialog bind:this={modal} class="modal" on:close={onClose}>
|
||||
<div class="modal-box bg-base-100">
|
||||
<table class="w-full">
|
||||
<tbody>
|
||||
{#each Object.keys(qualityLabels) as quality}
|
||||
<tr>
|
||||
<td>
|
||||
<label class="label p-0 cursor-pointer">
|
||||
<div class="label-text text-lg">
|
||||
{$translate(qualityLabels[quality])}
|
||||
</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={valueCheckedStates[quality]}
|
||||
on:change={(e) => onChange(e, quality)}
|
||||
class="toggle toggle-primary"
|
||||
/>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
{#each Object.keys(qualityLabels) as quality}
|
||||
<tr>
|
||||
<td>
|
||||
<label class="label p-0 cursor-pointer">
|
||||
<div class="label-text text-lg">
|
||||
{$tr(qualityLabels[quality])}
|
||||
</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={valueCheckedStates[quality]}
|
||||
on:change={(e) => onChange(e, quality)}
|
||||
class="toggle toggle-primary"
|
||||
/>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</table>
|
||||
<form method="dialog" class="flex justify-center space-x-2">
|
||||
<button class="btn btn-primary" on:click={save}
|
||||
>{$translate("Save")}</button
|
||||
>
|
||||
<button class="btn btn-primary">{$translate("Close")}</button>
|
||||
<button class="btn btn-primary" on:click={save}>{$tr("Save")}</button>
|
||||
<button class="btn btn-primary">{$tr("Close")}</button>
|
||||
</form>
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>{$translate("Close")}</button>
|
||||
<button>{$tr("Close")}</button>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate, userPreferencesStore } from "lib/Stores";
|
||||
import { tr, userPreferencesStore } from "lib/Stores";
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
export let displayText: string = "";
|
||||
export let key: string = "";
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<div class="form-control m-5">
|
||||
<label class="label p-0 cursor-pointer">
|
||||
<div class="label-text {textSizes[level]}">{$translate(displayText)}</div>
|
||||
<div class="label-text {textSizes[level]}">{$tr(displayText)}</div>
|
||||
<div class="join mt-2 mb-2">
|
||||
<button
|
||||
class="join-item btn btn-sm btn-primary"
|
||||
@@ -52,5 +52,5 @@
|
||||
</button>
|
||||
</div>
|
||||
</label>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
</div>
|
||||
+6
-7
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { playletStateStore, translate } from "lib/Stores";
|
||||
import { playletStateStore, tr } from "lib/Stores";
|
||||
import { ExternalControlProtocol } from "lib/Api/ExternalControlProtocol";
|
||||
import { get } from "svelte/store";
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
version = "latest";
|
||||
}
|
||||
|
||||
const trFn = get(translate);
|
||||
const trFn = get(tr);
|
||||
|
||||
if (
|
||||
confirm(
|
||||
@@ -100,9 +100,9 @@
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class="text-lg">{$translate("Playlet Library version")}</div>
|
||||
<div class="text-lg">{$tr("Playlet Library version")}</div>
|
||||
<div class="text-xs text-gray-500">
|
||||
{$translate(
|
||||
{$tr(
|
||||
"The version of Playlet Lib to use. These correspond to tagged releases on Github. Releases that do not have a playlet-lib.zip file are disabled."
|
||||
)}
|
||||
</div>
|
||||
@@ -112,14 +112,13 @@
|
||||
bind:value={selectedRelease}
|
||||
class="select select-bordered join-item w-full mr-1"
|
||||
>
|
||||
<option selected value="">{$translate("Latest (default)")}</option>
|
||||
<option selected value="">{$tr("Latest (default)")}</option>
|
||||
{#each releases as release}
|
||||
<option disabled={!release.enabled} value={release.name}
|
||||
>{release.name}</option
|
||||
>
|
||||
{/each}
|
||||
</select>
|
||||
<button class="join-item btn" on:click={apply}>{$translate("Apply")}</button
|
||||
>
|
||||
<button class="join-item btn" on:click={apply}>{$tr("Apply")}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate, userPreferencesStore } from "lib/Stores";
|
||||
import { tr, userPreferencesStore } from "lib/Stores";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $translate(description)}</div>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{@html $tr(description)}</div>
|
||||
|
||||
{#each options as option}
|
||||
<div class="form-control">
|
||||
<label class="label cursor-pointer">
|
||||
<span class="label-text">{$translate(option.displayText)}</span>
|
||||
<span class="label-text">{$tr(option.displayText)}</span>
|
||||
<input
|
||||
type="radio"
|
||||
name={key}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PlayletApi } from "lib/Api/PlayletApi";
|
||||
import { translate, userPreferencesStore } from "lib/Stores";
|
||||
import { tr, userPreferencesStore } from "lib/Stores";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
const invidiousPublicInstancesLink = `<a class="link" href="https://api.invidious.io" target="_blank" rel="noopener noreferrer">https://api.invidious.io</a>`;
|
||||
@@ -27,10 +27,10 @@
|
||||
</script>
|
||||
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">
|
||||
<!-- TODO:P2 this should not be hardcoded here -->
|
||||
{@html $translate(description).replace(
|
||||
{@html $tr(description).replace(
|
||||
"%INVIDIOUS_PUBLIC_INSTANCES%",
|
||||
invidiousPublicInstancesLink
|
||||
)}
|
||||
@@ -45,8 +45,7 @@
|
||||
class="join-item input w-full mr-1"
|
||||
/>
|
||||
{#if inputValue !== currentValue}
|
||||
<button class="join-item btn" on:click={save}>{$translate("Save")}</button
|
||||
>
|
||||
<button class="join-item btn" on:click={save}>{$tr("Save")}</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,7 +8,7 @@
|
||||
import NumberControl from "./SettingControls/NumberControl.svelte";
|
||||
import ClearCacheControl from "./SettingControls/ClearCacheControl.svelte";
|
||||
import EditQualityControl from "./SettingControls/EditQualityControl.svelte";
|
||||
import { translate } from "lib/Stores";
|
||||
import { tr } from "lib/Stores";
|
||||
|
||||
const textSizes = ["text-2xl", "text-lg", "text-base", "text-sm", "text-xs"];
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
/>
|
||||
{:else}
|
||||
<div class="m-5">
|
||||
<div class={textSizes[level]}>{$translate(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{$translate(description)}</div>
|
||||
<div class={textSizes[level]}>{$tr(displayText)}</div>
|
||||
<div class="text-xs text-gray-500">{$tr(description)}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{#if pref.visibility !== "tv"}
|
||||
<SettingsNode {...pref} />
|
||||
{#if i !== $preferencesModelStore.length - 1}
|
||||
<div class="divider"></div>
|
||||
<div class="divider" />
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
Reference in new issue
Block a user