-
{
- router.push("/create/video-to-video");
- }}>
-
-
Video To Video
-
Transform your video into a new style
-
-
- {/* 图标 右箭头 */}
-
-
Create
-
-
-
-
-
-
-
Script To Video
-
Transform your script into a video
-
-
- {/* 图标 右箭头 */}
-
-
Create
-
-
-
-
+
+ {/* 工具栏-列表形式切换 */}
+
+
+
+
+
+
+
+
);
}
\ No newline at end of file
diff --git a/components/pages/style/create-to-video.css b/components/pages/style/create-to-video.css
new file mode 100644
index 0000000..afa6e6e
--- /dev/null
+++ b/components/pages/style/create-to-video.css
@@ -0,0 +1,61 @@
+.video-tool-component {
+ position: fixed;
+ left: 50%;
+ bottom: 1rem;
+ z-index: 99;
+ --tw-translate-x: calc(-50% + 34.5px);
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
+}
+
+.video-storyboard-tools .tool-submit-button {
+ display: flex;
+ height: 36px;
+ width: 120px;
+ cursor: pointer;
+ align-items: center;
+ justify-content: center;
+ gap: 2px;
+ border-radius: 10px;
+ font-size: .875rem;
+ line-height: 1.25rem;
+ font-weight: 600;
+ --tw-text-opacity: 1;
+ color: rgb(29 33 41 / var(--tw-text-opacity));
+ background-color: #fff;
+}
+
+.video-storyboard-tools .tool-submit-button.disabled {
+ background-color: #fff;
+ opacity: .3;
+ cursor: not-allowed;
+}
+
+.storyboard-tools-tab {
+ border-radius: 16px 16px 0 0;
+ background: #ffffff0d;
+}
+
+.storyboard-tools-tab .tab-item {
+ position: relative;
+ cursor: pointer;
+ --tw-text-opacity: 1;
+ color: rgb(255 255 255 / var(--tw-text-opacity));
+ line-height: 32px;
+}
+
+.storyboard-tools-tab .tab-item.active,
+.storyboard-tools-tab .tab-item.active span {
+ opacity: 1;
+}
+
+.storyboard-tools-tab .tab-item.active:after {
+ content: "";
+ position: absolute;
+ bottom: -8px;
+ left: 50%;
+ width: 30px;
+ height: 2px;
+ border-radius: 2px;
+ background-color: #fff;
+ transform: translate(-50%);
+}
\ No newline at end of file
diff --git a/components/pages/style/home-page2.css b/components/pages/style/home-page2.css
index 0a8eb5f..1eb5b67 100644
--- a/components/pages/style/home-page2.css
+++ b/components/pages/style/home-page2.css
@@ -1,49 +1,12 @@
-.tab-item:first-child {
- position: relative;
-}
-.tab-item {
- position: relative;
- cursor: pointer;
- --tw-bg-opacity: .2;
- background-color: rgb(255 255 255 / var(--tw-bg-opacity));
- --tw-backdrop-blur: blur(15px);
- backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
- flex: 1 1 0%;
- border-radius: 16px;
-}
-
-.tab-item .content-wrapper {
- position: relative;
- height: 220px;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- overflow: hidden;
- border-radius: 16px;
- padding: 2rem;
- background-position: left center, right center;
-}
-.tab-item .tab-title {
- font-size: 36px;
- font-weight: 600;
- line-height: 64px;
- --tw-text-opacity: 1;
- color: rgb(255 255 255 / var(--tw-text-opacity));
-}
-.tab-item .tab-description {
- font-size: 16px;
- font-weight: 300;
- line-height: 22px;
- color: rgba(255, 255, 255, 0.8);
-}
-.tab-item .tab-btn {
+.add-project-btn {
display: flex;
height: 40px;
min-width: 168px;
flex-direction: row;
align-items: center;
justify-content: center;
- --tw-bg-opacity: -0.5;
- background-color: rgb(89 0 255 / var(--tw-bg-opacity));
+ --tw-bg-opacity: 0.1;
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
padding-left: 16px;
padding-right: 16px;
--tw-text-opacity: 1;
@@ -54,22 +17,27 @@
overflow: hidden;
border-radius: 10px;
}
-.tab-item .tab-btn .icon {
+.add-project-btn .icon {
/* --tw-text-opacity: 1;
color: rgb(29 33 41 / var(--tw-text-opacity)); */
transform: translate(-100px);
transition-property: transform;
transition-duration: 0.3s;
}
-.tab-item .tab-btn .btn-text {
+.add-project-btn .btn-text {
transform: translate(-14px);
transition-property: transform;
transition-duration: 0.3s;
font-weight: 600;
}
-.tab-item:hover .hover-btn {
- --tw-bg-opacity: 0.5;
+.add-project-btn:hover {
+ --tw-bg-opacity: 0.2;
}
-.tab-item:hover .hover-btn .btn-text, .tab-item:hover .hover-btn .icon {
+.add-project-btn:hover .icon,
+.add-project-btn:hover .btn-text {
transform: translate(0px);
+}
+.add-project-btn {
+ height: 8rem;
+ border-radius: 32px;
}
\ No newline at end of file
diff --git a/components/pages/video-to-video.tsx b/components/pages/video-to-video.tsx
index 69af1b3..1769356 100644
--- a/components/pages/video-to-video.tsx
+++ b/components/pages/video-to-video.tsx
@@ -135,8 +135,8 @@ export function VideoToVideo() {
audio_video_url: null,
final_video_url: null
});
- console.log('create video');
- setIsLoading(true);
+ console.log('create video');
+ setIsLoading(true);
setIsExpanded(true);
// 提取帧
diff --git a/package-lock.json b/package-lock.json
index 2488e7f..38207c8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -58,7 +58,9 @@
"react": "18.2.0",
"react-day-picker": "^8.10.1",
"react-dom": "18.2.0",
+ "react-grid-layout": "^1.5.1",
"react-hook-form": "^7.53.0",
+ "react-resizable": "^3.0.5",
"react-resizable-panels": "^2.1.3",
"recharts": "^2.12.7",
"sonner": "^1.5.0",
@@ -68,6 +70,9 @@
"typescript": "5.2.2",
"vaul": "^0.9.9",
"zod": "^3.23.8"
+ },
+ "devDependencies": {
+ "@types/react-grid-layout": "^1.3.5"
}
},
"node_modules/@alloc/quick-lru": {
@@ -1942,6 +1947,16 @@
"@types/react": "*"
}
},
+ "node_modules/@types/react-grid-layout": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmmirror.com/@types/react-grid-layout/-/react-grid-layout-1.3.5.tgz",
+ "integrity": "sha512-WH/po1gcEcoR6y857yAnPGug+ZhkF4PaTUxgAbwfeSH/QOgVSakKHBXoPGad/sEznmkiaK3pqHk+etdWisoeBQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/react": "*"
+ }
+ },
"node_modules/@types/scheduler": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.23.0.tgz",
@@ -5824,6 +5839,53 @@
"react": "^18.2.0"
}
},
+ "node_modules/react-draggable": {
+ "version": "4.4.6",
+ "resolved": "https://registry.npmmirror.com/react-draggable/-/react-draggable-4.4.6.tgz",
+ "integrity": "sha512-LtY5Xw1zTPqHkVmtM3X8MUOxNDOUhv/khTgBgrUvwaS064bwVvxT+q5El0uUFNx5IEPKXuRejr7UqLwBIg5pdw==",
+ "license": "MIT",
+ "dependencies": {
+ "clsx": "^1.1.1",
+ "prop-types": "^15.8.1"
+ },
+ "peerDependencies": {
+ "react": ">= 16.3.0",
+ "react-dom": ">= 16.3.0"
+ }
+ },
+ "node_modules/react-draggable/node_modules/clsx": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/clsx/-/clsx-1.2.1.tgz",
+ "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/react-grid-layout": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmmirror.com/react-grid-layout/-/react-grid-layout-1.5.1.tgz",
+ "integrity": "sha512-4Fr+kKMk0+m1HL/BWfHxi/lRuaOmDNNKQDcu7m12+NEYcen20wIuZFo789u3qWCyvUsNUxCiyf0eKq4WiJSNYw==",
+ "license": "MIT",
+ "dependencies": {
+ "clsx": "^2.0.0",
+ "fast-equals": "^4.0.3",
+ "prop-types": "^15.8.1",
+ "react-draggable": "^4.4.5",
+ "react-resizable": "^3.0.5",
+ "resize-observer-polyfill": "^1.5.1"
+ },
+ "peerDependencies": {
+ "react": ">= 16.3.0",
+ "react-dom": ">= 16.3.0"
+ }
+ },
+ "node_modules/react-grid-layout/node_modules/fast-equals": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/fast-equals/-/fast-equals-4.0.3.tgz",
+ "integrity": "sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==",
+ "license": "MIT"
+ },
"node_modules/react-hook-form": {
"version": "7.53.0",
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.0.tgz",
@@ -5889,6 +5951,19 @@
}
}
},
+ "node_modules/react-resizable": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmmirror.com/react-resizable/-/react-resizable-3.0.5.tgz",
+ "integrity": "sha512-vKpeHhI5OZvYn82kXOs1bC8aOXktGU5AmKAgaZS4F5JPburCtbmDPqE7Pzp+1kN4+Wb81LlF33VpGwWwtXem+w==",
+ "license": "MIT",
+ "dependencies": {
+ "prop-types": "15.x",
+ "react-draggable": "^4.0.3"
+ },
+ "peerDependencies": {
+ "react": ">= 16.3"
+ }
+ },
"node_modules/react-resizable-panels": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.4.tgz",
@@ -6040,6 +6115,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/resize-observer-polyfill": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+ "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==",
+ "license": "MIT"
+ },
"node_modules/resolve": {
"version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
diff --git a/package.json b/package.json
index 315d421..9384cf9 100644
--- a/package.json
+++ b/package.json
@@ -59,7 +59,9 @@
"react": "18.2.0",
"react-day-picker": "^8.10.1",
"react-dom": "18.2.0",
+ "react-grid-layout": "^1.5.1",
"react-hook-form": "^7.53.0",
+ "react-resizable": "^3.0.5",
"react-resizable-panels": "^2.1.3",
"recharts": "^2.12.7",
"sonner": "^1.5.0",
@@ -69,5 +71,8 @@
"typescript": "5.2.2",
"vaul": "^0.9.9",
"zod": "^3.23.8"
+ },
+ "devDependencies": {
+ "@types/react-grid-layout": "^1.3.5"
}
}
diff --git a/public/assets/loading.gif b/public/assets/loading.gif
new file mode 100644
index 0000000..a42dbaa
Binary files /dev/null and b/public/assets/loading.gif differ