Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removes discriminator for pomelo usernames #218

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion views/account/account.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<div class="setting-card">
<h2 class="header">{{ locale.account.settings.settingCards.discord }}</h2>
{{#if discordUser}}
<p>{{ locale.account.settings.settingCards.connectedToDiscord }} {{ discordUser.username }}#{{ discordUser.discriminator }}</p>
<p>{{ locale.account.settings.settingCards.connectedToDiscord }} {{ discordUser.username }}{{#ifCond discordUser.discriminator '#0'}}{{else}}#{{ discordUser.discriminator }}{{/ifCond}}</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • There is no handlebars function called ifCond. This crashes
  • Even if this didn't crash, discordUser.discriminator is a number, it does not contain the #, which is why it is added here. These checks would always fail since you seem to be checking for #0 and not 0
  • We prefer to use full blocks for if statements instead of single lines. See the #if checks earlier in this same view for checking the users environment status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fixed, however i was unable to rehost the website as i was missing critical files for the account server and didnt know how to get them

<a href="/account/remove/discord">
<button class="button secondary" id="remove-discord-connection">{{ locale.account.settings.settingCards.removeDiscord }}</button>
</a>
Expand Down