[gnome-shell/eos3.8: 169/255] payg: Support image-specific overrides for text in the unlock dialog



commit 07354b7c68c78d633886c41cae09c388c9d8dad7
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Wed Apr 4 11:53:14 2018 +0100

    payg: Support image-specific overrides for text in the unlock dialog
    
    Support four new keys for PAYG, to allow customizing the text
    shown to the user either partially (by inserting the name and
    phone number of the sales representative in the default text)
    or completely (by specifying the whole text for the first or
    the second line of text, or both).
    
    https://phabricator.endlessm.com/T21864

 js/misc/customerSupport.js | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
---
diff --git a/js/misc/customerSupport.js b/js/misc/customerSupport.js
index 6deaf21ff7..13f9f33f4d 100644
--- a/js/misc/customerSupport.js
+++ b/js/misc/customerSupport.js
@@ -34,6 +34,12 @@ const CUSTOMER_SUPPORT_KEY_EMAIL = 'Email';
 const PASSWORD_RESET_GROUP_NAME = 'Password Reset';
 const PASSWORD_RESET_KEY_SALT = 'Salt';
 
+const PAYG_GROUP_NAME = 'Pay As You Go';
+const PAYG_KEY_CONTACT_NAME = 'ContactName';
+const PAYG_KEY_CONTACT_NUMBER = 'ContactPhoneNumber';
+const PAYG_KEY_INSTRUCTIONS_LINE1 = 'InstructionsLine1';
+const PAYG_KEY_INSTRUCTIONS_LINE2 = 'InstructionsLine2';
+
 var CustomerSupport = GObject.registerClass(
 class CustomerSupport extends GObject.Object {
 
@@ -90,4 +96,40 @@ class CustomerSupport extends GObject.Object {
 
         return this._passwordResetSalt;
     }
+
+    get paygContactName() {
+        if (this._paygContactName === undefined) {
+            this._paygContactName = this._getLocaleString(PAYG_GROUP_NAME,
+                                                          PAYG_KEY_CONTACT_NAME);
+        }
+
+        return this._paygContactName;
+    }
+
+    get paygContactNumber() {
+        if (this._paygContactNumber === undefined) {
+            this._paygContactNumber = this._getLocaleString(PAYG_GROUP_NAME,
+                                                            PAYG_KEY_CONTACT_NUMBER);
+        }
+
+        return this._paygContactNumber;
+    }
+
+    get paygInstructionsLine1() {
+        if (this._paygInstructionsLine1 === undefined) {
+            this._paygInstructionsLine1 = this._getLocaleString(PAYG_GROUP_NAME,
+                                                                PAYG_KEY_INSTRUCTIONS_LINE1);
+        }
+
+        return this._paygInstructionsLine1;
+    }
+
+    get paygInstructionsLine2() {
+        if (this._paygInstructionsLine2 === undefined) {
+            this._paygInstructionsLine2 = this._getLocaleString(PAYG_GROUP_NAME,
+                                                                PAYG_KEY_INSTRUCTIONS_LINE2);
+        }
+
+        return this._paygInstructionsLine2;
+    }
 });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]