Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Indienet
Site
Commits
0082c4b8
Verified
Commit
0082c4b8
authored
Mar 09, 2018
by
Aral Balkan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display password modal on initial setup
parent
2a95dce6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
30 deletions
+108
-30
components/indieHeader.vue
components/indieHeader.vue
+0
-1
components/settings.vue
components/settings.vue
+95
-18
store/index.js
store/index.js
+13
-11
No files found.
components/indieHeader.vue
View file @
0082c4b8
...
...
@@ -17,7 +17,6 @@ export default {
bio
()
{
return
this
.
$store
.
state
.
bio
},
signedIn
()
{
return
this
.
$store
.
state
.
signedIn
},
configured
()
{
return
this
.
$store
.
state
.
configured
}
},
methods
:
{
followButtonPress
()
{
...
...
components/settings.vue
View file @
0082c4b8
<
template
>
<form
@
submit.prevent=
'submit'
>
<label
for=
'password'
>
Password
</label>
<div
class=
'control'
>
<no-ssr>
<vue-password
v-model=
'password'
classes=
'input'
>
<template
slot=
"password-toggle"
slot-scope=
"props"
>
<button
class=
"button VuePassword__Toggle"
type=
"button"
v-on:click =
"props.toggle"
v-text=
"props.type === 'password' ? 'Show' : 'Hide'"
>
</button>
</
template
>
</vue-password>
</no-ssr>
</div>
</form>
<div>
<form
@
submit.prevent=
'submit'
>
<b-field
label=
'Name'
>
<b-input
v-model=
'name'
></b-input>
</b-field>
<b-field
label=
'Bio'
>
<b-input
v-model=
'bio'
></b-input>
</b-field>
</form>
<b-modal
:active.sync=
'modalIsActive'
scroll=
'keep'
>
<!--
<div
class=
'modal-background'
></div>
-->
<div
class=
'modal-card'
style=
'width: auto'
>
<header
class=
'modal-card-head'
>
<p
class=
'modal-card-title'
>
Get started!
</p>
</header>
<section
class=
'modal-card-body'
>
<b-field
label=
'Password'
>
<div
id=
'password-field'
class=
'control'
>
<no-ssr>
<vue-password
v-model=
'password'
classes=
'input'
>
<template
slot=
"password-toggle"
slot-scope=
"props"
>
<button
class=
"button VuePassword__Toggle"
type=
"button"
v-on:click =
"props.toggle"
v-text=
"props.type === 'password' ? 'Show' : 'Hide'"
>
</button>
</
template
>
</vue-password>
</no-ssr>
</div>
</b-field>
</section>
<footer
class=
"modal-card-foot"
>
<button
class=
'button is-fullwidth is-primary'
>
Set password
</button>
</footer>
</div>
</b-modal>
</div>
</template>
<
script
>
export
default
{
computed
:
{
name
:
{
get
()
{
return
this
.
$store
.
state
.
name
},
set
(
value
)
{
this
.
$store
.
commit
(
'
name
'
,
value
)
}
},
bio
:
{
get
()
{
return
this
.
$store
.
state
.
bio
},
set
(
value
)
{
this
.
$store
.
commit
(
'
bio
'
,
value
)
}
},
configured
:
{
get
()
{
return
this
.
$store
.
state
.
configured
},
set
(
value
)
{
this
.
$store
.
commit
(
'
configured
'
,
value
)
}
}
},
data
()
{
return
{
password
:
''
password
:
''
,
modalIsActive
:
!
this
.
configured
}
},
methods
:
{
...
...
@@ -41,4 +93,29 @@
button
.button.VuePassword__Toggle
{
min-width
:
80px
;
}
div
.control
{
/* margin-top: 1em; */
margin-bottom
:
1em
;
}
div
.card-content
{
padding-top
:
1em
;
}
div
.VuePassword__Message
{
min-height
:
2rem
;
}
.VuePassword__Meter
{
margin-top
:
.5rem
;
}
.VuePassword__Message
{
padding-top
:
.5rem
;
}
#password-field
{
margin-bottom
:
0
;
}
</
style
>
store/index.js
View file @
0082c4b8
...
...
@@ -3,20 +3,22 @@
const
siteConfiguration
=
require
(
'
../assets/data.json
'
)
// Mock: sign-in state
siteConfiguration
.
signedIn
=
tru
e
siteConfiguration
.
configured
=
tru
e
siteConfiguration
.
signedIn
=
fals
e
siteConfiguration
.
configured
=
fals
e
export
const
state
=
()
=>
(
siteConfiguration
)
// export const mutations = {
// name (state, text) {
// state.name = text
// },
// bio (state, text) {
// state.bio = text
// }
// }
export
const
mutations
=
{
name
(
state
,
text
)
{
state
.
name
=
text
},
bio
(
state
,
text
)
{
state
.
bio
=
text
},
configured
(
state
,
value
)
{
state
.
configured
=
value
}
}
// export const actions = {
// async nuxtServerInit ({ commit }, { app }) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment