Compare commits

...
Author SHA1 Message Date
bflatastic 3db889cdbc after ok is clicked open the mine tab and category of uploaded object 2025-04-21 12:22:02 +07:00
bflatastic 2f52ccf05c working upload modal 2025-04-21 12:15:55 +07:00
Brandon Thomas ffd86f896c this configuration can launch the 2d app 2025-04-20 15:52:41 -04:00
Brandon Thomas 30b77afb23 fixup tauri scripts (wip) 2025-04-20 01:55:48 -04:00
Brandon Thomas 0d879af3a4 Refactor, clean up tauri builds 2025-04-20 01:24:25 -04:00
Brandon Thomas 4ac71a18c5 fix tauri build 2025-04-20 01:06:37 -04:00
Brandon Thomas 81e1fce6a0 cleanup and delete old scripts and configs (#536) 2025-04-20 00:52:42 -04:00
Brandon Thomas 855ddbdf2d Refactor editor3d pathing (#535) 2025-04-20 00:38:29 -04:00
Brandon Thomas 0a7d3028c9 ignore more vim temp files 2025-04-19 23:03:55 -04:00
Brandon Thomas c5aebaffb9 Ingore files from VSCode/Cursor 2025-04-19 23:01:20 -04:00
Brandon Thomasandbflatastic 931304887f Restore Bombay's toaster PR (#533)
Co-authored-by: bflatastic <bombayapirat@gmail.com>
2025-04-19 22:56:22 -04:00
bflatastic 3dcec8bc85 editor3d: login and sign up page styling fixes 2025-04-20 08:44:43 +07:00
Brandon Thomas af30eea6f7 start removing remix (#531) 2025-04-19 14:40:58 -04:00
bflatastic df7db6b35d editor2d: link to 3d editor 2025-04-19 20:07:33 +07:00
bflatastic d228a43baf editor3d: link to go to editor2d 2025-04-19 19:49:29 +07:00
bflatastic ebcc52dd1a margin fix login and signup pages 2025-04-19 15:59:45 +07:00
bflatastic 726206fd0c editor2d: login and sign up pages restyled 2025-04-19 15:58:07 +07:00
BFlat ac896fd93a editor2d demo video on open (#532)
- demo video modal opens at first load
2025-04-19 14:30:19 +07:00
Brandon Thomas 85a4ff5c55 Revert "shared toaster component (#528)" (#530)
This reverts commit e3f15b0d93.
2025-04-18 18:42:50 -04:00
BFlat e3f15b0d93 shared toaster component (#528) 2025-04-18 14:57:51 +07:00
BFlat e31a2c0a91 fix nx project discoverability (#527) 2025-04-18 14:10:40 +07:00
Kasisnu ea85abdc62 image-gen: make unused bools in task response optional 2025-04-18 10:34:52 +05:30
Brandon Thomas 4f3c93635f don't log debug level in prod 2025-04-18 00:07:51 -04:00
ArEnScandMichael Chung 82b9b90ff9 Added the apis to the api folder it loads correctly now (#525)
Co-authored-by: Michael Chung <michaelchung@michaels-mbp-2.home>
2025-04-17 22:49:27 -04:00
bflatastic ad5ea26a81 commented out test component it was pushing the ui down 2025-04-18 08:59:53 +07:00
bflatastic 6121d118f0 reduced topbar right side gap 2025-04-18 08:54:40 +07:00
bflatastic 28ca7be96c activity update 2025-04-18 08:50:55 +07:00
Brandon Thomas a2a7f7d274 could also be a bearer token issue 2025-04-17 21:39:45 -04:00
Brandon Thomas e1255a55a0 specific error message for cookie expiration 2025-04-17 21:30:16 -04:00
9f629ee5e2 Nx working test (#524)
It works now.

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Tanish Manku <tanish2k09.dev@gmail.com>
Co-authored-by: Michael Chung <michaelchung@michaels-mbp-2.home>
2025-04-17 16:32:30 -04:00
BFlat 6a82fcb6e0 Revert "shared component starting with toaster" (#522)
Reverts storytold/storyteller-rust#521

it was causing an application error on build.
2025-04-17 17:21:05 +07:00
BFlat 35eac53b9d shared component starting with toaster (#521)
- share the toaster component between both editor2d and editor 3d
2025-04-17 17:14:02 +07:00
1048 changed files with 5374 additions and 1595 deletions
+6
View File
@@ -0,0 +1,6 @@
{
"files.exclude": {
"**/*~": true,
"frontend_old/**": true
}
}
Generated
+41 -41
View File
@@ -802,47 +802,6 @@ dependencies = [
"num",
]
[[package]]
name = "artcraft"
version = "0.1.0"
dependencies = [
"anyhow",
"assertor",
"base64 0.22.1",
"bytes 1.10.0",
"chrono",
"const_format",
"crockford",
"directories 6.0.0",
"dirs 6.0.0",
"errors",
"filesys",
"futures 0.3.29",
"image",
"libloading 0.8.6",
"log",
"memory_caching",
"once_cell",
"openai_sora_client",
"primitives",
"rand 0.9.0",
"reqwest 0.12.15",
"serde",
"serde_derive",
"serde_json",
"serde_yaml",
"serial_test",
"subprocess_common",
"tauri",
"tauri-build",
"tauri-plugin-log",
"tempdir",
"tempfile",
"tokio",
"tokio-util",
"workspace-build-acceleration",
]
[[package]]
name = "ascii"
version = "0.9.3"
@@ -12026,6 +11985,47 @@ dependencies = [
"windows 0.60.0",
]
[[package]]
name = "tauri-artcraft"
version = "0.1.0"
dependencies = [
"anyhow",
"assertor",
"base64 0.22.1",
"bytes 1.10.0",
"chrono",
"const_format",
"crockford",
"directories 6.0.0",
"dirs 6.0.0",
"errors",
"filesys",
"futures 0.3.29",
"image",
"libloading 0.8.6",
"log",
"memory_caching",
"once_cell",
"openai_sora_client",
"primitives",
"rand 0.9.0",
"reqwest 0.12.15",
"serde",
"serde_derive",
"serde_json",
"serde_yaml",
"serial_test",
"subprocess_common",
"tauri",
"tauri-build",
"tauri-plugin-log",
"tempdir",
"tempfile",
"tokio",
"tokio-util",
"workspace-build-acceleration",
]
[[package]]
name = "tauri-build"
version = "2.1.1"
+1 -1
View File
@@ -24,7 +24,7 @@ members = [
"crates/cli/production/migration-tool",
# Desktop apps
"crates/desktop/tauri-4o",
"crates/desktop/tauri-artcraft",
"crates/desktop/tauri-realtime",
# Shared libraries
@@ -1,7 +0,0 @@
#[test]
fn test_dynamic_library_loading() {
let name = libloading::library_filename("cublas");
assert_eq!(name, "libcublas.so");
}
@@ -1,5 +1,5 @@
[package]
name = "artcraft"
name = "tauri-artcraft"
version = "0.1.0"
description = "Artcraft"
authors = ["you"]
@@ -12,7 +12,7 @@ publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "app_lib"
name = "tauri_artcraft_app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

@@ -2,5 +2,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
app_lib::run();
tauri_artcraft_app_lib::run();
}
@@ -0,0 +1,37 @@
{
"$schema": "https://schema.tauri.app/config/2.0.0-rc",
"productName": "ArtCraft 2D",
"version": "0.1.0",
"identifier": "ai.artcraft.app",
"build": {
"frontendDist": "../../../frontend/apps/editor2d/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "nx run editor2d:dev",
"beforeBuildCommand": "nx run editor2d:build"
},
"app": {
"windows": [
{
"title": "ArtCraft 2D",
"width": 2400,
"height": 1300,
"resizable": true,
"fullscreen": false
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
@@ -0,0 +1,5 @@
# For some reason, we can't pass json files to the tauri dev command
[build]
frontendDist = "../../../frontend/apps/editor2d/dist"
beforeDevCommand = "nx run editor2d:dev"
devUrl = "http://localhost:5741"
@@ -0,0 +1,37 @@
{
"$schema": "https://schema.tauri.app/config/2.0.0-rc",
"productName": "ArtCraft 3D",
"version": "0.1.0",
"identifier": "ai.artcraft.app",
"build": {
"frontendDist": "../../../frontend/apps/editor3d/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "nx run editor3d:dev",
"beforeBuildCommand": "nx run editor3d:build"
},
"app": {
"windows": [
{
"title": "ArtCraft 3D",
"width": 2400,
"height": 1300,
"resizable": true,
"fullscreen": false
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
@@ -2,12 +2,12 @@
"$schema": "https://schema.tauri.app/config/2.0.0-rc",
"productName": "ArtCraft",
"version": "0.1.0",
"identifier": "com.unique.value.thing.why",
"identifier": "ai.artcraft.app",
"build": {
"frontendDist": "../../../frontend/realtime/dist",
"devUrl": "http://localhost:5174",
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build2"
"frontendDist": "../../../frontend/apps/editor3d/dist",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "nx run editor3d:dev",
"beforeBuildCommand": "nx run editor3d:build"
},
"app": {
"windows": [
@@ -83,16 +83,16 @@ pub struct Generation {
pub created_at: String,
pub deleted_at: Option<String>,
pub url: String,
pub seed: i64,
pub can_download: bool,
pub download_status: String,
pub is_favorite: bool,
pub is_liked: bool,
pub is_public: bool,
pub is_archived: bool,
pub is_featured: bool,
pub has_feedback: bool,
pub like_count: i32,
pub seed: Option<i64>,
pub can_download: Option<bool>,
pub download_status: Option<String>,
pub is_favorite: Option<bool>,
pub is_liked: Option<bool>,
pub is_public: Option<bool>,
pub is_archived: Option<bool>,
pub is_featured: Option<bool>,
pub has_feedback: Option<bool>,
pub like_count: Option<i32>,
pub cloudflare_metadata: Option<serde_json::Value>,
pub cf_thumbnail_url: Option<String>,
pub encodings: Encodings,
@@ -2,4 +2,5 @@ pub mod credentials;
pub mod image_gen;
pub mod job;
pub mod upload;
pub mod sentinel_refresh;
pub mod sentinel_refresh;
mod sora_error;
@@ -0,0 +1,48 @@
use std::error::Error;
use std::fmt::{Display, Formatter};
#[derive(Debug)]
pub enum SoraError {
/// Unauthorized, cookie and/or bearer token expired. We'll need to ask for a refreshed login.
///
/// Example message, e.g. from the upload endpoint:
/// {
/// "error": {
/// "message": "Your authentication token has expired. Please try signing in again.",
/// "type": "invalid_request_error",
/// "param": null,
/// "code": "token_expired"
/// }
/// }
UnauthorizedCookieOrBearerExpired,
/// Another error occurred.
OtherBadStatus(anyhow::Error),
/// Reqwest Error
ReqwestError(reqwest::Error),
}
impl Error for SoraError {}
impl Display for SoraError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
SoraError::UnauthorizedCookieOrBearerExpired => {
write!(f, "Unauthorized: cookie and/or bearer token expired")
}
SoraError::OtherBadStatus(err) => {
write!(f, "Other error: {}", err)
}
SoraError::ReqwestError(err) => {
write!(f, "Reqwest error: {}", err)
}
}
}
}
impl From<reqwest::Error> for SoraError {
fn from(err: reqwest::Error) -> SoraError {
SoraError::ReqwestError(err)
}
}
@@ -3,6 +3,7 @@ use errors::AnyhowResult;
use reqwest::multipart::{Form, Part};
use reqwest::Client;
use serde::Deserialize;
use crate::sora_error::SoraError;
const SORA_UPLOAD_MEDIA_URL: &str = "https://sora.com/backend/uploads";
@@ -25,6 +26,17 @@ Response:
"size_bytes": 118501,
"thumbnail_url": "https://videos.openai.com/vg-assets/assets%2Fclient_upload%2Fmedia%2Fuser-9wf6JFdgRSJLjvSJ53LNAbV8%2Fmedia_01jqt9vt20erx9zvryf3v1pecx.jpg?st=2025-04-02T02%3A39%3A01Z&se=2025-04-08T03%3A39%3A01Z&sks=b&skt=2025-04-02T02%3A39%3A01Z&ske=2025-04-08T03%3A39%3A01Z&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skoid=3d249c53-07fa-4ba4-9b65-0bf8eb4ea46a&skv=2019-02-02&sv=2018-11-09&sr=b&sp=r&spr=https%2Chttp&sig=9aU9xKI0BkhRtrTb0RD05%2BT6prBnmXk1I7nV2nTsFbY%3D&az=oaivgprodscus"
}
Error response:
Failed to upload scene media to Sora: Upload failed with status 401 Unauthorized: {
"error": {
"message": "Your authentication token has expired. Please try signing in again.",
"type": "invalid_request_error",
"param": null,
"code": "token_expired"
}
}
*/
#[derive(Debug, Deserialize)]
@@ -50,7 +62,13 @@ pub (crate) struct SoraMediaUploadRequest<'a> {
pub credentials: &'a SoraCredentials,
}
pub (crate) async fn upload_media_http_request(file_bytes: Vec<u8>, filename: String, mime_type: &str, credentials: &SoraCredentials) -> AnyhowResult<SoraMediaUploadResponse> {
pub (crate) async fn upload_media_http_request(
file_bytes: Vec<u8>,
filename: String,
mime_type: &str,
credentials: &SoraCredentials,
) -> Result<SoraMediaUploadResponse, SoraError> {
// Create multipart form
let part = Part::bytes(file_bytes) // NB: Reqwest needs to own the bytes.
.file_name(filename) // NB: Reqwest needs to own the bytes
@@ -70,12 +88,29 @@ pub (crate) async fn upload_media_http_request(file_bytes: Vec<u8>, filename: St
// Check response status
if !response.status().is_success() {
let status = response.status();
let text = response.text().await?;
return Err(anyhow::anyhow!("Upload failed with status {}: {}", status, text));
let error = classify_error(response).await;
return Err(error);
}
// Parse response
let upload_response = response.json::<SoraMediaUploadResponse>().await?;
Ok(upload_response)
}
async fn classify_error(response: reqwest::Response) -> SoraError {
let status = response.status();
let message = match response.text().await {
Ok(text) => text,
Err(err) => return SoraError::ReqwestError(err),
};
let cookie_expired =
message.contains("Your authentication token has expired. Please try signing in again.")
|| message.contains("token_expired");
if cookie_expired {
SoraError::UnauthorizedCookieOrBearerExpired
} else {
SoraError::OtherBadStatus(anyhow::anyhow!("Upload failed with status {}: {}", status, message))
}
}
@@ -4,7 +4,6 @@
/// NB: `sqlx::query` is spammy and dumps all queries as "info"-level log lines.
/// NB: `hyper::proto::h1::io` is incredibly spammy and logs every chunk of bytes in very large files being downloaded.
pub const DEFAULT_RUST_LOG: &str = concat!(
"debug,",
"actix_web=info,",
"sqlx::query=warn,",
"hyper::proto::h1::io=warn,",
+17
View File
@@ -27,4 +27,21 @@ Run dev server:
nx dev editor3d
```
```
call when starting on main or a new branch:
./clean_modules
The names for @frontend and @storyteller come from the package.json file in the libs folder.
import { Login } from "@frontend/login";
import { api } from "@storyteller/api";
building:
npx nx build editor3d
npx nx build editor2d
dev:
npx nx dev editor3d
npx nx dev editor2d
```
+8 -1
View File
@@ -4,7 +4,14 @@
"version": "0.0.0",
"type": "module",
"nx": {
"name": "editor2d"
"name": "editor2d",
"targets": {
"build": {
"dependsOn": [
"^build"
]
}
}
},
"scripts": {
"dev": "echo 'editor2d' && vite",
Binary file not shown.
@@ -125,6 +125,10 @@
@apply relative border border-ui-border shadow-lg backdrop-blur-xl transition-colors duration-300;
@apply bg-ui-controls/50 hover:bg-ui-controls/90 !important;
}
.glass-no-hover {
@apply hover:bg-ui-controls/50 !important;
}
}
@keyframes glow {
+10 -16
View File
@@ -1,12 +1,9 @@
import { useRef } from "react";
import { useNavigate, useSearchParams, Link } from "react-router-dom";
import { useSignalEffect } from "@preact/signals-react/runtime";
import { faKey, faUser } from "@fortawesome/pro-solid-svg-icons";
import { Button, Input, LoadingSpinner } from "~/components/ui";
import { authentication } from "~/signals";
import { paperWrapperStyles } from "~/components/styles";
import { twMerge } from "tailwind-merge";
export const Login = () => {
@@ -62,24 +59,21 @@ export const Login = () => {
});
return (
<div className="fixed flex h-full w-full flex-col items-center justify-center bg-[url('/svg/bg-dots.svg')] bg-[length:200px_200px] bg-center bg-repeat">
<div className="my-7 flex w-10/12 max-w-2xl items-center justify-center gap-4">
<div className="pegboard fixed flex h-full w-full flex-col items-center justify-center bg-center bg-repeat">
<div className="mb-7 flex w-10/12 max-w-2xl items-center justify-center gap-4">
<img
src="/brand/Storyteller-Logo-Black.png"
alt="Storyteller Logo"
className="h-11 select-none"
src="/brand/artcraft-logo.png"
alt="ArtCraft Logo"
className="h-9 select-none"
/>
</div>
<div className="w-full max-w-xl rounded-xl shadow-lg">
<div
className={twMerge(
paperWrapperStyles,
"relative mx-auto w-full rounded-none rounded-t-xl p-8 shadow-none",
"glass glass-no-hover relative mx-auto w-full rounded-none rounded-t-xl p-6 shadow-none",
)}
>
<h1 className="mb-9 text-center text-2xl font-bold">
Log in to Board
</h1>
<h1 className="mb-6 text-center text-2xl font-bold">Log in</h1>
<form
ref={formRef}
onSubmit={handleOnSumbit}
@@ -106,7 +100,7 @@ export const Login = () => {
required
/>
<Button className="mt-6 py-3">Continue</Button>
<Button className="mt-4 py-3">Continue</Button>
</form>
{shouldShowLoader && (
<div className="absolute left-0 top-0 flex h-full w-full items-center justify-center">
@@ -114,10 +108,10 @@ export const Login = () => {
</div>
)}
</div>
<div className="align-items flex w-full max-w-xl rounded-b-xl border border-t-0 bg-gray-100 px-8 py-4">
<div className="align-items flex w-full max-w-xl rounded-b-xl bg-ui-controls px-6 py-4">
<a
href="https://storyteller.ai/password-reset"
className="text-brand-primary hover:text-brand-primary-400 grow text-sm transition-all duration-150"
className="grow text-sm !text-primary-400 transition-all duration-150 hover:!text-primary-300"
>
Forgot your password?
</a>
@@ -14,10 +14,17 @@ import { appMode } from "~/signals";
import { useSignals } from "@preact/signals-react/runtime";
import { GenerationRootComponent } from "~/GenerationRootComponent/GenerationRootComponent";
import { EditModeRootComponent } from "~/EditModeRootComponent/EditModeRootComponent";
import { useRef } from "react";
import { useRef, useState } from "react";
import { EngineType } from "~/KonvaApp";
import { GenerationEngine } from "~/KonvaApp/GenerationEngine";
import { GalleryRootComponent } from "~/GalleryRootComponent";
import { BaseDialog } from "~/components/ui/BaseDialog";
import { Button } from "~/components/ui/Button";
import {
faArrowRight,
faMagicWandSparkles,
} from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
export const Main = withProtectionRoute(() => {
// This is a hook that will log the number of times the component has rerendered
@@ -32,6 +39,7 @@ export const Main = withProtectionRoute(() => {
const realtimeEngineRef = useRef<EngineType | null>(null);
const generationEngineRef = useRef<GenerationEngine | null>(null);
const [firstTimeDialogOpen, setFirstTimeDialogOpen] = useState(true);
const appModeValue = appMode.value;
let childView;
@@ -60,25 +68,72 @@ export const Main = withProtectionRoute(() => {
}
return (
<div className="fixed h-full w-full">
<div className="fixed grid h-full w-full grid-cols-12 grid-rows-12">
{childView}
</div>
<div className="absolute top-0 w-full p-3.5">
<div className="relative flex w-full">
<div className="absolute left-0">
<ToolbarTopLeft />
</div>
<div className="flex w-full justify-center">
<ToolbarTopCenter />
</div>
<div className="absolute right-0">
<ToolbarTopRight />
<>
<div className="fixed h-full w-full">
<div className="fixed grid h-full w-full grid-cols-12 grid-rows-12">
{childView}
</div>
<div className="absolute top-0 w-full p-3.5">
<div className="relative flex w-full">
<div className="absolute left-0">
<ToolbarTopLeft />
</div>
<div className="flex w-full justify-center">
<ToolbarTopCenter />
</div>
<div className="absolute right-0">
<ToolbarTopRight />
</div>
</div>
</div>
{appModeValue === "gallery" && (
<GalleryRootComponent className="z-1 fixed h-full w-full bg-black" />
)}
</div>
{appModeValue === "gallery" &&
(<GalleryRootComponent className="fixed h-full w-full z-1 bg-black" />)}
</div>
<BaseDialog
isOpen={firstTimeDialogOpen}
onClose={() => {
setFirstTimeDialogOpen(false);
}}
className="max-w-5xl"
>
<div className="flex flex-col items-center justify-center gap-6">
<div className="flex flex-col items-center gap-3">
<h1 className="text-3xl font-bold">
<FontAwesomeIcon
icon={faMagicWandSparkles}
className="mr-3 text-[24px]"
/>
Welcome to ArtCraft
</h1>
<div className="text-center">
<p className="text-lg font-medium text-white/80">
Your creative canvas for digital art and design
</p>
<p className="text-white/60">
Draw freely, create collages, and design with our intuitive
tool. Bring your ideas to life in seconds!
</p>
</div>
</div>
<div className="aspect-video w-full overflow-hidden rounded-md">
<video autoPlay muted loop controls={false}>
<source src="/videos/demo_video.mp4" type="video/mp4" />
</video>
</div>
<Button
className="px-4 py-3 font-semibold"
icon={faArrowRight}
iconFlip={true}
onClick={() => {
setFirstTimeDialogOpen(false);
}}
>
Start creating now
</Button>
</div>
</BaseDialog>
</>
);
});
@@ -1,12 +1,9 @@
import { useRef } from "react";
import { useNavigate, useSearchParams, Link } from "react-router-dom";
import { useSignalEffect } from "@preact/signals-react/runtime";
import { faKey, faUser } from "@fortawesome/pro-solid-svg-icons";
import { Button, Input, LoadingSpinner } from "~/components/ui";
import { authentication } from "~/signals";
import { paperWrapperStyles } from "~/components/styles";
import { twMerge } from "tailwind-merge";
export const Signup = () => {
@@ -77,22 +74,21 @@ export const Signup = () => {
});
return (
<div className="fixed flex h-full w-full flex-col items-center justify-center bg-[url('/svg/bg-dots.svg')] bg-[length:200px_200px] bg-center bg-repeat">
<div className="my-7 flex w-10/12 max-w-2xl items-center justify-center gap-4">
<div className="pegboard fixed flex h-full w-full flex-col items-center justify-center bg-center bg-repeat">
<div className="mb-7 flex w-10/12 max-w-2xl items-center justify-center gap-4">
<img
src="/brand/Storyteller-Logo-Black.png"
alt="Storyteller Logo"
className="h-11 select-none"
src="/brand/artcraft-logo.png"
alt="ArtCraft Logo"
className="h-9 select-none"
/>
</div>
<div className="w-full max-w-xl rounded-xl shadow-lg">
<div
className={twMerge(
paperWrapperStyles,
"relative mx-auto w-full rounded-none rounded-t-xl p-8 shadow-none",
"glass glass-no-hover relative mx-auto w-full rounded-none rounded-t-xl p-6 shadow-none",
)}
>
<h1 className="mb-9 text-center text-2xl font-bold">
<h1 className="mb-6 text-center text-2xl font-bold">
Create your Account
</h1>
<form
@@ -139,7 +135,7 @@ export const Signup = () => {
required
/>
<Button className="mt-6 py-3">Create Account</Button>
<Button className="mt-4 py-3">Create Account</Button>
</form>
{shouldShowLoader && (
<div className="absolute left-0 top-0 flex h-full w-full items-center justify-center">
@@ -147,7 +143,7 @@ export const Signup = () => {
</div>
)}
</div>
<div className="align-items flex w-full max-w-xl rounded-b-xl border border-t-0 bg-gray-100 px-8 py-4">
<div className="align-items flex w-full max-w-xl rounded-b-xl bg-ui-controls px-6 py-4">
<div className="flex w-full justify-end gap-1 text-sm">
<p className="opacity-75">Already have an account?</p>
<Link to="/login">Log In</Link>
@@ -7,6 +7,8 @@ import {
GenerationLoadingState,
generationSignal,
} from "~/signals";
import { faChevronRight } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "~/components/ui/Button";
// import { paperWrapperStyles } from "~/components/styles";
// import { faPlus, faQuestion } from "@fortawesome/pro-solid-svg-icons";
@@ -32,6 +34,10 @@ export const ToolbarTopLeft = () => {
const generationState = generationSignal.value;
const handleClick = () => {
window.location.href = "https://storyteller-3d.netlify.app/";
};
console.log(appMode.value);
return (
@@ -46,14 +52,25 @@ export const ToolbarTopLeft = () => {
className="h-[28px] select-none"
/>
<TabSelector
<Button
variant="secondary"
icon={faChevronRight}
iconClassName="text-xs"
iconFlip={true}
onClick={handleClick}
className="bg-transparent p-0 text-sm text-white/80 hover:bg-transparent hover:text-white hover:underline hover:underline-offset-2"
>
Go to 3D Stage Editor
</Button>
{/* <TabSelector
tabs={tabs}
activeTab={activeTab.value}
onTabChange={handleTabChange}
disabled={
generationState.loadingState === GenerationLoadingState.GENERATING
}
/>
/> */}
{/* <ToolbarButton icon={faPlus}>
<span className="font-semibold">New Board</span>
-1
View File
@@ -1 +0,0 @@
_
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
-23
View File
@@ -1,23 +0,0 @@
import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
stories: ["../**/*.mdx", "../**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {
builder: {
viteConfigPath: "sb-vite.config.ts",
},
},
},
docs: {
autodocs: "tag",
},
};
export default config;
@@ -1,34 +0,0 @@
const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function expressMiddleware(router) {
router.use(
"/v1",
createProxyMiddleware({
target: "https://api.storyteller.ai/v1",
changeOrigin: true,
on: {
proxyReq: async (req, res) => {
req.setHeader("Access-Control-Allow-Origin", "*");
req.setHeader("Origin", "http://localhost:5173");
req.setHeader("Referer", "http://localhost:5173");
},
},
logger: console,
}),
);
router.use(
"/cdn-cgi",
createProxyMiddleware({
target: "https://cdn.storyteller.ai/cdn-cgi",
changeOrigin: true,
on: {
proxyReq: async (req, res) => {
req.setHeader("Access-Control-Allow-Origin", "*");
req.setHeader("Origin", "http://localhost:5173");
req.setHeader("Referer", "http://localhost:5173");
},
},
logger: console,
}),
);
};
@@ -1,7 +0,0 @@
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
Roboto, "Helvetica Neue", Arial, sans-serif;
color: white;
}
</style>
@@ -1,6 +0,0 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"
/>
@@ -1,23 +0,0 @@
import type { Preview } from "@storybook/react";
import "tailwindcss/tailwind.css";
import "../app/styles/tailwind.css";
import "../app/styles/normalize.css?url";
import "../app//styles/tailwind.css?url";
import "../app//styles/base.css?url";
import { MemoryRouter } from "react-router";
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [
(story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>,
],
};
export default preview;
@@ -1,76 +0,0 @@
import { Fragment } from "react";
import { Listbox, Transition } from "@headlessui/react";
import { faCheck, faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { MediaFileAnimationType } from "~/enums";
export type SelectValue = string | number;
export type SelectOption = { label: string; value: SelectValue };
interface ListDropdownProps {
options: SelectOption[];
onChange: (val: MediaFileAnimationType) => void;
placeholder?: string;
value?: SelectValue;
}
export const Select = ({
onChange,
options,
placeholder,
value,
}: ListDropdownProps) => {
const selectedOption = options.find(
(option: SelectOption) => option.value === value,
) || { label: placeholder || "", value: "" };
return (
<Listbox value={value} onChange={onChange}>
<div className="relative mt-1">
<Listbox.Button className="relative h-10 w-full cursor-pointer rounded-md bg-brand-secondary py-2 pl-3 pr-10 text-left outline-none outline-offset-0 transition-all duration-150 ease-in-out focus:outline-brand-primary sm:text-sm">
<span className={`block truncate${value ? "" : " opacity-50"}`}>
{selectedOption.label}
</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<FontAwesomeIcon icon={faChevronDown} aria-hidden="true" />
</span>
</Listbox.Button>
<Transition
as={Fragment}
leave="transition ease-in duration-100"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<Listbox.Options className="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-brand-secondary py-1 text-base shadow-lg focus:outline-none sm:text-sm">
{options.map((option, itemIdx) => (
<Listbox.Option
key={itemIdx}
className={({ active }) =>
`relative cursor-pointer select-none py-2 pl-10 pr-4 text-white ${
active ? "text-white" : "text-gray-400"
}`
}
value={option.value}
>
{({ selected }) => (
<>
<span
className={`block truncate ${
selected ? "font-medium" : "font-normal"
}`}
>
{option.label}
</span>
{selected ? (
<span className="absolute inset-y-0 left-0 flex items-center pl-3">
<FontAwesomeIcon icon={faCheck} aria-hidden="true" />
</span>
) : null}
</>
)}
</Listbox.Option>
))}
</Listbox.Options>
</Transition>
</div>
</Listbox>
);
};
@@ -1,114 +0,0 @@
import { useEffect, useState } from "react";
import { TransitionDialogue, LoadingDots } from "~/components";
import { UploadAssetError } from "../UploadModal/UploadAssetError";
import { UploadSuccess } from "../UploadModal/UploadSuccess";
import { UploadFiles3D } from "./UploadFiles3D";
import { FilterEngineCategories, UploaderStates } from "~/enums";
import { initialUploaderState, UploaderState } from "~/models";
interface Props {
onClose: () => void;
onSuccess: () => void;
isOpen: boolean;
title: string;
fileTypes: string[];
engineCategory: FilterEngineCategories;
options?: {
fileSubtypes?: { [key: string]: string }[];
hasLength?: boolean;
hasThumbnailUpload?: boolean;
};
}
export function UploadModal3D({
isOpen,
onClose,
onSuccess,
title,
fileTypes,
engineCategory,
options,
}: Props) {
const [uploaderState, setUploaderState] =
useState<UploaderState>(initialUploaderState);
const updateUploaderState = (newState: UploaderState) => {
setUploaderState(newState);
};
const resetModalState = () => {
setUploaderState(initialUploaderState);
};
useEffect(() => {
if (isOpen) {
resetModalState();
}
}, [isOpen]);
const UploaderModalContent = () => {
switch (uploaderState.status) {
case UploaderStates.ready:
return (
<UploadFiles3D
title={title}
engineCategory={engineCategory}
fileTypes={fileTypes}
options={options}
onClose={onClose}
onUploadProgress={updateUploaderState}
/>
);
case UploaderStates.uploadingAsset:
case UploaderStates.uploadingCover:
case UploaderStates.settingCover:
return (
<>
<LoadingDots className="mb-1 bg-transparent" />
<div className="w-100 text-center opacity-50">Uploading...</div>
</>
);
case UploaderStates.success:
return (
<UploadSuccess
title={title}
onOk={() => {
onSuccess();
onClose();
}}
/>
);
case UploaderStates.assetError:
return (
<UploadAssetError
onCancel={onClose}
onRetry={() => {
resetModalState();
}}
type={FilterEngineCategories.OBJECT}
errorMessage={uploaderState.errorMessage}
/>
);
case UploaderStates.coverCreateError:
case UploaderStates.coverSetError:
return (
<UploadAssetError
onCancel={onClose}
onRetry={() => {
resetModalState();
}}
type={"Thumbnail"}
errorMessage={uploaderState.errorMessage}
/>
);
}
};
return (
<TransitionDialogue isOpen={isOpen} onClose={onClose} title={title}>
<UploaderModalContent />
</TransitionDialogue>
);
}
@@ -1,26 +0,0 @@
import { useSignals } from "@preact/signals-react/runtime";
import { AUTH_STATUS } from "~/enums";
import { authentication } from "~/signals";
import { ButtonLink } from "~/components";
import ProfileDropdown from "./ProfileDropdown";
export const AuthButtons = () => {
useSignals();
const { status } = authentication;
if (status.value === AUTH_STATUS.LOGGED_IN) {
return <ProfileDropdown />;
} else {
return (
<>
<ButtonLink variant="secondary" to="/login">
Login
</ButtonLink>
<ButtonLink to="/signup">Sign Up</ButtonLink>
</>
);
}
};
+16
View File
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ArtCraft 3D</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<!-- <link rel="stylesheet" href="/src/styles.css" /> -->
</head>
<body className="overflow-hidden bg-ui-background">
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Login | ArtCraft 3D</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<!-- <link rel="stylesheet" href="/src/styles.css" /> -->
</head>
<body className="overflow-hidden bg-ui-background">
<div id="root"></div>
<script type="module" src="/src/login.tsx"></script>
</body>
</html>
@@ -1,389 +0,0 @@
import { TransitionDialogue } from "~/components/reusable/TransitionDialogue";
import {
faPlus,
faSearch,
faChevronLeft,
faLayerGroup,
faUser,
faSun,
faCube,
faChevronRight,
faMountainCity,
faDog,
} from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Button, CloseButton, Input, Tooltip } from "~/components";
import { TabSelector } from "~/components/reusable/TabSelector";
import { useState, useEffect, useMemo, useRef } from "react";
import { ItemElements } from "../SidePanelTabs/sharedComps/ItemElements";
import {
demoSkyboxItems,
demoShapeItems,
demoCharacterItems,
assetModalVisibleDuringDrag,
reopenAfterDragSignal,
assetModalVisible,
} from "../../signals";
import { MediaItem } from "../../models";
import { useUserObjects, useFeaturedObjects } from "../SidePanelTabs/hooks";
import { FilterEngineCategories } from "~/enums";
import { twMerge } from "tailwind-merge";
import { useSignals } from "@preact/signals-react/runtime";
interface AssetModalProps {
isOpen: boolean;
onClose: () => void;
}
type AssetTab = {
id: string;
label: string;
icon: typeof faLayerGroup;
engineCategory?: FilterEngineCategories;
items: MediaItem[];
};
const AllTabSection = ({
label,
items,
onViewAll,
}: {
label: string;
items: MediaItem[];
onViewAll: () => void;
}) => (
<div className="mb-0">
<div className="mb-2 flex items-center justify-between">
<h3 className="text-md ml-2 font-semibold opacity-90">{label}</h3>
<Button
variant="secondary"
className="mr-3 flex items-center gap-1 px-2 py-1 text-xs"
onClick={onViewAll}
>
View all
<FontAwesomeIcon icon={faChevronRight} className="text-xs opacity-70" />
</Button>
</div>
<div className="h-[170px]">
<ItemElements
items={items.slice(0, 4)}
busy={false}
debug={`all-tab-section-${label}`}
/>
</div>
</div>
);
export const AssetModal = () => {
useSignals();
const [activeLibraryTab, setActiveLibraryTab] = useState("library");
const [activeAssetTab, setActiveAssetTab] = useState("all");
const [searchTerm, setSearchTerm] = useState("");
const [reopenAfterAdd, setReopenAfterAdd] = useState(false);
const searchInputRef = useRef<HTMLInputElement>(null);
const handleClose = () => {
assetModalVisible.value = false;
};
// Update the signal when the preference changes
useEffect(() => {
reopenAfterDragSignal.value = reopenAfterAdd;
}, [reopenAfterAdd]);
useEffect(() => {
if (assetModalVisible.value) {
// Small delay to ensure the modal is fully mounted
const timer = setTimeout(() => {
searchInputRef.current?.focus();
}, 100);
return () => clearTimeout(timer);
}
}, [assetModalVisible.value]);
// Fetch objects for different categories
const { userObjects: userCharacters } = useUserObjects({
filterEngineCategories: [FilterEngineCategories.CHARACTER],
defaultErrorMessage: "Error fetching user characters",
});
const { userObjects: userObjects } = useUserObjects({
filterEngineCategories: [FilterEngineCategories.OBJECT],
defaultErrorMessage: "Error fetching user objects",
});
const { featuredObjects: featuredCharacters } = useFeaturedObjects({
filterEngineCategories: [FilterEngineCategories.CHARACTER],
defaultErrorMessage: "Error fetching featured characters",
});
const { featuredObjects: featuredObjects } = useFeaturedObjects({
filterEngineCategories: [FilterEngineCategories.OBJECT],
defaultErrorMessage: "Error fetching featured objects",
});
const { userObjects: userSets } = useUserObjects({
filterEngineCategories: [FilterEngineCategories.LOCATION],
defaultErrorMessage: "Error fetching user sets",
});
const { featuredObjects: featuredSets } = useFeaturedObjects({
filterEngineCategories: [FilterEngineCategories.LOCATION],
defaultErrorMessage: "Error fetching featured sets",
});
const { userObjects: userCreatures } = useUserObjects({
filterEngineCategories: [FilterEngineCategories.CREATURE],
defaultErrorMessage: "Error fetching user creatures",
});
const { featuredObjects: featuredCreatures } = useFeaturedObjects({
filterEngineCategories: [FilterEngineCategories.CREATURE],
defaultErrorMessage: "Error fetching featured creatures",
});
const libraryTabs = [
{ id: "library", label: "Library" },
{ id: "mine", label: "Mine" },
];
// eslint-disable-next-line react-hooks/exhaustive-deps
const assetTabs: AssetTab[] = [
{ id: "all", label: "All", icon: faLayerGroup, items: [] },
{
id: "character",
label: "Character",
icon: faUser,
engineCategory: FilterEngineCategories.CHARACTER,
items:
activeLibraryTab === "library"
? [...demoCharacterItems.value, ...(featuredCharacters ?? [])]
: (userCharacters ?? []),
},
{
id: "objects",
label: "Objects",
icon: faCube,
engineCategory: FilterEngineCategories.OBJECT,
items:
activeLibraryTab === "library"
? [...demoShapeItems.value, ...(featuredObjects ?? [])]
: (userObjects ?? []),
},
{
id: "sets",
label: "Sets",
icon: faMountainCity,
engineCategory: FilterEngineCategories.LOCATION,
items:
activeLibraryTab === "library"
? (featuredSets ?? [])
: (userSets ?? []),
},
{
id: "creatures",
label: "Creatures",
icon: faDog,
engineCategory: FilterEngineCategories.CREATURE,
items:
activeLibraryTab === "library"
? (featuredCreatures ?? [])
: (userCreatures ?? []),
},
{
id: "skybox",
label: "Skybox",
icon: faSun,
items: demoSkyboxItems.value,
},
];
// Combine all items for the "All" tab
const allItems = useMemo(() => {
return assetTabs
.filter((tab) => tab.id !== "all")
.flatMap((tab) => tab.items);
}, [assetTabs]);
// Update the items array for the "All" tab
assetTabs[0].items = allItems;
const currentTab =
assetTabs.find((tab) => tab.id === activeAssetTab) || assetTabs[0];
// Filter items based on search term
const displayedItems = useMemo(() => {
if (!searchTerm) {
return currentTab.items;
}
const searchLower = searchTerm.toLowerCase();
return currentTab.items.filter(
(item) =>
item.name?.toLowerCase().includes(searchLower) ||
item.description?.toLowerCase().includes(searchLower),
);
}, [currentTab.items, searchTerm]);
// Switch to "All" tab when searching
useEffect(() => {
if (searchTerm && activeAssetTab !== "all") {
setActiveAssetTab("all");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchTerm]);
// Clear search term when tab changes
useEffect(() => {
setSearchTerm("");
}, [activeAssetTab]);
const renderContent = () => {
if (activeAssetTab === "all" && !searchTerm) {
return (
<div className="h-full space-y-2 overflow-y-auto">
{assetTabs.slice(1).map((tab) => (
<AllTabSection
key={tab.id}
label={tab.label}
items={tab.items}
onViewAll={() => setActiveAssetTab(tab.id)}
/>
))}
</div>
);
}
return (
<ItemElements
items={displayedItems}
busy={false}
debug={`asset-modal-${currentTab.id}`}
/>
);
};
const handleAddAsset = () => {
if (reopenAfterAdd) {
// Small delay to allow the modal to close and reopen
setTimeout(() => {
handleClose();
}, 100);
} else {
handleClose();
}
};
const clearSearch = () => setSearchTerm("");
return (
<TransitionDialogue
isOpen={assetModalVisible.value && assetModalVisibleDuringDrag.value}
onClose={handleClose}
className="h-[640px] max-w-4xl"
childPadding={false}
>
<div className="grid h-full grid-cols-12 gap-3">
<div className="relative col-span-3 flex h-full flex-col p-3 pt-2 after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-gray-200 after:dark:bg-white/10">
<div className="flex items-center justify-between gap-2.5 py-0.5">
<h2 className="text-[18px] font-semibold opacity-80">3D Assets</h2>
<Tooltip content="Upload model" position="top" delay={200}>
<Button
className="h-6 w-6 rounded-full border-none bg-transparent text-white/70 transition-colors hover:bg-transparent hover:text-white/100"
onClick={handleAddAsset}
>
<FontAwesomeIcon icon={faPlus} className="text-xl" />
</Button>
</Tooltip>
</div>
<hr className="my-2 w-full border-white/10" />
<div className="space-y-2">
{assetTabs.map((tab) => (
<Button
key={tab.id}
variant={activeAssetTab === tab.id ? "primary" : "secondary"}
className={twMerge(
"w-full justify-start rounded-xl border border-white/[2%] bg-white/[4%] px-3.5 py-2.5 text-left hover:bg-white/15",
activeAssetTab === tab.id &&
"border-brand-primary bg-brand-primary/10 hover:bg-brand-primary/10",
)}
onClick={() => setActiveAssetTab(tab.id)}
>
<FontAwesomeIcon icon={tab.icon} className="mr-2 opacity-70" />
{tab.label}
</Button>
))}
</div>
<div className="mt-auto flex items-center gap-2 pt-3">
<input
type="checkbox"
id="reopen-after-add"
checked={reopenAfterAdd}
onChange={(e) => setReopenAfterAdd(e.target.checked)}
className="h-4 w-4 rounded-lg border-gray-300 bg-gray-700 text-brand-primary focus:ring-brand-primary"
/>
<label htmlFor="reopen-after-add" className="text-sm text-white/70">
Reopen after adding
</label>
</div>
</div>
<div className="col-span-9 p-3 pb-0 ps-0 pt-2">
<div className="flex h-full flex-col">
<div className="h-full">
<div className="flex items-center gap-4">
<TabSelector
tabs={libraryTabs}
activeTab={activeLibraryTab}
onTabChange={setActiveLibraryTab}
className="w-auto"
/>
<div className="relative grow">
<Input
ref={searchInputRef}
placeholder="Search"
className="grow"
inputClassName="pr-2.5"
icon={faSearch}
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
iconClassName="text-white/60"
/>
{searchTerm && (
<CloseButton
onClick={clearSearch}
className="absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 bg-white/10 text-[10px] hover:bg-white/20"
/>
)}
</div>
<CloseButton onClick={handleClose} />
</div>
<div
className={twMerge(
"overflow-auto-y mt-4 h-[574px]",
activeAssetTab !== "all" && "h-[552px]",
)}
>
{activeAssetTab !== "all" && !searchTerm && (
<div className="mb-2 flex items-center font-semibold">
<Button
variant="secondary"
className="flex items-center gap-2 border-none bg-transparent px-3 py-1.5 text-sm text-white/70 hover:bg-transparent hover:text-white/100"
onClick={() => setActiveAssetTab("all")}
>
<FontAwesomeIcon
icon={faChevronLeft}
className="text-sm font-semibold opacity-70"
/>
</Button>
{currentTab.label}
</div>
)}
{renderContent()}
</div>
</div>
</div>
</div>
</div>
</TransitionDialogue>
);
};

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 701 B

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Some files were not shown because too many files have changed in this diff Show More