Merge pull request #1157 from ogayot/ui-fixes-ua

Small improvements for Ubuntu Advantage dialogs
This commit is contained in:
Dan Bungert 2022-01-13 12:40:35 -07:00 committed by GitHub
commit 0a5c7f585a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 6 deletions

View File

@ -207,14 +207,21 @@ class ShowServicesWidget(Stretchy):
ok = ok_btn(label=_("OK"), on_press=self.ok) ok = ok_btn(label=_("OK"), on_press=self.ok)
title = _("Available Services") title = _("Available Services")
header = _("List of services that will be enabled through your " header = _("List of services that are available through your "
"Ubuntu Advantage subscription:") "Ubuntu Advantage subscription:")
widgets: List[Widget] = [Text(header)] widgets: List[Widget] = [
widgets.extend([Text(f"* {svc['description']}") for svc in services]) Text(header),
widgets.append(button_pile([ok])) Text(""),
Pile([Text(f"* {svc['description']}") for svc in services]),
Text(""),
Text("Once the installation has finished, you can enable these "
"services using the `ua` command-line tool."),
Text(""),
button_pile([ok]),
]
super().__init__(title, widgets, 0, 0) super().__init__(title, widgets, 2, 6)
def ok(self, sender) -> None: def ok(self, sender) -> None:
""" Close the overlay and submit the token. """ """ Close the overlay and submit the token. """
@ -233,9 +240,10 @@ class ContinueAnywayWidget(Stretchy):
widgets = [ widgets = [
Text("Unable to check your subscription information." Text("Unable to check your subscription information."
" Do you want to go back or continue anyway?"), " Do you want to go back or continue anyway?"),
Text(""),
button_pile([back, cont]), button_pile([back, cont]),
] ]
super().__init__("Unknown error", widgets, 0, 0) super().__init__("Unknown error", widgets, 0, 2)
def back(self, sender) -> None: def back(self, sender) -> None:
""" Close the overlay. """ """ Close the overlay. """