mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 11:01:35 +00:00
Merge branch 'main' into feature/download-click-listen
This commit is contained in:
5 files changed
+11
-103
No files matched your search
Generated
-25
@@ -7701,16 +7701,6 @@ dependencies = [
|
||||
"objc2-core-foundation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-javascript-core"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9052cb1bb50a4c161d934befcf879526fb87ae9a68858f241e693ca46225cf5a"
|
||||
dependencies = [
|
||||
"objc2 0.6.1",
|
||||
"objc2-core-foundation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-metal"
|
||||
version = "0.2.2"
|
||||
@@ -7747,17 +7737,6 @@ dependencies = [
|
||||
"objc2-foundation 0.3.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-security"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1f8e0ef3ab66b08c42644dcb34dba6ec0a574bbd8adbb8bdbdc7a2779731a44"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"objc2 0.6.1",
|
||||
"objc2-core-foundation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-ui-kit"
|
||||
version = "0.3.0"
|
||||
@@ -7782,8 +7761,6 @@ dependencies = [
|
||||
"objc2-app-kit",
|
||||
"objc2-core-foundation",
|
||||
"objc2-foundation 0.3.1",
|
||||
"objc2-javascript-core",
|
||||
"objc2-security",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -12154,8 +12131,6 @@ dependencies = [
|
||||
"log",
|
||||
"memory_caching",
|
||||
"memory_store",
|
||||
"objc2-app-kit",
|
||||
"objc2-web-kit",
|
||||
"once_cell",
|
||||
"openai_sora_client",
|
||||
"primitives",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use tauri::{AppHandle, Manager, Webview};
|
||||
use errors::AnyhowResult;
|
||||
use tauri::{AppHandle, Manager};
|
||||
|
||||
const MAIN_WINDOW_NAME: &str = "main";
|
||||
|
||||
@@ -7,19 +7,19 @@ pub fn webview_unsafe_for_app(app: &AppHandle) -> AnyhowResult<()> {
|
||||
let windows = app.windows();
|
||||
let maybe_window = windows.get(MAIN_WINDOW_NAME);
|
||||
|
||||
if let Some(window) = maybe_window {
|
||||
/*if let Some(window) = maybe_window {
|
||||
let webview = window.get_webview(MAIN_WINDOW_NAME);
|
||||
if let Some(webview) = webview {
|
||||
webview_unsafe(&webview);
|
||||
|
||||
}
|
||||
} else {
|
||||
return Err(anyhow::anyhow!("Main window not found"));
|
||||
}
|
||||
}*/
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn webview_unsafe(webview: &Webview) {
|
||||
/*pub fn webview_unsafe(webview: &Webview) {
|
||||
let r = webview.with_webview(|webview| {
|
||||
webview.controller();
|
||||
#[cfg(target_os = "macos")]
|
||||
@@ -35,4 +35,4 @@ pub fn webview_unsafe(webview: &Webview) {
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}*/
|
||||
+3
-1
@@ -316,7 +316,9 @@ pub async fn fetch<R: Runtime>(
|
||||
let mut maybe_origin_header = headers.get(header::ORIGIN);
|
||||
|
||||
let replace_origin_header = maybe_origin_header.is_none()
|
||||
|| maybe_origin_header == Some(&HeaderValue::from_static("null"));
|
||||
|| maybe_origin_header == Some(&HeaderValue::from_static("null")) // Above error (Mac)
|
||||
|| maybe_origin_header == Some(&HeaderValue::from_static("http://tauri.localhost")) // Windows
|
||||
|| maybe_origin_header == Some(&HeaderValue::from_static("tauri://localhost")); // Mac plausibly causes this
|
||||
|
||||
if replace_origin_header {
|
||||
// TODO(bt): Make this a sentinel origin, eg. sentinel.storyteller.ai.
|
||||
|
||||
@@ -5,33 +5,10 @@ import { viteCommonjs, esbuildCommonjs } from '@originjs/vite-plugin-commonjs'
|
||||
import path from 'path'
|
||||
import { dirname, resolve } from 'node:path'
|
||||
|
||||
// NB(bt): This configuration file can specify bundler rollup options, compiler plugins,
|
||||
// dev server HTTP headers, CORS options, path rewriting, etc. Read the vite docs for more.
|
||||
export default defineConfig({
|
||||
root: path.resolve(__dirname, 'app'),
|
||||
//resolve: {
|
||||
// alias: {
|
||||
// 'kalidokit': `${path.resolve(__dirname, 'src')}/`,
|
||||
// },
|
||||
//},
|
||||
//resolve: {
|
||||
// alias: [
|
||||
// {
|
||||
// find: /@frontend\/login/,
|
||||
// //replacement: path.resolve(__dirname, 'node_modules', '@frontend', 'login'),
|
||||
// replacement: path.resolve(__dirname, '../', '../', 'libs', 'login'),
|
||||
// },
|
||||
// ],
|
||||
//},
|
||||
//rollupOptions: {
|
||||
// // make sure to externalize deps that shouldn't be bundled
|
||||
// // into your library
|
||||
// exports: "named",
|
||||
// external: [],
|
||||
// output: {
|
||||
// // Provide global variables to use in the UMD build
|
||||
// // for externalized deps
|
||||
// globals: {},
|
||||
// },
|
||||
//},
|
||||
build: {
|
||||
outDir: path.resolve(__dirname, 'dist'),
|
||||
rollupOptions: {
|
||||
@@ -45,51 +22,7 @@ export default defineConfig({
|
||||
plugins: [
|
||||
netlifyPlugin(),
|
||||
tsconfigPaths(),
|
||||
//viteCommonjs({
|
||||
// include: ["kalidokit"],
|
||||
//}),
|
||||
{
|
||||
name: "configure-response-headers",
|
||||
configureServer: (server) => {
|
||||
server.middlewares.use((_req, res, next) => {
|
||||
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
||||
next();
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
server: {
|
||||
// Local development CORS for images
|
||||
headers: {
|
||||
"Cross-Origin-Opener-Policy": "same-origin",
|
||||
"Cross-Origin-Embedder-Policy": "require-corp"
|
||||
},
|
||||
proxy: {
|
||||
"/v1": "https://api.storyteller.ai",
|
||||
"/avatar": "https://www.gravatar.com",
|
||||
"/preview": "https://style.storyteller.ai",
|
||||
"/google": {
|
||||
target: "https://storage.googleapis.com",
|
||||
rewrite: (path) => path.replace(/^\/google/, ""),
|
||||
},
|
||||
},
|
||||
},
|
||||
//optimizeDeps: {
|
||||
// esbuildOptions: {
|
||||
// plugins: [
|
||||
// esbuildCommonjs(['kalidokit'])
|
||||
// ]
|
||||
// }
|
||||
//}
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
//'vue',
|
||||
//'vue-router',
|
||||
//'@vueuse/core',
|
||||
//'@vueuse/head',
|
||||
//'consola',
|
||||
//'kalidokit',
|
||||
],
|
||||
}
|
||||
});
|
||||
@@ -276,8 +276,6 @@ export const GalleryModal = React.memo(
|
||||
onError={() =>
|
||||
handleImageError(item.thumbnail!)
|
||||
}
|
||||
crossOrigin="anonymous"
|
||||
referrerPolicy="no-referrer"
|
||||
/>
|
||||
)}
|
||||
{mode === "select" &&
|
||||
|
||||
Reference in new issue
Block a user