mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-04 03:27:14 -05:00 
			
		
		
		
	Format code
This commit is contained in:
		
							parent
							
								
									a09e229711
								
							
						
					
					
						commit
						a7fd96800a
					
				@ -75,8 +75,7 @@ namespace Kyoo.Authentication
 | 
			
		||||
						.GetValue("DEFAULT_PERMISSIONS", "overall.read")!
 | 
			
		||||
						.Split(','),
 | 
			
		||||
					PublicUrl =
 | 
			
		||||
						_configuration.GetValue<string?>("PUBLIC_URL")
 | 
			
		||||
						?? "http://localhost:8901",
 | 
			
		||||
						_configuration.GetValue<string?>("PUBLIC_URL") ?? "http://localhost:8901",
 | 
			
		||||
					ApiKeys = _configuration.GetValue("KYOO_APIKEYS", string.Empty)!.Split(','),
 | 
			
		||||
					OIDC = _configuration
 | 
			
		||||
						.AsEnumerable()
 | 
			
		||||
 | 
			
		||||
@ -24,9 +24,18 @@ namespace Kyoo.Authentication.Models.DTO;
 | 
			
		||||
public class JwtProfile
 | 
			
		||||
{
 | 
			
		||||
	public string Sub { get; set; }
 | 
			
		||||
	public string Uid { set => Sub = value; }
 | 
			
		||||
	public string Id { set => Sub = value; }
 | 
			
		||||
	public string Guid { set => Sub = value; }
 | 
			
		||||
	public string Uid
 | 
			
		||||
	{
 | 
			
		||||
		set => Sub = value;
 | 
			
		||||
	}
 | 
			
		||||
	public string Id
 | 
			
		||||
	{
 | 
			
		||||
		set => Sub = value;
 | 
			
		||||
	}
 | 
			
		||||
	public string Guid
 | 
			
		||||
	{
 | 
			
		||||
		set => Sub = value;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public string? Name { get; set; }
 | 
			
		||||
	public string? Username { get; set; }
 | 
			
		||||
 | 
			
		||||
@ -95,7 +95,8 @@ public class OidcProvider
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public static readonly Dictionary<string, OidcProvider> KnownProviders = new()
 | 
			
		||||
	public static readonly Dictionary<string, OidcProvider> KnownProviders =
 | 
			
		||||
		new()
 | 
			
		||||
		{
 | 
			
		||||
			["google"] = new("google")
 | 
			
		||||
			{
 | 
			
		||||
 | 
			
		||||
@ -22,4 +22,3 @@ import { OidcCallbackPage } from "@kyoo/ui";
 | 
			
		||||
import { withRoute } from "~/router";
 | 
			
		||||
 | 
			
		||||
export default withRoute(OidcCallbackPage);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ export const Button = forwardRef(function Button<AsProps = PressableProps>(
 | 
			
		||||
		as,
 | 
			
		||||
		...props
 | 
			
		||||
	}: {
 | 
			
		||||
		children?: ReactElement | Falsy;
 | 
			
		||||
		children?: ReactElement | ReactElement[] | Falsy;
 | 
			
		||||
		text?: string;
 | 
			
		||||
		licon?: ReactElement | Falsy;
 | 
			
		||||
		icon?: ReactElement | Falsy;
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@
 | 
			
		||||
 * along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
import { WatchInfo, kyooApiUrl, queryFn, toQueryKey } from "@kyoo/models";
 | 
			
		||||
import { WatchInfo, getCurrentApiUrl, queryFn, toQueryKey } from "@kyoo/models";
 | 
			
		||||
import { Player } from "../player";
 | 
			
		||||
import { getCurrentAccount } from "@kyoo/models/src/account-internal";
 | 
			
		||||
import { ReactNode } from "react";
 | 
			
		||||
@ -41,7 +41,7 @@ export const useDownloader = () => {
 | 
			
		||||
		// TODO: This methods does not work with auth.
 | 
			
		||||
		const a = document.createElement("a");
 | 
			
		||||
		a.style.display = "none";
 | 
			
		||||
		a.href = `${kyooApiUrl}/${type}/${slug}/direct`;
 | 
			
		||||
		a.href = `${getCurrentApiUrl()!}/${type}/${slug}/direct`;
 | 
			
		||||
		a.download = `${slug}.${info.extension}`;
 | 
			
		||||
		document.body.appendChild(a);
 | 
			
		||||
		a.click();
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,7 @@ import { useYoshiki } from "yoshiki/native";
 | 
			
		||||
export const ErrorView = ({ error }: { error: KyooErrors }) => {
 | 
			
		||||
	const { css } = useYoshiki();
 | 
			
		||||
 | 
			
		||||
	console.log(error)
 | 
			
		||||
	console.log(error);
 | 
			
		||||
	return (
 | 
			
		||||
		<View
 | 
			
		||||
			{...css({
 | 
			
		||||
 | 
			
		||||
@ -47,7 +47,6 @@ export const ServerUrlPage: QueryPage = () => {
 | 
			
		||||
	const { t } = useTranslation();
 | 
			
		||||
	const { css } = useYoshiki();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	return (
 | 
			
		||||
		<View
 | 
			
		||||
			{...css({
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user