Spaces:
Sleeping
Sleeping
working to improve the clap format
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- src/app/api/media/[mediaId]/route.ts +1 -1
- src/app/api/video/[videoId]/route.ts +1 -1
- src/app/layout.tsx +1 -1
- src/app/main.tsx +12 -10
- src/app/server/actions/ai-tube-hf/deleteFileFromDataset.ts +1 -1
- src/app/server/actions/ai-tube-hf/downloadClapProject.ts +3 -3
- src/app/server/actions/ai-tube-hf/downloadFileAsBlob.ts +1 -1
- src/app/server/actions/ai-tube-hf/downloadFileAsText.ts +1 -1
- src/app/server/actions/ai-tube-hf/getCredentials.ts +1 -1
- src/app/server/actions/ai-tube-hf/getPrivateChannels.ts +1 -1
- src/app/server/actions/ai-tube-hf/getVideoRequestsFromChannel.ts +1 -1
- src/app/server/actions/ai-tube-hf/parseChannel.ts +1 -1
- src/app/server/actions/ai-tube-hf/uploadVideoRequestToDataset.ts +1 -1
- src/app/server/actions/comments.ts +1 -1
- src/app/server/actions/config.ts +1 -1
- src/app/server/actions/stats.ts +1 -1
- src/app/server/actions/users.ts +1 -1
- src/app/server/actions/utils/censorship.ts +1 -1
- src/app/state/useStore.ts +2 -2
- src/app/views/home-view/index.tsx +3 -3
- src/app/views/not-found-view/index.tsx +1 -1
- src/app/views/public-channel-view/index.tsx +3 -3
- src/app/views/public-channels-view/index.tsx +2 -2
- src/app/views/{public-video-embed-view β public-media-embed-view}/index.tsx +3 -3
- src/app/views/{public-video-view β public-media-view}/index.tsx +11 -12
- src/app/views/public-music-videos-view/index.tsx +4 -4
- src/app/views/report-modal/index.tsx +1 -1
- src/app/views/user-account-view/index.tsx +2 -2
- src/app/views/user-channel-view/index.tsx +2 -2
- src/{app β components}/interface/about/index.tsx +1 -1
- src/{app β components}/interface/action-button/index.tsx +1 -1
- src/{app β components}/interface/channel-card/index.tsx +2 -2
- src/{app β components}/interface/channel-list/index.tsx +1 -1
- src/{app β components}/interface/collection-card/index.tsx +5 -5
- src/{app β components}/interface/collection-list/index.tsx +1 -1
- src/{app β components}/interface/comment-card/index.tsx +2 -2
- src/{app β components}/interface/comment-card/time-seeker.tsx +0 -0
- src/{app β components}/interface/comment-list/index.tsx +1 -1
- src/{app β components}/interface/default-avatar/impl.tsx +0 -0
- src/{app β components}/interface/default-avatar/index.tsx +0 -0
- src/{app β components}/interface/equirectangular-video-player/index.tsx +1 -1
- src/{app β components}/interface/equirectangular-video-player/viewer.tsx +1 -1
- src/{app β components}/interface/fonts/index.tsx +0 -0
- src/{app β components}/interface/gsplat/index.tsx +0 -0
- src/components/interface/latent-engine/index.tsx +36 -0
- src/components/interface/latent-engine/useLatentEngine.ts +26 -0
- src/{app β components}/interface/left-menu/index.tsx +3 -3
- src/{app β components}/interface/left-menu/menu-item/index.tsx +1 -1
- src/{app β components}/interface/like-button/generic.tsx +2 -2
- src/{app β components}/interface/like-button/index.tsx +0 -0
src/app/api/media/[mediaId]/route.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import { NextResponse, NextRequest } from "next/server"
|
2 |
|
3 |
import { getVideo } from "@/app/server/actions/ai-tube-hf/getVideo"
|
4 |
-
import { parseMediaProjectionType } from "@/lib/parseMediaProjectionType";
|
5 |
|
6 |
export async function GET(req: NextRequest) {
|
7 |
const mediaId = req.url.split("/").pop() || ""
|
|
|
1 |
import { NextResponse, NextRequest } from "next/server"
|
2 |
|
3 |
import { getVideo } from "@/app/server/actions/ai-tube-hf/getVideo"
|
4 |
+
import { parseMediaProjectionType } from "@/lib/utils/parseMediaProjectionType";
|
5 |
|
6 |
export async function GET(req: NextRequest) {
|
7 |
const mediaId = req.url.split("/").pop() || ""
|
src/app/api/video/[videoId]/route.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import { NextResponse, NextRequest } from "next/server"
|
2 |
|
3 |
import { getVideo } from "@/app/server/actions/ai-tube-hf/getVideo"
|
4 |
-
import { parseMediaProjectionType } from "@/lib/parseMediaProjectionType";
|
5 |
|
6 |
/**
|
7 |
* @deprecated
|
|
|
1 |
import { NextResponse, NextRequest } from "next/server"
|
2 |
|
3 |
import { getVideo } from "@/app/server/actions/ai-tube-hf/getVideo"
|
4 |
+
import { parseMediaProjectionType } from "@/lib/utils/parseMediaProjectionType";
|
5 |
|
6 |
/**
|
7 |
* @deprecated
|
src/app/layout.tsx
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import type { Metadata } from 'next'
|
2 |
import { Roboto } from 'next/font/google'
|
3 |
|
4 |
-
import { cn } from '@/lib/utils'
|
5 |
|
6 |
import './globals.css'
|
7 |
import Head from 'next/head'
|
|
|
1 |
import type { Metadata } from 'next'
|
2 |
import { Roboto } from 'next/font/google'
|
3 |
|
4 |
+
import { cn } from '@/lib/utils/cn'
|
5 |
|
6 |
import './globals.css'
|
7 |
import Head from 'next/head'
|
src/app/main.tsx
CHANGED
@@ -1,20 +1,22 @@
|
|
1 |
"use client"
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
import { useStore } from "./state/useStore"
|
4 |
import { HomeView } from "./views/home-view"
|
5 |
import { PublicChannelsView } from "./views/public-channels-view"
|
6 |
import { PublicChannelView } from "./views/public-channel-view"
|
7 |
import { UserChannelView } from "./views/user-channel-view"
|
8 |
-
import { PublicVideoView } from "./views/public-video-view"
|
9 |
import { UserAccountView } from "./views/user-account-view"
|
10 |
import { NotFoundView } from "./views/not-found-view"
|
11 |
-
import {
|
12 |
-
import { useEffect } from "react"
|
13 |
-
import { usePathname, useRouter } from "next/navigation"
|
14 |
-
import { TubeLayout } from "./interface/tube-layout"
|
15 |
import { PublicMusicVideosView } from "./views/public-music-videos-view"
|
16 |
-
import {
|
17 |
-
import {
|
18 |
|
19 |
// this is where we transition from the server-side space
|
20 |
// and the client-side space
|
@@ -139,12 +141,12 @@ export function Main({
|
|
139 |
return (
|
140 |
<TubeLayout>
|
141 |
{view === "home" && <HomeView />}
|
142 |
-
{view === "
|
143 |
-
{view === "
|
144 |
{view === "public_music_videos" && <PublicMusicVideosView />}
|
145 |
{view === "public_channels" && <PublicChannelsView />}
|
146 |
{view === "public_channel" && <PublicChannelView />}
|
147 |
-
{/*view === "
|
148 |
{view === "user_channel" && <UserChannelView />}
|
149 |
{view === "user_account" && <UserAccountView />}
|
150 |
{view === "not_found" && <NotFoundView />}
|
|
|
1 |
"use client"
|
2 |
|
3 |
+
import { useEffect } from "react"
|
4 |
+
import { usePathname, useRouter } from "next/navigation"
|
5 |
+
|
6 |
+
import { ChannelInfo, MediaInfo } from "@/types/general"
|
7 |
+
import { getCollectionKey } from "@/lib/business/getCollectionKey"
|
8 |
+
|
9 |
import { useStore } from "./state/useStore"
|
10 |
import { HomeView } from "./views/home-view"
|
11 |
import { PublicChannelsView } from "./views/public-channels-view"
|
12 |
import { PublicChannelView } from "./views/public-channel-view"
|
13 |
import { UserChannelView } from "./views/user-channel-view"
|
|
|
14 |
import { UserAccountView } from "./views/user-account-view"
|
15 |
import { NotFoundView } from "./views/not-found-view"
|
16 |
+
import { TubeLayout } from "../components/interface/tube-layout"
|
|
|
|
|
|
|
17 |
import { PublicMusicVideosView } from "./views/public-music-videos-view"
|
18 |
+
import { PublicMediaEmbedView } from "./views/public-media-embed-view"
|
19 |
+
import { PublicMediaView } from "./views/public-media-view"
|
20 |
|
21 |
// this is where we transition from the server-side space
|
22 |
// and the client-side space
|
|
|
141 |
return (
|
142 |
<TubeLayout>
|
143 |
{view === "home" && <HomeView />}
|
144 |
+
{view === "public_media_embed" && <PublicMediaEmbedView />}
|
145 |
+
{view === "public_media" && <PublicMediaView />}
|
146 |
{view === "public_music_videos" && <PublicMusicVideosView />}
|
147 |
{view === "public_channels" && <PublicChannelsView />}
|
148 |
{view === "public_channel" && <PublicChannelView />}
|
149 |
+
{/*view === "user_medias" && <UserMediasView />*/}
|
150 |
{view === "user_channel" && <UserChannelView />}
|
151 |
{view === "user_account" && <UserAccountView />}
|
152 |
{view === "not_found" && <NotFoundView />}
|
src/app/server/actions/ai-tube-hf/deleteFileFromDataset.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { deleteFile } from "@/huggingface/hub/src"
|
2 |
|
3 |
import { getCredentials } from "./getCredentials"
|
4 |
|
|
|
1 |
+
import { deleteFile } from "@/lib/huggingface/hub/src"
|
2 |
|
3 |
import { getCredentials } from "./getCredentials"
|
4 |
|
src/app/server/actions/ai-tube-hf/downloadClapProject.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import { v4 as uuidv4 } from "uuid"
|
2 |
-
import { Credentials } from "@/huggingface/hub/src"
|
3 |
|
4 |
-
import { ClapProject } from "@/clap/types"
|
5 |
import { ChannelInfo, MediaInfo, VideoRequest } from "@/types/general"
|
6 |
import { defaultVideoModel } from "@/app/config"
|
7 |
-
import { parseClap } from "@/clap/parseClap"
|
8 |
|
9 |
import { parseVideoModelName } from "../utils/parseVideoModelName"
|
10 |
import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
|
|
|
1 |
import { v4 as uuidv4 } from "uuid"
|
2 |
+
import { Credentials } from "@/lib/huggingface/hub/src"
|
3 |
|
4 |
+
import { ClapProject } from "@/lib/clap/types"
|
5 |
import { ChannelInfo, MediaInfo, VideoRequest } from "@/types/general"
|
6 |
import { defaultVideoModel } from "@/app/config"
|
7 |
+
import { parseClap } from "@/lib/clap/parseClap"
|
8 |
|
9 |
import { parseVideoModelName } from "../utils/parseVideoModelName"
|
10 |
import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
|
src/app/server/actions/ai-tube-hf/downloadFileAsBlob.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { downloadFile } from "@/huggingface/hub/src"
|
2 |
import { getCredentials } from "./getCredentials"
|
3 |
|
4 |
export async function downloadFileAsBlob({
|
|
|
1 |
+
import { downloadFile } from "@/lib/huggingface/hub/src"
|
2 |
import { getCredentials } from "./getCredentials"
|
3 |
|
4 |
export async function downloadFileAsBlob({
|
src/app/server/actions/ai-tube-hf/downloadFileAsText.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { downloadFile } from "@/huggingface/hub/src"
|
2 |
import { getCredentials } from "./getCredentials"
|
3 |
|
4 |
export async function downloadFileAsText({
|
|
|
1 |
+
import { downloadFile } from "@/lib/huggingface/hub/src"
|
2 |
import { getCredentials } from "./getCredentials"
|
3 |
|
4 |
export async function downloadFileAsText({
|
src/app/server/actions/ai-tube-hf/getCredentials.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
// safe way to get the credentials
|
3 |
|
4 |
-
import { Credentials, WhoAmIUser, whoAmI } from "@/huggingface/hub/src"
|
5 |
|
6 |
import { adminCredentials, adminUsername } from "../config"
|
7 |
|
|
|
1 |
|
2 |
// safe way to get the credentials
|
3 |
|
4 |
+
import { Credentials, WhoAmIUser, whoAmI } from "@/lib/huggingface/hub/src"
|
5 |
|
6 |
import { adminCredentials, adminUsername } from "../config"
|
7 |
|
src/app/server/actions/ai-tube-hf/getPrivateChannels.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
"use server"
|
2 |
|
3 |
-
import { Credentials, listDatasets, whoAmI } from "@/huggingface/hub/src"
|
4 |
import { ChannelInfo } from "@/types/general"
|
5 |
|
6 |
import { adminCredentials } from "../config"
|
|
|
1 |
"use server"
|
2 |
|
3 |
+
import { Credentials, listDatasets, whoAmI } from "@/lib/huggingface/hub/src"
|
4 |
import { ChannelInfo } from "@/types/general"
|
5 |
|
6 |
import { adminCredentials } from "../config"
|
src/app/server/actions/ai-tube-hf/getVideoRequestsFromChannel.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import { ChannelInfo, VideoRequest } from "@/types/general"
|
4 |
import { getCredentials } from "./getCredentials"
|
5 |
-
import { listFiles } from "@/huggingface/hub/src"
|
6 |
import { parsePromptFileName } from "../utils/parsePromptFileName"
|
7 |
import { downloadFileAsText } from "./downloadFileAsText"
|
8 |
import { parseDatasetPrompt } from "../utils/parseDatasetPrompt"
|
|
|
2 |
|
3 |
import { ChannelInfo, VideoRequest } from "@/types/general"
|
4 |
import { getCredentials } from "./getCredentials"
|
5 |
+
import { listFiles } from "@/lib/huggingface/hub/src"
|
6 |
import { parsePromptFileName } from "../utils/parsePromptFileName"
|
7 |
import { downloadFileAsText } from "./downloadFileAsText"
|
8 |
import { parseDatasetPrompt } from "../utils/parseDatasetPrompt"
|
src/app/server/actions/ai-tube-hf/parseChannel.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
"use server"
|
2 |
|
3 |
-
import { Credentials, downloadFile, whoAmI } from "@/huggingface/hub/src"
|
4 |
import { parseDatasetReadme } from "@/app/server/actions/utils/parseDatasetReadme"
|
5 |
import { ChannelInfo, VideoGenerationModel, VideoOrientation } from "@/types/general"
|
6 |
|
|
|
1 |
"use server"
|
2 |
|
3 |
+
import { Credentials, downloadFile, whoAmI } from "@/lib/huggingface/hub/src"
|
4 |
import { parseDatasetReadme } from "@/app/server/actions/utils/parseDatasetReadme"
|
5 |
import { ChannelInfo, VideoGenerationModel, VideoOrientation } from "@/types/general"
|
6 |
|
src/app/server/actions/ai-tube-hf/uploadVideoRequestToDataset.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import { Blob } from "buffer"
|
4 |
|
5 |
-
import { Credentials, uploadFile, whoAmI } from "@/huggingface/hub/src"
|
6 |
import { ChannelInfo, VideoGenerationModel, MediaInfo, VideoOrientation, VideoRequest } from "@/types/general"
|
7 |
import { formatPromptFileName } from "../utils/formatPromptFileName"
|
8 |
import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
|
|
|
2 |
|
3 |
import { Blob } from "buffer"
|
4 |
|
5 |
+
import { Credentials, uploadFile, whoAmI } from "@/lib/huggingface/hub/src"
|
6 |
import { ChannelInfo, VideoGenerationModel, MediaInfo, VideoOrientation, VideoRequest } from "@/types/general"
|
7 |
import { formatPromptFileName } from "../utils/formatPromptFileName"
|
8 |
import { computeOrientationProjectionWidthHeight } from "../utils/computeOrientationProjectionWidthHeight"
|
src/app/server/actions/comments.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
import { v4 as uuidv4 } from "uuid"
|
4 |
|
5 |
import { CommentInfo, StoredCommentInfo } from "@/types/general"
|
6 |
-
import { stripHtml } from "@/lib/stripHtml"
|
7 |
import { getCurrentUser, getUsers } from "./users"
|
8 |
import { redis } from "./redis"
|
9 |
|
|
|
3 |
import { v4 as uuidv4 } from "uuid"
|
4 |
|
5 |
import { CommentInfo, StoredCommentInfo } from "@/types/general"
|
6 |
+
import { stripHtml } from "@/lib/utils/stripHtml"
|
7 |
import { getCurrentUser, getUsers } from "./users"
|
8 |
import { redis } from "./redis"
|
9 |
|
src/app/server/actions/config.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
|
2 |
-
import { Credentials } from "@/huggingface/hub/src"
|
3 |
|
4 |
export const adminApiKey = `${process.env.ADMIN_HUGGING_FACE_API_TOKEN || ""}`
|
5 |
export const adminUsername = `${process.env.ADMIN_HUGGING_FACE_USERNAME || ""}`
|
|
|
1 |
|
2 |
+
import { Credentials } from "@/lib/huggingface/hub/src"
|
3 |
|
4 |
export const adminApiKey = `${process.env.ADMIN_HUGGING_FACE_API_TOKEN || ""}`
|
5 |
export const adminUsername = `${process.env.ADMIN_HUGGING_FACE_USERNAME || ""}`
|
src/app/server/actions/stats.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
"use server"
|
2 |
|
3 |
import { developerMode } from "@/app/config"
|
4 |
-
import { WhoAmIUser, whoAmI } from "@/huggingface/hub/src"
|
5 |
import { MediaRating } from "@/types/general"
|
6 |
import { redis } from "./redis";
|
7 |
|
|
|
1 |
"use server"
|
2 |
|
3 |
import { developerMode } from "@/app/config"
|
4 |
+
import { WhoAmIUser, whoAmI } from "@/lib/huggingface/hub/src"
|
5 |
import { MediaRating } from "@/types/general"
|
6 |
import { redis } from "./redis";
|
7 |
|
src/app/server/actions/users.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
"use server"
|
2 |
|
3 |
-
import { WhoAmIUser, whoAmI } from "@/huggingface/hub/src"
|
4 |
import { UserInfo } from "@/types/general"
|
5 |
import { adminApiKey } from "./config"
|
6 |
import { redis } from "./redis"
|
|
|
1 |
"use server"
|
2 |
|
3 |
+
import { WhoAmIUser, whoAmI } from "@/lib/huggingface/hub/src"
|
4 |
import { UserInfo } from "@/types/general"
|
5 |
import { adminApiKey } from "./config"
|
6 |
import { redis } from "./redis"
|
src/app/server/actions/utils/censorship.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
// for some naked anime stuff or whatever
|
4 |
// I also want to avoid a PR scandal due to some bad user generated content
|
5 |
|
6 |
-
import { computeSecretFingerprint } from "@/lib/computeSecretFingerprint"
|
7 |
|
8 |
// those keywords have been generated by looking at the logs of the panorama and the AI Comic Factory
|
9 |
// those are real requests some users tried to attempt.. :|
|
|
|
3 |
// for some naked anime stuff or whatever
|
4 |
// I also want to avoid a PR scandal due to some bad user generated content
|
5 |
|
6 |
+
import { computeSecretFingerprint } from "@/lib/utils/computeSecretFingerprint"
|
7 |
|
8 |
// those keywords have been generated by looking at the logs of the panorama and the AI Comic Factory
|
9 |
// those are real requests some users tried to attempt.. :|
|
src/app/state/useStore.ts
CHANGED
@@ -105,8 +105,8 @@ export const useStore = create<{
|
|
105 |
setPathname: (pathname: string) => {
|
106 |
const routes: Record<string, InterfaceView> = {
|
107 |
"/": "home",
|
108 |
-
"/watch": "
|
109 |
-
"/embed": "
|
110 |
"/music": "public_music_videos",
|
111 |
"/channels": "public_channels",
|
112 |
"/channel": "public_channel",
|
|
|
105 |
setPathname: (pathname: string) => {
|
106 |
const routes: Record<string, InterfaceView> = {
|
107 |
"/": "home",
|
108 |
+
"/watch": "public_media",
|
109 |
+
"/embed": "public_media_embed",
|
110 |
"/music": "public_music_videos",
|
111 |
"/channels": "public_channels",
|
112 |
"/channel": "public_channel",
|
src/app/views/home-view/index.tsx
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
import { useEffect, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
import { MediaInfo } from "@/types/general"
|
8 |
import { getVideos } from "@/app/server/actions/ai-tube-hf/getVideos"
|
9 |
-
import { VideoList } from "@/
|
10 |
import { getTags } from "@/app/server/actions/ai-tube-hf/getTags"
|
11 |
import { extendVideosWithStats } from "@/app/server/actions/ai-tube-hf/extendVideosWithStats"
|
12 |
|
@@ -34,7 +34,7 @@ export function HomeView() {
|
|
34 |
}, [currentTag])
|
35 |
|
36 |
const handleSelect = (video: MediaInfo) => {
|
37 |
-
setView("
|
38 |
setPublicVideo(video)
|
39 |
}
|
40 |
|
|
|
3 |
import { useEffect, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
import { MediaInfo } from "@/types/general"
|
8 |
import { getVideos } from "@/app/server/actions/ai-tube-hf/getVideos"
|
9 |
+
import { VideoList } from "@/components/interface/video-list"
|
10 |
import { getTags } from "@/app/server/actions/ai-tube-hf/getTags"
|
11 |
import { extendVideosWithStats } from "@/app/server/actions/ai-tube-hf/extendVideosWithStats"
|
12 |
|
|
|
34 |
}, [currentTag])
|
35 |
|
36 |
const handleSelect = (video: MediaInfo) => {
|
37 |
+
setView("public_media")
|
38 |
setPublicVideo(video)
|
39 |
}
|
40 |
|
src/app/views/not-found-view/index.tsx
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
"use client"
|
2 |
|
3 |
-
import { cn } from "@/lib/utils"
|
4 |
|
5 |
export function NotFoundView() {
|
6 |
return (
|
|
|
1 |
"use client"
|
2 |
|
3 |
+
import { cn } from "@/lib/utils/cn"
|
4 |
|
5 |
export function NotFoundView() {
|
6 |
return (
|
src/app/views/public-channel-view/index.tsx
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
-
import { VideoList } from "@/
|
8 |
-
import { DefaultAvatar } from "@/
|
9 |
|
10 |
export function PublicChannelView() {
|
11 |
const [_isPending, startTransition] = useTransition()
|
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
+
import { VideoList } from "@/components/interface/video-list"
|
8 |
+
import { DefaultAvatar } from "@/components/interface/default-avatar"
|
9 |
|
10 |
export function PublicChannelView() {
|
11 |
const [_isPending, startTransition] = useTransition()
|
src/app/views/public-channels-view/index.tsx
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
import { getChannels } from "@/app/server/actions/ai-tube-hf/getChannels"
|
8 |
-
import { ChannelList } from "@/
|
9 |
|
10 |
export function PublicChannelsView() {
|
11 |
const [_isPending, startTransition] = useTransition()
|
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
import { getChannels } from "@/app/server/actions/ai-tube-hf/getChannels"
|
8 |
+
import { ChannelList } from "@/components/interface/channel-list"
|
9 |
|
10 |
export function PublicChannelsView() {
|
11 |
const [_isPending, startTransition] = useTransition()
|
src/app/views/{public-video-embed-view β public-media-embed-view}/index.tsx
RENAMED
@@ -3,12 +3,12 @@
|
|
3 |
import { useEffect, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
-
import { MediaPlayer } from "@/
|
8 |
|
9 |
import { countNewMediaView } from "@/app/server/actions/stats"
|
10 |
|
11 |
-
export function
|
12 |
const [_pending, startTransition] = useTransition()
|
13 |
|
14 |
// current time in the media
|
|
|
3 |
import { useEffect, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
+
import { MediaPlayer } from "@/components/interface/media-player"
|
8 |
|
9 |
import { countNewMediaView } from "@/app/server/actions/stats"
|
10 |
|
11 |
+
export function PublicMediaEmbedView() {
|
12 |
const [_pending, startTransition] = useTransition()
|
13 |
|
14 |
// current time in the media
|
src/app/views/{public-video-view β public-media-view}/index.tsx
RENAMED
@@ -11,30 +11,29 @@ import { BiCameraMovie } from "react-icons/bi"
|
|
11 |
import { useLocalStorage } from "usehooks-ts"
|
12 |
|
13 |
import { useStore } from "@/app/state/useStore"
|
14 |
-
import { cn } from "@/lib/utils"
|
15 |
|
16 |
-
import { ActionButton, actionButtonClassName } from "@/
|
17 |
-
import { RecommendedVideos } from "@/
|
18 |
import { isCertifiedUser } from "@/app/certification"
|
19 |
import { countNewMediaView } from "@/app/server/actions/stats"
|
20 |
-
import { formatTimeAgo } from "@/lib/formatTimeAgo"
|
21 |
-
import { DefaultAvatar } from "@/
|
22 |
-
import { LikeButton } from "@/
|
23 |
|
24 |
import { ReportModal } from "../report-modal"
|
25 |
-
import { formatLargeNumber } from "@/lib/formatLargeNumber"
|
26 |
-
import { CommentList } from "@/
|
27 |
import { Input } from "@/components/ui/input"
|
28 |
|
29 |
import { localStorageKeys } from "@/app/state/localStorageKeys"
|
30 |
import { defaultSettings } from "@/app/state/defaultSettings"
|
31 |
import { getComments, submitComment } from "@/app/server/actions/comments"
|
32 |
import { useCurrentUser } from "@/app/state/useCurrentUser"
|
33 |
-
import { parseMediaProjectionType } from "@/lib/parseMediaProjectionType"
|
34 |
-
import { MediaPlayer } from "@/
|
35 |
|
36 |
-
|
37 |
-
export function PublicVideoView() {
|
38 |
const [_pending, startTransition] = useTransition()
|
39 |
|
40 |
const [commentDraft, setCommentDraft] = useState("")
|
|
|
11 |
import { useLocalStorage } from "usehooks-ts"
|
12 |
|
13 |
import { useStore } from "@/app/state/useStore"
|
14 |
+
import { cn } from "@/lib/utils/cn"
|
15 |
|
16 |
+
import { ActionButton, actionButtonClassName } from "@/components/interface/action-button"
|
17 |
+
import { RecommendedVideos } from "@/components/interface/recommended-videos"
|
18 |
import { isCertifiedUser } from "@/app/certification"
|
19 |
import { countNewMediaView } from "@/app/server/actions/stats"
|
20 |
+
import { formatTimeAgo } from "@/lib/formatters/formatTimeAgo"
|
21 |
+
import { DefaultAvatar } from "@/components/interface/default-avatar"
|
22 |
+
import { LikeButton } from "@/components/interface/like-button"
|
23 |
|
24 |
import { ReportModal } from "../report-modal"
|
25 |
+
import { formatLargeNumber } from "@/lib/formatters/formatLargeNumber"
|
26 |
+
import { CommentList } from "@/components/interface/comment-list"
|
27 |
import { Input } from "@/components/ui/input"
|
28 |
|
29 |
import { localStorageKeys } from "@/app/state/localStorageKeys"
|
30 |
import { defaultSettings } from "@/app/state/defaultSettings"
|
31 |
import { getComments, submitComment } from "@/app/server/actions/comments"
|
32 |
import { useCurrentUser } from "@/app/state/useCurrentUser"
|
33 |
+
import { parseMediaProjectionType } from "@/lib/utils/parseMediaProjectionType"
|
34 |
+
import { MediaPlayer } from "@/components/interface/media-player"
|
35 |
|
36 |
+
export function PublicMediaView() {
|
|
|
37 |
const [_pending, startTransition] = useTransition()
|
38 |
|
39 |
const [commentDraft, setCommentDraft] = useState("")
|
src/app/views/public-music-videos-view/index.tsx
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
import { useEffect, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
import { MediaInfo } from "@/types/general"
|
8 |
import { getVideos } from "@/app/server/actions/ai-tube-hf/getVideos"
|
9 |
-
import { TrackList } from "@/
|
10 |
-
import { PlaylistControl } from "@/
|
11 |
-
import { usePlaylist } from "@/lib/usePlaylist"
|
12 |
|
13 |
export function PublicMusicVideosView() {
|
14 |
const [_isPending, startTransition] = useTransition()
|
|
|
3 |
import { useEffect, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
import { MediaInfo } from "@/types/general"
|
8 |
import { getVideos } from "@/app/server/actions/ai-tube-hf/getVideos"
|
9 |
+
import { TrackList } from "@/components/interface/track-list"
|
10 |
+
import { PlaylistControl } from "@/components/interface/playlist-control"
|
11 |
+
import { usePlaylist } from "@/lib/hooks/usePlaylist"
|
12 |
|
13 |
export function PublicMusicVideosView() {
|
14 |
const [_isPending, startTransition] = useTransition()
|
src/app/views/report-modal/index.tsx
CHANGED
@@ -5,7 +5,7 @@ import { Button } from "@/components/ui/button"
|
|
5 |
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTrigger } from "@/components/ui/dialog"
|
6 |
|
7 |
import { ChannelInfo, MediaInfo } from "@/types/general"
|
8 |
-
import { ActionButton } from "@/
|
9 |
|
10 |
// modal to report a media or channel
|
11 |
export function ReportModal({
|
|
|
5 |
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTrigger } from "@/components/ui/dialog"
|
6 |
|
7 |
import { ChannelInfo, MediaInfo } from "@/types/general"
|
8 |
+
import { ActionButton } from "@/components/interface/action-button"
|
9 |
|
10 |
// modal to report a media or channel
|
11 |
export function ReportModal({
|
src/app/views/user-account-view/index.tsx
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
-
import { ChannelList } from "@/
|
8 |
|
9 |
import { getPrivateChannels } from "@/app/server/actions/ai-tube-hf/getPrivateChannels"
|
10 |
import { useCurrentUser } from "@/app/state/useCurrentUser"
|
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
+
import { ChannelList } from "@/components/interface/channel-list"
|
8 |
|
9 |
import { getPrivateChannels } from "@/app/server/actions/ai-tube-hf/getPrivateChannels"
|
10 |
import { useCurrentUser } from "@/app/state/useCurrentUser"
|
src/app/views/user-channel-view/index.tsx
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
import { VideoGenerationModel, MediaInfo } from "@/types/general"
|
8 |
|
9 |
import { useLocalStorage } from "usehooks-ts"
|
@@ -13,7 +13,7 @@ import { Input } from "@/components/ui/input"
|
|
13 |
import { Textarea } from "@/components/ui/textarea"
|
14 |
import { Button } from "@/components/ui/button"
|
15 |
import { submitVideoRequest } from "@/app/server/actions/submitVideoRequest"
|
16 |
-
import { PendingVideoList } from "@/
|
17 |
import { getChannelVideos } from "@/app/server/actions/ai-tube-hf/getChannelVideos"
|
18 |
import { parseVideoModelName } from "@/app/server/actions/utils/parseVideoModelName"
|
19 |
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
|
|
|
3 |
import { useEffect, useState, useTransition } from "react"
|
4 |
|
5 |
import { useStore } from "@/app/state/useStore"
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
import { VideoGenerationModel, MediaInfo } from "@/types/general"
|
8 |
|
9 |
import { useLocalStorage } from "usehooks-ts"
|
|
|
13 |
import { Textarea } from "@/components/ui/textarea"
|
14 |
import { Button } from "@/components/ui/button"
|
15 |
import { submitVideoRequest } from "@/app/server/actions/submitVideoRequest"
|
16 |
+
import { PendingVideoList } from "@/components/interface/pending-video-list"
|
17 |
import { getChannelVideos } from "@/app/server/actions/ai-tube-hf/getChannelVideos"
|
18 |
import { parseVideoModelName } from "@/app/server/actions/utils/parseVideoModelName"
|
19 |
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
|
src/{app β components}/interface/about/index.tsx
RENAMED
@@ -2,7 +2,7 @@ import { ReactNode, useState } from "react"
|
|
2 |
|
3 |
import { Button } from "@/components/ui/button"
|
4 |
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
|
5 |
-
import { cn } from "@/lib/utils"
|
6 |
import { AiOutlineQuestionCircle } from "react-icons/ai"
|
7 |
|
8 |
export function About() {
|
|
|
2 |
|
3 |
import { Button } from "@/components/ui/button"
|
4 |
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
|
5 |
+
import { cn } from "@/lib/utils/cn"
|
6 |
import { AiOutlineQuestionCircle } from "react-icons/ai"
|
7 |
|
8 |
export function About() {
|
src/{app β components}/interface/action-button/index.tsx
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
import { ReactNode } from "react"
|
2 |
|
3 |
-
import { cn } from "@/lib/utils"
|
4 |
|
5 |
export const actionButtonClassName = cn(
|
6 |
`flex flex-row space-x-1.5 lg:space-x-2 pl-2 lg:pl-3 pr-3 lg:pr-4 h-8 lg:h-9`,
|
|
|
1 |
import { ReactNode } from "react"
|
2 |
|
3 |
+
import { cn } from "@/lib/utils/cn"
|
4 |
|
5 |
export const actionButtonClassName = cn(
|
6 |
`flex flex-row space-x-1.5 lg:space-x-2 pl-2 lg:pl-3 pr-3 lg:pr-4 h-8 lg:h-9`,
|
src/{app β components}/interface/channel-card/index.tsx
RENAMED
@@ -3,11 +3,11 @@ import { useState } from "react"
|
|
3 |
import { RiCheckboxCircleFill } from "react-icons/ri"
|
4 |
import { IoAdd } from "react-icons/io5"
|
5 |
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
import { ChannelInfo } from "@/types/general"
|
8 |
import { isCertifiedUser } from "@/app/certification"
|
9 |
import { DefaultAvatar } from "../default-avatar"
|
10 |
-
import { formatLargeNumber } from "@/lib/formatLargeNumber"
|
11 |
|
12 |
export function ChannelCard({
|
13 |
channel,
|
|
|
3 |
import { RiCheckboxCircleFill } from "react-icons/ri"
|
4 |
import { IoAdd } from "react-icons/io5"
|
5 |
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
import { ChannelInfo } from "@/types/general"
|
8 |
import { isCertifiedUser } from "@/app/certification"
|
9 |
import { DefaultAvatar } from "../default-avatar"
|
10 |
+
import { formatLargeNumber } from "@/lib/formatters/formatLargeNumber"
|
11 |
|
12 |
export function ChannelCard({
|
13 |
channel,
|
src/{app β components}/interface/channel-list/index.tsx
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { cn } from "@/lib/utils"
|
2 |
import { ChannelInfo } from "@/types/general"
|
3 |
|
4 |
import { ChannelCard } from "../channel-card"
|
|
|
1 |
+
import { cn } from "@/lib/utils/cn"
|
2 |
import { ChannelInfo } from "@/types/general"
|
3 |
|
4 |
import { ChannelCard } from "../channel-card"
|
src/{app β components}/interface/collection-card/index.tsx
RENAMED
@@ -4,14 +4,14 @@ import { useState } from "react"
|
|
4 |
import Link from "next/link"
|
5 |
import { RiCheckboxCircleFill } from "react-icons/ri"
|
6 |
|
7 |
-
import { cn } from "@/lib/utils"
|
8 |
import { CollectionInfo } from "@/types/general"
|
9 |
-
import { formatDuration } from "@/lib/formatDuration"
|
10 |
-
import { formatTimeAgo } from "@/lib/formatTimeAgo"
|
11 |
import { isCertifiedUser } from "@/app/certification"
|
12 |
-
import { transparentImage } from "@/lib/transparentImage"
|
13 |
import { DefaultAvatar } from "../default-avatar"
|
14 |
-
import { formatLargeNumber } from "@/lib/formatLargeNumber"
|
15 |
|
16 |
export function CollectionCard({
|
17 |
collection,
|
|
|
4 |
import Link from "next/link"
|
5 |
import { RiCheckboxCircleFill } from "react-icons/ri"
|
6 |
|
7 |
+
import { cn } from "@/lib/utils/cn"
|
8 |
import { CollectionInfo } from "@/types/general"
|
9 |
+
import { formatDuration } from "@/lib/formatters/formatDuration"
|
10 |
+
import { formatTimeAgo } from "@/lib/formatters/formatTimeAgo"
|
11 |
import { isCertifiedUser } from "@/app/certification"
|
12 |
+
import { transparentImage } from "@/lib/utils/transparentImage"
|
13 |
import { DefaultAvatar } from "../default-avatar"
|
14 |
+
import { formatLargeNumber } from "@/lib/formatters/formatLargeNumber"
|
15 |
|
16 |
export function CollectionCard({
|
17 |
collection,
|
src/{app β components}/interface/collection-list/index.tsx
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { cn } from "@/lib/utils"
|
2 |
import { CollectionInfo } from "@/types/general"
|
3 |
|
4 |
import { CollectionCard } from "../collection-card"
|
|
|
1 |
+
import { cn } from "@/lib/utils/cn"
|
2 |
import { CollectionInfo } from "@/types/general"
|
3 |
|
4 |
import { CollectionCard } from "../collection-card"
|
src/{app β components}/interface/comment-card/index.tsx
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
-
import { cn } from "@/lib/utils"
|
2 |
import { CommentInfo } from "@/types/general"
|
3 |
import { useEffect, useState } from "react"
|
4 |
import { DefaultAvatar } from "../default-avatar"
|
5 |
-
import { formatTimeAgo } from "@/lib/formatTimeAgo"
|
6 |
import { CommentWithTimeSeeks } from "./time-seeker"
|
7 |
|
8 |
export function CommentCard({
|
|
|
1 |
+
import { cn } from "@/lib/utils/cn"
|
2 |
import { CommentInfo } from "@/types/general"
|
3 |
import { useEffect, useState } from "react"
|
4 |
import { DefaultAvatar } from "../default-avatar"
|
5 |
+
import { formatTimeAgo } from "@/lib/formatters/formatTimeAgo"
|
6 |
import { CommentWithTimeSeeks } from "./time-seeker"
|
7 |
|
8 |
export function CommentCard({
|
src/{app β components}/interface/comment-card/time-seeker.tsx
RENAMED
File without changes
|
src/{app β components}/interface/comment-list/index.tsx
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
"use client"
|
2 |
|
3 |
-
import { cn } from "@/lib/utils"
|
4 |
import { CommentInfo } from "@/types/general"
|
5 |
import { CommentCard } from "../comment-card"
|
6 |
|
|
|
1 |
"use client"
|
2 |
|
3 |
+
import { cn } from "@/lib/utils/cn"
|
4 |
import { CommentInfo } from "@/types/general"
|
5 |
import { CommentCard } from "../comment-card"
|
6 |
|
src/{app β components}/interface/default-avatar/impl.tsx
RENAMED
File without changes
|
src/{app β components}/interface/default-avatar/index.tsx
RENAMED
File without changes
|
src/{app β components}/interface/equirectangular-video-player/index.tsx
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import AutoSizer from "react-virtualized-auto-sizer"
|
4 |
|
5 |
-
import { cn } from "@/lib/utils"
|
6 |
import { MediaInfo } from "@/types/general"
|
7 |
|
8 |
import { VideoSphereViewer } from "./viewer"
|
|
|
2 |
|
3 |
import AutoSizer from "react-virtualized-auto-sizer"
|
4 |
|
5 |
+
import { cn } from "@/lib/utils/cn"
|
6 |
import { MediaInfo } from "@/types/general"
|
7 |
|
8 |
import { VideoSphereViewer } from "./viewer"
|
src/{app β components}/interface/equirectangular-video-player/viewer.tsx
RENAMED
@@ -14,7 +14,7 @@ import { VideoPlugin } from "@photo-sphere-viewer/video-plugin"
|
|
14 |
import "@photo-sphere-viewer/settings-plugin/index.css"
|
15 |
import "@photo-sphere-viewer/video-plugin/index.css"
|
16 |
|
17 |
-
import { cn } from "@/lib/utils"
|
18 |
import { MediaInfo } from "@/types/general"
|
19 |
|
20 |
export function VideoSphereViewer({
|
|
|
14 |
import "@photo-sphere-viewer/settings-plugin/index.css"
|
15 |
import "@photo-sphere-viewer/video-plugin/index.css"
|
16 |
|
17 |
+
import { cn } from "@/lib/utils/cn"
|
18 |
import { MediaInfo } from "@/types/general"
|
19 |
|
20 |
export function VideoSphereViewer({
|
src/{app β components}/interface/fonts/index.tsx
RENAMED
File without changes
|
src/{app β components}/interface/gsplat/index.tsx
RENAMED
File without changes
|
src/components/interface/latent-engine/index.tsx
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { useEffect, useRef } from "react"
|
2 |
+
import { useLatentEngine } from "./useLatentEngine"
|
3 |
+
import { mockClap } from "@/lib/clap/mockClap"
|
4 |
+
import { Gsplat } from "../gsplat"
|
5 |
+
|
6 |
+
export type LatentEngineStatus =
|
7 |
+
| "idle"
|
8 |
+
| "loading"
|
9 |
+
| "loaded"
|
10 |
+
| "failed"
|
11 |
+
|
12 |
+
export function LatentEngine({
|
13 |
+
url,
|
14 |
+
width,
|
15 |
+
height,
|
16 |
+
className = "" }: {
|
17 |
+
url: string
|
18 |
+
width?: number
|
19 |
+
height?: number
|
20 |
+
className?: string
|
21 |
+
}) {
|
22 |
+
const le = useLatentEngine()
|
23 |
+
|
24 |
+
useEffect(() => {
|
25 |
+
if (!le.loaded) {
|
26 |
+
console.log("let's load an experience")
|
27 |
+
le.load(mockClap())
|
28 |
+
}
|
29 |
+
}, [le.loaded])
|
30 |
+
|
31 |
+
return (
|
32 |
+
<div style={{ width, height }} className={className}>
|
33 |
+
{/* <Gsplat /> */}
|
34 |
+
</div>
|
35 |
+
);
|
36 |
+
}
|
src/components/interface/latent-engine/useLatentEngine.ts
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client"
|
2 |
+
|
3 |
+
import { create } from "zustand"
|
4 |
+
|
5 |
+
import { ClapProject } from "@/lib/clap/types"
|
6 |
+
import { newClap } from "@/lib/clap/newClap"
|
7 |
+
|
8 |
+
export type LatentEngineStore = {
|
9 |
+
clap: ClapProject
|
10 |
+
loaded: boolean
|
11 |
+
load: (clap: ClapProject) => void
|
12 |
+
}
|
13 |
+
|
14 |
+
export const useLatentEngine = create<LatentEngineStore>((set, get) => ({
|
15 |
+
clap: newClap(),
|
16 |
+
loaded: false,
|
17 |
+
|
18 |
+
// TODO: add a loader for either a Clap or a LatentScript
|
19 |
+
|
20 |
+
load: (clap: ClapProject) => {
|
21 |
+
set({
|
22 |
+
clap,
|
23 |
+
loaded: true
|
24 |
+
})
|
25 |
+
},
|
26 |
+
}))
|
src/{app β components}/interface/left-menu/index.tsx
RENAMED
@@ -9,7 +9,7 @@ import { CgProfile } from "react-icons/cg"
|
|
9 |
import { MdOutlinePlayCircleOutline } from "react-icons/md";
|
10 |
|
11 |
import { useStore } from "@/app/state/useStore"
|
12 |
-
import { cn } from "@/lib/utils"
|
13 |
import { showBetaFeatures } from "@/app/config"
|
14 |
|
15 |
import { MenuItem } from "./menu-item"
|
@@ -89,8 +89,8 @@ export function LeftMenu() {
|
|
89 |
)}>
|
90 |
{/*<MenuItem
|
91 |
icon={<MdVideoLibrary className="h-6 w-6" />}
|
92 |
-
selected={view === "
|
93 |
-
onClick={() => setView("
|
94 |
>
|
95 |
My Videos
|
96 |
</MenuItem>
|
|
|
9 |
import { MdOutlinePlayCircleOutline } from "react-icons/md";
|
10 |
|
11 |
import { useStore } from "@/app/state/useStore"
|
12 |
+
import { cn } from "@/lib/utils/cn"
|
13 |
import { showBetaFeatures } from "@/app/config"
|
14 |
|
15 |
import { MenuItem } from "./menu-item"
|
|
|
89 |
)}>
|
90 |
{/*<MenuItem
|
91 |
icon={<MdVideoLibrary className="h-6 w-6" />}
|
92 |
+
selected={view === "user_medias"}
|
93 |
+
onClick={() => setView("user_medias")}
|
94 |
>
|
95 |
My Videos
|
96 |
</MenuItem>
|
src/{app β components}/interface/left-menu/menu-item/index.tsx
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
import { ReactNode } from "react"
|
2 |
|
3 |
-
import { cn } from "@/lib/utils"
|
4 |
|
5 |
export function MenuItem({
|
6 |
icon = null,
|
|
|
1 |
import { ReactNode } from "react"
|
2 |
|
3 |
+
import { cn } from "@/lib/utils/cn"
|
4 |
|
5 |
export function MenuItem({
|
6 |
icon = null,
|
src/{app β components}/interface/like-button/generic.tsx
RENAMED
@@ -3,8 +3,8 @@ import { RiThumbUpFill } from "react-icons/ri"
|
|
3 |
import { RiThumbDownLine } from "react-icons/ri"
|
4 |
import { RiThumbDownFill } from "react-icons/ri"
|
5 |
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
-
import { formatLargeNumber } from "@/lib/formatLargeNumber"
|
8 |
|
9 |
export const likeButtonClassName = cn(
|
10 |
`flex flex-row`,
|
|
|
3 |
import { RiThumbDownLine } from "react-icons/ri"
|
4 |
import { RiThumbDownFill } from "react-icons/ri"
|
5 |
|
6 |
+
import { cn } from "@/lib/utils/cn"
|
7 |
+
import { formatLargeNumber } from "@/lib/formatters/formatLargeNumber"
|
8 |
|
9 |
export const likeButtonClassName = cn(
|
10 |
`flex flex-row`,
|
src/{app β components}/interface/like-button/index.tsx
RENAMED
File without changes
|