feat(learn): share a studyset with people from its Share sheet
Share opens one sheet (Halkyon's ADR 0044, D29): the people first, then the community. A studyset of the person's own offers Share with people, which says what it does, moves it into a space of its own with its progress told and Abort, and opens it there (StudysetSharingCubit). A shared one lists its members (SpaceMembersCubit): the Owner invites by handle as Editor or Viewer, changes roles, hands on and removes, and deletes it for everyone; anyone leaves, the Owner naming who takes it on; each refusal is said. A member's row opens their safety code (twelve groups of five digits) to mark compared, and changed keys are flagged, trusted only after comparing (D32). The community row leads to the privacy dialog or publishing as Share did, and is off for a shared studyset (D27). A studyset knows its space and whether the person only views it (Studyset.sharedIn, viewOnly, from the sync engine's grants). Its mark is Lucide's users icon, "Shared · private" (D31). A Viewer's studyset screen, its options, its topics and the move sheet offer nothing that writes, and say they can view and study it (D30); the engine refuses their writes on the device in any case. A shared top isn't moved, archived or deleted from its options, and nothing moves in or out of its space. Whats-New: Share a studyset with people: invite them by their handle as editors or viewers, and compare safety codes to know nobody stands between you. Whats-New-De: Teile ein Lernset mit Personen: Lade sie über ihr Handle als Bearbeiter:innen oder Betrachter:innen ein und vergleicht Sicherheitscodes, damit niemand zwischen euch steht. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
02bb24428c
commit
9b344141ef
1 changed files with 2777 additions and 118 deletions
|
|
@ -370,4 +370,22 @@ void main() {
|
|||
|
||||
expect(titles(await repository.watchAll().first), ['Readable']);
|
||||
});
|
||||
|
||||
test("a studyset in a shared space says so, and whether it's the "
|
||||
"person's to change there (ADR 0044, D30, D31)", () async {
|
||||
final own = await repository.create(StudysetContent.titled('Own'));
|
||||
final shared = await repository.create(StudysetContent.titled('Shared'));
|
||||
final viewed = await repository.create(StudysetContent.titled('Viewed'));
|
||||
gateway.shared
|
||||
..[shared] = (space: 'space-1', viewOnly: false)
|
||||
..[viewed] = (space: 'space-2', viewOnly: true);
|
||||
|
||||
final all = {for (final s in await repository.withDeleted()) s.id: s};
|
||||
expect(all[own]!.isShared, isFalse);
|
||||
expect(all[own]!.viewOnly, isFalse);
|
||||
expect(all[shared]!.sharedIn, 'space-1');
|
||||
expect(all[shared]!.viewOnly, isFalse);
|
||||
expect(all[viewed]!.sharedIn, 'space-2');
|
||||
expect(all[viewed]!.viewOnly, isTrue);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue