Skip to content

Commit

Permalink
feat: show placeholder for dynamic blocks of pages (#206)
Browse files Browse the repository at this point in the history
Added placeholder for obsolete dynamic blocks of pages to indicate that
the blocks were discontinued and no longer available.
  • Loading branch information
poppingmoon authored Jun 16, 2024
1 parent 78dfe81 commit 320a940
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/view/page/page/page_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,37 @@ class PagePage extends ConsumerWidget {
} else {
return NoteWidget(account: account, noteId: noteId);
}
case AbstractPageContent(
type: PageContentType.button || // ignore: deprecated_member_use
PageContentType.condition || // ignore: deprecated_member_use
PageContentType.textarea || // ignore: deprecated_member_use
PageContentType.post || // ignore: deprecated_member_use
PageContentType.canvas || // ignore: deprecated_member_use
PageContentType.numberInput || // ignore: deprecated_member_use
PageContentType.textInput || // ignore: deprecated_member_use
PageContentType.switcher || // ignore: deprecated_member_use
PageContentType.radioButton || // ignore: deprecated_member_use
PageContentType.counter || // ignore: deprecated_member_use
PageContentType.textareaInput // ignore: deprecated_member_use
):
return DecoratedBox(
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context).colorScheme.outlineVariant,
),
borderRadius: BorderRadius.circular(8.0),
),
child: ListTile(
title: Text(
t.misskey.pages_.blocks.dynamic,
textAlign: TextAlign.center,
),
subtitle: Text(
t.misskey.pages_.blocks.dynamicDescription(play: 'Play'),
textAlign: TextAlign.center,
),
),
);
default:
return const SizedBox.shrink();
}
Expand Down

0 comments on commit 320a940

Please sign in to comment.