Skip to content

Commit

Permalink
Merge pull request #122 from mykhailodanilenko/feature/video-controls…
Browse files Browse the repository at this point in the history
…-overlay-UI-impl

Add video player
  • Loading branch information
mykhailodanilenko authored Aug 7, 2024
2 parents 166a262 + c468da1 commit 0e59180
Show file tree
Hide file tree
Showing 35 changed files with 902 additions and 686 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-static-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: cd OwnTube.tv/ && npm run test

build_android_apk:
needs: code_quality
needs: [code_quality, build_info]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
path: "./OwnTube.tv/android/app/build/outputs/apk/release/app-release.apk"

deploy_web:
needs: code_quality
needs: [code_quality, build_info]
runs-on: ubuntu-latest
environment:
name: github-pages
Expand Down
1 change: 1 addition & 0 deletions OwnTube.tv/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/dist/*
package.json
app.json
assets/selection.json
2 changes: 0 additions & 2 deletions OwnTube.tv/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { StatusBar } from "expo-status-bar";
import RootLayout from "./app/_layout";

export default function App() {
return (
<>
<StatusBar style="auto" />
<RootLayout />
</>
);
Expand Down
8 changes: 7 additions & 1 deletion OwnTube.tv/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@
"fonts": ["assets/fonts/icomoon.ttf"]
}
],
"expo-localization"
"expo-localization",
[
"expo-screen-orientation",
{
"initialOrientation": "DEFAULT"
}
]
]
}
}
69 changes: 37 additions & 32 deletions OwnTube.tv/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link, Stack, useLocalSearchParams } from "expo-router";
import { Platform, StyleSheet } from "react-native";
import { ROUTES, STORAGE } from "../types";
import { DarkTheme, DefaultTheme, ThemeProvider } from "@react-navigation/native";
import { ThemeProvider } from "@react-navigation/native";
import { AppConfigContextProvider, ColorSchemeContextProvider, useColorSchemeContext } from "../contexts";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
Expand All @@ -24,50 +24,55 @@ import {
Inter_900Black,
} from "@expo-google-fonts/inter";
import { IcoMoonIcon } from "../components";
import { colorSchemes } from "../theme";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { StatusBar } from "expo-status-bar";

const RootStack = () => {
const { backend } = useLocalSearchParams();
const { scheme } = useColorSchemeContext();
const theme = scheme === "dark" ? DarkTheme : DefaultTheme;
const theme = scheme === "dark" ? colorSchemes.dark : colorSchemes.light;
const { t, i18n } = useTranslation();

useEffect(() => {
readFromAsyncStorage(STORAGE.LOCALE).then(i18n.changeLanguage);
}, []);

return (
<ThemeProvider value={theme}>
<Stack
screenOptions={{
headerTitle: ({ children }) => <ClickableHeaderText>{children}</ClickableHeaderText>,
}}
>
<Stack.Screen
name={"(home)/index"}
options={{
headerBackVisible: false,
title: t("appName"),
headerLeft: () => <></>,
headerRight: () => <></>,
<>
<StatusBar style={scheme === "dark" ? "light" : "dark"} />
<ThemeProvider value={theme}>
<Stack
screenOptions={{
headerTitle: ({ children }) => <ClickableHeaderText>{children}</ClickableHeaderText>,
}}
/>
<Stack.Screen
options={{
title: t("settingsPageTitle"),
headerBackVisible: false,
headerLeft: () => (
<Link style={styles.headerButtonLeft} href={{ pathname: "/", params: { backend } }}>
<IcoMoonIcon name="Home" size={24} color={theme.colors.primary} />
</Link>
),
}}
name={`(home)/${ROUTES.SETTINGS}`}
/>
<Stack.Screen options={{ title: t("videoPageTitle"), headerShown: false }} name={`(home)/video`} />
</Stack>
<Toast config={{ buildInfo: () => <BuildInfoToast /> }} />
</ThemeProvider>
>
<Stack.Screen
name={"(home)/index"}
options={{
headerBackVisible: false,
title: t("appName"),
headerLeft: () => <></>,
headerRight: () => <></>,
}}
/>
<Stack.Screen
options={{
title: t("settingsPageTitle"),
headerBackVisible: false,
headerLeft: () => (
<Link style={styles.headerButtonLeft} href={{ pathname: "/", params: { backend } }}>
<IcoMoonIcon name="Home" size={24} color={theme.colors.primary} />
</Link>
),
}}
name={`(home)/${ROUTES.SETTINGS}`}
/>
<Stack.Screen options={{ title: t("videoPageTitle"), headerShown: false }} name={`(home)/video`} />
</Stack>
<Toast config={{ buildInfo: () => <BuildInfoToast /> }} />
</ThemeProvider>
</>
);
};

Expand Down
Binary file modified OwnTube.tv/assets/fonts/icomoon.ttf
Binary file not shown.
Loading

0 comments on commit 0e59180

Please sign in to comment.