feat(frontend): add profile page to view stream key
This commit is contained in:
@@ -20,8 +20,6 @@ services:
|
|||||||
- postgres
|
- postgres
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
|
||||||
SPRING_PROFILES_ACTIVE: dev
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${MEDIA_DATA}:/app/data/media
|
- ${MEDIA_DATA}:/app/data/media
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import Home from './pages/Home';
|
|||||||
import {useEffect} from "react";
|
import {useEffect} from "react";
|
||||||
import MyClips from './pages/MyClips';
|
import MyClips from './pages/MyClips';
|
||||||
import VideoPlayer from "./pages/VideoPlayer.tsx";
|
import VideoPlayer from "./pages/VideoPlayer.tsx";
|
||||||
|
import Profile from "./pages/Profile.tsx";
|
||||||
import { GoogleOAuthProvider } from '@react-oauth/google';
|
import { GoogleOAuthProvider } from '@react-oauth/google';
|
||||||
|
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ function App() {
|
|||||||
<Route path="/create/:id" element={<ClipEdit />} />
|
<Route path="/create/:id" element={<ClipEdit />} />
|
||||||
<Route path="/my-clips" element={<MyClips />} />
|
<Route path="/my-clips" element={<MyClips />} />
|
||||||
<Route path="/video/:id" element={<VideoPlayer />} />
|
<Route path="/video/:id" element={<VideoPlayer />} />
|
||||||
|
<Route path="/profile" element={<Profile />} />
|
||||||
</Route>
|
</Route>
|
||||||
</Routes>
|
</Routes>
|
||||||
</Router>
|
</Router>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import SidebarButton from "./buttons/SidebarButton.tsx";
|
import SidebarButton from "./buttons/SidebarButton.tsx";
|
||||||
import { Plus, Film, Home } from 'lucide-react';
|
import { Plus, Film, Home, User as UserIcon } from 'lucide-react';
|
||||||
import Box from "./Box.tsx";
|
import Box from "./Box.tsx";
|
||||||
import type {User} from "../utils/types.ts";
|
import type {User} from "../utils/types.ts";
|
||||||
|
|
||||||
@@ -30,11 +30,18 @@ const Sidebar = ({user, className}: props) => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
{ user && (
|
{ user && (
|
||||||
|
<>
|
||||||
<SidebarButton
|
<SidebarButton
|
||||||
url={"/my-clips"}
|
url={"/my-clips"}
|
||||||
logo={<Film size={20}/>}
|
logo={<Film size={20}/>}
|
||||||
label={"My Clips"}
|
label={"My Clips"}
|
||||||
/>
|
/>
|
||||||
|
<SidebarButton
|
||||||
|
url={"/profile"}
|
||||||
|
logo={<UserIcon size={20}/>}
|
||||||
|
label={"Profile"}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ const Topbar = ({
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Dropdown label={user.name}>
|
<Dropdown label={user.name}>
|
||||||
|
<DropdownItem item="Profile"
|
||||||
|
onClick={() => navigate("/profile")} />
|
||||||
<DropdownItem item="Logout"
|
<DropdownItem item="Logout"
|
||||||
onClick={() => handleLogout()}
|
onClick={() => handleLogout()}
|
||||||
className={"text-red-500 font-medium"} />
|
className={"text-red-500 font-medium"} />
|
||||||
|
|||||||
@@ -17,8 +17,11 @@ type APIResponse = {
|
|||||||
|
|
||||||
type User = {
|
type User = {
|
||||||
name: string,
|
name: string,
|
||||||
|
username: string,
|
||||||
email: string,
|
email: string,
|
||||||
profilePictureUrl: string
|
profilePictureUrl: string,
|
||||||
|
streamKey: string,
|
||||||
|
createdAt: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
type Clip = {
|
type Clip = {
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ RUN apt-get update && \
|
|||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ENV POSTGRES_DATA=/app/db
|
||||||
|
ENV MEDIA_DATA=/app/data/media
|
||||||
|
ENV STREAM_DATA=/app/data/media/streams
|
||||||
|
|
||||||
|
VOLUME ["app/db", "app/data/media/streams", "/app/data/media"]
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/target/*.jar app.jar
|
COPY --from=builder /app/target/*.jar app.jar
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
spring.docker.compose.enabled=false
|
|
||||||
|
|
||||||
spring.datasource.url=jdbc:postgresql://postgres:5432/vodSystem
|
|
||||||
spring.datasource.username=${POSTGRES_USER}
|
|
||||||
spring.datasource.password=${POSTGRES_PASSWORD}
|
|
||||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
|
||||||
spring.jpa.show-sql=true
|
|
||||||
spring.sql.init.mode=always
|
|
||||||
spring.sql.init.schema-locations=classpath:db/schema.sql
|
|
||||||
@@ -1,15 +1 @@
|
|||||||
# Database
|
|
||||||
spring.datasource.url=jdbc:postgresql://localhost:5432/vodSystem
|
|
||||||
spring.datasource.username=${POSTGRES_USER}
|
|
||||||
spring.datasource.password=${POSTGRES_PASSWORD}
|
|
||||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
|
||||||
spring.jpa.show-sql=true
|
|
||||||
spring.sql.init.mode=always
|
|
||||||
spring.sql.init.schema-locations=classpath:db/schema.sql
|
|
||||||
|
|
||||||
# Frontend
|
|
||||||
frontend.url=http://localhost:5173
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
spring.docker.compose.file=docker-compose.dev.yml
|
spring.docker.compose.file=docker-compose.dev.yml
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
spring.application.name=vodSystem
|
spring.application.name=vodSystem
|
||||||
spring.profiles.default=local
|
|
||||||
|
|
||||||
# VODs
|
# VODs
|
||||||
spring.servlet.multipart.max-file-size=2GB
|
spring.servlet.multipart.max-file-size=2GB
|
||||||
@@ -8,6 +7,16 @@ storage.temp.inputs=videos/inputs/
|
|||||||
storage.temp.outputs=videos/outputs/
|
storage.temp.outputs=videos/outputs/
|
||||||
storage.outputs=${MEDIA_DATA}
|
storage.outputs=${MEDIA_DATA}
|
||||||
|
|
||||||
|
# Database
|
||||||
|
spring.datasource.url=${POSTGRES_URL}
|
||||||
|
spring.datasource.username=${POSTGRES_USER}
|
||||||
|
spring.datasource.password=${POSTGRES_PASSWORD}
|
||||||
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
|
spring.jpa.show-sql=true
|
||||||
|
spring.sql.init.mode=always
|
||||||
|
spring.sql.init.schema-locations=classpath:db/schema.sql
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
|
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
|
||||||
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
|
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
|
||||||
@@ -16,5 +25,8 @@ spring.security.oauth2.client.registration.google.scope=profile,email
|
|||||||
jwt.secret.key=${JWT_SECRET_KEY}
|
jwt.secret.key=${JWT_SECRET_KEY}
|
||||||
jwt.expiration=3600000
|
jwt.expiration=3600000
|
||||||
|
|
||||||
|
# Frontend
|
||||||
|
frontend.url=${FRONTEND_URL}
|
||||||
|
|
||||||
## Server Configuration
|
## Server Configuration
|
||||||
server.servlet.session.timeout=30m
|
server.servlet.session.timeout=30m
|
||||||
Reference in New Issue
Block a user