forked from Silverfish/proton-bridge
feat(GODT-2842): Implement Bug Report Fallback notification.
This commit is contained in:
@ -1265,6 +1265,7 @@ void QMLBackend::connectGrpcEvents() {
|
|||||||
connect(client, &GRPCClient::resetFinished, this, &QMLBackend::onResetFinished);
|
connect(client, &GRPCClient::resetFinished, this, &QMLBackend::onResetFinished);
|
||||||
connect(client, &GRPCClient::reportBugFinished, this, &QMLBackend::reportBugFinished);
|
connect(client, &GRPCClient::reportBugFinished, this, &QMLBackend::reportBugFinished);
|
||||||
connect(client, &GRPCClient::reportBugSuccess, this, &QMLBackend::bugReportSendSuccess);
|
connect(client, &GRPCClient::reportBugSuccess, this, &QMLBackend::bugReportSendSuccess);
|
||||||
|
connect(client, &GRPCClient::reportBugFallback, this, &QMLBackend::bugReportSendFallback);
|
||||||
connect(client, &GRPCClient::reportBugError, this, &QMLBackend::bugReportSendError);
|
connect(client, &GRPCClient::reportBugError, this, &QMLBackend::bugReportSendError);
|
||||||
connect(client, &GRPCClient::showMainWindow, [&]() { this->showMainWindow("gRPC showMainWindow event"); });
|
connect(client, &GRPCClient::showMainWindow, [&]() { this->showMainWindow("gRPC showMainWindow event"); });
|
||||||
|
|
||||||
|
|||||||
@ -266,6 +266,7 @@ signals: // Signals received from the Go backend, to be forwarded to QML
|
|||||||
void resetFinished(); ///< Signal for the 'resetFinished' gRPC stream event.
|
void resetFinished(); ///< Signal for the 'resetFinished' gRPC stream event.
|
||||||
void reportBugFinished(); ///< Signal for the 'reportBugFinished' gRPC stream event.
|
void reportBugFinished(); ///< Signal for the 'reportBugFinished' gRPC stream event.
|
||||||
void bugReportSendSuccess(); ///< Signal for the 'bugReportSendSuccess' gRPC stream event.
|
void bugReportSendSuccess(); ///< Signal for the 'bugReportSendSuccess' gRPC stream event.
|
||||||
|
void bugReportSendFallback(); ///< Signal for the 'bugReportSendFallback' gRPC stream event.
|
||||||
void bugReportSendError(); ///< Signal for the 'bugReportSendError' gRPC stream event.
|
void bugReportSendError(); ///< Signal for the 'bugReportSendError' gRPC stream event.
|
||||||
void showMainWindow(); ///< Signal for the 'showMainWindow' gRPC stream event.
|
void showMainWindow(); ///< Signal for the 'showMainWindow' gRPC stream event.
|
||||||
void hideMainWindow(); ///< Signal for the 'hideMainWindow' gRPC stream event.
|
void hideMainWindow(); ///< Signal for the 'hideMainWindow' gRPC stream event.
|
||||||
|
|||||||
@ -76,7 +76,7 @@ QtObject {
|
|||||||
target: Backend
|
target: Backend
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property var all: [root.noInternet, root.imapPortStartupError, root.smtpPortStartupError, root.imapPortChangeError, root.smtpPortChangeError, root.imapConnectionModeChangeError, root.smtpConnectionModeChangeError, root.updateManualReady, root.updateManualRestartNeeded, root.updateManualError, root.updateForce, root.updateForceError, root.updateSilentRestartNeeded, root.updateSilentError, root.updateIsLatestVersion, root.loginConnectionError, root.onlyPaidUsers, root.alreadyLoggedIn, root.enableBeta, root.bugReportSendSuccess, root.bugReportSendError, root.cacheUnavailable, root.cacheCantMove, root.accountChanged, root.diskFull, root.cacheLocationChangeSuccess, root.enableSplitMode, root.resetBridge, root.changeAllMailVisibility, root.deleteAccount, root.noKeychain, root.rebuildKeychain, root.addressChanged, root.apiCertIssue, root.noActiveKeyForRecipient, root.userBadEvent, root.imapLoginWhileSignedOut, root.genericError, root.genericQuestion]
|
property var all: [root.noInternet, root.imapPortStartupError, root.smtpPortStartupError, root.imapPortChangeError, root.smtpPortChangeError, root.imapConnectionModeChangeError, root.smtpConnectionModeChangeError, root.updateManualReady, root.updateManualRestartNeeded, root.updateManualError, root.updateForce, root.updateForceError, root.updateSilentRestartNeeded, root.updateSilentError, root.updateIsLatestVersion, root.loginConnectionError, root.onlyPaidUsers, root.alreadyLoggedIn, root.enableBeta, root.bugReportSendSuccess, root.bugReportSendError, root.bugReportSendFallback, root.cacheUnavailable, root.cacheCantMove, root.accountChanged, root.diskFull, root.cacheLocationChangeSuccess, root.enableSplitMode, root.resetBridge, root.changeAllMailVisibility, root.deleteAccount, root.noKeychain, root.rebuildKeychain, root.addressChanged, root.apiCertIssue, root.noActiveKeyForRecipient, root.userBadEvent, root.imapLoginWhileSignedOut, root.genericError, root.genericQuestion]
|
||||||
property Notification alreadyLoggedIn: Notification {
|
property Notification alreadyLoggedIn: Notification {
|
||||||
brief: qsTr("Already signed in")
|
brief: qsTr("Already signed in")
|
||||||
description: qsTr("This account is already signed in.")
|
description: qsTr("This account is already signed in.")
|
||||||
@ -153,6 +153,30 @@ QtObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property Notification bugReportSendFallback: Notification {
|
||||||
|
brief: qsTr("Error sharing debug data")
|
||||||
|
description: qsTr("Report was sent but debug data could not be shared. Please consider sharing it using "+ "<a href=\"https://proton.me/support/send-large-files-proton-drive\">Proton Drive</a>.")
|
||||||
|
group: Notifications.Group.Configuration
|
||||||
|
icon: "./icons/ic-exclamation-circle-filled.svg"
|
||||||
|
type: Notification.NotificationType.Info
|
||||||
|
|
||||||
|
action: Action {
|
||||||
|
text: qsTr("OK")
|
||||||
|
|
||||||
|
onTriggered: {
|
||||||
|
root.bugReportSendFallback.active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
function onBugReportSendFallback() {
|
||||||
|
root.bugReportSendFallback.active = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
target: Backend
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Bug reports
|
// Bug reports
|
||||||
property Notification bugReportSendSuccess: Notification {
|
property Notification bugReportSendSuccess: Notification {
|
||||||
brief: qsTr("Report sent")
|
brief: qsTr("Report sent")
|
||||||
|
|||||||
@ -1130,6 +1130,10 @@ void GRPCClient::processAppEvent(AppEvent const &event) {
|
|||||||
this->logTrace("App event received: ShowMainWindow.");
|
this->logTrace("App event received: ShowMainWindow.");
|
||||||
emit showMainWindow();
|
emit showMainWindow();
|
||||||
break;
|
break;
|
||||||
|
case AppEvent::kReportBugFallback:
|
||||||
|
this->logTrace("App event received: ReportBugFallback.");
|
||||||
|
emit reportBugFallback();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
this->logError("Unknown App event received.");
|
this->logError("Unknown App event received.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,6 +102,7 @@ signals: // app related signals
|
|||||||
void reportBugFinished();
|
void reportBugFinished();
|
||||||
void reportBugSuccess();
|
void reportBugSuccess();
|
||||||
void reportBugError();
|
void reportBugError();
|
||||||
|
void reportBugFallback();
|
||||||
void showMainWindow();
|
void showMainWindow();
|
||||||
|
|
||||||
// cache related calls
|
// cache related calls
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -261,6 +261,7 @@ message AppEvent {
|
|||||||
ReportBugSuccessEvent reportBugSuccess = 5;
|
ReportBugSuccessEvent reportBugSuccess = 5;
|
||||||
ReportBugErrorEvent reportBugError = 6;
|
ReportBugErrorEvent reportBugError = 6;
|
||||||
ShowMainWindowEvent showMainWindow = 7;
|
ShowMainWindowEvent showMainWindow = 7;
|
||||||
|
ReportBugFallbackEvent reportBugFallback = 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,6 +275,7 @@ message ReportBugFinishedEvent {}
|
|||||||
message ReportBugSuccessEvent {}
|
message ReportBugSuccessEvent {}
|
||||||
message ReportBugErrorEvent {}
|
message ReportBugErrorEvent {}
|
||||||
message ShowMainWindowEvent {}
|
message ShowMainWindowEvent {}
|
||||||
|
message ReportBugFallbackEvent {}
|
||||||
|
|
||||||
//**********************************************************
|
//**********************************************************
|
||||||
// Login related events
|
// Login related events
|
||||||
|
|||||||
@ -41,6 +41,10 @@ func NewReportBugErrorEvent() *StreamEvent {
|
|||||||
return appEvent(&AppEvent{Event: &AppEvent_ReportBugError{ReportBugError: &ReportBugErrorEvent{}}})
|
return appEvent(&AppEvent{Event: &AppEvent_ReportBugError{ReportBugError: &ReportBugErrorEvent{}}})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewReportBugFallbackEvent() *StreamEvent {
|
||||||
|
return appEvent(&AppEvent{Event: &AppEvent_ReportBugFallback{ReportBugFallback: &ReportBugFallbackEvent{}}})
|
||||||
|
}
|
||||||
|
|
||||||
func NewShowMainWindowEvent() *StreamEvent {
|
func NewShowMainWindowEvent() *StreamEvent {
|
||||||
return appEvent(&AppEvent{Event: &AppEvent_ShowMainWindow{ShowMainWindow: &ShowMainWindowEvent{}}})
|
return appEvent(&AppEvent{Event: &AppEvent_ShowMainWindow{ShowMainWindow: &ShowMainWindowEvent{}}})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user