Compare commits
2 Commits
cac342bdc5
...
e6ba5433e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6ba5433e2 | ||
|
|
d19a3ca557 |
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1149,6 +1149,7 @@ dependencies = [
|
|||||||
"config",
|
"config",
|
||||||
"image",
|
"image",
|
||||||
"serde",
|
"serde",
|
||||||
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@ -19,5 +19,6 @@ 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
|
||||||
|
|||||||
@ -17,7 +17,9 @@ 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() {
|
||||||
std::fs::create_dir_all(&path)?;
|
if let Err(e) = 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 })
|
||||||
|
|||||||
@ -2,7 +2,6 @@ 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 {
|
||||||
@ -17,7 +16,7 @@ function tailwindEscapeFix(): Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [tailwindcss(), tailwindEscapeFix(), react(), analyzer()],
|
plugins: [tailwindcss(), tailwindEscapeFix(), react()],
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
entries: ["src/**/*.{ts,tsx}"],
|
entries: ["src/**/*.{ts,tsx}"],
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user