Compare commits

..

No commits in common. "e6ba5433e27d436e35b9fc3719bc6ce6b2ca537e" and "cac342bdc5478198b112b09976d4e16c9b265062" have entirely different histories.

4 changed files with 3 additions and 6 deletions

1
Cargo.lock generated
View File

@ -1149,7 +1149,6 @@ dependencies = [
"config", "config",
"image", "image",
"serde", "serde",
"tracing",
] ]
[[package]] [[package]]

View File

@ -19,6 +19,5 @@ config = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
image = { workspace = true } image = { workspace = true }
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }
tracing = { workspace = true }
[lints] [lints]
workspace = true workspace = true

View File

@ -17,9 +17,7 @@ impl AppAvatar {
pub async fn init(cfg: &AppConfig) -> anyhow::Result<Self> { pub async fn init(cfg: &AppConfig) -> anyhow::Result<Self> {
let path = cfg.avatar_path()?; let path = cfg.avatar_path()?;
if std::fs::read_dir(&path).is_err() { if std::fs::read_dir(&path).is_err() {
if let Err(e) = std::fs::create_dir_all(&path) { std::fs::create_dir_all(&path)?;
tracing::warn!(path = %path, error = %e, "Avatar directory not available, avatars disabled");
}
} }
let basic_path = PathBuf::from(path); let basic_path = PathBuf::from(path);
Ok(Self { basic_path }) Ok(Self { basic_path })

View File

@ -2,6 +2,7 @@ import path from "path"
import tailwindcss from "@tailwindcss/vite" import tailwindcss from "@tailwindcss/vite"
import react from "@vitejs/plugin-react" import react from "@vitejs/plugin-react"
import {defineConfig, type Plugin} from "vite" import {defineConfig, type Plugin} from "vite"
import {analyzer} from 'vite-bundle-analyzer'
function tailwindEscapeFix(): Plugin { function tailwindEscapeFix(): Plugin {
return { return {
@ -16,7 +17,7 @@ function tailwindEscapeFix(): Plugin {
} }
export default defineConfig({ export default defineConfig({
plugins: [tailwindcss(), tailwindEscapeFix(), react()], plugins: [tailwindcss(), tailwindEscapeFix(), react(), analyzer()],
optimizeDeps: { optimizeDeps: {
entries: ["src/**/*.{ts,tsx}"], entries: ["src/**/*.{ts,tsx}"],
}, },