mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-07 14:55:16 -04:00
Upgrade to expo 56 (#1515)
This commit is contained in:
@@ -158,6 +158,7 @@ func (h *Handler) OidcLogged(c *echo.Context) error {
|
||||
// @Param provider path string true "OIDC provider id" Example(google)
|
||||
// @Param token query string true "Opaque token returned by /oidc/logged/:provider"
|
||||
// @Param tenant query string false "Optional tenant passthrough for federated setups"
|
||||
// @Param device query string false "The device the created session will be used on" example(android tv)
|
||||
// @Param Authorization header string false "Bearer token to link provider to current account"
|
||||
// @Success 201 {object} SessionWToken
|
||||
// @Failure 404 {object} KError "Unknown OIDC provider"
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ func (h *Handler) createSession(c *echo.Context, user *User) error {
|
||||
return err
|
||||
}
|
||||
|
||||
dev := cmp.Or(c.Param("device"), c.Request().Header.Get("User-Agent"))
|
||||
dev := cmp.Or(c.QueryParam("device"), c.Request().Header.Get("User-Agent"))
|
||||
device := &dev
|
||||
if dev == "" {
|
||||
device = nil
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
dist/
|
||||
uniwind-types.d.ts
|
||||
# dependencies
|
||||
node_modules
|
||||
.pnp
|
||||
@@ -50,4 +51,4 @@ apps/web/next-env.d.ts
|
||||
# The following patterns were generated by expo-cli
|
||||
|
||||
expo-env.d.ts
|
||||
# @end expo-cli
|
||||
# @end expo-cli
|
||||
|
||||
+223
-367
File diff suppressed because it is too large
Load Diff
+30
-32
@@ -19,62 +19,60 @@
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
||||
"@expo-google-fonts/poppins": "^0.4.1",
|
||||
"@expo-google-fonts/sora": "^0.4.2",
|
||||
"@expo/html-elements": "^55.0.3",
|
||||
"@expo/html-elements": "^56.0.1",
|
||||
"@gorhom/portal": "^1.0.14",
|
||||
"@legendapp/list": "zoriya/legend-list#beta56",
|
||||
"@material-symbols/svg-400": "^0.44.8",
|
||||
"@material-symbols/svg-400": "^0.44.9",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
||||
"@radix-ui/react-popover": "^1.1.15",
|
||||
"@radix-ui/react-select": "^2.2.6",
|
||||
"@react-navigation/bottom-tabs": "^7.15.5",
|
||||
"@react-navigation/material-top-tabs": "^7.4.27",
|
||||
"@react-navigation/native": "^7.1.33",
|
||||
"@tanstack/react-query": "^5.100.11",
|
||||
"@tanstack/react-query-devtools": "^5.100.11",
|
||||
"@tanstack/react-query": "^5.100.14",
|
||||
"@tanstack/react-query-devtools": "^5.100.14",
|
||||
"@types/langmap": "^0.0.3",
|
||||
"clsx": "^2.1.1",
|
||||
"expo": "~55.0.25",
|
||||
"expo-build-properties": "~55.0.14",
|
||||
"expo-constants": "~55.0.16",
|
||||
"expo-dev-client": "~55.0.35",
|
||||
"expo-font": "^55.0.8",
|
||||
"expo-image": "~55.0.10",
|
||||
"expo-image-picker": "^55.0.20",
|
||||
"expo-linear-gradient": "~55.0.14",
|
||||
"expo-linking": "~55.0.15",
|
||||
"expo-localization": "~55.0.15",
|
||||
"expo-router": "~55.0.15",
|
||||
"expo-splash-screen": "~55.0.21",
|
||||
"expo-status-bar": "~55.0.6",
|
||||
"expo-updates": "~55.0.23",
|
||||
"expo": "~56.0.4",
|
||||
"expo-build-properties": "~56.0.14",
|
||||
"expo-constants": "~56.0.15",
|
||||
"expo-dev-client": "~56.0.15",
|
||||
"expo-font": "^56.0.5",
|
||||
"expo-image": "~56.0.9",
|
||||
"expo-image-picker": "^56.0.13",
|
||||
"expo-linear-gradient": "~56.0.4",
|
||||
"expo-linking": "~56.0.11",
|
||||
"expo-localization": "~56.0.6",
|
||||
"expo-router": "~56.2.6",
|
||||
"expo-splash-screen": "~56.0.10",
|
||||
"expo-status-bar": "~56.0.4",
|
||||
"expo-updates": "~56.0.16",
|
||||
"i18next-browser-languagedetector": "^8.2.1",
|
||||
"i18next-http-backend": "^4.0.0",
|
||||
"jassub": "^1.8.8",
|
||||
"langmap": "^0.0.16",
|
||||
"libpgs": "^0.8.1",
|
||||
"react": "19.2.0",
|
||||
"react-dom": "19.2.0",
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
"react-i18next": "^17.0.8",
|
||||
"react-native": "0.83.6",
|
||||
"react-native": "0.85.3",
|
||||
"react-native-get-random-values": "^2.0.0",
|
||||
"react-native-localization-settings": "^1.2.0",
|
||||
"react-native-mmkv": "^4.3.1",
|
||||
"react-native-nitro-modules": "^0.35.7",
|
||||
"react-native-pager-view": "8.0.0",
|
||||
"react-native-reanimated": "4.2.1",
|
||||
"react-native-safe-area-context": "~5.6.2",
|
||||
"react-native-screens": "~4.23.0",
|
||||
"react-native-svg": "15.15.3",
|
||||
"react-native-pager-view": "8.0.1",
|
||||
"react-native-reanimated": "4.3.1",
|
||||
"react-native-safe-area-context": "~5.7.0",
|
||||
"react-native-screens": "~4.25.2",
|
||||
"react-native-svg": "15.15.4",
|
||||
"react-native-svg-transformer": "^1.5.3",
|
||||
"react-native-tab-view": "^4.3.0",
|
||||
"react-native-video": "zoriya/react-native-video#v7-b8",
|
||||
"react-native-web": "^0.21.2",
|
||||
"react-native-worklets": "0.7.4",
|
||||
"react-native-worklets": "0.8.3",
|
||||
"react-tooltip": "^6.0.4",
|
||||
"react-use-websocket": "^4.13.0",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tailwindcss": "^4.3.0",
|
||||
"tsx": "^4.22.3",
|
||||
"uniwind": "^1.6.5",
|
||||
"uniwind": "^1.7.0",
|
||||
"uuid": "^14.0.0",
|
||||
"video.js": "^8.23.7",
|
||||
"zod": "^4.4.3"
|
||||
@@ -84,7 +82,7 @@
|
||||
"@types/bun": "^1.3.14",
|
||||
"@types/react": "~19.2.15",
|
||||
"@types/react-dom": "~19.2.3",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"expo": {
|
||||
"doctor": {
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import { Slot, withLayoutContext } from "expo-router";
|
||||
import {
|
||||
createMaterialTopTabNavigator,
|
||||
type MaterialTopTabNavigationEventMap,
|
||||
type MaterialTopTabNavigationOptions,
|
||||
} from "@react-navigation/material-top-tabs";
|
||||
import type {
|
||||
NavigationProp,
|
||||
ParamListBase,
|
||||
TabNavigationState,
|
||||
} from "@react-navigation/native";
|
||||
import { useFocusEffect, useNavigation } from "@react-navigation/native";
|
||||
import { Slot, withLayoutContext } from "expo-router";
|
||||
} from "expo-router/js-top-tabs";
|
||||
import {
|
||||
type NavigationProp,
|
||||
type ParamListBase,
|
||||
type TabNavigationState,
|
||||
useFocusEffect,
|
||||
useNavigation,
|
||||
} from "expo-router/react-navigation";
|
||||
import { useCallback } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Platform } from "react-native";
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
declare module "*.css" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "*.svg" {
|
||||
import type React from "react";
|
||||
import type { SvgProps } from "react-native-svg";
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Image as EImage } from "expo-image";
|
||||
import KyooLogo from "public/icon.svg";
|
||||
import type { ComponentProps } from "react";
|
||||
import { type ImageStyle, Platform, View, type ViewProps } from "react-native";
|
||||
import { withUniwind } from "uniwind";
|
||||
import type { KImage } from "~/models";
|
||||
import { useToken } from "~/providers/account-context";
|
||||
import { cn } from "~/utils";
|
||||
import KyooLogo from "~public/icon.svg";
|
||||
import { Skeleton } from "../skeleton";
|
||||
|
||||
const Img = withUniwind(EImage);
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { usePortal } from "@gorhom/portal";
|
||||
import Close from "@material-symbols/svg-400/rounded/close.svg";
|
||||
import { usePathname } from "expo-router";
|
||||
import { type ReactNode, useCallback, useEffect, useState } from "react";
|
||||
import {
|
||||
type ReactNode,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { Pressable, ScrollView, View } from "react-native";
|
||||
import { cn } from "~/utils";
|
||||
import { Icon, IconButton, type Icon as IconType } from "./icons";
|
||||
@@ -23,13 +29,6 @@ export const Overlay = ({
|
||||
scroll?: boolean;
|
||||
className?: string;
|
||||
}) => {
|
||||
const pathname = usePathname();
|
||||
|
||||
useEffect(() => {
|
||||
pathname;
|
||||
close?.();
|
||||
}, [pathname, close]);
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
className="absolute inset-0 cursor-default! items-center justify-center bg-black/60 max-md:px-4"
|
||||
@@ -78,6 +77,16 @@ export const Popup = ({
|
||||
scroll?: boolean;
|
||||
className?: string;
|
||||
}) => {
|
||||
const pathname = usePathname();
|
||||
const prevPathname = useRef(pathname);
|
||||
|
||||
useEffect(() => {
|
||||
if (prevPathname.current !== pathname) {
|
||||
prevPathname.current = pathname;
|
||||
close?.();
|
||||
}
|
||||
}, [pathname, close]);
|
||||
|
||||
return (
|
||||
<Overlay icon={icon} title={title} close={close} scroll={scroll} {...props}>
|
||||
{children}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { PortalProvider } from "@gorhom/portal";
|
||||
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
||||
import {
|
||||
DefaultTheme,
|
||||
ThemeProvider as RNThemeProvider,
|
||||
} from "@react-navigation/native";
|
||||
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
||||
} from "expo-router/react-navigation";
|
||||
import { type ReactNode, useState } from "react";
|
||||
import { SafeAreaListener } from "react-native-safe-area-context";
|
||||
import {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { RetryableError } from "~/models/retryable-error";
|
||||
import { Button, H1, P } from "~/primitives";
|
||||
import "../global.css";
|
||||
import "~/fonts.web.css";
|
||||
import { Header, SafeAreaProviderCompat } from "@react-navigation/elements";
|
||||
import { Header, SafeAreaProviderCompat } from "expo-router/react-navigation";
|
||||
import { useCSSVariable } from "uniwind";
|
||||
import { NavbarProfile, NavbarTitle } from "~/ui/navbar";
|
||||
|
||||
|
||||
@@ -38,9 +38,11 @@ export const FormPage = ({
|
||||
return (
|
||||
<ImageBackground
|
||||
source={{ uri: `${apiUrl ?? defaultApiUrl}/api/shows/random/thumbnail` }}
|
||||
className="h-lvw w-lvw flex-1 flex-row overflow-x-hidden bg-popover"
|
||||
className="flex-1 flex-row overflow-x-hidden bg-popover"
|
||||
>
|
||||
<SvgBlob className="absolute top-0 left-0" />
|
||||
<View className="absolute inset-0 overflow-hidden">
|
||||
<SvgBlob />
|
||||
</View>
|
||||
<ScrollView className="pr-6">
|
||||
<View
|
||||
className={cn(
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Platform } from "react-native";
|
||||
import { z } from "zod/v4";
|
||||
import { type Account, type KyooError, User } from "~/models";
|
||||
import { capitalize } from "~/primitives";
|
||||
import { defaultApiUrl } from "~/providers/account-provider";
|
||||
import {
|
||||
addAccount,
|
||||
@@ -29,9 +31,11 @@ export const login = async (
|
||||
try {
|
||||
const controller = new AbortController();
|
||||
setTimeout(() => controller.abort(), 5_000);
|
||||
const device =
|
||||
Platform.OS === "web" ? "" : `?device=${capitalize(Platform.OS)} App`;
|
||||
const { token } = await queryFn({
|
||||
method: "POST",
|
||||
url: `${apiUrl}/auth/${action === "login" ? "sessions" : "users"}`,
|
||||
url: `${apiUrl}/auth/${action === "login" ? "sessions" : "users"}${device}`,
|
||||
body,
|
||||
authToken: null,
|
||||
signal: controller.signal,
|
||||
@@ -60,9 +64,11 @@ export const oidcLogin = async (
|
||||
) => {
|
||||
apiUrl ??= defaultApiUrl;
|
||||
try {
|
||||
const device =
|
||||
Platform.OS === "web" ? "" : `?device=${capitalize(Platform.OS)} App`;
|
||||
const { token } = await queryFn({
|
||||
method: "GET",
|
||||
url: `${apiUrl}/auth/oidc/callback/${provider}?token=${code}`,
|
||||
url: `${apiUrl}/auth/oidc/callback/${provider}?token=${code}${device}`,
|
||||
authToken: linkToToken,
|
||||
parser: linkToToken ? null : z.object({ token: z.string() }),
|
||||
});
|
||||
|
||||
@@ -8,9 +8,8 @@ import Person from "@material-symbols/svg-400/rounded/person-fill.svg";
|
||||
import Play from "@material-symbols/svg-400/rounded/play_arrow-fill.svg";
|
||||
import Search from "@material-symbols/svg-400/rounded/search-fill.svg";
|
||||
import Settings from "@material-symbols/svg-400/rounded/settings.svg";
|
||||
import { useIsFocused } from "@react-navigation/native";
|
||||
import { useNavigation, usePathname, useRouter } from "expo-router";
|
||||
import KyooLongLogo from "public/icon-long.svg";
|
||||
import { useIsFocused } from "expo-router/react-navigation";
|
||||
import {
|
||||
type ComponentProps,
|
||||
type ComponentType,
|
||||
@@ -49,6 +48,7 @@ import {
|
||||
import { useAccount, useAccounts } from "~/providers/account-context";
|
||||
import { logout } from "~/ui/login/logic";
|
||||
import { cn, useQueryState } from "~/utils";
|
||||
import KyooLongLogo from "~public/icon-long.svg";
|
||||
|
||||
export const NavbarLeft = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -44,7 +44,6 @@ export const toggleFullscreen = async (set?: boolean) => {
|
||||
try {
|
||||
if (set) {
|
||||
await document.body.requestFullscreen({ navigationUI: "hide" });
|
||||
// @ts-expect-error Firefox does not support this so ts complains
|
||||
await screen.orientation.lock("landscape");
|
||||
} else {
|
||||
if (document.fullscreenElement) await document.exitFullscreen();
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
"~/*": ["./src/*"],
|
||||
"~public/*": ["./public/*"]
|
||||
},
|
||||
"strict": true,
|
||||
"rootDir": ".",
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// NOTE: This file is generated by uniwind and it should not be edited manually.
|
||||
/// <reference types="uniwind/types" />
|
||||
|
||||
declare module "uniwind" {
|
||||
export interface UniwindConfig {
|
||||
themes: readonly ["light", "dark"];
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user