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

Add Discord field to user profiles #3033

Merged
merged 13 commits into from Apr 18, 2018
Merged

Add Discord field to user profiles #3033

merged 13 commits into from Apr 18, 2018

Conversation

@nekodex
Copy link
Collaborator

@nekodex nekodex commented Apr 18, 2018

(reuses the existing user_jabber field for now until we can rename the database column)

fixes #1286 (but doesn't nuke skype)

nekodex added 8 commits Apr 13, 2018
// This is a basic check and not 100% compliant to Discord's spec, only validates that input:
// - is a 2-32 char username (excluding chars @#:)
// - ends with a # and 4-digit discriminator (number being greater than 0000)
if (!preg_match('/^[^@#:]{2,32}#\d{3}[1-9]$/i', $this->user_discord)) {

This comment has been minimized.

@nanaya

nanaya Apr 18, 2018
Collaborator

discriminator can't end with 0?

onClick: @click
title: osu.trans('common.buttons.click_to_copy')
'data-tooltip-pin-position': true
a

This comment has been minimized.

@nanaya

nanaya Apr 18, 2018
Collaborator

Shouldn't this one be the span and the parent the a...?

click: (e) =>
e.preventDefault()
el = e.currentTarget
api = @state.api || $(el).qtip('api')

This comment has been minimized.

@nanaya

nanaya Apr 18, 2018
Collaborator

or maybe just @api ?= $(...? Doesn't seem useful storing it in @state?


@setState
qtip: api
title: el.getAttribute('title') || el.dataset.origTitle

This comment has been minimized.

@nanaya

nanaya Apr 18, 2018
Collaborator

same with @api (and timer).

api.set 'content.text', osu.trans('common.buttons.click_to_copy_copied')

# set timer to reset tooltip text
if @state.timer?

This comment has been minimized.

@nanaya

nanaya Apr 18, 2018
Collaborator

Timeout.clear undefined is fine. So is clearing cleared timeout.

nekodex added 4 commits Apr 18, 2018
@nekodex nekodex force-pushed the nekodex:discord-profile branch from e21ff86 to 9aec398 Apr 18, 2018
@nanaya
nanaya approved these changes Apr 18, 2018
@nanaya nanaya merged commit 4238996 into ppy:master Apr 18, 2018
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@nekodex nekodex deleted the nekodex:discord-profile branch Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.