Skip to content

Commit 4b01bd0

Browse files
committed
make support email easier to be selected
1 parent d23200b commit 4b01bd0

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

services/static-webserver/client/source/class/osparc/ErrorPage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ qx.Class.define("osparc.ErrorPage", {
214214
const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail();
215215
const giveEmailFeedbackWindow = new osparc.ui.window.Dialog("Support", null, qx.locale.Manager.tr("Please send us an email to:"));
216216
const mailto = osparc.store.Support.getMailToLabel(supportEmail, "Access error");
217+
mailto.setTextAlign("center");
217218
giveEmailFeedbackWindow.addWidget(mailto);
218219
giveEmailFeedbackWindow.open();
219220
},

services/static-webserver/client/source/class/osparc/product/AboutProduct.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ qx.Class.define("osparc.product.AboutProduct", {
162162
__getMailTo: function() {
163163
const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail();
164164
const productName = osparc.store.StaticInfo.getInstance().getDisplayName();
165-
return osparc.store.Support.mailToText(supportEmail, "Support " + productName, false);
165+
return osparc.store.Support.mailToLink(supportEmail, "Support " + productName, false);
166166
},
167167

168168
__addCopyright: function() {

services/static-webserver/client/source/class/osparc/product/quickStart/Utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ qx.Class.define("osparc.product.quickStart.Utils", {
6666
const label = new qx.ui.basic.Label().set({
6767
rich: true,
6868
wrap: true,
69+
selectable: true,
6970
font: "text-14"
7071
});
7172
if (text) {

services/static-webserver/client/source/class/osparc/store/Support.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ qx.Class.define("osparc.store.Support", {
132132
});
133133
},
134134

135-
mailToText: function(email, subject, centered = true) {
135+
mailToLink: function(email, subject, centered = true) {
136136
const color = qx.theme.manager.Color.getInstance().resolve("text");
137-
let textLink = `<a href="mailto:${email}?subject=${subject}" style='color: ${color}' target='_blank'>${email}</a>&nbsp&nbsp`;
137+
let textLink = `<a href="mailto:${email}?subject=${subject}" style='color: ${color}' target='_blank'>${email}</a>`;
138138
if (centered) {
139139
textLink = `<center>${textLink}</center>`
140140
}
141141
return textLink;
142142
},
143143

144144
getMailToLabel: function(email, subject) {
145-
const mailto = new qx.ui.basic.Label(this.mailToText(email, subject)).set({
146-
alignX: "center",
145+
const mailto = new qx.ui.basic.Label(this.mailToLink(email, subject, false)).set({
147146
font: "text-14",
147+
allowGrowX: true, // let it grow to make it easier to select
148148
selectable: true,
149-
rich: true
149+
rich: true,
150150
});
151151
return mailto;
152152
},
@@ -155,6 +155,7 @@ qx.Class.define("osparc.store.Support", {
155155
const productName = osparc.product.Utils.getProductName();
156156
const giveEmailFeedbackWindow = new osparc.ui.window.Dialog("Feedback", null, qx.locale.Manager.tr("Please send us an email to:"));
157157
const mailto = this.getMailToLabel(email, productName + " feedback");
158+
mailto.setTextAlign("center");
158159
giveEmailFeedbackWindow.addWidget(mailto);
159160
giveEmailFeedbackWindow.open();
160161
},

services/static-webserver/client/source/class/osparc/ui/window/Dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ qx.Class.define("osparc.ui.window.Dialog", {
8181
});
8282

8383
this.__extraWidgetsLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(15)).set({
84-
paddingTop: 15
84+
paddingTop: 10
8585
});
8686
this.__extraWidgetsLayout.exclude();
8787
this.add(this.__extraWidgetsLayout, {

services/static-webserver/client/source/class/osparc/utils/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ qx.Class.define("osparc.utils.Utils", {
591591
const manuals = osparc.store.Support.getManuals();
592592
const manualLink = (manuals && manuals.length) ? manuals[0].url : "";
593593
const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail();
594-
const mailto = osparc.store.Support.mailToText(supportEmail, "Request Account " + productName);
594+
const mailto = osparc.store.Support.mailToLink(supportEmail, "Request Account " + productName);
595595
let msg = "";
596596
msg += qx.locale.Manager.tr("To use all ");
597597
msg += this.createHTMLLink(productName + " features", manualLink);

0 commit comments

Comments
 (0)