feat: portal reopen, reports, templates and remote access

This commit is contained in:
Esdras Renan 2025-11-13 23:22:17 -03:00
parent 6a75a0a9ed
commit 52c03ff1cf
16 changed files with 1387 additions and 16 deletions

View file

@ -323,7 +323,7 @@ type DeviceInventory = {
collaborator?: { email?: string; name?: string; role?: string }
}
type DeviceRemoteAccessEntry = {
export type DeviceRemoteAccessEntry = {
id: string | null
clientId: string
provider: string | null
@ -478,7 +478,7 @@ function readText(record: Record<string, unknown>, ...keys: string[]): string |
return undefined
}
function isRustDeskAccess(entry: DeviceRemoteAccessEntry | null | undefined) {
export function isRustDeskAccess(entry: DeviceRemoteAccessEntry | null | undefined) {
if (!entry) return false
const provider = (entry.provider ?? entry.metadata?.provider ?? "").toString().toLowerCase()
if (provider.includes("rustdesk")) return true
@ -486,7 +486,7 @@ function isRustDeskAccess(entry: DeviceRemoteAccessEntry | null | undefined) {
return url.includes("rustdesk")
}
function buildRustDeskUri(entry: DeviceRemoteAccessEntry) {
export function buildRustDeskUri(entry: DeviceRemoteAccessEntry) {
const identifier = (entry.identifier ?? "").replace(/\s+/g, "")
if (!identifier) return null
const params = new URLSearchParams()