mirror of
https://github.com/venera-app/venera.git
synced 2025-09-28 08:17:25 +00:00
improve ui
This commit is contained in:
@@ -29,6 +29,16 @@ class CategoriesPage extends StatelessWidget {
|
||||
.where((element) => allCategories.contains(element))
|
||||
.toList();
|
||||
|
||||
if(categories.isEmpty) {
|
||||
return NetworkError(
|
||||
message: "No Category Pages".tl,
|
||||
retry: () {
|
||||
controller.update();
|
||||
},
|
||||
withAppbar: false,
|
||||
);
|
||||
}
|
||||
|
||||
return Material(
|
||||
child: DefaultTabController(
|
||||
length: categories.length,
|
||||
|
@@ -272,7 +272,7 @@ class _CommentTileState extends State<_CommentTile> {
|
||||
if (widget.comment.time != null)
|
||||
Text(widget.comment.time!, style: ts.s12),
|
||||
const SizedBox(height: 4),
|
||||
Text(widget.comment.content),
|
||||
_CommentContent(text: widget.comment.content),
|
||||
buildActions(),
|
||||
],
|
||||
),
|
||||
@@ -490,3 +490,14 @@ class _CommentTileState extends State<_CommentTile> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _CommentContent extends StatelessWidget {
|
||||
const _CommentContent({required this.text});
|
||||
|
||||
final String text;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SelectableText(text);
|
||||
}
|
||||
}
|
||||
|
@@ -62,8 +62,22 @@ class _ExplorePageState extends State<ExplorePage>
|
||||
|
||||
Widget buildBody(String i) => _SingleExplorePage(i, key: Key(i));
|
||||
|
||||
Widget buildEmpty() {
|
||||
return NetworkError(
|
||||
message: "No Explore Pages".tl,
|
||||
retry: () {
|
||||
setState(() {});
|
||||
},
|
||||
withAppbar: false,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (pages.isEmpty) {
|
||||
return buildEmpty();
|
||||
}
|
||||
|
||||
Widget tabBar = Material(
|
||||
child: FilledTabBar(
|
||||
tabs: pages.map((e) => buildTab(e)).toList(),
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sliver_tools/sliver_tools.dart';
|
||||
import 'package:venera/components/components.dart';
|
||||
import 'package:venera/foundation/app.dart';
|
||||
import 'package:venera/foundation/appdata.dart';
|
||||
@@ -168,7 +169,10 @@ class _SearchPageState extends State<SearchPage> {
|
||||
yield buildSuggestions(context);
|
||||
} else {
|
||||
yield buildSearchTarget();
|
||||
yield buildSearchOptions();
|
||||
yield SliverAnimatedPaintExtent(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: buildSearchOptions(),
|
||||
);
|
||||
yield buildSearchHistory();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user