Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma-fe
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ilja
pleroma-fe
Commits
f1d1fd64
Commit
f1d1fd64
authored
6 years ago
by
raeno
Browse files
Options
Downloads
Patches
Plain Diff
Clean up the code
parent
91a72d51
Branches
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/components/registration/registration.js
+1
-5
1 addition, 5 deletions
src/components/registration/registration.js
src/components/registration/registration.vue
+4
-14
4 additions, 14 deletions
src/components/registration/registration.vue
src/mutation_types.js
+2
-0
2 additions, 0 deletions
src/mutation_types.js
with
7 additions
and
19 deletions
src/components/registration/registration.js
+
1
−
5
View file @
f1d1fd64
...
...
@@ -31,10 +31,6 @@ const registration = {
if
((
!
this
.
registrationOpen
&&
!
this
.
token
)
||
this
.
signedIn
)
{
this
.
$router
.
push
(
'
/main/all
'
)
}
// // Seems like this doesn't work at first page open for some reason
// if (this.$store.state.instance.registrationOpen && this.token) {
// this.$router.push('/registration')
// }
},
computed
:
{
token
()
{
return
this
.
$route
.
params
.
token
},
...
...
@@ -43,7 +39,7 @@ const registration = {
signedIn
:
(
state
)
=>
!!
state
.
users
.
currentUser
,
isPending
:
(
state
)
=>
state
.
users
[
SIGN_UP
.
isPending
],
serverValidationErrors
:
(
state
)
=>
state
.
users
[
SIGN_UP
.
errors
],
terms
ofs
ervice
:
(
state
)
=>
state
.
instance
.
tos
terms
OfS
ervice
:
(
state
)
=>
state
.
instance
.
tos
})
},
methods
:
{
...
...
This diff is collapsed.
Click to expand it.
src/components/registration/registration.vue
+
4
−
14
View file @
f1d1fd64
...
...
@@ -74,13 +74,7 @@
</li>
</ul>
</div>
<!--
<div
class=
'form-group'
>
<label
for=
'captcha'
>
Captcha
</label>
<img
src=
'/qvittersimplesecurity/captcha.jpg'
alt=
'captcha'
class=
'captcha'
>
<input
:disabled=
"registering"
v-model=
'user.captcha'
placeholder=
'Enter captcha'
type=
'test'
class=
'form-control'
id=
'captcha'
>
</div>
-->
<div
class=
'form-group'
v-if=
'token'
>
<label
for=
'token'
>
{{
$t
(
'
registration.token
'
)
}}
</label>
<input
disabled=
'true'
v-model=
'token'
class=
'form-control'
id=
'token'
type=
'text'
>
...
...
@@ -89,12 +83,10 @@
<button
:disabled=
"isPending"
type=
'submit'
class=
'btn btn-default'
>
{{
$t
(
'
general.submit
'
)
}}
</button>
</div>
</div>
<div
class=
'terms-of-service'
v-html=
"termsofservice"
>
<div
class=
'terms-of-service'
v-html=
"termsOfService"
>
</div>
</div>
<div
v-if=
"clientValidationFailed"
>
<span>
Form is invalid
</span>
</div>
<div
v-if=
"serverValidationErrors.length"
class=
'form-group'
>
<div
class=
'alert error'
>
<span
v-for=
"error in serverValidationErrors"
>
{{
error
}}
</span>
...
...
@@ -165,7 +157,7 @@
}
.form-group--error
.form--label
{
color
:
#f04124
;
color
:
var
(
--
cRed
,
#f04124
)
;
}
.form-error
{
...
...
@@ -198,8 +190,6 @@
}
.btn
{
//align-self: flex-start;
//width: 10em;
margin-top
:
0
.6em
;
height
:
28px
;
}
...
...
This diff is collapsed.
Click to expand it.
src/mutation_types.js
+
2
−
0
View file @
f1d1fd64
export
const
SIGN_UP
=
{
// mutations
SUCCESS
:
'
SIGN_UP_SUCCESS
'
,
FAILURE
:
'
SIGN_UP_FAILURE
'
,
PENDING
:
'
SIGN_UP_PENDING
'
,
// state
isPending
:
'
sign_up_pending
'
,
errors
:
'
sign_up_errors
'
}
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