Skip to content

Commit 801228b

Browse files
authored
Merge pull request #2573 from uProxy/ellePossibleHelp
Add helpful messages and links to feedback submission
2 parents 49d889a + 19563e1 commit 801228b

File tree

2 files changed

+46
-11
lines changed

2 files changed

+46
-11
lines changed

src/generic_ui/locales/en/messages.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,38 @@
175175
"description": "Message helping make sure the user understands that personally identifiable information may be included in their feedback to uProxy.",
176176
"message": "Your feedback and email address will be sent to uProxy.org. Your logs, network information and email may include personally identifiable information."
177177
},
178-
"THANK_YOU": {
178+
"FEEDBACK_TITLE": {
179179
"description": "",
180180
"message": "Thank you!"
181181
},
182+
"FEEDBACK_TITLE_4": {
183+
"description": "",
184+
"message": "Trouble signing in"
185+
},
186+
"FEEDBACK_TITLE_5": {
187+
"description": "",
188+
"message": "No friends to proxy from"
189+
},
190+
"FEEDBACK_TITLE_6": {
191+
"description": "",
192+
"message": "Can't start connection"
193+
},
182194
"FEEDBACK_SUBMITTED": {
183195
"description": "User feedback was successfully submitted.",
184196
"message": "Your feedback has been submitted to the uProxy development team."
185197
},
198+
"FEEDBACK_SUBMITTED_4": {
199+
"description": "Trouble signing in feedback error.",
200+
"message": "Login will fail if you try a social network that is blocked. Thanks for your feedback! <uproxy-faq-link anchor='willUproxyWork'>Learn more.</uproxy-faq-link>"
201+
},
202+
"FEEDBACK_SUBMITTED_5": {
203+
"description": "No friends feedback error.",
204+
"message": "Consider using uProxy cloud servers. Thanks for your feedback! <uproxy-faq-link anchor='whatAreCloudServers'>Learn more.</uproxy-faq-link>"
205+
},
206+
"FEEDBACK_SUBMITTED_6": {
207+
"description": "Trouble connecting feedback error.",
208+
"message": "Sometimes uProxy relies on port control to establish a connection, but that might not be available for your network. Thanks for your feedback! <uproxy-faq-link anchor='whatIsPortControl'>Learn more.</uproxy-faq-link>"
209+
},
186210
"EMAIL_INSTEAD_TITLE": {
187211
"description": "Title for error that appears if feedback submission failed.",
188212
"message": "Email feedback instead?"

src/generic_ui/polymer/feedback.ts

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,27 @@ Polymer({
5252
browserInfo: navigator.userAgent,
5353
feedbackType: this.feedbackType
5454
}).then(() => {
55+
var messages : {[key: number]: [string, string]} = {
56+
0: ['FEEDBACK_SUBMITTED', 'FEEDBACK_TITLE'],
57+
1: ['FEEDBACK_SUBMITTED', 'FEEDBACK_TITLE'],
58+
2: ['FEEDBACK_SUBMITTED', 'FEEDBACK_TITLE'],
59+
3: ['FEEDBACK_SUBMITTED', 'FEEDBACK_TITLE'],
60+
4: ['FEEDBACK_SUBMITTED_4', 'FEEDBACK_TITLE_4'],
61+
5: ['FEEDBACK_SUBMITTED_5', 'FEEDBACK_TITLE_5'],
62+
6: ['FEEDBACK_SUBMITTED_6', 'FEEDBACK_TITLE_6'],
63+
7: ['FEEDBACK_SUBMITTED', 'FEEDBACK_TITLE'],
64+
8: ['FEEDBACK_SUBMITTED', 'FEEDBACK_TITLE']
65+
};
66+
// root.ts listens for open-dialog signals and shows a popup
67+
// when it receives these events.
68+
this.$.state.openDialog(dialogs.getMessageDialogDescription(
69+
translator.i18n_t(messages[this.$.errorInput.selected][1]),
70+
translator.i18n_t(messages[this.$.errorInput.selected][0]),
71+
translator.i18n_t('DONE'))).then(() => {
72+
this.fire('core-signal', { name: 'close-settings' });
73+
}, () => {/*MT*/});
74+
this.close();
75+
this.$.sendingFeedbackDialog.close();
5576
// Reset the placeholders, which seem to be cleared after the
5677
// user types input in the input fields.
5778
this.$.emailInput.placeholder = ui.i18n_t('EMAIL_PLACEHOLDER');
@@ -66,16 +87,6 @@ Polymer({
6687
this.feedback = '';
6788
this.feedbackType = null;
6889
this.$.logCheckbox.checked = false;
69-
// root.ts listens for open-dialog signals and shows a popup
70-
// when it receives these events.
71-
this.$.state.openDialog(dialogs.getMessageDialogDescription(
72-
translator.i18n_t('THANK_YOU'),
73-
translator.i18n_t('FEEDBACK_SUBMITTED'),
74-
translator.i18n_t('DONE'))).then(() => {
75-
this.fire('core-signal', { name: 'close-settings' });
76-
}, () => {/*MT*/});
77-
this.close();
78-
this.$.sendingFeedbackDialog.close();
7990
}).catch((e :Error) => {
8091
this.$.state.openDialog(dialogs.getMessageDialogDescription(
8192
translator.i18n_t('EMAIL_INSTEAD_TITLE'),

0 commit comments

Comments
 (0)