From c873d152c32861f9293ce88e3fd47a3dd63c5f72 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 29 May 2021 12:22:31 +0530 Subject: [PATCH] rearranged static files --- .gitignore | 4 +++- build.rs | 4 ++-- src/docs.rs | 2 +- src/main.rs | 6 +++--- src/static_assets/filemap.rs | 4 ++-- src/static_assets/static_files.rs | 19 ++++++++++++++---- src/widget/mod.rs | 10 +-------- .../cache}/img/icon-trans.png | Bin {static-assets => static/cache}/img/icon.png | Bin .../cache}/img/svg/bell.svg | 0 .../cache}/img/svg/credit-card.svg | 0 .../cache}/img/svg/eye-off.svg | 0 .../cache}/img/svg/eye.svg | 0 .../cache}/img/svg/file-text.svg | 0 .../cache}/img/svg/file.svg | 0 .../cache}/img/svg/filter.svg | 0 .../cache}/img/svg/github.svg | 0 .../cache}/img/svg/globe.svg | 0 .../cache}/img/svg/help-circle.svg | 0 .../cache}/img/svg/home.svg | 0 .../cache}/img/svg/key.svg | 0 .../cache}/img/svg/log-out.svg | 0 .../cache}/img/svg/menu.svg | 0 .../cache}/img/svg/message-square.svg | 0 .../cache}/img/svg/moon.svg | 0 .../cache}/img/svg/settings.svg | 0 .../cache}/img/svg/shield-off.svg | 0 .../cache}/img/svg/shield.svg | 0 .../cache}/img/svg/tag.svg | 0 .../cache}/img/svg/toggle-left.svg | 0 .../cache}/img/svg/toggle-right.svg | 0 .../cache}/img/svg/user.svg | 0 .../favicons/android-icon-144x144.png | Bin .../favicons/android-icon-192x192.png | Bin .../favicons/android-icon-36x36.png | Bin .../favicons/android-icon-48x48.png | Bin .../favicons/android-icon-72x72.png | Bin .../favicons/android-icon-96x96.png | Bin .../favicons/apple-icon-114x114.png | Bin .../favicons/apple-icon-120x120.png | Bin .../favicons/apple-icon-144x144.png | Bin .../favicons/apple-icon-152x152.png | Bin .../favicons/apple-icon-180x180.png | Bin .../favicons/apple-icon-57x57.png | Bin .../favicons/apple-icon-60x60.png | Bin .../favicons/apple-icon-72x72.png | Bin .../favicons/apple-icon-76x76.png | Bin .../favicons/apple-icon-precomposed.png | Bin .../favicons/apple-icon.png | Bin .../favicons/browserconfig.xml | 0 .../favicons/favicon-16x16.png | Bin .../favicons/favicon-32x32.png | Bin .../favicons/favicon-96x96.png | Bin .../favicons/favicon.ico | Bin .../favicons/manifest.json | 4 ++-- .../favicons/ms-icon-144x144.png | Bin .../favicons/ms-icon-150x150.png | Bin .../favicons/ms-icon-310x310.png | Bin .../favicons/ms-icon-70x70.png | Bin {docs => static/openapi}/favicon-16x16.png | Bin {docs => static/openapi}/favicon-32x32.png | Bin {docs => static/openapi}/index.html | 0 {docs => static/openapi}/oauth2-redirect.html | 0 {docs => static/openapi}/swagger-ui-bundle.js | 0 .../openapi}/swagger-ui-bundle.js.map | 0 .../openapi}/swagger-ui-es-bundle-core.js | 0 .../openapi}/swagger-ui-es-bundle-core.js.map | 0 .../openapi}/swagger-ui-es-bundle.js | 0 .../openapi}/swagger-ui-es-bundle.js.map | 0 .../openapi}/swagger-ui-standalone-preset.js | 0 .../swagger-ui-standalone-preset.js.map | 0 {docs => static/openapi}/swagger-ui.css | 0 {docs => static/openapi}/swagger-ui.css.map | 0 {docs => static/openapi}/swagger-ui.js | 0 {docs => static/openapi}/swagger-ui.js.map | 0 templates/auth/login/index.html | 2 +- templates/auth/register/index.html | 2 +- templates/components/headers/raw-headers.html | 4 ++-- templates/components/showPassword/index.html | 4 ++-- templates/panel/header/taskbar/index.html | 6 +++--- templates/panel/navbar/index.html | 18 ++++++++--------- templates/widget/index.html | 2 +- webpack.config.js | 2 +- 83 files changed, 49 insertions(+), 44 deletions(-) rename {static-assets => static/cache}/img/icon-trans.png (100%) rename {static-assets => static/cache}/img/icon.png (100%) rename {static-assets => static/cache}/img/svg/bell.svg (100%) rename {static-assets => static/cache}/img/svg/credit-card.svg (100%) rename {static-assets => static/cache}/img/svg/eye-off.svg (100%) rename {static-assets => static/cache}/img/svg/eye.svg (100%) rename {static-assets => static/cache}/img/svg/file-text.svg (100%) rename {static-assets => static/cache}/img/svg/file.svg (100%) rename {static-assets => static/cache}/img/svg/filter.svg (100%) rename {static-assets => static/cache}/img/svg/github.svg (100%) rename {static-assets => static/cache}/img/svg/globe.svg (100%) rename {static-assets => static/cache}/img/svg/help-circle.svg (100%) rename {static-assets => static/cache}/img/svg/home.svg (100%) rename {static-assets => static/cache}/img/svg/key.svg (100%) rename {static-assets => static/cache}/img/svg/log-out.svg (100%) rename {static-assets => static/cache}/img/svg/menu.svg (100%) rename {static-assets => static/cache}/img/svg/message-square.svg (100%) rename {static-assets => static/cache}/img/svg/moon.svg (100%) rename {static-assets => static/cache}/img/svg/settings.svg (100%) rename {static-assets => static/cache}/img/svg/shield-off.svg (100%) rename {static-assets => static/cache}/img/svg/shield.svg (100%) rename {static-assets => static/cache}/img/svg/tag.svg (100%) rename {static-assets => static/cache}/img/svg/toggle-left.svg (100%) rename {static-assets => static/cache}/img/svg/toggle-right.svg (100%) rename {static-assets => static/cache}/img/svg/user.svg (100%) rename {static-assets => static}/favicons/android-icon-144x144.png (100%) rename {static-assets => static}/favicons/android-icon-192x192.png (100%) rename {static-assets => static}/favicons/android-icon-36x36.png (100%) rename {static-assets => static}/favicons/android-icon-48x48.png (100%) rename {static-assets => static}/favicons/android-icon-72x72.png (100%) rename {static-assets => static}/favicons/android-icon-96x96.png (100%) rename {static-assets => static}/favicons/apple-icon-114x114.png (100%) rename {static-assets => static}/favicons/apple-icon-120x120.png (100%) rename {static-assets => static}/favicons/apple-icon-144x144.png (100%) rename {static-assets => static}/favicons/apple-icon-152x152.png (100%) rename {static-assets => static}/favicons/apple-icon-180x180.png (100%) rename {static-assets => static}/favicons/apple-icon-57x57.png (100%) rename {static-assets => static}/favicons/apple-icon-60x60.png (100%) rename {static-assets => static}/favicons/apple-icon-72x72.png (100%) rename {static-assets => static}/favicons/apple-icon-76x76.png (100%) rename {static-assets => static}/favicons/apple-icon-precomposed.png (100%) rename {static-assets => static}/favicons/apple-icon.png (100%) rename {static-assets => static}/favicons/browserconfig.xml (100%) rename {static-assets => static}/favicons/favicon-16x16.png (100%) rename {static-assets => static}/favicons/favicon-32x32.png (100%) rename {static-assets => static}/favicons/favicon-96x96.png (100%) rename {static-assets => static}/favicons/favicon.ico (100%) rename {static-assets => static}/favicons/manifest.json (96%) rename {static-assets => static}/favicons/ms-icon-144x144.png (100%) rename {static-assets => static}/favicons/ms-icon-150x150.png (100%) rename {static-assets => static}/favicons/ms-icon-310x310.png (100%) rename {static-assets => static}/favicons/ms-icon-70x70.png (100%) rename {docs => static/openapi}/favicon-16x16.png (100%) rename {docs => static/openapi}/favicon-32x32.png (100%) rename {docs => static/openapi}/index.html (100%) rename {docs => static/openapi}/oauth2-redirect.html (100%) rename {docs => static/openapi}/swagger-ui-bundle.js (100%) rename {docs => static/openapi}/swagger-ui-bundle.js.map (100%) rename {docs => static/openapi}/swagger-ui-es-bundle-core.js (100%) rename {docs => static/openapi}/swagger-ui-es-bundle-core.js.map (100%) rename {docs => static/openapi}/swagger-ui-es-bundle.js (100%) rename {docs => static/openapi}/swagger-ui-es-bundle.js.map (100%) rename {docs => static/openapi}/swagger-ui-standalone-preset.js (100%) rename {docs => static/openapi}/swagger-ui-standalone-preset.js.map (100%) rename {docs => static/openapi}/swagger-ui.css (100%) rename {docs => static/openapi}/swagger-ui.css.map (100%) rename {docs => static/openapi}/swagger-ui.js (100%) rename {docs => static/openapi}/swagger-ui.js.map (100%) diff --git a/.gitignore b/.gitignore index f01bce58..5bb69e0c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,10 @@ cobertura.xml prod/ node_modules/ /static-assets/bundle -/static +static/cache/bundle ./templates/**/*.js /static-assets/bundle/* src/cache_buster_data.json coverage +dist +assets diff --git a/build.rs b/build.rs index 531a6502..b4cf8613 100644 --- a/build.rs +++ b/build.rs @@ -47,8 +47,8 @@ fn cache_bust() { ]; let config = BusterBuilder::default() - .source("./static-assets") - .result("./static") + .source("./static/cache") + .result("./assets") .mime_types(types) .copy(true) .follow_links(true) diff --git a/src/docs.rs b/src/docs.rs index 27c3b9f2..3df5e5c9 100644 --- a/src/docs.rs +++ b/src/docs.rs @@ -51,7 +51,7 @@ pub fn services(cfg: &mut web::ServiceConfig) { } #[derive(RustEmbed)] -#[folder = "docs/"] +#[folder = "static/openapi/"] struct Asset; pub fn handle_embedded_file(path: &str) -> HttpResponse { diff --git a/src/main.rs b/src/main.rs index 18e2fcc5..0bdc1ffe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,11 +55,11 @@ lazy_static! { // pub static ref S: String = env::var("S").unwrap(); pub static ref FILES: FileMap = FileMap::new(); pub static ref JS: &'static str = - FILES.get("./static-assets/bundle/bundle.js").unwrap(); + FILES.get("./static/cache/bundle/bundle.js").unwrap(); pub static ref CSS: &'static str = - FILES.get("./static-assets/bundle/bundle.css").unwrap(); + FILES.get("./static/cache/bundle/bundle.css").unwrap(); pub static ref MOBILE_CSS: &'static str = - FILES.get("./static-assets/bundle/mobile.css").unwrap(); + FILES.get("./static/cache/bundle/mobile.css").unwrap(); /// points to source files matching build commit pub static ref SOURCE_FILES_OF_INSTANCE: String = { diff --git a/src/static_assets/filemap.rs b/src/static_assets/filemap.rs index 2141daa9..1c5a338c 100644 --- a/src/static_assets/filemap.rs +++ b/src/static_assets/filemap.rs @@ -45,8 +45,8 @@ mod tests { #[test] fn filemap_works() { let files = super::FileMap::new(); - let css = files.get("./static-assets/bundle/bundle.css").unwrap(); + let css = files.get("./static/cache/bundle/bundle.css").unwrap(); println!("{}", css); - assert!(css.contains("/static/bundle/bundle")); + assert!(css.contains("/assets/bundle/bundle")); } } diff --git a/src/static_assets/static_files.rs b/src/static_assets/static_files.rs index 4458b87a..06cc7af2 100644 --- a/src/static_assets/static_files.rs +++ b/src/static_assets/static_files.rs @@ -25,7 +25,7 @@ use rust_embed::RustEmbed; use crate::CACHE_AGE; #[derive(RustEmbed)] -#[folder = "static/"] +#[folder = "assets/"] struct Asset; fn handle_assets(path: &str) -> HttpResponse { @@ -47,7 +47,7 @@ fn handle_assets(path: &str) -> HttpResponse { } } -#[get("/static/{_:.*}")] +#[get("/assets/{_:.*}")] pub async fn static_files(path: web::Path) -> impl Responder { handle_assets(&path.0) } @@ -55,7 +55,7 @@ pub async fn static_files(path: web::Path) -> impl Responder { #[derive(RustEmbed)] -#[folder = "static-assets/favicons/"] +#[folder = "static/favicons/"] struct Favicons; fn handle_favicons(path: &str) -> HttpResponse { @@ -90,7 +90,6 @@ mod tests { use super::*; use crate::*; - use crate::tests::*; #[actix_rt::test] async fn static_assets_work() { @@ -102,6 +101,18 @@ mod tests { ) .await; assert_eq!(resp.status(), StatusCode::OK); + + let resp = test::call_service( + &mut app, + test::TestRequest::get().uri( + crate::FILES + .get("./static/cache/img/icon-trans.png") + .unwrap() + ).to_request(), + ) + .await; + assert_eq!(resp.status(), StatusCode::OK); + } #[actix_rt::test] diff --git a/src/widget/mod.rs b/src/widget/mod.rs index 272b0a9a..3a3cdf98 100644 --- a/src/widget/mod.rs +++ b/src/widget/mod.rs @@ -72,20 +72,12 @@ pub fn services(cfg: &mut web::ServiceConfig) { mod test { use actix_web::http::StatusCode; use actix_web::test; - use actix_web::web::Bytes; use crate::*; #[actix_rt::test] async fn captcha_widget_route_works() { - let mut app = test::init_service( - actix_web::App::new() - .wrap(get_identity_service()) - .wrap(actix_middleware::NormalizePath::new( - actix_middleware::normalize::TrailingSlash::Trim, - )) - .configure(crate::widget::services) - ).await; + let mut app = get_app!().await; let list_sitekey_resp = test::call_service( diff --git a/static-assets/img/icon-trans.png b/static/cache/img/icon-trans.png similarity index 100% rename from static-assets/img/icon-trans.png rename to static/cache/img/icon-trans.png diff --git a/static-assets/img/icon.png b/static/cache/img/icon.png similarity index 100% rename from static-assets/img/icon.png rename to static/cache/img/icon.png diff --git a/static-assets/img/svg/bell.svg b/static/cache/img/svg/bell.svg similarity index 100% rename from static-assets/img/svg/bell.svg rename to static/cache/img/svg/bell.svg diff --git a/static-assets/img/svg/credit-card.svg b/static/cache/img/svg/credit-card.svg similarity index 100% rename from static-assets/img/svg/credit-card.svg rename to static/cache/img/svg/credit-card.svg diff --git a/static-assets/img/svg/eye-off.svg b/static/cache/img/svg/eye-off.svg similarity index 100% rename from static-assets/img/svg/eye-off.svg rename to static/cache/img/svg/eye-off.svg diff --git a/static-assets/img/svg/eye.svg b/static/cache/img/svg/eye.svg similarity index 100% rename from static-assets/img/svg/eye.svg rename to static/cache/img/svg/eye.svg diff --git a/static-assets/img/svg/file-text.svg b/static/cache/img/svg/file-text.svg similarity index 100% rename from static-assets/img/svg/file-text.svg rename to static/cache/img/svg/file-text.svg diff --git a/static-assets/img/svg/file.svg b/static/cache/img/svg/file.svg similarity index 100% rename from static-assets/img/svg/file.svg rename to static/cache/img/svg/file.svg diff --git a/static-assets/img/svg/filter.svg b/static/cache/img/svg/filter.svg similarity index 100% rename from static-assets/img/svg/filter.svg rename to static/cache/img/svg/filter.svg diff --git a/static-assets/img/svg/github.svg b/static/cache/img/svg/github.svg similarity index 100% rename from static-assets/img/svg/github.svg rename to static/cache/img/svg/github.svg diff --git a/static-assets/img/svg/globe.svg b/static/cache/img/svg/globe.svg similarity index 100% rename from static-assets/img/svg/globe.svg rename to static/cache/img/svg/globe.svg diff --git a/static-assets/img/svg/help-circle.svg b/static/cache/img/svg/help-circle.svg similarity index 100% rename from static-assets/img/svg/help-circle.svg rename to static/cache/img/svg/help-circle.svg diff --git a/static-assets/img/svg/home.svg b/static/cache/img/svg/home.svg similarity index 100% rename from static-assets/img/svg/home.svg rename to static/cache/img/svg/home.svg diff --git a/static-assets/img/svg/key.svg b/static/cache/img/svg/key.svg similarity index 100% rename from static-assets/img/svg/key.svg rename to static/cache/img/svg/key.svg diff --git a/static-assets/img/svg/log-out.svg b/static/cache/img/svg/log-out.svg similarity index 100% rename from static-assets/img/svg/log-out.svg rename to static/cache/img/svg/log-out.svg diff --git a/static-assets/img/svg/menu.svg b/static/cache/img/svg/menu.svg similarity index 100% rename from static-assets/img/svg/menu.svg rename to static/cache/img/svg/menu.svg diff --git a/static-assets/img/svg/message-square.svg b/static/cache/img/svg/message-square.svg similarity index 100% rename from static-assets/img/svg/message-square.svg rename to static/cache/img/svg/message-square.svg diff --git a/static-assets/img/svg/moon.svg b/static/cache/img/svg/moon.svg similarity index 100% rename from static-assets/img/svg/moon.svg rename to static/cache/img/svg/moon.svg diff --git a/static-assets/img/svg/settings.svg b/static/cache/img/svg/settings.svg similarity index 100% rename from static-assets/img/svg/settings.svg rename to static/cache/img/svg/settings.svg diff --git a/static-assets/img/svg/shield-off.svg b/static/cache/img/svg/shield-off.svg similarity index 100% rename from static-assets/img/svg/shield-off.svg rename to static/cache/img/svg/shield-off.svg diff --git a/static-assets/img/svg/shield.svg b/static/cache/img/svg/shield.svg similarity index 100% rename from static-assets/img/svg/shield.svg rename to static/cache/img/svg/shield.svg diff --git a/static-assets/img/svg/tag.svg b/static/cache/img/svg/tag.svg similarity index 100% rename from static-assets/img/svg/tag.svg rename to static/cache/img/svg/tag.svg diff --git a/static-assets/img/svg/toggle-left.svg b/static/cache/img/svg/toggle-left.svg similarity index 100% rename from static-assets/img/svg/toggle-left.svg rename to static/cache/img/svg/toggle-left.svg diff --git a/static-assets/img/svg/toggle-right.svg b/static/cache/img/svg/toggle-right.svg similarity index 100% rename from static-assets/img/svg/toggle-right.svg rename to static/cache/img/svg/toggle-right.svg diff --git a/static-assets/img/svg/user.svg b/static/cache/img/svg/user.svg similarity index 100% rename from static-assets/img/svg/user.svg rename to static/cache/img/svg/user.svg diff --git a/static-assets/favicons/android-icon-144x144.png b/static/favicons/android-icon-144x144.png similarity index 100% rename from static-assets/favicons/android-icon-144x144.png rename to static/favicons/android-icon-144x144.png diff --git a/static-assets/favicons/android-icon-192x192.png b/static/favicons/android-icon-192x192.png similarity index 100% rename from static-assets/favicons/android-icon-192x192.png rename to static/favicons/android-icon-192x192.png diff --git a/static-assets/favicons/android-icon-36x36.png b/static/favicons/android-icon-36x36.png similarity index 100% rename from static-assets/favicons/android-icon-36x36.png rename to static/favicons/android-icon-36x36.png diff --git a/static-assets/favicons/android-icon-48x48.png b/static/favicons/android-icon-48x48.png similarity index 100% rename from static-assets/favicons/android-icon-48x48.png rename to static/favicons/android-icon-48x48.png diff --git a/static-assets/favicons/android-icon-72x72.png b/static/favicons/android-icon-72x72.png similarity index 100% rename from static-assets/favicons/android-icon-72x72.png rename to static/favicons/android-icon-72x72.png diff --git a/static-assets/favicons/android-icon-96x96.png b/static/favicons/android-icon-96x96.png similarity index 100% rename from static-assets/favicons/android-icon-96x96.png rename to static/favicons/android-icon-96x96.png diff --git a/static-assets/favicons/apple-icon-114x114.png b/static/favicons/apple-icon-114x114.png similarity index 100% rename from static-assets/favicons/apple-icon-114x114.png rename to static/favicons/apple-icon-114x114.png diff --git a/static-assets/favicons/apple-icon-120x120.png b/static/favicons/apple-icon-120x120.png similarity index 100% rename from static-assets/favicons/apple-icon-120x120.png rename to static/favicons/apple-icon-120x120.png diff --git a/static-assets/favicons/apple-icon-144x144.png b/static/favicons/apple-icon-144x144.png similarity index 100% rename from static-assets/favicons/apple-icon-144x144.png rename to static/favicons/apple-icon-144x144.png diff --git a/static-assets/favicons/apple-icon-152x152.png b/static/favicons/apple-icon-152x152.png similarity index 100% rename from static-assets/favicons/apple-icon-152x152.png rename to static/favicons/apple-icon-152x152.png diff --git a/static-assets/favicons/apple-icon-180x180.png b/static/favicons/apple-icon-180x180.png similarity index 100% rename from static-assets/favicons/apple-icon-180x180.png rename to static/favicons/apple-icon-180x180.png diff --git a/static-assets/favicons/apple-icon-57x57.png b/static/favicons/apple-icon-57x57.png similarity index 100% rename from static-assets/favicons/apple-icon-57x57.png rename to static/favicons/apple-icon-57x57.png diff --git a/static-assets/favicons/apple-icon-60x60.png b/static/favicons/apple-icon-60x60.png similarity index 100% rename from static-assets/favicons/apple-icon-60x60.png rename to static/favicons/apple-icon-60x60.png diff --git a/static-assets/favicons/apple-icon-72x72.png b/static/favicons/apple-icon-72x72.png similarity index 100% rename from static-assets/favicons/apple-icon-72x72.png rename to static/favicons/apple-icon-72x72.png diff --git a/static-assets/favicons/apple-icon-76x76.png b/static/favicons/apple-icon-76x76.png similarity index 100% rename from static-assets/favicons/apple-icon-76x76.png rename to static/favicons/apple-icon-76x76.png diff --git a/static-assets/favicons/apple-icon-precomposed.png b/static/favicons/apple-icon-precomposed.png similarity index 100% rename from static-assets/favicons/apple-icon-precomposed.png rename to static/favicons/apple-icon-precomposed.png diff --git a/static-assets/favicons/apple-icon.png b/static/favicons/apple-icon.png similarity index 100% rename from static-assets/favicons/apple-icon.png rename to static/favicons/apple-icon.png diff --git a/static-assets/favicons/browserconfig.xml b/static/favicons/browserconfig.xml similarity index 100% rename from static-assets/favicons/browserconfig.xml rename to static/favicons/browserconfig.xml diff --git a/static-assets/favicons/favicon-16x16.png b/static/favicons/favicon-16x16.png similarity index 100% rename from static-assets/favicons/favicon-16x16.png rename to static/favicons/favicon-16x16.png diff --git a/static-assets/favicons/favicon-32x32.png b/static/favicons/favicon-32x32.png similarity index 100% rename from static-assets/favicons/favicon-32x32.png rename to static/favicons/favicon-32x32.png diff --git a/static-assets/favicons/favicon-96x96.png b/static/favicons/favicon-96x96.png similarity index 100% rename from static-assets/favicons/favicon-96x96.png rename to static/favicons/favicon-96x96.png diff --git a/static-assets/favicons/favicon.ico b/static/favicons/favicon.ico similarity index 100% rename from static-assets/favicons/favicon.ico rename to static/favicons/favicon.ico diff --git a/static-assets/favicons/manifest.json b/static/favicons/manifest.json similarity index 96% rename from static-assets/favicons/manifest.json rename to static/favicons/manifest.json index 013d4a6a..e7fba85b 100644 --- a/static-assets/favicons/manifest.json +++ b/static/favicons/manifest.json @@ -1,5 +1,5 @@ { - "name": "App", + "name": "mCaptcha", "icons": [ { "src": "\/android-icon-36x36.png", @@ -38,4 +38,4 @@ "density": "4.0" } ] -} \ No newline at end of file +} diff --git a/static-assets/favicons/ms-icon-144x144.png b/static/favicons/ms-icon-144x144.png similarity index 100% rename from static-assets/favicons/ms-icon-144x144.png rename to static/favicons/ms-icon-144x144.png diff --git a/static-assets/favicons/ms-icon-150x150.png b/static/favicons/ms-icon-150x150.png similarity index 100% rename from static-assets/favicons/ms-icon-150x150.png rename to static/favicons/ms-icon-150x150.png diff --git a/static-assets/favicons/ms-icon-310x310.png b/static/favicons/ms-icon-310x310.png similarity index 100% rename from static-assets/favicons/ms-icon-310x310.png rename to static/favicons/ms-icon-310x310.png diff --git a/static-assets/favicons/ms-icon-70x70.png b/static/favicons/ms-icon-70x70.png similarity index 100% rename from static-assets/favicons/ms-icon-70x70.png rename to static/favicons/ms-icon-70x70.png diff --git a/docs/favicon-16x16.png b/static/openapi/favicon-16x16.png similarity index 100% rename from docs/favicon-16x16.png rename to static/openapi/favicon-16x16.png diff --git a/docs/favicon-32x32.png b/static/openapi/favicon-32x32.png similarity index 100% rename from docs/favicon-32x32.png rename to static/openapi/favicon-32x32.png diff --git a/docs/index.html b/static/openapi/index.html similarity index 100% rename from docs/index.html rename to static/openapi/index.html diff --git a/docs/oauth2-redirect.html b/static/openapi/oauth2-redirect.html similarity index 100% rename from docs/oauth2-redirect.html rename to static/openapi/oauth2-redirect.html diff --git a/docs/swagger-ui-bundle.js b/static/openapi/swagger-ui-bundle.js similarity index 100% rename from docs/swagger-ui-bundle.js rename to static/openapi/swagger-ui-bundle.js diff --git a/docs/swagger-ui-bundle.js.map b/static/openapi/swagger-ui-bundle.js.map similarity index 100% rename from docs/swagger-ui-bundle.js.map rename to static/openapi/swagger-ui-bundle.js.map diff --git a/docs/swagger-ui-es-bundle-core.js b/static/openapi/swagger-ui-es-bundle-core.js similarity index 100% rename from docs/swagger-ui-es-bundle-core.js rename to static/openapi/swagger-ui-es-bundle-core.js diff --git a/docs/swagger-ui-es-bundle-core.js.map b/static/openapi/swagger-ui-es-bundle-core.js.map similarity index 100% rename from docs/swagger-ui-es-bundle-core.js.map rename to static/openapi/swagger-ui-es-bundle-core.js.map diff --git a/docs/swagger-ui-es-bundle.js b/static/openapi/swagger-ui-es-bundle.js similarity index 100% rename from docs/swagger-ui-es-bundle.js rename to static/openapi/swagger-ui-es-bundle.js diff --git a/docs/swagger-ui-es-bundle.js.map b/static/openapi/swagger-ui-es-bundle.js.map similarity index 100% rename from docs/swagger-ui-es-bundle.js.map rename to static/openapi/swagger-ui-es-bundle.js.map diff --git a/docs/swagger-ui-standalone-preset.js b/static/openapi/swagger-ui-standalone-preset.js similarity index 100% rename from docs/swagger-ui-standalone-preset.js rename to static/openapi/swagger-ui-standalone-preset.js diff --git a/docs/swagger-ui-standalone-preset.js.map b/static/openapi/swagger-ui-standalone-preset.js.map similarity index 100% rename from docs/swagger-ui-standalone-preset.js.map rename to static/openapi/swagger-ui-standalone-preset.js.map diff --git a/docs/swagger-ui.css b/static/openapi/swagger-ui.css similarity index 100% rename from docs/swagger-ui.css rename to static/openapi/swagger-ui.css diff --git a/docs/swagger-ui.css.map b/static/openapi/swagger-ui.css.map similarity index 100% rename from docs/swagger-ui.css.map rename to static/openapi/swagger-ui.css.map diff --git a/docs/swagger-ui.js b/static/openapi/swagger-ui.js similarity index 100% rename from docs/swagger-ui.js rename to static/openapi/swagger-ui.js diff --git a/docs/swagger-ui.js.map b/static/openapi/swagger-ui.js.map similarity index 100% rename from docs/swagger-ui.js.map rename to static/openapi/swagger-ui.js.map diff --git a/templates/auth/login/index.html b/templates/auth/login/index.html index bb266005..66e2e7e7 100644 --- a/templates/auth/login/index.html +++ b/templates/auth/login/index.html @@ -4,7 +4,7 @@
" + crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>" class="auth__logo" alt="mcaptcha logo" />
" + crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>" class="auth__logo" alt="mcaptcha logo" /> diff --git a/templates/components/headers/raw-headers.html b/templates/components/headers/raw-headers.html index 23d8fc86..47d75466 100644 --- a/templates/components/headers/raw-headers.html +++ b/templates/components/headers/raw-headers.html @@ -24,7 +24,7 @@ /> " + content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>" /> " + content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>" /> " alt="" /> + crate::FILES.get("./static/cache/img/svg/eye.svg").unwrap() .>" alt="" /> " alt="" /> + crate::FILES.get("./static/cache/img/svg/eye-off.svg").unwrap() .>" alt="" /> diff --git a/templates/panel/header/taskbar/index.html b/templates/panel/header/taskbar/index.html index 464af33c..0c377572 100644 --- a/templates/panel/header/taskbar/index.html +++ b/templates/panel/header/taskbar/index.html @@ -12,19 +12,19 @@
  • " alt="Profile" /> + crate::FILES.get("./static/cache/img/svg/moon.svg").unwrap() .>" alt="Profile" />
  • " + crate::FILES.get("./static/cache/img/svg/bell.svg").unwrap() .>" alt="Notifications" />
  • " alt="Profile" + crate::FILES.get("./static/cache/img/svg/log-out.svg").unwrap() .>" alt="Profile" />
  • diff --git a/templates/panel/navbar/index.html b/templates/panel/navbar/index.html index bdc17e3c..4256ecbc 100644 --- a/templates/panel/navbar/index.html +++ b/templates/panel/navbar/index.html @@ -1,7 +1,7 @@