client/web: add confirmation dialogs

Add confirmation dialogs for disconnecting and stopping advertisement
of a subnet route.

Updates #10261

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-12-08 18:55:57 -05:00
committed by Sonia Appasamy
parent 69b56462fc
commit a4c7b0574a
9 changed files with 474 additions and 23 deletions

View File

@@ -14,6 +14,13 @@ export function assertNever(a: never): never {
*/
export function noop() {}
/**
* isObject checks if a value is an object.
*/
export function isObject(val: unknown): val is object {
return Boolean(val && typeof val === "object" && val.constructor === Object)
}
/**
* pluralize is a very simple function that returns either
* the singular or plural form of a string based on the given