UI Improvements and Tweaks (#13689)

* Improve image loading by not loading when off screen

* Add share menu to export

* Add share button and tidy up review detail lists

* Fix missing key

* Use query args for review filter

* Add object lifecycle to explore dialog

* Adjust sizing

* Simplify share button

* Always show snapshot but hide buttons for frigate+ if not applicable

* Handle case when user switches to element missing the previously selected tab

* Handle cases where share is not available

* Fix logic
This commit is contained in:
Nicolas Mowen
2024-09-12 08:46:29 -06:00
committed by GitHub
parent b4acf4f341
commit d84e3cacca
15 changed files with 172 additions and 70 deletions

View File

@@ -0,0 +1,16 @@
import copy from "copy-to-clipboard";
import { toast } from "sonner";
export function shareOrCopy(url: string, title?: string) {
if (window.isSecureContext && "share" in navigator) {
navigator.share({
url: url,
title: title,
});
} else {
copy(url);
toast.success("Copied to clipboard.", {
position: "top-center",
});
}
}