Skip to content

Commit

Permalink
Update import modpack and mod widgets a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrquantumoff committed Jan 15, 2024
1 parent 439be54 commit ec2bf88
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,23 @@ class _ShareModpacksPageState extends State<ShareModpacksPage> {
child: ListView(
shrinkWrap: true,
children: isLoading
? [const LinearProgressIndicator()]
? [const CircularProgressIndicator()]
: (mods.isEmpty && otherModCount == 0)
? [
Center(
child: Text(AppLocalizations.of(context)!.manualInput),
),
Center(
child: SizedBox(
width: 960,
child: TextField(
controller: modpackEntryController,
Container(
margin: const EdgeInsets.symmetric(vertical: 12),
child: Center(
child: SizedBox(
width: 960,
child: TextField(
decoration: const InputDecoration(
border: OutlineInputBorder(),
),
controller: modpackEntryController,
),
),
),
),
Expand All @@ -151,7 +157,7 @@ class _ShareModpacksPageState extends State<ShareModpacksPage> {
children: [
Container(
margin: const EdgeInsets.symmetric(horizontal: 8),
child: OutlinedButton(
child: FilledButton.tonal(
child: Text(
AppLocalizations.of(context)!.paste,
),
Expand All @@ -167,7 +173,7 @@ class _ShareModpacksPageState extends State<ShareModpacksPage> {
),
Container(
margin: const EdgeInsets.symmetric(horizontal: 8),
child: OutlinedButton(
child: FilledButton(
child: Text(
AppLocalizations.of(context)!.download,
),
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/web/mod/mod.dart
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class _ModState extends State<Mod> with AutomaticKeepAliveClientMixin {
margin:
const EdgeInsets.symmetric(vertical: 0, horizontal: 12),
child: widget.downloadable
? TextButton.icon(
? FilledButton.icon(
onPressed: () async {
Uri uri = Uri.parse(
'https://api.modrinth.com/v2/tag/game_version',
Expand Down Expand Up @@ -314,7 +314,7 @@ class _ModState extends State<Mod> with AutomaticKeepAliveClientMixin {
margin: widget.downloadable
? const EdgeInsets.symmetric(horizontal: 0)
: const EdgeInsets.symmetric(vertical: 0),
child: TextButton.icon(
child: FilledButton.tonalIcon(
onPressed: () async {
final String slug = widget.slug;
String rawUrl = "";
Expand Down Expand Up @@ -361,7 +361,7 @@ class _ModState extends State<Mod> with AutomaticKeepAliveClientMixin {
vertical: (showUpdateButton ? 20 : 50)),
child: !isNewVersionUrl || !areButttonsActive
? showUpdateButton
? TextButton.icon(
? FilledButton.icon(
onPressed: () async {
setState(() {
showUpdateButton = false;
Expand Down

0 comments on commit ec2bf88

Please sign in to comment.