feat(desktop): permissions

This commit is contained in:
Adam
2025-12-27 05:16:39 -06:00
parent c523ca4127
commit 21eba5f987
17 changed files with 586 additions and 60 deletions

View File

@@ -86,6 +86,17 @@ export namespace Permission {
return state().pending
}
export function list() {
const { pending } = state()
const result: Info[] = []
for (const items of Object.values(pending)) {
for (const item of Object.values(items)) {
result.push(item.info)
}
}
return result.sort((a, b) => a.id.localeCompare(b.id))
}
export async function ask(input: {
type: Info["type"]
title: Info["title"]