Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
c7d64734
You need to sign in or sign up before continuing.
Commit
c7d64734
authored
Sep 27, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: edit menu speed-dial UX
parent
4f8a28f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
16 deletions
+116
-16
nav-header.vue
client/components/common/nav-header.vue
+26
-9
page.vue
client/themes/default/components/page.vue
+90
-7
No files found.
client/components/common/nav-header.vue
View file @
c7d64734
...
@@ -246,7 +246,7 @@ export default {
...
@@ -246,7 +246,7 @@ export default {
pictureUrl
:
get
(
'user/pictureUrl'
),
pictureUrl
:
get
(
'user/pictureUrl'
),
isAuthenticated
:
get
(
'user/authenticated'
),
isAuthenticated
:
get
(
'user/authenticated'
),
permissions
:
get
(
'user/permissions'
),
permissions
:
get
(
'user/permissions'
),
picture
()
{
picture
()
{
if
(
this
.
pictureUrl
&&
this
.
pictureUrl
.
length
>
1
)
{
if
(
this
.
pictureUrl
&&
this
.
pictureUrl
.
length
>
1
)
{
return
{
return
{
kind
:
'image'
,
kind
:
'image'
,
...
@@ -264,27 +264,44 @@ export default {
...
@@ -264,27 +264,44 @@ export default {
}
}
}
}
},
},
isAdmin
()
{
isAdmin
()
{
return
_
.
intersection
(
this
.
permissions
,
[
'manage:system'
,
'write:users'
,
'manage:users'
,
'write:groups'
,
'manage:groups'
,
'manage:navigation'
,
'manage:theme'
,
'manage:api'
]).
length
>
0
return
_
.
intersection
(
this
.
permissions
,
[
'manage:system'
,
'write:users'
,
'manage:users'
,
'write:groups'
,
'manage:groups'
,
'manage:navigation'
,
'manage:theme'
,
'manage:api'
]).
length
>
0
}
}
},
},
created
()
{
created
()
{
if
(
this
.
hideSearch
||
this
.
dense
||
this
.
$vuetify
.
breakpoint
.
smAndDown
)
{
if
(
this
.
hideSearch
||
this
.
dense
||
this
.
$vuetify
.
breakpoint
.
smAndDown
)
{
this
.
searchIsShown
=
false
this
.
searchIsShown
=
false
}
}
},
},
mounted
()
{
this
.
$root
.
$on
(
'pageEdit'
,
()
=>
{
this
.
pageEdit
()
})
this
.
$root
.
$on
(
'pageHistory'
,
()
=>
{
this
.
pageHistory
()
})
this
.
$root
.
$on
(
'pageSource'
,
()
=>
{
this
.
pageSource
()
})
this
.
$root
.
$on
(
'pageMove'
,
()
=>
{
this
.
pageMove
()
})
this
.
$root
.
$on
(
'pageDelete'
,
()
=>
{
this
.
pageDelete
()
})
},
methods
:
{
methods
:
{
searchFocus
()
{
searchFocus
()
{
this
.
searchIsFocused
=
true
this
.
searchIsFocused
=
true
},
},
searchBlur
()
{
searchBlur
()
{
this
.
searchIsFocused
=
false
this
.
searchIsFocused
=
false
},
},
searchClose
()
{
searchClose
()
{
this
.
search
=
''
this
.
search
=
''
this
.
searchBlur
()
this
.
searchBlur
()
},
},
searchToggle
()
{
searchToggle
()
{
this
.
searchIsShown
=
!
this
.
searchIsShown
this
.
searchIsShown
=
!
this
.
searchIsShown
if
(
this
.
searchIsShown
)
{
if
(
this
.
searchIsShown
)
{
_
.
delay
(()
=>
{
_
.
delay
(()
=>
{
...
@@ -292,7 +309,7 @@ export default {
...
@@ -292,7 +309,7 @@ export default {
},
200
)
},
200
)
}
}
},
},
searchEnter
()
{
searchEnter
()
{
this
.
$root
.
$emit
(
'searchEnter'
,
true
)
this
.
$root
.
$emit
(
'searchEnter'
,
true
)
},
},
searchMove
(
dir
)
{
searchMove
(
dir
)
{
...
@@ -339,7 +356,7 @@ export default {
...
@@ -339,7 +356,7 @@ export default {
icon
:
'ferry'
icon
:
'ferry'
})
})
},
},
async
changeLocale
(
locale
)
{
async
changeLocale
(
locale
)
{
await
this
.
$i18n
.
i18next
.
changeLanguage
(
locale
.
code
)
await
this
.
$i18n
.
i18next
.
changeLanguage
(
locale
.
code
)
switch
(
this
.
mode
)
{
switch
(
this
.
mode
)
{
case
'view'
:
case
'view'
:
...
...
client/themes/default/components/page.vue
View file @
c7d64734
...
@@ -134,19 +134,86 @@
...
@@ -134,19 +134,86 @@
v-flex.page-col-content(xs12, lg9, xl10)
v-flex.page-col-content(xs12, lg9, xl10)
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='isAuthenticated')
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='isAuthenticated')
template(v-slot:activator='{ on }')
template(v-slot:activator='{ on: onEditActivator }')
v-btn.btn-animate-edit(
v-speed-dial(
fab
v-model='pageEditFab'
direction='top'
open-on-hover
transition='scale-transition'
bottom
bottom
:right='!$vuetify.rtl'
:right='!$vuetify.rtl'
:left='$vuetify.rtl'
:left='$vuetify.rtl'
color='primary'
fixed
fixed
dark
dark
:href='"/e/" + locale + "/" + path'
v-on='on'
)
)
v-icon mdi-pencil
template(v-slot:activator)
v-btn.btn-animate-edit(
fab
color='primary'
v-model='pageEditFab'
@click='pageEdit'
v-on='onEditActivator'
)
v-icon mdi-pencil
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageHistory'
)
v-icon(size='20') mdi-history
span History
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageSource'
)
v-icon(size='20') mdi-code-tags
span View Source
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageMove'
)
v-icon(size='20') mdi-content-save-move-outline
span Move / Rename
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl')
template(v-slot:activator='{ on }')
v-btn(
fab
dark
small
color='red'
v-on='on'
@click='pageDelete'
)
v-icon(size='20') mdi-trash-can-outline
span Delete
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl')
template(v-slot:activator='{ on }')
v-btn.mb-4(
fab
color='teal'
dark
v-on='on'
@click='pageHistory'
)
v-icon mdi-plus
span New Page
span
{{
$t
(
'common:page.editPage'
)
}}
span
{{
$t
(
'common:page.editPage'
)
}}
.contents(ref='container')
.contents(ref='container')
slot(name='contents')
slot(name='contents')
...
@@ -251,6 +318,7 @@ export default {
...
@@ -251,6 +318,7 @@ export default {
navShown
:
false
,
navShown
:
false
,
navExpanded
:
false
,
navExpanded
:
false
,
upBtnShown
:
false
,
upBtnShown
:
false
,
pageEditFab
:
false
,
scrollOpts
:
{
scrollOpts
:
{
duration
:
1500
,
duration
:
1500
,
offset
:
0
,
offset
:
0
,
...
@@ -343,6 +411,21 @@ export default {
...
@@ -343,6 +411,21 @@ export default {
},
},
print
()
{
print
()
{
window
.
print
()
window
.
print
()
},
pageEdit
()
{
this
.
$root
.
$emit
(
'pageEdit'
)
},
pageHistory
()
{
this
.
$root
.
$emit
(
'pageHistory'
)
},
pageSource
()
{
this
.
$root
.
$emit
(
'pageSource'
)
},
pageMove
()
{
this
.
$root
.
$emit
(
'pageMove'
)
},
pageDelete
()
{
this
.
$root
.
$emit
(
'pageDelete'
)
}
}
}
}
}
}
...
...
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