mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: disable update functionality for now.
This commit is contained in:
parent
279b76ad53
commit
b2a35813f6
@ -149,7 +149,8 @@
|
|||||||
"patchedDateLabel": "Patched Date",
|
"patchedDateLabel": "Patched Date",
|
||||||
"patchedDateHint": "{date} at {time}",
|
"patchedDateHint": "{date} at {time}",
|
||||||
"appliedPatchesLabel": "Applied Patches",
|
"appliedPatchesLabel": "Applied Patches",
|
||||||
"appliedPatchesHint": "{quantity} applied patches"
|
"appliedPatchesHint": "{quantity} applied patches",
|
||||||
|
"updateNotImplemented": "Update functionality not implemented yet"
|
||||||
},
|
},
|
||||||
"contributorsView": {
|
"contributorsView": {
|
||||||
"widgetTitle": "Contributors",
|
"widgetTitle": "Contributors",
|
||||||
|
@ -160,8 +160,9 @@ class AppInfoView extends StatelessWidget {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: BorderRadius.circular(16.0),
|
borderRadius: BorderRadius.circular(16.0),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
model.navigateToPatcher(app);
|
model.updateNotImplemented(context);
|
||||||
Navigator.of(context).pop();
|
// model.navigateToPatcher(app);
|
||||||
|
// Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
|
@ -8,6 +8,7 @@ import 'package:revanced_manager/models/patched_application.dart';
|
|||||||
import 'package:revanced_manager/services/manager_api.dart';
|
import 'package:revanced_manager/services/manager_api.dart';
|
||||||
import 'package:revanced_manager/services/patcher_api.dart';
|
import 'package:revanced_manager/services/patcher_api.dart';
|
||||||
import 'package:revanced_manager/services/root_api.dart';
|
import 'package:revanced_manager/services/root_api.dart';
|
||||||
|
import 'package:revanced_manager/services/toast.dart';
|
||||||
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
||||||
@ -19,6 +20,7 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
||||||
final PatcherAPI _patcherAPI = locator<PatcherAPI>();
|
final PatcherAPI _patcherAPI = locator<PatcherAPI>();
|
||||||
final RootAPI _rootAPI = RootAPI();
|
final RootAPI _rootAPI = RootAPI();
|
||||||
|
final Toast _toast = locator<Toast>();
|
||||||
|
|
||||||
Future<void> uninstallApp(
|
Future<void> uninstallApp(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
@ -51,6 +53,10 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
locator<NavigationViewModel>().setIndex(1);
|
locator<NavigationViewModel>().setIndex(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateNotImplemented(BuildContext context) {
|
||||||
|
_toast.show('appInfoView.updateNotImplemented');
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> showUninstallDialog(
|
Future<void> showUninstallDialog(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
PatchedApplication app,
|
PatchedApplication app,
|
||||||
|
@ -45,15 +45,17 @@ class AvailableUpdatesCard extends StatelessWidget {
|
|||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: apps
|
children: apps
|
||||||
.map((app) => ApplicationItem(
|
.map((app) => ApplicationItem(
|
||||||
icon: app.icon,
|
icon: app.icon,
|
||||||
name: app.name,
|
name: app.name,
|
||||||
patchDate: app.patchDate,
|
patchDate: app.patchDate,
|
||||||
changelog: app.changelog,
|
changelog: app.changelog,
|
||||||
isUpdatableApp: true,
|
isUpdatableApp: true,
|
||||||
onPressed: () =>
|
//TODO: Find a better way to do update functionality
|
||||||
locator<HomeViewModel>().navigateToPatcher(
|
onPressed: () {}
|
||||||
app,
|
// () =>
|
||||||
),
|
// locator<HomeViewModel>().navigateToPatcher(
|
||||||
|
// app,
|
||||||
|
// ),
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
);
|
);
|
||||||
|
@ -51,93 +51,93 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ExpandableController expController = ExpandableController();
|
ExpandableController expController = ExpandableController();
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(bottom: 16.0),
|
margin: const EdgeInsets.only(bottom: 16.0),
|
||||||
child: CustomCard(
|
child: CustomCard(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
expController.toggle();
|
expController.toggle();
|
||||||
_animationController.isCompleted
|
_animationController.isCompleted
|
||||||
? _animationController.reverse()
|
? _animationController.reverse()
|
||||||
: _animationController.forward();
|
: _animationController.forward();
|
||||||
},
|
},
|
||||||
child: ExpandablePanel(
|
child: ExpandablePanel(
|
||||||
controller: expController,
|
controller: expController,
|
||||||
theme: const ExpandableThemeData(
|
theme: const ExpandableThemeData(
|
||||||
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
||||||
tapBodyToCollapse: false,
|
tapBodyToCollapse: false,
|
||||||
tapBodyToExpand: false,
|
tapBodyToExpand: false,
|
||||||
tapHeaderToExpand: false,
|
tapHeaderToExpand: false,
|
||||||
hasIcon: false,
|
hasIcon: false,
|
||||||
animationDuration: Duration(milliseconds: 450),
|
animationDuration: Duration(milliseconds: 450),
|
||||||
),
|
),
|
||||||
header: Row(
|
header: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 40,
|
width: 40,
|
||||||
child: Image.memory(widget.icon, height: 40, width: 40),
|
child: Image.memory(widget.icon, height: 40, width: 40),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 15.0),
|
padding: const EdgeInsets.only(left: 15.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
widget.name.length > 12
|
|
||||||
? '${widget.name.substring(0, 12)}...'
|
|
||||||
: widget.name,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(format(widget.patchDate)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
RotationTransition(
|
|
||||||
turns: Tween(begin: 0.0, end: 0.50)
|
|
||||||
.animate(_animationController),
|
|
||||||
child: const Padding(
|
|
||||||
padding: EdgeInsets.all(8.0),
|
|
||||||
child: Icon(Icons.arrow_drop_down),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
CustomMaterialButton(
|
Text(
|
||||||
label: widget.isUpdatableApp
|
widget.name.length > 12
|
||||||
? I18nText('applicationItem.patchButton')
|
? '${widget.name.substring(0, 12)}...'
|
||||||
: I18nText('applicationItem.infoButton'),
|
: widget.name,
|
||||||
onPressed: widget.onPressed,
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
Text(format(widget.patchDate)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
const Spacer(),
|
||||||
collapsed: const SizedBox(),
|
RotationTransition(
|
||||||
expanded: Padding(
|
turns: Tween(begin: 0.0, end: 0.50)
|
||||||
padding: const EdgeInsets.only(top: 16.0, left: 4.0, right: 4.0, bottom: 4.0),
|
.animate(_animationController),
|
||||||
child: Column(
|
child: const Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: EdgeInsets.all(8.0),
|
||||||
children: <Widget>[
|
child: Icon(Icons.arrow_drop_down),
|
||||||
I18nText(
|
|
||||||
'applicationItem.changelogLabel',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(fontWeight: FontWeight.w700),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(width: 8),
|
||||||
Text('\u2022 ${widget.changelog.join('\n\u2022 ')}'),
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
CustomMaterialButton(
|
||||||
|
label: widget.isUpdatableApp
|
||||||
|
? I18nText('applicationItem.infoButton')
|
||||||
|
: I18nText('applicationItem.infoButton'),
|
||||||
|
onPressed: widget.onPressed,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
collapsed: const SizedBox(),
|
||||||
|
expanded: Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 16.0, left: 4.0, right: 4.0, bottom: 4.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
I18nText(
|
||||||
|
'applicationItem.changelogLabel',
|
||||||
|
child: const Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w700),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text('\u2022 ${widget.changelog.join('\n\u2022 ')}'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
));
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user