Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Hubs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ar-noc
Hubs
Commits
11b7cabd
Commit
11b7cabd
authored
6 years ago
by
Greg Fodor
Browse files
Options
Downloads
Patches
Plain Diff
UX cleanup for link entry
parent
86bd9b14
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/assets/stylesheets/link.scss
+12
-0
12 additions, 0 deletions
src/assets/stylesheets/link.scss
src/assets/translations.data.json
+1
-1
1 addition, 1 deletion
src/assets/translations.data.json
src/react-components/link-root.js
+28
-14
28 additions, 14 deletions
src/react-components/link-root.js
with
41 additions
and
15 deletions
src/assets/stylesheets/link.scss
+
12
−
0
View file @
11b7cabd
...
...
@@ -10,6 +10,17 @@ body {
padding
:
0
;
background-color
:
white
;
color
:
black
;
-moz-user-select
:
none
;
-webkit-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
overflow-y
:
hidden
;
}
button
{
outline
:
none
;
-webkit-tap-highlight-color
:
rgba
(
255
,
255
,
255
,
0
);
-webkit-tap-highlight-color
:
transparent
;
}
a
{
...
...
@@ -112,6 +123,7 @@ a {
:local
(
.header
)
{
text-align
:
center
;
white-space
:
pre-wrap
;
}
:local
(
.footer
)
{
...
...
This diff is collapsed.
Click to expand it.
src/assets/translations.data.json
+
1
−
1
View file @
11b7cabd
...
...
@@ -76,7 +76,7 @@
"link.link_page_header_entry"
:
"Enter your code:"
,
"link.link_page_header_headset"
:
"Enter headset link code:"
,
"link.linking_a_headset"
:
"Linking a Headset?"
,
"link.try_again"
:
"We couldn't find that code.
Please try again."
,
"link.try_again"
:
"We couldn't find that code.
\n
Please try again."
,
"help.report_issue"
:
"Report an Issue"
,
"scene.logo_tagline"
:
"A new way to get together"
,
"scene.create_button"
:
"Create a room with this scene"
,
...
...
This diff is collapsed.
Click to expand it.
src/react-components/link-root.js
+
28
−
14
View file @
11b7cabd
...
...
@@ -14,6 +14,7 @@ const MAX_LETTERS = 4;
addLocaleData
([...
en
]);
disableiOSZoom
();
const
hasTouchEvents
=
"
ontouchstart
"
in
document
.
documentElement
;
class
LinkRoot
extends
Component
{
static
propTypes
=
{
...
...
@@ -196,14 +197,20 @@ class LinkRoot extends Component {
disabled
=
{
this
.
state
.
entered
.
length
===
this
.
maxAllowedChars
()}
key
=
{
`char_
${
i
}
`
}
className
=
{
styles
.
keypadButton
}
onClick
=
{()
=>
this
.
addToEntry
(
d
)}
onClick
=
{()
=>
{
if
(
!
hasTouchEvents
)
this
.
addToEntry
(
d
);
}}
onTouchStart
=
{()
=>
this
.
addToEntry
(
d
)}
>
{
d
}
<
/button
>
))}
<
button
className
=
{
classNames
(
styles
.
keypadButton
,
styles
.
keypadToggleMode
)}
onClick
=
{()
=>
this
.
toggleMode
()}
onTouchStart
=
{()
=>
this
.
toggleMode
()}
onClick
=
{()
=>
{
if
(
!
hasTouchEvents
)
this
.
toggleMode
();
}}
>
{
this
.
state
.
isAlphaMode
?
"
123
"
:
"
ABC
"
}
<
/button
>
...
...
@@ -211,7 +218,10 @@ class LinkRoot extends Component {
<
button
disabled
=
{
this
.
state
.
entered
.
length
===
this
.
maxAllowedChars
()}
className
=
{
classNames
(
styles
.
keypadButton
,
styles
.
keypadZeroButton
)}
onClick
=
{()
=>
this
.
addToEntry
(
0
)}
onTouchStart
=
{()
=>
this
.
addToEntry
(
0
)}
onClick
=
{()
=>
{
if
(
!
hasTouchEvents
)
this
.
addToEntry
(
0
);
}}
>
0
<
/button
>
...
...
@@ -219,23 +229,27 @@ class LinkRoot extends Component {
<
button
disabled
=
{
this
.
state
.
entered
.
length
===
0
||
this
.
state
.
entered
.
length
===
this
.
maxAllowedChars
()}
className
=
{
classNames
(
styles
.
keypadButton
,
styles
.
keypadBackspace
)}
onClick
=
{()
=>
this
.
removeChar
()}
onTouchStart
=
{()
=>
this
.
removeChar
()}
onClick
=
{()
=>
{
if
(
!
hasTouchEvents
)
this
.
removeChar
();
}}
>
⌫
<
/button
>
<
/div
>
<
div
className
=
{
styles
.
footer
}
>
{
!
this
.
state
.
isAlphaMode
&&
(
<
div
className
=
{
styles
.
linkHeadsetFooterLink
}
>
<
img
onClick
=
{()
=>
this
.
toggleMode
()}
src
=
{
HeadsetIcon
}
className
=
{
styles
.
headsetIcon
}
/
>
<
span
>
<
a
href
=
"
#
"
onClick
=
{()
=>
this
.
toggleMode
()}
>
<
FormattedMessage
id
=
"
link.linking_a_headset
"
/>
<
/a
>
<
/span
>
<
/div
>
)}
<
div
className
=
{
styles
.
linkHeadsetFooterLink
}
style
=
{{
visibility
:
this
.
state
.
isAlphaMode
?
"
hidden
"
:
"
visible
"
}}
>
<
img
onClick
=
{()
=>
this
.
toggleMode
()}
src
=
{
HeadsetIcon
}
className
=
{
styles
.
headsetIcon
}
/
>
<
span
>
<
a
href
=
"
#
"
onClick
=
{()
=>
this
.
toggleMode
()}
>
<
FormattedMessage
id
=
"
link.linking_a_headset
"
/>
<
/a
>
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment