Feature/settings support custom extension repos (#539)

* [Codegen] Support custom extension repos

* [VersionMapping] Require server version "r1444" for preview
This commit is contained in:
schroda
2024-01-06 18:38:16 +01:00
committed by GitHub
parent b42c3103f1
commit 39b79c6ebe
12 changed files with 245 additions and 33 deletions

View File

@@ -22,6 +22,7 @@ import { makeToast } from '@/components/util/Toast.tsx';
interface IProps {
extension: PartialExtension;
handleUpdate: () => void;
usesCustomRepos: boolean;
}
enum ExtensionAction {
@@ -91,8 +92,9 @@ export function ExtensionCard(props: IProps) {
const { t } = useTranslation();
const {
extension: { name, lang, versionName, isInstalled, hasUpdate, isObsolete, pkgName, iconUrl, isNsfw },
extension: { name, lang, versionName, isInstalled, hasUpdate, isObsolete, pkgName, iconUrl, isNsfw, repo },
handleUpdate,
usesCustomRepos,
} = props;
const [installedState, setInstalledState] = useState<InstalledStates>(
getInstalledState(isInstalled, isObsolete, hasUpdate),
@@ -184,6 +186,11 @@ export function ExtensionCard(props: IProps) {
</Typography>
)}
</Typography>
{usesCustomRepos && (
<Typography variant="caption" display="block">
{repo}
</Typography>
)}
</Box>
</Box>