Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6a6066e
adding frontend ans server version on admin page
maze-runnar Jul 26, 2021
e62e06c
f
maze-runnar Jul 26, 2021
d6a481a
revert
maze-runnar Jul 26, 2021
f6a3248
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Jul 27, 2021
24c9237
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Jul 29, 2021
1bef0e9
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Jul 31, 2021
b8df450
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Aug 4, 2021
fadde90
rebaes
maze-runnar Aug 4, 2021
c843d1a
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Aug 8, 2021
a3e2f13
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Aug 9, 2021
a96cea4
Rebase ...
maze-runnar Aug 10, 2021
a8b1486
Merge branch
maze-runnar Aug 16, 2021
5872f84
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Aug 28, 2021
9cbe269
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Aug 29, 2021
73432de
Rebase not working..
maze-runnar Sep 2, 2021
ccee328
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Sep 20, 2021
dc8709b
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Sep 29, 2021
e108eba
Merge branch 'development' of https://github.com/fossasia/open-event-…
maze-runnar Oct 3, 2021
e1909fc
set public profile name after login
maze-runnar Oct 6, 2021
bdcd5e8
set public profile name after login
maze-runnar Oct 6, 2021
b4ab046
code style
maze-runnar Oct 6, 2021
5bfd3f2
setting afterModel hook with timeOut
maze-runnar Oct 7, 2021
9eeeb20
fix..
maze-runnar Oct 7, 2021
82f2ee4
reduce timeout time
maze-runnar Oct 7, 2021
a318627
UI changes
maze-runnar Oct 7, 2021
13626a5
last commit
maze-runnar Oct 8, 2021
53b754d
Merge branch 'development' into userprofile-name
maze-runnar Oct 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/components/modals/confirm-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ export default ModalBase.extend({
},

actions: {
savePublicName() {
this.authManager.currentUser.save();
this.confirm.pendingPromise?.resolve();
this.set('isOpen', false);
},

deny() {
if (this.confirm.pendingPromise.reject) {
this.confirm.pendingPromise.reject();
Expand Down
5 changes: 5 additions & 0 deletions app/helpers/confirm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export default Helper.extend({
.then(() => {
params[1](...arguments);
});
} else if (params[1] === 'publicName') {
confirm.prompt(params[0], { 'publicName': true })
.then(() => {
params[1](...arguments);
});
} else if (params.length >= 6) {
confirm.prompt('Are You Sure?', { 'denyText': params[2], 'approveText': params[3], 'denyColor': params[4], 'approveColor': params[5], 'extra': params[0] })
.then(() => {
Expand Down
15 changes: 15 additions & 0 deletions app/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export default class IndexRoute extends Route {
}
];


return hash({
filteredEvents: this.store.query('event', {
upcoming : true,
Expand All @@ -196,6 +197,20 @@ export default class IndexRoute extends Route {
'page[size]' : 6
})
});

}

async afterModel() {
const prevRoute = this.session.currentRouteName;
setTimeout(() => {
if (this.session.isAuthenticated && this.session.currentRouteName === 'index' && prevRoute === 'login' && !this.authManager.currentUser.publicName) {
try {
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 });
} catch {
console.warn('User public profile name not set.');
}
}
}, 2000);
}

setupController(controller, model) {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/components/forms/user-profile-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<UiPopup
@tagName="i"
@class="info circle icon"
@content={{'Public profile name, if set, is displayed to other users on profiles and video sessions instead of real name.'}} />
@content={{'Public profile name, if set, is displayed to other users on profiles and video sessions instead of a fantasy name.'}} />
</label>
<Input
@type="text"
Expand Down
44 changes: 30 additions & 14 deletions app/templates/components/modals/confirm-modal.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,35 @@
{{sanitize this.confirm.options.extra}}
</div>
{{/if}}
<div class="actions">
{{#if this.confirm.options.infoModal}}
<button type="button" class="ui blue button" {{action 'deny'}}>
{{t 'Ok'}}
{{#if this.confirm.options.publicName}}
<div class="content">
<div class="field ui fluid input">
<Input type="text" @id="public_name" placeholder={{t "Public Profile Name"}} @value={{this.authManager.currentUser.publicName}}/>
</div>
</div>
<div class="actions">
<button type="button" class="ui green button" {{action 'savePublicName'}}>
{{t 'Save'}}
</button>
{{else}}
{{#unless this.confirm.options.hideDeny}}
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.denyColor 'black'}} button" {{action 'deny'}}>
{{if this.confirm.options.denyText this.confirm.options.denyText (t 'No')}}
</button>
{{/unless}}
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.approveColor 'green'}} button" {{action 'confirm'}}>
{{if this.confirm.options.approveText this.confirm.options.approveText (t 'Yes')}}
<button type="button" class="ui black button" {{action 'deny'}}>
{{t 'Cancel'}}
</button>
{{/if}}
</div>
</div>
{{else}}
<div class="actions">
{{#if this.confirm.options.infoModal}}
<button type="button" class="ui blue button" {{action 'deny'}}>
{{t 'Ok'}}
</button>
{{else}}
{{#unless this.confirm.options.hideDeny}}
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.denyColor 'black'}} button" {{action 'deny'}}>
{{if this.confirm.options.denyText this.confirm.options.denyText (t 'No')}}
</button>
{{/unless}}
<button type="button" class="ui {{if this.confirm.options.denyText this.confirm.options.approveColor 'green'}} button" {{action 'confirm'}}>
{{if this.confirm.options.approveText this.confirm.options.approveText (t 'Yes')}}
</button>
{{/if}}
</div>
{{/if}}