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
810cff60
Unverified
Commit
810cff60
authored
Sep 04, 2023
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add mdc parsing
parent
a9784c34
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
5 deletions
+34
-5
en.json
server/locales/en.json
+1
-0
package-lock.json
server/package-lock.json
+0
-0
package.json
server/package.json
+1
-0
markdown.mjs
server/renderers/markdown.mjs
+2
-0
package-lock.json
ux/package-lock.json
+0
-0
package.json
ux/package.json
+1
-0
FileManager.vue
ux/src/components/FileManager.vue
+14
-1
PageActionsCol.vue
ux/src/components/PageActionsCol.vue
+2
-2
RerenderPageDialog.vue
ux/src/components/RerenderPageDialog.vue
+10
-1
app.scss
ux/src/css/app.scss
+1
-1
markdown.js
ux/src/renderers/markdown.js
+2
-0
No files found.
server/locales/en.json
View file @
810cff60
...
@@ -1230,6 +1230,7 @@
...
@@ -1230,6 +1230,7 @@
"common.actions.properties"
:
"Properties"
,
"common.actions.properties"
:
"Properties"
,
"common.actions.refresh"
:
"Refresh"
,
"common.actions.refresh"
:
"Refresh"
,
"common.actions.rename"
:
"Rename"
,
"common.actions.rename"
:
"Rename"
,
"common.actions.rerender"
:
"Rerender"
,
"common.actions.returnToTop"
:
"Return to top"
,
"common.actions.returnToTop"
:
"Return to top"
,
"common.actions.save"
:
"Save"
,
"common.actions.save"
:
"Save"
,
"common.actions.saveAndClose"
:
"Save and Close"
,
"common.actions.saveAndClose"
:
"Save and Close"
,
...
...
server/package-lock.json
View file @
810cff60
B
{
B
{
...
...
server/package.json
View file @
810cff60
...
@@ -105,6 +105,7 @@
...
@@ -105,6 +105,7 @@
"markdown-it-footnote"
:
"3.0.3"
,
"markdown-it-footnote"
:
"3.0.3"
,
"markdown-it-imsize"
:
"2.0.1"
,
"markdown-it-imsize"
:
"2.0.1"
,
"markdown-it-mark"
:
"3.0.1"
,
"markdown-it-mark"
:
"3.0.1"
,
"markdown-it-mdc"
:
"0.1.3"
,
"markdown-it-multimd-table"
:
"4.2.2"
,
"markdown-it-multimd-table"
:
"4.2.2"
,
"markdown-it-sub"
:
"1.0.0"
,
"markdown-it-sub"
:
"1.0.0"
,
"markdown-it-sup"
:
"1.0.0"
,
"markdown-it-sup"
:
"1.0.0"
,
...
...
server/renderers/markdown.mjs
View file @
810cff60
...
@@ -10,6 +10,7 @@ import mdSub from 'markdown-it-sub'
...
@@ -10,6 +10,7 @@ import mdSub from 'markdown-it-sub'
import
mdMark
from
'markdown-it-mark'
import
mdMark
from
'markdown-it-mark'
import
mdMultiTable
from
'markdown-it-multimd-table'
import
mdMultiTable
from
'markdown-it-multimd-table'
import
mdFootnote
from
'markdown-it-footnote'
import
mdFootnote
from
'markdown-it-footnote'
import
mdMdc
from
'markdown-it-mdc'
import
katex
from
'katex'
import
katex
from
'katex'
import
mdImsize
from
'./modules/markdown-it-imsize.mjs'
import
mdImsize
from
'./modules/markdown-it-imsize.mjs'
import
mdUnderline
from
'./modules/markdown-it-underline.mjs'
import
mdUnderline
from
'./modules/markdown-it-underline.mjs'
...
@@ -71,6 +72,7 @@ export async function render (input, config) {
...
@@ -71,6 +72,7 @@ export async function render (input, config) {
.
use
(
mdMark
)
.
use
(
mdMark
)
.
use
(
mdFootnote
)
.
use
(
mdFootnote
)
.
use
(
mdImsize
)
.
use
(
mdImsize
)
.
use
(
mdMdc
)
if
(
config
.
underline
)
{
if
(
config
.
underline
)
{
md
.
use
(
mdUnderline
)
md
.
use
(
mdUnderline
)
...
...
ux/package-lock.json
View file @
810cff60
B
{
B
{
...
...
ux/package.json
View file @
810cff60
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
"markdown-it-footnote"
:
"3.0.3"
,
"markdown-it-footnote"
:
"3.0.3"
,
"markdown-it-imsize"
:
"2.0.1"
,
"markdown-it-imsize"
:
"2.0.1"
,
"markdown-it-mark"
:
"3.0.1"
,
"markdown-it-mark"
:
"3.0.1"
,
"markdown-it-mdc"
:
"0.1.3"
,
"markdown-it-multimd-table"
:
"4.2.2"
,
"markdown-it-multimd-table"
:
"4.2.2"
,
"markdown-it-sub"
:
"1.0.0"
,
"markdown-it-sub"
:
"1.0.0"
,
"markdown-it-sup"
:
"1.0.0"
,
"markdown-it-sup"
:
"1.0.0"
,
...
...
ux/src/components/FileManager.vue
View file @
810cff60
...
@@ -247,7 +247,7 @@ q-layout.fileman(view='hHh lpR lFr', container)
...
@@ -247,7 +247,7 @@ q-layout.fileman(view='hHh lpR lFr', container)
q-item-section.fileman-filelist-side(side, v-if='item.side')
q-item-section.fileman-filelist-side(side, v-if='item.side')
.text-caption
{{
item
.
side
}}
.text-caption
{{
item
.
side
}}
//- RIGHT-CLICK MENU
//- RIGHT-CLICK MENU
q-menu(
q-menu
.translucent-menu
(
touch-position
touch-position
context-menu
context-menu
auto-close
auto-close
...
@@ -264,6 +264,10 @@ q-layout.fileman(view='hHh lpR lFr', container)
...
@@ -264,6 +264,10 @@ q-layout.fileman(view='hHh lpR lFr', container)
q-item-section(side)
q-item-section(side)
q-icon(name='las la-edit', color='orange')
q-icon(name='las la-edit', color='orange')
q-item-section
{{
t
(
`common.actions.edit`
)
}}
q-item-section
{{
t
(
`common.actions.edit`
)
}}
q-item(clickable, v-if='item.type === `page`', @click='rerenderPage(item)')
q-item-section(side)
q-icon(name='las la-magic', color='orange')
q-item-section
{{
t
(
`common.actions.rerender`
)
}}
q-item(clickable, v-if='item.type !== `folder`', @click='openItem(item)')
q-item(clickable, v-if='item.type !== `folder`', @click='openItem(item)')
q-item-section(side)
q-item-section(side)
q-icon(name='las la-eye', color='primary')
q-icon(name='las la-eye', color='primary')
...
@@ -786,6 +790,15 @@ function reloadFolder (folderId) {
...
@@ -786,6 +790,15 @@ function reloadFolder (folderId) {
// PAGE METHODS
// PAGE METHODS
// --------------------------------------
// --------------------------------------
function
rerenderPage
(
item
)
{
$q
.
dialog
({
component
:
defineAsyncComponent
(()
=>
import
(
'src/components/RerenderPageDialog.vue'
)),
componentProps
:
{
id
:
item
.
id
}
})
}
function
delPage
(
pageId
,
pageName
)
{
function
delPage
(
pageId
,
pageName
)
{
$q
.
dialog
({
$q
.
dialog
({
component
:
defineAsyncComponent
(()
=>
import
(
'src/components/PageDeleteDialog.vue'
)),
component
:
defineAsyncComponent
(()
=>
import
(
'src/components/PageDeleteDialog.vue'
)),
...
...
ux/src/components/PageActionsCol.vue
View file @
810cff60
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
transition-show='jump-left'
transition-show='jump-left'
)
)
q-list(padding, style='min-width: 225px;')
q-list(padding, style='min-width: 225px;')
q-item(clickable, v-if='userStore.can(`manage:pages`)')
q-item(clickable,
disabled,
v-if='userStore.can(`manage:pages`)')
q-item-section.items-center(avatar)
q-item-section.items-center(avatar)
q-icon(color='deep-orange-9', name='las la-atom', size='sm')
q-icon(color='deep-orange-9', name='las la-atom', size='sm')
q-item-section
q-item-section
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
q-icon(color='deep-orange-9', name='las la-magic', size='sm')
q-icon(color='deep-orange-9', name='las la-magic', size='sm')
q-item-section
q-item-section
q-item-label Rerender Page
q-item-label Rerender Page
q-item(clickable)
q-item(clickable
, disabled
)
q-item-section.items-center(avatar)
q-item-section.items-center(avatar)
q-icon(color='deep-orange-9', name='las la-sun', size='sm')
q-icon(color='deep-orange-9', name='las la-sun', size='sm')
q-item-section
q-item-section
...
...
ux/src/components/RerenderPageDialog.vue
View file @
810cff60
...
@@ -12,6 +12,15 @@ import { useDialogPluginComponent, useQuasar } from 'quasar'
...
@@ -12,6 +12,15 @@ import { useDialogPluginComponent, useQuasar } from 'quasar'
import
{
computed
,
onMounted
,
reactive
}
from
'vue'
import
{
computed
,
onMounted
,
reactive
}
from
'vue'
import
{
usePageStore
}
from
'src/stores/page'
import
{
usePageStore
}
from
'src/stores/page'
// PROPS
const
props
=
defineProps
({
id
:
{
type
:
String
,
required
:
true
}
})
// EMITS
// EMITS
defineEmits
([
defineEmits
([
...
@@ -52,7 +61,7 @@ async function rerenderPage () {
...
@@ -52,7 +61,7 @@ async function rerenderPage () {
}
}
`
,
`
,
variables
:
{
variables
:
{
id
:
p
ageStore
.
id
id
:
p
rops
.
id
}
}
})
})
if
(
resp
?.
data
?.
rerenderPage
?.
operation
?.
succeeded
)
{
if
(
resp
?.
data
?.
rerenderPage
?.
operation
?.
succeeded
)
{
...
...
ux/src/css/app.scss
View file @
810cff60
...
@@ -222,7 +222,7 @@ body::-webkit-scrollbar-thumb {
...
@@ -222,7 +222,7 @@ body::-webkit-scrollbar-thumb {
.translucent-menu
{
.translucent-menu
{
@at-root
.body--light
&
{
@at-root
.body--light
&
{
background-color
:
rgba
(
255
,
255
,
255
,.
9
);
background-color
:
rgba
(
255
,
255
,
255
,.
8
);
}
}
@at-root
.body--dark
&
{
@at-root
.body--dark
&
{
background-color
:
rgba
(
$dark
,.
7
);
background-color
:
rgba
(
$dark
,.
7
);
...
...
ux/src/renderers/markdown.js
View file @
810cff60
...
@@ -10,6 +10,7 @@ import mdSub from 'markdown-it-sub'
...
@@ -10,6 +10,7 @@ import mdSub from 'markdown-it-sub'
import
mdMark
from
'markdown-it-mark'
import
mdMark
from
'markdown-it-mark'
import
mdMultiTable
from
'markdown-it-multimd-table'
import
mdMultiTable
from
'markdown-it-multimd-table'
import
mdFootnote
from
'markdown-it-footnote'
import
mdFootnote
from
'markdown-it-footnote'
import
mdMdc
from
'markdown-it-mdc'
import
katex
from
'katex'
import
katex
from
'katex'
import
mdUnderline
from
'./modules/markdown-it-underline'
import
mdUnderline
from
'./modules/markdown-it-underline'
import
mdImsize
from
'./modules/markdown-it-imsize'
import
mdImsize
from
'./modules/markdown-it-imsize'
...
@@ -72,6 +73,7 @@ export class MarkdownRenderer {
...
@@ -72,6 +73,7 @@ export class MarkdownRenderer {
.
use
(
mdMark
)
.
use
(
mdMark
)
.
use
(
mdFootnote
)
.
use
(
mdFootnote
)
.
use
(
mdImsize
)
.
use
(
mdImsize
)
.
use
(
mdMdc
)
if
(
config
.
underline
)
{
if
(
config
.
underline
)
{
this
.
md
.
use
(
mdUnderline
)
this
.
md
.
use
(
mdUnderline
)
...
...
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