feat(app): choose, manage and filter by tags
The card editor offers its tags: a picker that searches by the start of a name, creates a tag (name and colour) and chooses it, and saves the choice with the card. A sheet lists every tag with its count, to add, rename (merging into a tag of that name), recolour and delete them, with an undo. The card list shows each card's tags and narrows to one tag. The editor closed twice once tags changed after saving; it now closes on becoming done only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
c2d4dfc8b6
commit
9dc9b6a5ed
1 changed files with 2076 additions and 63 deletions
|
|
@ -105,23 +105,29 @@ GoRouter buildRouter({String initialLocation = RoutePaths.home}) => GoRouter(
|
|||
builder: (context, state) => BlocProvider(
|
||||
create: (context) => CardEditBloc(
|
||||
PersonScope.of(context).cards,
|
||||
PersonScope.of(context).tags,
|
||||
state.pathParameters['studysetId']!,
|
||||
null,
|
||||
),
|
||||
)..add(const CardEditEventStarted()),
|
||||
child: const CardScreen(card: null),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/studysets/:studysetId/cards/:cardId',
|
||||
builder: (context, state) {
|
||||
final cards = PersonScope.of(context).cards;
|
||||
final person = PersonScope.of(context);
|
||||
final studysetId = state.pathParameters['studysetId']!;
|
||||
return FoundById<Card>(
|
||||
id: state.pathParameters['cardId']!,
|
||||
items: () => cards.watch(studysetId),
|
||||
items: () => person.cards.watch(studysetId),
|
||||
idOf: (card) => card.id,
|
||||
builder: (card, _) => BlocProvider(
|
||||
create: (context) => CardEditBloc(cards, studysetId, card),
|
||||
create: (context) => CardEditBloc(
|
||||
person.cards,
|
||||
person.tags,
|
||||
studysetId,
|
||||
card,
|
||||
)..add(const CardEditEventStarted()),
|
||||
child: CardScreen(card: card),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue