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
8c71470d
Unverified
Commit
8c71470d
authored
Feb 26, 2023
by
Nicolas Giard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: show active editors only in new page menu
parent
f849c16d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
9 deletions
+69
-9
PageNewMenu.vue
ux/src/components/PageNewMenu.vue
+39
-9
AdminEditors.vue
ux/src/pages/AdminEditors.vue
+9
-0
site.js
ux/src/stores/site.js
+21
-0
No files found.
ux/src/components/PageNewMenu.vue
View file @
8c71470d
...
...
@@ -5,36 +5,66 @@ q-menu.translucent-menu(
self='top right'
)
q-list(padding)
q-item(clickable, @click='create(`wysiwyg`)')
q-item(
clickable
@click='create(`wysiwyg`)'
v-if='siteStore.editors.wysiwyg'
)
blueprint-icon(icon='google-presentation')
q-item-section.q-pr-sm New Page
q-item(clickable, @click='create(`markdown`)')
q-item(
clickable
@click='create(`markdown`)'
v-if='siteStore.editors.markdown'
)
blueprint-icon(icon='markdown')
q-item-section.q-pr-sm New Markdown Page
q-item(clickable, @click='create(`asciidoc`)')
q-item(
clickable
@click='create(`asciidoc`)'
v-if='siteStore.editors.asciidoc'
)
blueprint-icon(icon='asciidoc')
q-item-section.q-pr-sm New AsciiDoc Page
template(v-if='flagsStore.experimental')
q-item(clickable, @click='create(`channel`)')
q-item(
clickable
@click='create(`channel`)'
)
blueprint-icon(icon='chat')
q-item-section.q-pr-sm New Discussion Space
q-item(clickable, @click='create(`blog`)')
q-item(
clickable
@click='create(`blog`)'
)
blueprint-icon(icon='typewriter-with-paper')
q-item-section.q-pr-sm New Blog Page
q-item(clickable, @click='create(`api`)')
q-item(
clickable
@click='create(`api`)'
)
blueprint-icon(icon='api')
q-item-section.q-pr-sm New API Documentation
q-item(clickable, @click='create(`redirect`)')
q-item(
clickable
@click='create(`redirect`)'
)
blueprint-icon(icon='advance')
q-item-section.q-pr-sm New Redirection
template(v-if='props.hideAssetBtn === false')
q-separator.q-my-sm(inset)
q-item(clickable, @click='openFileManager')
q-item(
clickable
@click='openFileManager'
)
blueprint-icon(icon='add-image')
q-item-section.q-pr-sm Upload Media Asset
template(v-if='props.showNewFolder')
q-separator.q-my-sm(inset)
q-item(clickable, @click='newFolder')
q-item(
clickable
@click='newFolder'
)
blueprint-icon(icon='add-folder')
q-item-section.q-pr-sm New Folder
</
template
>
...
...
ux/src/pages/AdminEditors.vue
View file @
8c71470d
...
...
@@ -242,6 +242,15 @@ async function save () {
}
})
if
(
respRaw
?.
data
?.
updateSite
?.
operation
?.
succeeded
)
{
if
(
adminStore
.
currentSiteId
===
siteStore
.
id
)
{
siteStore
.
$patch
({
editors
:
{
asciidoc
:
state
.
config
.
asciidoc
,
markdown
:
state
.
config
.
markdown
,
wysiwyg
:
state
.
config
.
wysiwyg
}
})
}
$q
.
notify
({
type
:
'positive'
,
message
:
t
(
'admin.editors.saveSuccess'
)
...
...
ux/src/stores/site.js
View file @
8c71470d
...
...
@@ -28,6 +28,11 @@ export const useSiteStore = defineStore('site', {
features
:
{
ratingsMode
:
'off'
},
editors
:
{
asciidoc
:
false
,
markdown
:
false
,
wysiwyg
:
false
},
theme
:
{
dark
:
false
,
injectCSS
:
''
,
...
...
@@ -81,6 +86,17 @@ export const useSiteStore = defineStore('site', {
features {
ratingsMode
}
editors {
asciidoc {
isActive
}
markdown {
isActive
}
wysiwyg {
isActive
}
}
theme {
dark
colorPrimary
...
...
@@ -116,6 +132,11 @@ export const useSiteStore = defineStore('site', {
...
this
.
features
,
...
clone
(
siteInfo
.
features
)
}
this
.
editors
=
{
asciidoc
:
clone
(
siteInfo
.
editors
.
asciidoc
.
isActive
),
markdown
:
clone
(
siteInfo
.
editors
.
markdown
.
isActive
),
wysiwyg
:
clone
(
siteInfo
.
editors
.
wysiwyg
.
isActive
)
}
this
.
theme
=
{
...
this
.
theme
,
...
clone
(
siteInfo
.
theme
)
...
...
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