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
daa8174d
Commit
daa8174d
authored
Oct 12, 2019
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: github sponsor button + keep parent path in page selector
parent
acb57879
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
18 deletions
+45
-18
admin-contribute.vue
client/components/admin/admin-contribute.vue
+7
-0
loader.vue
client/components/common/loader.vue
+1
-1
nav-header.vue
client/components/common/nav-header.vue
+8
-8
page-delete.vue
client/components/common/page-delete.vue
+7
-1
page-selector.vue
client/components/common/page-selector.vue
+21
-8
common-pages-query-tree.gql
client/graph/common/common-pages-query-tree.gql
+1
-0
donate_github.svg
client/static/img/donate_github.svg
+0
-0
No files found.
client/components/admin/admin-contribute.vue
View file @
daa8174d
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
icons-and-text
icons-and-text
)
)
v-tab
v-tab
span GitHub
v-icon.my-1(size='24') mdi-github-circle
v-tab
span Patreon
span Patreon
img.my-1(src='/svg/icon-patreon.svg', style='height: 24px;')
img.my-1(src='/svg/icon-patreon.svg', style='height: 24px;')
v-tab
v-tab
...
@@ -41,6 +44,10 @@
...
@@ -41,6 +44,10 @@
span T-Shirts
span T-Shirts
img.my-1(src='/svg/icon-t-shirt.svg', style='height: 24px;')
img.my-1(src='/svg/icon-t-shirt.svg', style='height: 24px;')
v-tab-item(:transition='false', :reverse-transition='false')
v-tab-item(:transition='false', :reverse-transition='false')
.body-2.pa-3
{{
$t
(
'admin:contribute.github'
)
}}
a.ml-3(href='https://github.com/users/NGPixel/sponsorship', :title='$t(`admin:contribute.becomeASponsor`)')
img(src='/img/donate_github.svg', :alt='$t(`admin:contribute.becomeASponsor`)' style='width:200px;')
v-tab-item(:transition='false', :reverse-transition='false')
.body-2.pa-3
{{
$t
(
'admin:contribute.patreon'
)
}}
.body-2.pa-3
{{
$t
(
'admin:contribute.patreon'
)
}}
a.ml-3(href='https://www.patreon.com/bePatron?u=16744039', :title='$t(`admin:contribute.becomeAPatron`)')
a.ml-3(href='https://www.patreon.com/bePatron?u=16744039', :title='$t(`admin:contribute.becomeAPatron`)')
img(src='/img/donate_patreon.png', :alt='$t(`admin:contribute.becomeAPatron`)' style='width:200px;')
img(src='/img/donate_patreon.png', :alt='$t(`admin:contribute.becomeAPatron`)' style='width:200px;')
...
...
client/components/common/loader.vue
View file @
daa8174d
<
template
lang=
'pug'
>
<
template
lang=
'pug'
>
v-dialog(v-model='value', persistent, max-width='350')
v-dialog(v-model='value', persistent, max-width='350'
, :overlay-color='color', overlay-opacity='.7'
)
v-card.loader-dialog.radius-7(:color='color', dark)
v-card.loader-dialog.radius-7(:color='color', dark)
v-card-text.text-center.py-4
v-card-text.text-center.py-4
atom-spinner.is-inline(
atom-spinner.is-inline(
...
...
client/components/common/nav-header.vue
View file @
daa8174d
...
@@ -132,10 +132,9 @@
...
@@ -132,10 +132,9 @@
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-code-tags
v-list-item-avatar(size='24'): v-icon(color='indigo') mdi-code-tags
v-list-item-title.body-2
{{
$t
(
'common:header.viewSource'
)
}}
v-list-item-title.body-2
{{
$t
(
'common:header.viewSource'
)
}}
v-list-item.pl-4(@click='pageMove', v-if='isAuthenticated')
v-list-item.pl-4(@click='pageMove', v-if='isAuthenticated')
v-list-item-avatar(size='24'): v-icon(color='
grey lighten-2
') mdi-content-save-move-outline
v-list-item-avatar(size='24'): v-icon(color='
indigo
') mdi-content-save-move-outline
v-list-item-content
v-list-item-content
v-list-item-title.body-2.grey--text.text--ligten-2
{{
$t
(
'common:header.move'
)
}}
v-list-item-title.body-2
{{
$t
(
'common:header.move'
)
}}
v-list-item-subtitle.overline.grey--text.text--lighten-2 Coming soon
v-list-item.pl-4(@click='pageDelete', v-if='isAuthenticated')
v-list-item.pl-4(@click='pageDelete', v-if='isAuthenticated')
v-list-item-avatar(size='24'): v-icon(color='red darken-2') mdi-trash-can-outline
v-list-item-avatar(size='24'): v-icon(color='red darken-2') mdi-trash-can-outline
v-list-item-title.body-2
{{
$t
(
'common:header.delete'
)
}}
v-list-item-title.body-2
{{
$t
(
'common:header.delete'
)
}}
...
@@ -196,6 +195,7 @@
...
@@ -196,6 +195,7 @@
span
{{
$t
(
'common:header.login'
)
}}
span
{{
$t
(
'common:header.login'
)
}}
page-selector(mode='create', v-model='newPageModal', :open-handler='pageNewCreate', :locale='locale')
page-selector(mode='create', v-model='newPageModal', :open-handler='pageNewCreate', :locale='locale')
page-selector(mode='move', v-model='movePageModal', :open-handler='pageMoveRename', :path='path', :locale='locale')
page-delete(v-model='deletePageModal', v-if='path && path.length')
page-delete(v-model='deletePageModal', v-if='path && path.length')
</
template
>
</
template
>
...
@@ -226,6 +226,7 @@ export default {
...
@@ -226,6 +226,7 @@ export default {
searchIsShown
:
true
,
searchIsShown
:
true
,
searchAdvMenuShown
:
false
,
searchAdvMenuShown
:
false
,
newPageModal
:
false
,
newPageModal
:
false
,
movePageModal
:
false
,
deletePageModal
:
false
,
deletePageModal
:
false
,
locales
:
siteLangs
locales
:
siteLangs
}
}
...
@@ -339,11 +340,10 @@ export default {
...
@@ -339,11 +340,10 @@ export default {
window
.
location
.
assign
(
`/s/
${
this
.
locale
}
/
${
this
.
path
}
`
)
window
.
location
.
assign
(
`/s/
${
this
.
locale
}
/
${
this
.
path
}
`
)
},
},
pageMove
()
{
pageMove
()
{
this
.
$store
.
commit
(
'showNotification'
,
{
this
.
movePageModal
=
true
style
:
'indigo'
,
},
message
:
`Coming soon...`
,
pageMoveRename
({
path
,
locale
})
{
icon
:
'ferry'
})
},
},
pageDelete
()
{
pageDelete
()
{
this
.
deletePageModal
=
true
this
.
deletePageModal
=
true
...
...
client/components/common/page-delete.vue
View file @
daa8174d
<
template
lang=
'pug'
>
<
template
lang=
'pug'
>
v-dialog(v-model='isShown', max-width='550', persistent)
v-dialog(
v-model='isShown'
max-width='550'
persistent
overlay-color='red darken-4'
overlay-opacity='.7'
)
v-card
v-card
.dialog-header.is-short.is-red
.dialog-header.is-short.is-red
v-icon.mr-2(color='white') mdi-file-document-box-remove-outline
v-icon.mr-2(color='white') mdi-file-document-box-remove-outline
...
...
client/components/common/page-selector.vue
View file @
daa8174d
<
template
lang=
"pug"
>
<
template
lang=
"pug"
>
v-dialog(v-model='isShown', max-width='850px')
v-dialog(
v-model='isShown'
max-width='850px'
overlay-color='blue darken-4'
overlay-opacity='.7'
)
v-card.page-selector
v-card.page-selector
.dialog-header.is-blue
.dialog-header.is-blue
v-icon.mr-3(color='white') mdi-page-next-outline
v-icon.mr-3(color='white') mdi-page-next-outline
.body-1 Select Page Location
.body-1(v-if='mode === `create`') Select New Page Location
.body-1(v-else-if='mode === `move`') Move / Rename Page Location
v-spacer
v-spacer
v-progress-circular(
v-progress-circular(
indeterminate
indeterminate
...
@@ -13,11 +19,11 @@
...
@@ -13,11 +19,11 @@
v-show='searchLoading'
v-show='searchLoading'
)
)
.d-flex(style='min-height:400px;')
.d-flex(style='min-height:400px;')
v-flex.grey(xs
4
, :class='darkMode ? `darken-4` : `lighten-3`')
v-flex.grey(xs
5
, :class='darkMode ? `darken-4` : `lighten-3`')
v-toolbar(color='grey darken-3', dark, dense, flat)
v-toolbar(color='grey darken-3', dark, dense, flat)
.body-2 Virtual Folders
.body-2 Virtual Folders
v-spacer
v-spacer
v-btn(icon, tile, href='https://docs.requarks.io/', target='_blank')
v-btn(icon, tile, href='https://docs.requarks.io/
guide/pages#folders
', target='_blank')
v-icon mdi-help-box
v-icon mdi-help-box
v-treeview(
v-treeview(
:active.sync='currentNode'
:active.sync='currentNode'
...
@@ -33,7 +39,7 @@
...
@@ -33,7 +39,7 @@
)
)
template(slot='prepend', slot-scope='{ item, open, leaf }')
template(slot='prepend', slot-scope='{ item, open, leaf }')
v-icon mdi-
{{
open
?
'folder-open'
:
'folder'
}}
v-icon mdi-
{{
open
?
'folder-open'
:
'folder'
}}
v-flex(xs
8
)
v-flex(xs
7
)
v-toolbar(color='blue darken-2', dark, dense, flat)
v-toolbar(color='blue darken-2', dark, dense, flat)
.body-2 Pages
.body-2 Pages
v-spacer
v-spacer
...
@@ -121,6 +127,7 @@ export default {
...
@@ -121,6 +127,7 @@ export default {
return
{
return
{
searchLoading
:
false
,
searchLoading
:
false
,
currentLocale
:
siteConfig
.
lang
,
currentLocale
:
siteConfig
.
lang
,
currentFolderPath
:
''
,
currentPath
:
'new-page'
,
currentPath
:
'new-page'
,
currentPage
:
null
,
currentPage
:
null
,
currentNode
:
[
0
],
currentNode
:
[
0
],
...
@@ -142,7 +149,7 @@ export default {
...
@@ -142,7 +149,7 @@ export default {
set
(
val
)
{
this
.
$emit
(
'input'
,
val
)
}
set
(
val
)
{
this
.
$emit
(
'input'
,
val
)
}
},
},
currentPages
()
{
currentPages
()
{
return
_
.
filter
(
this
.
pages
,
[
'parent'
,
_
.
head
(
this
.
currentNode
)
||
0
])
return
_
.
sortBy
(
_
.
filter
(
this
.
pages
,
[
'parent'
,
_
.
head
(
this
.
currentNode
)
||
0
]),
[
'title'
,
'path'
])
},
},
isValidPath
()
{
isValidPath
()
{
return
this
.
currentPath
&&
this
.
currentPath
.
length
>
2
return
this
.
currentPath
&&
this
.
currentPath
.
length
>
2
...
@@ -164,8 +171,9 @@ export default {
...
@@ -164,8 +171,9 @@ export default {
this
.
currentNode
=
oldValue
this
.
currentNode
=
oldValue
})
})
}
else
{
}
else
{
const
current
=
_
.
find
(
this
.
all
,
[
'id'
,
newValue
[
0
]])
if
(
this
.
openNodes
.
indexOf
(
newValue
[
0
])
<
0
)
{
// auto open and load children
if
(
this
.
openNodes
.
indexOf
(
newValue
[
0
])
<
0
)
{
// auto open and load children
const
current
=
_
.
find
(
this
.
all
,
[
'id'
,
newValue
[
0
]])
if
(
current
)
{
if
(
current
)
{
if
(
this
.
openNodes
.
indexOf
(
current
.
parent
)
<
0
)
{
if
(
this
.
openNodes
.
indexOf
(
current
.
parent
)
<
0
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -177,6 +185,8 @@ export default {
...
@@ -177,6 +185,8 @@ export default {
this
.
openNodes
.
push
(
newValue
[
0
])
this
.
openNodes
.
push
(
newValue
[
0
])
})
})
}
}
this
.
currentPath
=
_
.
compact
([
_
.
get
(
current
,
'path'
,
''
),
_
.
last
(
this
.
currentPath
.
split
(
'/'
))]).
join
(
'/'
)
}
}
},
},
currentPage
(
newValue
,
oldValue
)
{
currentPage
(
newValue
,
oldValue
)
{
...
@@ -211,7 +221,7 @@ export default {
...
@@ -211,7 +221,7 @@ export default {
})
})
const
items
=
_
.
get
(
resp
,
'data.pages.tree'
,
[])
const
items
=
_
.
get
(
resp
,
'data.pages.tree'
,
[])
const
itemFolders
=
_
.
filter
(
items
,
[
'isFolder'
,
true
]).
map
(
f
=>
({...
f
,
children
:
[]}))
const
itemFolders
=
_
.
filter
(
items
,
[
'isFolder'
,
true
]).
map
(
f
=>
({...
f
,
children
:
[]}))
const
itemPages
=
_
.
filter
(
items
,
[
'isFolder'
,
false
]
)
const
itemPages
=
_
.
filter
(
items
,
i
=>
i
.
pageId
>
0
)
if
(
itemFolders
.
length
>
0
)
{
if
(
itemFolders
.
length
>
0
)
{
item
.
children
=
itemFolders
item
.
children
=
itemFolders
}
else
{
}
else
{
...
@@ -233,6 +243,9 @@ export default {
...
@@ -233,6 +243,9 @@ export default {
.v-treeview-node__label
{
.v-treeview-node__label
{
font-size
:
13px
;
font-size
:
13px
;
}
}
.v-treeview-node__content
{
cursor
:
pointer
;
}
}
}
</
style
>
</
style
>
client/graph/common/common-pages-query-tree.gql
View file @
daa8174d
...
@@ -5,6 +5,7 @@ query ($parent: Int!, $mode: PageTreeMode!, $locale: String!) {
...
@@ -5,6 +5,7 @@ query ($parent: Int!, $mode: PageTreeMode!, $locale: String!) {
path
path
title
title
isFolder
isFolder
pageId
parent
parent
}
}
}
}
...
...
client/static/img/donate_github.svg
0 → 100644
View file @
daa8174d
This diff is collapsed.
Click to expand it.
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