Skip to content

Commit

Permalink
Pem Widget Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
BrawlerXull committed Jun 5, 2024
1 parent 27766d7 commit 190b9bf
Showing 1 changed file with 38 additions and 26 deletions.
64 changes: 38 additions & 26 deletions lib/app/modules/manageTaskServer/views/manage_task_server_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -617,32 +617,44 @@ class ManageTaskServerView extends GetView<ManageTaskServerController> {
),
],
)),
for (var pem in [
'taskd.certificate',
'taskd.key',
'taskd.ca',
if (homeController.serverCertExists.value) 'server.cert',
])
PemWidget(
storage: controller.storage,
pem: pem,
optionString: pem == "taskd.certificate"
? "Configure your certificate"
: pem == "taskd.key"
? "Configure TaskServer key"
: pem == "taskd.ca"
? "Configure Server Certificate"
: "Configure Server Certificate",
listTileTitle: pem == "taskd.certificate"
? "Select Certificate"
: pem == "taskd.key"
? "Select key"
: pem == "taskd.ca"
? "Select Certificate"
: "Select Certificate",
onTapCallBack: controller.onTapPEMWidget,
onLongPressCallBack: controller.onLongPressPEMWidget,
),
GetBuilder<ManageTaskServerController>(
builder: (controller) {
List<Widget> pemWidgets = [];
for (var pem in [
'taskd.certificate',
'taskd.key',
'taskd.ca',
if (controller.homeController.serverCertExists.value)
'server.cert',
]) {
pemWidgets.add(
PemWidget(
storage: controller.storage,
pem: pem,
optionString: pem == "taskd.certificate"
? "Configure your certificate"
: pem == "taskd.key"
? "Configure TaskServer key"
: pem == "taskd.ca"
? "Configure Server Certificate"
: "Configure Server Certificate",
listTileTitle: pem == "taskd.certificate"
? "Select Certificate"
: pem == "taskd.key"
? "Select key"
: pem == "taskd.ca"
? "Select Certificate"
: "Select Certificate",
onTapCallBack: controller.onTapPEMWidget,
onLongPressCallBack: controller.onLongPressPEMWidget,
),
);
}
return Column(
children: pemWidgets,
);
},
)
],
),
),
Expand Down

0 comments on commit 190b9bf

Please sign in to comment.