main 5041353

permission.go RawHistoryFolder

1package port
2
3import (
4	"context"
5
6	"github.com/bnema/dumber/internal/domain/entity"
7)
8
9// PermissionDialogResult represents the user's response from a permission dialog.
10type PermissionDialogResult struct {
11	// Allowed is true if the user clicked "Allow" or "Always Allow".
12	Allowed bool
13
14	// Persistent is true if the user clicked "Always Allow" (save this decision).
15	// This should only be true for mic/camera permissions, not display capture.
16	Persistent bool
17}
18
19// PermissionDialogPresenter defines the interface for showing permission dialogs.
20// This is implemented by the UI layer (Adwaita dialogs).
21type PermissionDialogPresenter interface {
22	// ShowPermissionDialog displays a permission request dialog to the user.
23	// The callback is invoked with the user's decision.
24	//
25	// Parameters:
26	//   - ctx: context for cancellation and logging
27	//   - origin: the website origin requesting permission (e.g., "https://meet.example.com")
28	//   - permTypes: the types of permissions being requested
29	//   - metadata: permission-type-specific context; for website_data_access both
30	//     entity.PermissionMetadataKeyRequestingDomain and entity.PermissionMetadataKeyCurrentDomain must be set
31	//   - callback: invoked when the user makes a decision or dialog is dismissed
32	ShowPermissionDialog(
33		ctx context.Context,
34		origin string,
35		permTypes []entity.PermissionType,
36		metadata entity.PermissionMetadata,
37		callback func(result PermissionDialogResult),
38	)
39}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close