Merge branch 'staging' into 'main'
Staging See merge request PhilippHofer/rot!39
This commit is contained in:
commit
fadb65c631
@ -20,6 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"choices.js": "^10.2.0",
|
||||
"d3": "^7.8.5"
|
||||
"d3": "^7.8.5",
|
||||
"terser": "^5.21.0"
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,12 @@ export default defineConfig({
|
||||
],
|
||||
publicDir: false, // disable copy `public/` to outDir
|
||||
build: {
|
||||
minify: 'terser', // Explicitly specify to use terser for minification
|
||||
terserOptions: {
|
||||
mangle: false, // Disable variable name mangling
|
||||
keep_classnames: false,
|
||||
keep_fnames: false,
|
||||
},
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: './main.ts',
|
||||
@ -32,4 +38,4 @@ export default defineConfig({
|
||||
css: {
|
||||
devSourcemap: true, // disabled by default because of performance reasons
|
||||
},
|
||||
})
|
||||
})
|
||||
|
@ -79,7 +79,7 @@ async fn login(
|
||||
}
|
||||
};
|
||||
|
||||
cookies.add_private(Cookie::new("loggedin_user", format!("{}", json!(user.id))));
|
||||
cookies.add_private(Cookie::new("loggedin_user", format!("{}", user.id)));
|
||||
|
||||
Log::create(
|
||||
db,
|
||||
@ -128,8 +128,7 @@ async fn updatepw(
|
||||
|
||||
user.update_pw(db, updatepw.password).await;
|
||||
|
||||
let user_json: String = format!("{}", json!(user));
|
||||
let mut cookie = Cookie::new("loggedin_user", user_json);
|
||||
let mut cookie = Cookie::new("loggedin_user", format!("{}", user.id));
|
||||
cookie.set_expires(OffsetDateTime::now_utc() + Duration::weeks(12));
|
||||
cookies.add_private(cookie);
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
{% else %}
|
||||
{% if loggedin_user.is_cox %}
|
||||
<form action="/boatdamage/{{ boatdamage.id }}/fixed" method="post" class="mt-3">
|
||||
<input type="hidden" name="desc" value="{{ boatdamage.desc }}" />
|
||||
<input type="text" name="desc" value="{{ boatdamage.desc }}" />
|
||||
{% if loggedin_user.is_tech %}
|
||||
<input type="submit" class="btn btn-primary" value="Repariert und verifiziert" />
|
||||
{% else %}
|
||||
@ -74,7 +74,7 @@
|
||||
{% else %}
|
||||
{% if loggedin_user.is_tech and boatdamage.fixed_at %}
|
||||
<form action="/boatdamage/{{ boatdamage.id }}/verified" method="post" class="mt-3">
|
||||
<input type="hidden" name="desc" value="{{ boatdamage.desc }}" />
|
||||
<input type="text" name="desc" value="{{ boatdamage.desc }}" />
|
||||
<input type="submit" class="btn btn-dark" value="Verifiziert" />
|
||||
</form>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user