diff --git a/.gitignore b/.gitignore index c07e7847..b531b85c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,10 @@ .yarn node_modules build +backendVenv +modelsVenv +ModelsVenv +*.pyc .svelte-kit .pnp.* .yarnrc.yml diff --git a/Desktop/package.json b/Desktop/package.json index 1468765e..a41b37d0 100644 --- a/Desktop/package.json +++ b/Desktop/package.json @@ -12,6 +12,8 @@ "test:ui": "vitest --ui" }, "dependencies": { + "@lottiefiles/dotlottie-svelte": "^0.3.14", + "@lottiefiles/svelte-lottie-player": "^0.3.1", "@mdi/js": "^7.4.47", "@node-rs/bcrypt": "^1.10.4", "@rollup/plugin-commonjs": "^18.0.0", @@ -22,9 +24,11 @@ "@sveltejs/vite-plugin-svelte": "^3.1.1", "@testing-library/jest-dom": "^6.4.6", "@types/bcryptjs": "^2.4.6", + "apexcharts": "^3.52.0", "autoprefixer": "^10.0.0", "axios": "^1.7.2", "axios-mock-adapter": "^1.22.0", + "babylonjs": "^7.20.1", "baffle": "^0.3.6", "bcryptjs": "^2.4.3", "d3": "^7.9.0", @@ -37,6 +41,7 @@ "ffprobe": "^1.1.2", "ffprobe-static": "^3.1.0", "fluent-ffmpeg": "^2.1.3", + "lottie-web": "^5.12.2", "mime": "^4.0.4", "postcss": "^8.0.0", "postcss-import": "^16.1.0", diff --git a/Desktop/public/images/frame_000000.png b/Desktop/public/images/frame_000000.png new file mode 100644 index 00000000..ac398da9 Binary files /dev/null and b/Desktop/public/images/frame_000000.png differ diff --git a/Desktop/public/index.html b/Desktop/public/index.html index f63b62d4..4cfe146a 100644 --- a/Desktop/public/index.html +++ b/Desktop/public/index.html @@ -5,6 +5,10 @@ HighViz + + + + diff --git a/Desktop/src/components/DriveCard.svelte b/Desktop/src/components/DriveCard.svelte new file mode 100644 index 00000000..42bef7fb --- /dev/null +++ b/Desktop/src/components/DriveCard.svelte @@ -0,0 +1,191 @@ + + + +
+ {#if isGalLoading} +
+
+
+
+
+ {/if} + {#if !isGalLoading} +
+ {#if listType === "grid"} + video preview + {:else} + video preview + {/if} +
+
+
+ + {#if listType === "grid"} +
+ {/if} + + {#if processed} + Processed + {:else} + Unprocessed + {/if} + +
+
+
+
+ +
+ {/if} +
+ + diff --git a/Desktop/src/components/GallaryCard.svelte b/Desktop/src/components/GallaryCard.svelte index 9bf68302..c83ad3ba 100644 --- a/Desktop/src/components/GallaryCard.svelte +++ b/Desktop/src/components/GallaryCard.svelte @@ -242,6 +242,9 @@ diff --git a/Desktop/src/routes/routes.js b/Desktop/src/routes/routes.js index d91fbb03..644b2264 100644 --- a/Desktop/src/routes/routes.js +++ b/Desktop/src/routes/routes.js @@ -12,6 +12,9 @@ import Gallery from '../pages/GallaryPage.svelte' import ChangePassword from "../routes/ChangePassword.svelte" import ModelPage from './Models.svelte' import VideoPage from './video/[videoUrl]/+page.svelte' +import Drives from './drives/[videoUrl]/+page.svelte' +import DriveGallery from './DriveGallery.svelte' +import ThreeJS from './ThreeJS.svelte' import Join from './Join.svelte' import NewTeam from './NewTeam.svelte' import Invite from './Invite.svelte' @@ -33,6 +36,9 @@ const routes = { '/changePassword': ChangePassword, '/video/:VideoUrl': VideoPage, '/help': Help, + '/drive/:driveurl': Drives, + '/drivegallery': DriveGallery, + '/threejs': ThreeJS, '/join': Join, '/newTeam': NewTeam, '/invite': Invite, diff --git a/Desktop/src/videoScanner.js b/Desktop/src/videoScanner.js new file mode 100644 index 00000000..7a5851dc --- /dev/null +++ b/Desktop/src/videoScanner.js @@ -0,0 +1,50 @@ +const fs = require('fs'); +const path = require('path'); + +// Function to recursively get video file paths for folders containing "drive" +function getVideoFiles(directory) { + return new Promise((resolve, reject) => { + function readDirectory(dir) { + return new Promise((res, rej) => { + fs.readdir(dir, { withFileTypes: true }, (err, entries) => { + if (err) { + return rej(err); + } + + const promises = entries.map((entry) => { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory() && entry.name.toLowerCase().includes('drive')) { + return readDirectory(fullPath); + } else if (entry.isFile() && path.extname(entry.name).toLowerCase() === '.mp4') { + return Promise.resolve({ + path: fullPath, + name: path.basename(dir) // Use folder name as video name + }); + } + return Promise.resolve(null); + }); + + Promise.all(promises) + .then((results) => { + // Flatten the array and filter out null values + const files = results.flat().filter(Boolean); + res(files); + }) + .catch(rej); + }); + }); + } + + readDirectory(directory) + .then((files) => { + console.log('MP4 Files found:', files); + resolve(files); + }) + .catch((err) => { + console.error('Error reading directory:', err); + reject(err); + }); + }); +} + +module.exports = { getVideoFiles };