Add a whiteboard file picker and force-refresh
Build and push server image / build-and-push (push) Successful in 1m57s
Build and push server image / build-and-push (push) Successful in 1m57s
File picker: an optional WebDAV browse root in Settings (User.webdav_base_url) plus a plain-PROPFIND directory listing (webdav_client.list_directory) power a "Browse..." panel on a frame's Whiteboard tab, so a file can be clicked into rather than typing its exact WebDAV URL. Manual URL entry still works unchanged either way. Force-refresh: get_or_refresh_whiteboard takes a force flag that skips the fetch throttle entirely; the Whiteboard tab's refresh button now passes it, so clicking it always re-fetches and re-renders instead of possibly just re-showing the same cached image from within the last ~20 minutes.
This commit is contained in:
@@ -431,6 +431,7 @@ def settings_submit(
|
||||
webdav_username: str = Form(""),
|
||||
webdav_password: str = Form(""),
|
||||
webdav_reuse_caldav_creds: bool = Form(False),
|
||||
webdav_base_url: str = Form(""),
|
||||
current_password: str = Form(""),
|
||||
new_password: str = Form(""),
|
||||
db: Session = Depends(get_db),
|
||||
@@ -481,6 +482,14 @@ def settings_submit(
|
||||
if webdav_password.strip():
|
||||
user.webdav_password = webdav_password.strip()
|
||||
|
||||
# Not a secret -- round-trips visibly, so blank is an explicit clear,
|
||||
# same convention as calendar_ics_url above.
|
||||
stripped_webdav_base = webdav_base_url.strip()
|
||||
if stripped_webdav_base and not valid_http_url(stripped_webdav_base):
|
||||
error = "WebDAV browse root must be a plain http:// or https:// URL."
|
||||
else:
|
||||
user.webdav_base_url = stripped_webdav_base
|
||||
|
||||
if new_password:
|
||||
if not user.password_hash or not verify_password(current_password, user.password_hash):
|
||||
error = "Current password is wrong -- password not changed."
|
||||
|
||||
Reference in New Issue
Block a user