mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-24 20:41:01 +00:00
Remove underscore prefix from route methods to suppress clippy
This commit is contained in:
parent
33fceddc08
commit
f720dcbe9a
6 changed files with 13 additions and 11 deletions
|
@ -246,8 +246,9 @@ pub fn theme_files(file: PathBuf, _build_id: &RawStr) -> Option<ThemeFile> {
|
|||
.map(ThemeFile)
|
||||
}
|
||||
|
||||
#[get("/static/cached/<_build_id>/<file..>", rank = 2)]
|
||||
pub fn plume_static_files(file: PathBuf, _build_id: &RawStr) -> Option<CachedFile> {
|
||||
#[allow(unused_variables)]
|
||||
#[get("/static/cached/<build_id>/<file..>", rank = 2)]
|
||||
pub fn plume_static_files(file: PathBuf, build_id: &RawStr) -> Option<CachedFile> {
|
||||
static_files(file)
|
||||
}
|
||||
#[get("/static/media/<file..>")]
|
||||
|
|
|
@ -378,9 +378,10 @@ pub struct UpdateUserForm {
|
|||
pub hide_custom_css: bool,
|
||||
}
|
||||
|
||||
#[put("/@/<_name>/edit", data = "<form>")]
|
||||
#[allow(unused_variables)]
|
||||
#[put("/@/<name>/edit", data = "<form>")]
|
||||
pub fn update(
|
||||
_name: String,
|
||||
name: String,
|
||||
conn: DbConn,
|
||||
mut user: User,
|
||||
form: LenientForm<UpdateUserForm>,
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<meta charset="utf-8" />
|
||||
<title>@title ⋅ @i18n!(ctx.1, "Plume")</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(ctx.2.clone().and_then(|u| u.preferred_theme).unwrap_or_else(|| CONFIG.default_theme.clone())).join("theme.css"), _build_id = CACHE_NAME)" />
|
||||
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(ctx.2.clone().and_then(|u| u.preferred_theme).unwrap_or_else(|| CONFIG.default_theme.clone())).join("theme.css"), build_id = CACHE_NAME)" />
|
||||
<link rel="manifest" href="@uri!(instance::web_manifest)" />
|
||||
<link rel="icon" type="image/png" href="@uri!(plume_static_files: file = CONFIG.logo.favicon.as_str(), _build_id = CACHE_NAME)">
|
||||
<link rel="icon" type="image/png" href="@uri!(plume_static_files: file = CONFIG.logo.favicon.as_str(), build_id = CACHE_NAME)">
|
||||
<meta content='#282c37' name='theme-color'/>
|
||||
@:head()
|
||||
</head>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<div id="content">
|
||||
<nav>
|
||||
<a href="@uri!(instance::index)" class="title">
|
||||
<img src="@uri!(plume_static_files: file = CONFIG.logo.main.as_str(), _build_id = CACHE_NAME)">
|
||||
<img src="@uri!(plume_static_files: file = CONFIG.logo.main.as_str(), build_id = CACHE_NAME)">
|
||||
<p>@i18n!(ctx.1, "Plume")</p>
|
||||
</a>
|
||||
<hr/>
|
||||
|
@ -96,6 +96,6 @@
|
|||
<a href="https://matrix.to/#/#plume-blog:matrix.org">@i18n!(ctx.1, "Matrix room")</a>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="@uri!(plume_static_files: file = "plume-front.js", _build_id = CACHE_NAME)"></script>
|
||||
<script src="@uri!(plume_static_files: file = "plume-front.js", build_id = CACHE_NAME)"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<link href='@blog.ap_url' rel='canonical'>
|
||||
@if !ctx.2.clone().map(|u| u.hide_custom_css).unwrap_or(false) {
|
||||
@if let Some(ref theme) = blog.theme {
|
||||
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(theme).join("theme.css"), _build_id = CACHE_NAME)">
|
||||
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(theme).join("theme.css"), build_id = CACHE_NAME)">
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
@if !ctx.2.clone().map(|u| u.hide_custom_css).unwrap_or(false) {
|
||||
@if let Some(ref theme) = blog.theme {
|
||||
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(theme).join("theme.css"), _build_id = CACHE_NAME)">
|
||||
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(theme).join("theme.css"), build_id = CACHE_NAME)">
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
@i18n!(ctx.1, "To change your avatar, upload it to your gallery and then select from there.")
|
||||
<a href="@uri!(medias::new)">@i18n!(ctx.1, "Upload an avatar")</a>
|
||||
</p>
|
||||
<form method="post" action="@uri!(user::update: _name = u.username.clone())">
|
||||
<form method="post" action="@uri!(user::update: name = u.username.clone())">
|
||||
<!-- Rocket hack to use various HTTP methods -->
|
||||
<input type=hidden name="_method" value="put">
|
||||
|
||||
|
|
Loading…
Reference in a new issue