Skip to content

Commit ceca227

Browse files
authored
Merge branch 'development' into fix-7761
2 parents 5097647 + 989b518 commit ceca227

File tree

7 files changed

+173
-116
lines changed

7 files changed

+173
-116
lines changed

app/components/modals/confirm-modal.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export default ModalBase.extend({
77
},
88

99
actions: {
10+
savePublicName() {
11+
this.authManager.currentUser.save();
12+
this.confirm.pendingPromise?.resolve();
13+
this.set('isOpen', false);
14+
},
15+
1016
deny() {
1117
if (this.confirm.pendingPromise.reject) {
1218
this.confirm.pendingPromise.reject();

app/helpers/confirm.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export default Helper.extend({
1515
.then(() => {
1616
params[1](...arguments);
1717
});
18+
} else if (params[1] === 'publicName') {
19+
confirm.prompt(params[0], { 'publicName': true })
20+
.then(() => {
21+
params[1](...arguments);
22+
});
1823
} else if (params.length >= 6) {
1924
confirm.prompt('Are You Sure?', { 'denyText': params[2], 'approveText': params[3], 'denyColor': params[4], 'approveColor': params[5], 'extra': params[0] })
2025
.then(() => {

app/routes/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export default class IndexRoute extends Route {
171171
}
172172
];
173173

174+
174175
return hash({
175176
filteredEvents: this.store.query('event', {
176177
upcoming : true,
@@ -196,6 +197,20 @@ export default class IndexRoute extends Route {
196197
'page[size]' : 6
197198
})
198199
});
200+
201+
}
202+
203+
async afterModel() {
204+
const prevRoute = this.session.currentRouteName;
205+
setTimeout(() => {
206+
if (this.session.isAuthenticated && this.session.currentRouteName === 'index' && prevRoute === 'login' && !this.authManager.currentUser.publicName) {
207+
try {
208+
this.confirm.prompt(this.l10n.t('You have not set a Public Profile Name yet. A public name is displayed on user profiles and video sessions instead of a fantasy name. You can change it later on your account page. Please set your public name now.'), { 'publicName': true });
209+
} catch {
210+
console.warn('User public profile name not set.');
211+
}
212+
}
213+
}, 2000);
199214
}
200215

201216
setupController(controller, model) {

app/templates/components/forms/user-profile-form.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<UiPopup
4949
@tagName="i"
5050
@class="info circle icon"
51-
@content={{'Public profile name, if set, is displayed to other users on profiles and video sessions instead of real name.'}} />
51+
@content={{'Public profile name, if set, is displayed to other users on profiles and video sessions instead of a fantasy name.'}} />
5252
</label>
5353
<Input
5454
@type="text"

app/templates/components/modals/confirm-modal.hbs

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,35 @@
66
{{sanitize this.confirm.options.extra}}
77
</div>
88
{{/if}}
9-
<div class="actions">
10-
{{#if this.confirm.options.infoModal}}
11-
<button type="button" class="ui blue button" {{action 'deny'}}>
12-
{{t 'Ok'}}
9+
{{#if this.confirm.options.publicName}}
10+
<div class="content">
11+
<div class="field ui fluid input">
12+
<Input type="text" @id="public_name" placeholder={{t "Public Profile Name"}} @value={{this.authManager.currentUser.publicName}}/>
13+
</div>
14+
</div>
15+
<div class="actions">
16+
<button type="button" class="ui green button" {{action 'savePublicName'}}>
17+
{{t 'Save'}}
1318
</button>
14-
{{else}}
15-
{{#unless this.confirm.options.hideDeny}}
16-
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.denyColor 'black'}} button" {{action 'deny'}}>
17-
{{if this.confirm.options.denyText this.confirm.options.denyText (t 'No')}}
18-
</button>
19-
{{/unless}}
20-
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.approveColor 'green'}} button" {{action 'confirm'}}>
21-
{{if this.confirm.options.approveText this.confirm.options.approveText (t 'Yes')}}
19+
<button type="button" class="ui black button" {{action 'deny'}}>
20+
{{t 'Cancel'}}
2221
</button>
23-
{{/if}}
24-
</div>
22+
</div>
23+
{{else}}
24+
<div class="actions">
25+
{{#if this.confirm.options.infoModal}}
26+
<button type="button" class="ui blue button" {{action 'deny'}}>
27+
{{t 'Ok'}}
28+
</button>
29+
{{else}}
30+
{{#unless this.confirm.options.hideDeny}}
31+
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.denyColor 'black'}} button" {{action 'deny'}}>
32+
{{if this.confirm.options.denyText this.confirm.options.denyText (t 'No')}}
33+
</button>
34+
{{/unless}}
35+
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.approveColor 'green'}} button" {{action 'confirm'}}>
36+
{{if this.confirm.options.approveText this.confirm.options.approveText (t 'Yes')}}
37+
</button>
38+
{{/if}}
39+
</div>
40+
{{/if}}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828
]
2929
},
3030
"devDependencies": {
31-
"@babel/core": "^7.15.5",
31+
"@babel/core": "^7.15.8",
3232
"@babel/plugin-proposal-object-rest-spread": "^7.15.6",
3333
"@babel/plugin-transform-block-scoping": "^7.15.3",
3434
"@ember/jquery": "^2.0.0",
3535
"@ember/optional-features": "^2.0.0",
36-
"@ember/render-modifiers": "^1.0.2",
36+
"@ember/render-modifiers": "^2.0.0",
3737
"@glimmer/component": "^1.0.4",
3838
"@glimmer/tracking": "^1.0.4",
3939
"@open-event/theme": "^0.2.2",
40-
"@sentry/browser": "^6.13.2",
41-
"@sentry/integrations": "^6.13.2",
42-
"@sentry/tracing": "^6.13.2",
40+
"@sentry/browser": "^6.13.3",
41+
"@sentry/integrations": "^6.13.3",
42+
"@sentry/tracing": "^6.13.3",
4343
"@types/ember": "^3.16.5",
4444
"@types/ember-data": "^3.16.15",
4545
"@types/ember-data__model": "^3.16.1",
@@ -128,7 +128,7 @@
128128
"ember-resolver": "^8.0.3",
129129
"ember-route-action-helper": "^2.0.8",
130130
"ember-router-scroll": "^3.3.7",
131-
"ember-simple-auth": "^4.0.1",
131+
"ember-simple-auth": "^4.0.2",
132132
"ember-simple-auth-token": "^5.2.2",
133133
"ember-source": "3.20.3",
134134
"ember-table": "^2.2.3",
@@ -145,7 +145,7 @@
145145
"leaflet": "^1.6.0",
146146
"loader.js": "^4.7.0",
147147
"lodash-es": "^4.17.21",
148-
"mini-css-extract-plugin": "^2.3.0",
148+
"mini-css-extract-plugin": "^2.4.2",
149149
"moment-timezone": "^0.5.31",
150150
"npm-run-all": "^4.1.5",
151151
"object-to-formdata": "^4.1.0",

0 commit comments

Comments
 (0)