diff --git a/.github/workflows/deploying.yml b/.github/workflows/deploying.yml
index ebf9d131..e07a60a5 100644
--- a/.github/workflows/deploying.yml
+++ b/.github/workflows/deploying.yml
@@ -173,7 +173,7 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
- platforms: linux/amd64,linux/arm64,linux/arm
+ platforms: linux/amd64,linux/arm64
context: .
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json
index e461eb82..4db7eeaa 100644
--- a/src/assets/locales/en.json
+++ b/src/assets/locales/en.json
@@ -416,14 +416,14 @@
}
},
"server": {
- "description": "If you would like to connect to a custom backend to store your data, enable this and provide the URL.",
+ "description": "If you would like to connect to a custom backend to store your data, enable this and provide the URL. <0>Instructions.0>",
"label": "Custom server",
"urlLabel": "Custom server URL"
},
"title": "Connections",
"workers": {
"addButton": "Add new worker",
- "description": "To make the application function, all traffic is routed through proxies. Enable this if you want to bring your own workers.",
+ "description": "To make the application function, all traffic is routed through proxies. Enable this if you want to bring your own workers. <0>Instructions.0>",
"emptyState": "No workers yet, add one below",
"label": "Use custom proxy workers",
"urlLabel": "Worker URLs",
diff --git a/src/components/buttons/Button.tsx b/src/components/buttons/Button.tsx
index ed0eebf8..70e2c780 100644
--- a/src/components/buttons/Button.tsx
+++ b/src/components/buttons/Button.tsx
@@ -41,7 +41,7 @@ export function Button(props: Props) {
props.padding ?? "px-4 py-3",
props.className,
colorClasses,
- props.disabled ? "cursor-not-allowed bg-opacity-60 text-opacity-60" : null,
+ props.disabled ? "!cursor-not-allowed bg-opacity-60 text-opacity-60" : null,
);
if (props.disabled)
diff --git a/src/components/player/atoms/settings/CaptionsView.tsx b/src/components/player/atoms/settings/CaptionsView.tsx
index dc9a112f..09ab5685 100644
--- a/src/components/player/atoms/settings/CaptionsView.tsx
+++ b/src/components/player/atoms/settings/CaptionsView.tsx
@@ -75,6 +75,7 @@ function CustomCaptionOption() {
setCaption({
language: "custom",
srtData: converted,
+ id: "custom-caption",
});
setCustomSubs();
});
@@ -115,39 +116,38 @@ function useSubtitleList(subs: CaptionListItem[], searchQuery: string) {
export function CaptionsView({ id }: { id: string }) {
const { t } = useTranslation();
const router = useOverlayRouter(id);
- const lang = usePlayerStore((s) => s.caption.selected?.language);
+ const selectedCaptionId = usePlayerStore((s) => s.caption.selected?.id);
const [currentlyDownloading, setCurrentlyDownloading] = useState<
string | null
>(null);
- const { selectLanguage, disable } = useCaptions();
+ const { selectCaptionById, disable } = useCaptions();
const captionList = usePlayerStore((s) => s.captionList);
const [searchQuery, setSearchQuery] = useState("");
const subtitleList = useSubtitleList(captionList, searchQuery);
const [downloadReq, startDownload] = useAsyncFn(
- async (language: string) => {
- setCurrentlyDownloading(language);
- return selectLanguage(language);
+ async (captionId: string) => {
+ setCurrentlyDownloading(captionId);
+ return selectCaptionById(captionId);
},
- [selectLanguage, setCurrentlyDownloading],
+ [selectCaptionById, setCurrentlyDownloading],
);
const content = subtitleList.map((v, i) => {
return (
startDownload(v.language)}
+ onClick={() => startDownload(v.id)}
>
{v.languageName}
@@ -176,7 +176,7 @@ export function CaptionsView({ id }: { id: string }) {
- disable()} selected={!lang}>
+ disable()} selected={!selectedCaptionId}>
{t("player.menus.subtitles.offChoice")}
diff --git a/src/components/player/display/displayInterface.ts b/src/components/player/display/displayInterface.ts
index 604bdeca..8ba8480a 100644
--- a/src/components/player/display/displayInterface.ts
+++ b/src/components/player/display/displayInterface.ts
@@ -41,6 +41,7 @@ export interface DisplayMeta {
}
export interface DisplayCaption {
+ id: string;
srtData: string;
language: string;
url?: string;
diff --git a/src/components/player/hooks/useCaptions.ts b/src/components/player/hooks/useCaptions.ts
index 9f96c41c..458c704a 100644
--- a/src/components/player/hooks/useCaptions.ts
+++ b/src/components/player/hooks/useCaptions.ts
@@ -14,22 +14,32 @@ export function useCaptions() {
const lastSelectedLanguage = useSubtitleStore((s) => s.lastSelectedLanguage);
const captionList = usePlayerStore((s) => s.captionList);
- const selectLanguage = useCallback(
- async (language: string) => {
- const caption = captionList.find((v) => v.language === language);
+ const selectCaptionById = useCallback(
+ async (captionId: string) => {
+ const caption = captionList.find((v) => v.id === captionId);
if (!caption) return;
const srtData = await downloadCaption(caption);
setCaption({
+ id: caption.id,
language: caption.language,
srtData,
url: caption.url,
});
resetSubtitleSpecificSettings();
- setLanguage(language);
+ setLanguage(caption.language);
},
[setLanguage, captionList, setCaption, resetSubtitleSpecificSettings],
);
+ const selectLanguage = useCallback(
+ async (language: string) => {
+ const caption = captionList.find((v) => v.language === language);
+ if (!caption) return;
+ return selectCaptionById(caption.id);
+ },
+ [captionList, selectCaptionById],
+ );
+
const disable = useCallback(async () => {
setCaption(null);
setLanguage(null);
@@ -56,5 +66,6 @@ export function useCaptions() {
selectLastUsedLanguage,
toggleLastUsed,
selectLastUsedLanguageIfEnabled,
+ selectCaptionById,
};
}
diff --git a/src/components/player/utils/captions.ts b/src/components/player/utils/captions.ts
index abccee9f..bc2079db 100644
--- a/src/components/player/utils/captions.ts
+++ b/src/components/player/utils/captions.ts
@@ -80,6 +80,7 @@ export function convertProviderCaption(
captions: RunOutput["stream"]["captions"],
): CaptionListItem[] {
return captions.map((v) => ({
+ id: v.id,
language: v.language,
url: v.url,
needsProxy: v.hasCorsRestrictions,
diff --git a/src/pages/parts/auth/AccountCreatePart.tsx b/src/pages/parts/auth/AccountCreatePart.tsx
index 674a3be6..6f8b9ad4 100644
--- a/src/pages/parts/auth/AccountCreatePart.tsx
+++ b/src/pages/parts/auth/AccountCreatePart.tsx
@@ -5,7 +5,6 @@ import { Avatar } from "@/components/Avatar";
import { Button } from "@/components/buttons/Button";
import { ColorPicker, initialColor } from "@/components/form/ColorPicker";
import { IconPicker, initialIcon } from "@/components/form/IconPicker";
-import { Icon, Icons } from "@/components/Icon";
import {
LargeCard,
LargeCardButtons,
diff --git a/src/pages/parts/settings/ConnectionsPart.tsx b/src/pages/parts/settings/ConnectionsPart.tsx
index 8a01f2b3..9b693e9f 100644
--- a/src/pages/parts/settings/ConnectionsPart.tsx
+++ b/src/pages/parts/settings/ConnectionsPart.tsx
@@ -1,10 +1,11 @@
import { Dispatch, SetStateAction, useCallback } from "react";
-import { useTranslation } from "react-i18next";
+import { Trans, useTranslation } from "react-i18next";
import { Button } from "@/components/buttons/Button";
import { Toggle } from "@/components/buttons/Toggle";
import { Icon, Icons } from "@/components/Icon";
import { SettingsCard } from "@/components/layout/SettingsCard";
+import { MwLink } from "@/components/text/Link";
import { AuthInputBox } from "@/components/text-inputs/AuthInputBox";
import { Divider } from "@/components/utils/Divider";
import { Heading1 } from "@/components/utils/Text";
@@ -53,7 +54,11 @@ function ProxyEdit({ proxyUrls, setProxyUrls }: ProxyEditProps) {
{t("settings.connections.workers.label")}
- {t("settings.connections.workers.description")}
+
+
+ Proxy documentation
+
+
@@ -119,7 +124,11 @@ function BackendEdit({ backendUrl, setBackendUrl }: BackendEditProps) {
{t("settings.connections.server.label")}
- {t("settings.connections.server.description")}
+
+
+ Backend documentation
+
+
diff --git a/src/stores/player/slices/source.ts b/src/stores/player/slices/source.ts
index 441c55f6..0312b8b0 100644
--- a/src/stores/player/slices/source.ts
+++ b/src/stores/player/slices/source.ts
@@ -42,12 +42,14 @@ export interface PlayerMeta {
}
export interface Caption {
+ id: string;
language: string;
url?: string;
srtData: string;
}
export interface CaptionListItem {
+ id: string;
language: string;
url: string;
needsProxy: boolean;