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
aaeb24a8
Commit
aaeb24a8
authored
Nov 19, 2018
by
Nicolas Giard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: hide page actions when not applicable
parent
27adad8d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
31 deletions
+52
-31
admin.vue
client/components/admin.vue
+4
-1
nav-header.vue
client/components/common/nav-header.vue
+27
-19
editor.vue
client/components/editor.vue
+9
-7
history.vue
client/components/history.vue
+2
-0
profile.vue
client/components/profile.vue
+4
-1
page.js
client/store/page.js
+2
-1
page.vue
client/themes/default/components/page.vue
+2
-0
app.scss
client/themes/default/scss/app.scss
+2
-2
No files found.
client/components/admin.vue
View file @
aaeb24a8
...
...
@@ -125,7 +125,10 @@ export default {
computed
:
{
darkMode
:
get
(
'site/dark'
)
},
router
router
,
created
()
{
this
.
$store
.
commit
(
'page/SET_MODE'
,
'admin'
)
}
}
</
script
>
...
...
client/components/common/nav-header.vue
View file @
aaeb24a8
...
...
@@ -26,23 +26,27 @@
v-list-tile(avatar, @click='pageNew')
v-list-tile-avatar: v-icon(color='green') add_box
v-list-tile-content New Page
v-divider.my-0
v-subheader Current Page
v-list-tile(avatar, @click='pageEdit')
v-list-tile-avatar: v-icon(color='indigo') edit
v-list-tile-content Edit
v-list-tile(avatar, @click='pageHistory')
v-list-tile-avatar: v-icon(color='indigo') history
v-list-tile-content History
v-list-tile(avatar, @click='pageSource')
v-list-tile-avatar: v-icon(color='indigo') code
v-list-tile-content View Source
v-list-tile(avatar, @click='pageMove')
v-list-tile-avatar: v-icon(color='indigo') forward
v-list-tile-content Move / Rename
v-list-tile(avatar, @click='pageDelete')
v-list-tile-avatar: v-icon(color='red darken-2') delete
v-list-tile-content Delete
template(v-if='path && path.length')
v-divider.my-0
v-subheader Current Page
v-list-tile(avatar, @click='pageView', v-if='mode !== `view`')
v-list-tile-avatar: v-icon(color='indigo') subject
v-list-tile-content View
v-list-tile(avatar, @click='pageEdit', v-if='mode !== `edit`')
v-list-tile-avatar: v-icon(color='indigo') edit
v-list-tile-content Edit
v-list-tile(avatar, @click='pageHistory', v-if='mode !== `history`')
v-list-tile-avatar: v-icon(color='indigo') history
v-list-tile-content History
v-list-tile(avatar, @click='pageSource', v-if='mode !== `source`')
v-list-tile-avatar: v-icon(color='indigo') code
v-list-tile-content View Source
v-list-tile(avatar, @click='pageMove')
v-list-tile-avatar: v-icon(color='indigo') forward
v-list-tile-content Move / Rename
v-list-tile(avatar, @click='pageDelete')
v-list-tile-avatar: v-icon(color='red darken-2') delete
v-list-tile-content Delete
v-divider.my-0
v-subheader Assets
v-list-tile(avatar, @click='')
...
...
@@ -138,7 +142,8 @@ export default {
computed
:
{
isLoading
:
get
(
'isLoading'
),
title
:
get
(
'site/title'
),
path
:
get
(
'page/path'
)
path
:
get
(
'page/path'
),
mode
:
get
(
'page/mode'
)
},
created
()
{
if
(
this
.
hideSearch
||
this
.
dense
||
this
.
$vuetify
.
breakpoint
.
smAndDown
)
{
...
...
@@ -160,6 +165,9 @@ export default {
pageNew
()
{
this
.
newPageModal
=
true
},
pageView
()
{
window
.
location
.
assign
(
`/
${
this
.
path
}
`
)
},
pageEdit
()
{
window
.
location
.
assign
(
`/e/
${
this
.
path
}
`
)
},
...
...
@@ -167,7 +175,7 @@ export default {
window
.
location
.
assign
(
`/h/
${
this
.
path
}
`
)
},
pageSource
()
{
window
.
location
.
assign
(
`/s/
${
this
.
path
}
`
)
},
pageMove
()
{
...
...
client/components/editor.vue
View file @
aaeb24a8
...
...
@@ -12,19 +12,19 @@
span.white--text(v-if='$vuetify.breakpoint.lgAndUp')
{{
mode
===
'create'
?
$t
(
'common:actions.create'
)
:
$t
(
'common:actions.save'
)
}}
v-btn.mx-0(
outline
color='red'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
)
v-icon(color='red', :left='$vuetify.breakpoint.lgAndUp') close
span.white--text(v-if='$vuetify.breakpoint.lgAndUp')
{{
$t
(
'common:actions.discard'
)
}}
v-btn(
outline
color='blue'
@click.native.stop='openModal(`properties`)'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
)
v-icon(color='blue', :left='$vuetify.breakpoint.lgAndUp') sort_by_alpha
span.white--text(v-if='$vuetify.breakpoint.lgAndUp')
{{
$t
(
'editor:page'
)
}}
v-btn(
outline
color='red'
:class='{ "is-icon": $vuetify.breakpoint.mdAndDown }'
)
v-icon(color='red', :left='$vuetify.breakpoint.lgAndUp') close
span.white--text(v-if='$vuetify.breakpoint.lgAndUp')
{{
$t
(
'common:actions.discard'
)
}}
v-content
component(:is='currentEditor')
component(:is='currentModal')
...
...
@@ -170,6 +170,8 @@ export default {
this
.
$store
.
commit
(
'page/SET_PATH'
,
this
.
path
)
this
.
$store
.
commit
(
'page/SET_TAGS'
,
this
.
tags
)
this
.
$store
.
commit
(
'page/SET_TITLE'
,
this
.
title
)
this
.
$store
.
commit
(
'page/SET_MODE'
,
'edit'
)
},
mounted
()
{
this
.
$store
.
set
(
'editor/mode'
,
this
.
initMode
||
'create'
)
...
...
client/components/history.vue
View file @
aaeb24a8
...
...
@@ -122,6 +122,8 @@ export default {
this
.
$store
.
commit
(
'page/SET_ID'
,
this
.
id
)
this
.
$store
.
commit
(
'page/SET_LOCALE'
,
this
.
locale
)
this
.
$store
.
commit
(
'page/SET_PATH'
,
this
.
path
)
this
.
$store
.
commit
(
'page/SET_MODE'
,
'history'
)
},
methods
:
{
goLive
()
{
...
...
client/components/profile.vue
View file @
aaeb24a8
...
...
@@ -60,7 +60,10 @@ export default {
computed
:
{
darkMode
()
{
return
siteConfig
.
darkMode
}
},
router
router
,
created
()
{
this
.
$store
.
commit
(
'page/SET_MODE'
,
'profile'
)
}
}
</
script
>
...
...
client/store/page.js
View file @
aaeb24a8
...
...
@@ -13,7 +13,8 @@ const state = {
publishStartDate
:
''
,
tags
:
[],
title
:
''
,
updatedAt
:
''
updatedAt
:
''
,
mode
:
''
}
export
default
{
...
...
client/themes/default/components/page.vue
View file @
aaeb24a8
...
...
@@ -210,6 +210,8 @@ export default {
this
.
$store
.
commit
(
'page/SET_TAGS'
,
this
.
tags
)
this
.
$store
.
commit
(
'page/SET_TITLE'
,
this
.
title
)
this
.
$store
.
commit
(
'page/SET_UPDATED_AT'
,
this
.
updatedAt
)
this
.
$store
.
commit
(
'page/SET_MODE'
,
'view'
)
},
mounted
()
{
Prism
.
highlightAllUnder
(
this
.
$refs
.
container
)
...
...
client/themes/default/scss/app.scss
View file @
aaeb24a8
...
...
@@ -88,9 +88,9 @@
}
code
{
background-color
:
rgba
(
mc
(
'
pink'
,
'500'
)
,
.
1
);
background-color
:
rgba
(
mc
(
'
indigo'
,
'50'
)
,
1
);
padding
:
0
5px
;
color
:
mc
(
'
pink
'
,
'800'
);
color
:
mc
(
'
indigo
'
,
'800'
);
font-family
:
'Source Code Pro'
,
monospace
;
font-weight
:
normal
;
font-size
:
1rem
;
...
...
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