diff --git a/Mergin/help.py b/Mergin/help.py index 4c3989d..3526d18 100644 --- a/Mergin/help.py +++ b/Mergin/help.py @@ -1,5 +1,6 @@ MAIN_ROOT = "https://merginmaps.com/" + class MerginHelp: """Class for generating Mergin plugin help URLs.""" @@ -8,6 +9,6 @@ def howto_attachment_widget(self): def howto_background_maps(self): return f"{MAIN_ROOT}/docs/gis/settingup_background_map/" - + def mergin_subscription_link(self): return f"{MAIN_ROOT}/pricing/" diff --git a/Mergin/monthly_contributors_error_dialog.py b/Mergin/monthly_contributors_error_dialog.py index d95bb2a..f3cbdcb 100644 --- a/Mergin/monthly_contributors_error_dialog.py +++ b/Mergin/monthly_contributors_error_dialog.py @@ -8,6 +8,7 @@ ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "ui", "ui_monthly_contributors_error_dialog.ui") + class MonthlyContributorsErrorDialog(QDialog): def __init__(self, e, parent=None): QDialog.__init__(self, parent) @@ -15,14 +16,14 @@ def __init__(self, e, parent=None): self.server_response = e.server_response self.set_dialog_style() - + self.buttonBox.accepted.connect(self.open_upgrade_link) self.buttonBox.rejected.connect(self.reject) def set_dialog_style(self): upgrade_button = self.buttonBox.button(QDialogButtonBox.Ok) upgrade_button.setText("Upgrade") - + quota = self.server_response.get("contributors_quota", "#NA") quota_text = f"{quota}/{quota}" self.plan_quota_progress_bar.setFormat(quota_text) @@ -36,7 +37,8 @@ def set_dialog_style(self): QProgressBar::chunk { background-color: rgb(0, 76, 69); } - """) + """ + ) def open_upgrade_link(self): QDesktopServices.openUrl(QUrl(MerginHelp().mergin_subscription_link()))