mirror of
https://github.com/zoriya/Aeris.git
synced 2026-06-09 13:01:12 +00:00
Mobile Client: remove dummy data
This commit is contained in:
@@ -43,5 +43,7 @@
|
||||
"tryToConnect": "Try to connect",
|
||||
"routeToApi": "Route to API",
|
||||
"setupAPIRoute": "Setup API Route",
|
||||
"paramInheritTip": "To inherit parameters from previous actions, type '{' in the text field and tap on the choosen parameter"
|
||||
"paramInheritTip": "To inherit parameters from previous actions, type '{' in the text field and tap on the choosen parameter",
|
||||
"parameters": "Parameters",
|
||||
"noParameter": "No parameter"
|
||||
}
|
||||
@@ -43,5 +43,7 @@
|
||||
"tryToConnect": "Tester la connection",
|
||||
"routeToApi": "Route de l'API",
|
||||
"setupAPIRoute": "Choisir la route de l'API",
|
||||
"paramInheritTip": "Afin d'hériter de variables venant d'actions précedentes, entrez '{' dans un champ et choisissez la valeur"
|
||||
"paramInheritTip": "Afin d'hériter de variables venant d'actions précedentes, entrez '{' dans un champ et choisissez la valeur",
|
||||
"parameters": "Paramètres",
|
||||
"noParameter": "Aucun paramètre"
|
||||
}
|
||||
@@ -149,15 +149,8 @@ class AerisAPI {
|
||||
var res = await _requestAPI('/workflows', AerisAPIRequestType.get, null);
|
||||
if (res.ok == false) return [];
|
||||
final List body = jsonDecode(res.body);
|
||||
var decodedList = body.map((e) => Pipeline.fromJSON(Map.from(e))).toList();
|
||||
decodedList.add(
|
||||
Pipeline(id: 0, name: "My Dummy", triggerCount: 0, enabled: true, trigger:
|
||||
Trigger(name: "Trigger name", displayName: "Trigger Display", service: Service.discord(), parameters: [for (var i = 0; i < 3; i++) ActionParameter(name: "para$i", value: "value$i", description: "desc$i")]
|
||||
), reactions: [
|
||||
Reaction(service: const Service.anilist(), name: "Reaction name", displayName: "Reaction display", parameters: [for (var i = 0; i < 3; i++) ActionParameter(name: "para$i", value: "value$i", description: "desc$i")])
|
||||
])
|
||||
);
|
||||
return decodedList;
|
||||
|
||||
return body.map((e) => Pipeline.fromJSON(Map.from(e))).toList();
|
||||
}
|
||||
|
||||
/// Fetch the services the user is authenticated to
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:aeris/src/models/action.dart' as aeris;
|
||||
import 'package:aeris/src/models/action_parameter.dart';
|
||||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class ActionDetailCard extends StatelessWidget {
|
||||
///The source of information
|
||||
@@ -58,14 +59,15 @@ class ActionDetailCard extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(child: action.service.getLogo(logoSize: 50), flex: 2),
|
||||
Expanded(
|
||||
child: Text(
|
||||
child: Padding(padding: const EdgeInsets.only(left: 10),
|
||||
child: Text(
|
||||
action.displayName,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontSize: 15
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)),
|
||||
flex: 8
|
||||
),
|
||||
],
|
||||
@@ -79,7 +81,7 @@ class ActionDetailCard extends StatelessWidget {
|
||||
Padding(child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(action.parameters.isEmpty ? "No parameter": "Parameters:"), //TODO translta
|
||||
Text(action.parameters.isEmpty ? AppLocalizations.of(context).noParameter: "${AppLocalizations.of(context).parameters}:"),
|
||||
popupMenu
|
||||
]),
|
||||
padding: const EdgeInsets.only(bottom: 5)
|
||||
|
||||
Reference in New Issue
Block a user