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
d51fc36b
Unverified
Commit
d51fc36b
authored
Sep 11, 2023
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: block-index feature complete + dark theme fixes
parent
46fb25c1
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
189 additions
and
57 deletions
+189
-57
component.js
blocks/block-index/component.js
+95
-23
folderByPath.graphql
blocks/block-index/folderByPath.graphql
+0
-14
tree.graphql
blocks/block-index/tree.graphql
+27
-0
3.0.0.mjs
server/db/migrations/3.0.0.mjs
+4
-3
tree.mjs
server/graph/resolvers/tree.mjs
+6
-0
tree.graphql
server/graph/schemas/tree.graphql
+1
-0
en.json
server/locales/en.json
+2
-2
pages.mjs
server/models/pages.mjs
+2
-0
tree.mjs
server/models/tree.mjs
+6
-2
quasar.config.js
ux/quasar.config.js
+2
-0
externals.js
ux/src/boot/externals.js
+8
-3
AccountMenu.vue
ux/src/components/AccountMenu.vue
+4
-2
HeaderSearch.vue
ux/src/components/HeaderSearch.vue
+6
-2
NavEditOverlay.vue
ux/src/components/NavEditOverlay.vue
+2
-1
NavSidebar.vue
ux/src/components/NavSidebar.vue
+5
-1
PageHeader.vue
ux/src/components/PageHeader.vue
+2
-1
PagePropertiesDialog.vue
ux/src/components/PagePropertiesDialog.vue
+3
-0
MainLayout.vue
ux/src/layouts/MainLayout.vue
+14
-3
No files found.
blocks/block-index/component.js
View file @
d51fc36b
import
{
LitElement
,
html
,
css
}
from
'lit'
import
{
LitElement
,
html
,
css
}
from
'lit'
import
treeQuery
from
'./
folderByPath
.graphql'
import
treeQuery
from
'./
tree
.graphql'
/**
/**
* Block Index
* Block Index
...
@@ -11,9 +11,6 @@ export class BlockIndexElement extends LitElement {
...
@@ -11,9 +11,6 @@ export class BlockIndexElement extends LitElement {
display: block;
display: block;
margin-bottom: 16px;
margin-bottom: 16px;
}
}
:host-context(body.body--dark) {
background-color: #F00;
}
ul {
ul {
padding: 0;
padding: 0;
...
@@ -23,29 +20,48 @@ export class BlockIndexElement extends LitElement {
...
@@ -23,29 +20,48 @@ export class BlockIndexElement extends LitElement {
li {
li {
background-color: #fafafa;
background-color: #fafafa;
background-image: linear-gradient(
180deg
,#fff,#fafafa);
background-image: linear-gradient(
to bottom
,#fff,#fafafa);
border-right: 1px solid
#eee
;
border-right: 1px solid
rgba(0,0,0,.05)
;
border-bottom: 1px solid
#eee
;
border-bottom: 1px solid
rgba(0,0,0,.05)
;
border-left: 5px solid
#e0e0e0
;
border-left: 5px solid
rgba(0,0,0,.1)
;
box-shadow: 0 3px 8px 0 rgba(116,129,141,.1);
box-shadow: 0 3px 8px 0 rgba(116,129,141,.1);
padding: 0;
padding: 0;
border-radius: 5px;
border-radius: 5px;
font-weight: 500;
font-weight: 500;
}
}
:host-context(body.body--dark) li {
background-color: #222;
background-image: linear-gradient(to bottom,#161b22, #0d1117);
border-right: 1px solid rgba(0,0,0,.5);
border-bottom: 1px solid rgba(0,0,0,.5);
border-left: 5px solid rgba(255,255,255,.2);
box-shadow: 0 3px 8px 0 rgba(0,0,0,.25);
}
li:hover {
li:hover {
background-image: linear-gradient(180deg,#fff,#f6fbfe);
background-color: var(--q-primary);
border-left-color: #2196f3;
background-image: linear-gradient(to bottom,#fff,rgba(255,255,255,.95));
border-left-color: var(--q-primary);
cursor: pointer;
cursor: pointer;
}
}
:host-context(body.body--dark) li:hover {
background-image: linear-gradient(to bottom,#1e232a, #161b22);
border-left-color: var(--q-primary);
}
li + li {
li + li {
margin-top: .5rem;
margin-top: .5rem;
}
}
li a {
li a {
display: block;
display: block;
color:
#1976d2
;
color:
var(--q-primary)
;
padding: 1rem;
padding: 1rem;
text-decoration: none;
text-decoration: none;
}
}
.no-links {
color: var(--q-negative);
border: 1px dashed color-mix(in srgb, currentColor 50%, transparent);
border-radius: 5px;
padding: 1rem;
}
`
`
}
}
...
@@ -55,52 +71,108 @@ export class BlockIndexElement extends LitElement {
...
@@ -55,52 +71,108 @@ export class BlockIndexElement extends LitElement {
* The base path to fetch pages from
* The base path to fetch pages from
* @type {string}
* @type {string}
*/
*/
path
:
{
type
:
String
},
path
:
{
type
:
String
},
/**
/**
* A comma-separated list of tags to filter with
* A comma-separated list of tags to filter with
* @type {string}
* @type {string}
*/
*/
tags
:
{
type
:
String
},
tags
:
{
type
:
String
},
/**
/**
* The maximum number of items to fetch
* The maximum number of items to fetch
* @type {number}
* @type {number}
*/
*/
limit
:
{
type
:
Number
}
limit
:
{
type
:
Number
},
/**
* Ordering (createdAt, fileName, title, updatedAt)
* @type {string}
*/
orderBy
:
{
type
:
String
},
/**
* Ordering direction (asc, desc)
* @type {string}
*/
orderByDirection
:
{
type
:
String
},
/**
* Maximum folder depth to fetch
* @type {number}
*/
depth
:
{
type
:
Number
},
/**
* A fallback message if no results are returned
* @type {string}
*/
noResultMsg
:
{
type
:
String
},
// Internal Properties
_loading
:
{
state
:
true
},
_pages
:
{
state
:
true
}
}
}
}
}
constructor
()
{
constructor
()
{
super
()
super
()
this
.
pages
=
[]
this
.
_loading
=
true
this
.
_pages
=
[]
this
.
path
=
''
this
.
tags
=
''
this
.
limit
=
10
this
.
orderBy
=
'title'
this
.
orderByDirection
=
'asc'
this
.
depth
=
0
this
.
noResultMsg
=
'No pages matching your query.'
}
}
async
connectedCallback
()
{
async
connectedCallback
()
{
super
.
connectedCallback
()
super
.
connectedCallback
()
try
{
const
resp
=
await
APOLLO_CLIENT
.
query
({
const
resp
=
await
APOLLO_CLIENT
.
query
({
query
:
treeQuery
,
query
:
treeQuery
,
variables
:
{
variables
:
{
siteId
:
WIKI_STORES
.
site
.
id
,
siteId
:
WIKI_STATE
.
site
.
id
,
locale
:
'en'
,
locale
:
WIKI_STATE
.
page
.
locale
,
parentPath
:
''
parentPath
:
this
.
path
,
limit
:
this
.
limit
,
orderBy
:
this
.
orderBy
,
orderByDirection
:
this
.
orderByDirection
,
depth
:
this
.
depth
,
...
this
.
tags
&&
{
tags
:
this
.
tags
.
split
(
','
).
map
(
t
=>
t
.
trim
()).
filter
(
t
=>
t
)
},
}
}
})
})
this
.
pages
=
resp
.
data
.
tree
this
.
_pages
=
resp
.
data
.
tree
.
map
(
p
=>
({
this
.
requestUpdate
()
...
p
,
href
:
p
.
folderPath
?
`/
${
p
.
folderPath
}
/
${
p
.
fileName
}
`
:
`/
${
p
.
fileName
}
`
}))
}
catch
(
err
)
{
console
.
warn
(
err
)
}
this
.
_loading
=
false
}
}
render
()
{
render
()
{
return
html
`
return
this
.
_pages
.
length
>
0
||
this
.
_loading
?
html
`
<ul>
<ul>
${
this
.
pages
.
map
(
p
=>
${
this
.
_
pages
.
map
(
p
=>
html
`<li><a href="
#
">
${
p
.
title
}
</a></li>`
html
`<li><a href="
${
p
.
href
}
" @click="
${
this
.
_navigate
}
">
${
p
.
title
}
</a></li>`
)}
)}
</ul>
</ul>
<slot></slot>
<slot></slot>
`
:
html
`
<div class="no-links">
${
this
.
noResultMsg
}
</div>
<slot></slot>
`
`
}
}
_navigate
(
e
)
{
e
.
preventDefault
()
WIKI_ROUTER
.
push
(
e
.
target
.
getAttribute
(
'href'
))
}
// createRenderRoot() {
// createRenderRoot() {
// return this;
// return this;
// }
// }
...
...
blocks/block-index/folderByPath.graphql
deleted
100644 → 0
View file @
46fb25c1
query
blockIndexFetchPages
(
$siteId
:
UUID
!
$locale
:
String
!
$parentPath
:
String
!
)
{
tree
(
siteId
:
$siteId
,
locale
:
$locale
,
parentPath
:
$parentPath
)
{
id
title
}
}
blocks/block-index/tree.graphql
0 → 100644
View file @
d51fc36b
query
blockIndexFetchPages
(
$siteId
:
UUID
!
$locale
:
String
$parentPath
:
String
$tags
:
[
String
]
$limit
:
Int
$orderBy
:
TreeOrderBy
$orderByDirection
:
OrderByDirection
$depth
:
Int
)
{
tree
(
siteId
:
$siteId
locale
:
$locale
parentPath
:
$parentPath
tags
:
$tags
limit
:
$limit
types
:
[
page
]
orderBy
:
$orderBy
orderByDirection
:
$orderByDirection
depth
:
$depth
)
{
id
folderPath
fileName
title
}
}
server/db/migrations/3.0.0.mjs
View file @
d51fc36b
...
@@ -244,8 +244,8 @@ export async function up (knex) {
...
@@ -244,8 +244,8 @@ export async function up (knex) {
table
.
text
(
'content'
)
table
.
text
(
'content'
)
table
.
text
(
'render'
)
table
.
text
(
'render'
)
table
.
text
(
'searchContent'
)
table
.
text
(
'searchContent'
)
table
.
specificType
(
'ts'
,
'tsvector'
).
index
(
'ts_idx'
,
{
indexType
:
'GIN'
})
table
.
specificType
(
'ts'
,
'tsvector'
).
index
(
'
pages_
ts_idx'
,
{
indexType
:
'GIN'
})
table
.
specificType
(
'tags'
,
'text[]'
).
index
(
'tags_idx'
,
{
indexType
:
'GIN'
})
table
.
specificType
(
'tags'
,
'text[]'
).
index
(
'
pages_
tags_idx'
,
{
indexType
:
'GIN'
})
table
.
jsonb
(
'toc'
)
table
.
jsonb
(
'toc'
)
table
.
string
(
'editor'
).
notNullable
()
table
.
string
(
'editor'
).
notNullable
()
table
.
string
(
'contentType'
).
notNullable
()
table
.
string
(
'contentType'
).
notNullable
()
...
@@ -303,7 +303,7 @@ export async function up (knex) {
...
@@ -303,7 +303,7 @@ export async function up (knex) {
// TREE --------------------------------
// TREE --------------------------------
.
createTable
(
'tree'
,
table
=>
{
.
createTable
(
'tree'
,
table
=>
{
table
.
uuid
(
'id'
).
notNullable
().
primary
().
defaultTo
(
knex
.
raw
(
'gen_random_uuid()'
))
table
.
uuid
(
'id'
).
notNullable
().
primary
().
defaultTo
(
knex
.
raw
(
'gen_random_uuid()'
))
table
.
specificType
(
'folderPath'
,
'ltree'
).
index
().
index
(
'tree_folderpath_gist_i
nde
x'
,
{
indexType
:
'GIST'
})
table
.
specificType
(
'folderPath'
,
'ltree'
).
index
().
index
(
'tree_folderpath_gist_i
d
x'
,
{
indexType
:
'GIST'
})
table
.
string
(
'fileName'
).
notNullable
().
index
()
table
.
string
(
'fileName'
).
notNullable
().
index
()
table
.
string
(
'hash'
).
notNullable
().
index
()
table
.
string
(
'hash'
).
notNullable
().
index
()
table
.
enu
(
'type'
,
[
'folder'
,
'page'
,
'asset'
]).
notNullable
().
index
()
table
.
enu
(
'type'
,
[
'folder'
,
'page'
,
'asset'
]).
notNullable
().
index
()
...
@@ -311,6 +311,7 @@ export async function up (knex) {
...
@@ -311,6 +311,7 @@ export async function up (knex) {
table
.
string
(
'title'
).
notNullable
()
table
.
string
(
'title'
).
notNullable
()
table
.
enum
(
'navigationMode'
,
[
'inherit'
,
'override'
,
'overrideExact'
,
'hide'
,
'hideExact'
]).
notNullable
().
defaultTo
(
'inherit'
).
index
()
table
.
enum
(
'navigationMode'
,
[
'inherit'
,
'override'
,
'overrideExact'
,
'hide'
,
'hideExact'
]).
notNullable
().
defaultTo
(
'inherit'
).
index
()
table
.
uuid
(
'navigationId'
).
index
()
table
.
uuid
(
'navigationId'
).
index
()
table
.
specificType
(
'tags'
,
'text[]'
).
index
(
'tree_tags_idx'
,
{
indexType
:
'GIN'
})
table
.
jsonb
(
'meta'
).
notNullable
().
defaultTo
(
'{}'
)
table
.
jsonb
(
'meta'
).
notNullable
().
defaultTo
(
'{}'
)
table
.
timestamp
(
'createdAt'
).
notNullable
().
defaultTo
(
knex
.
fn
.
now
())
table
.
timestamp
(
'createdAt'
).
notNullable
().
defaultTo
(
knex
.
fn
.
now
())
table
.
timestamp
(
'updatedAt'
).
notNullable
().
defaultTo
(
knex
.
fn
.
now
())
table
.
timestamp
(
'updatedAt'
).
notNullable
().
defaultTo
(
knex
.
fn
.
now
())
...
...
server/graph/resolvers/tree.mjs
View file @
d51fc36b
...
@@ -80,6 +80,11 @@ export default {
...
@@ -80,6 +80,11 @@ export default {
type
:
'folder'
type
:
'folder'
})
})
}
}
// -> Filter by tags
if
(
args
.
tags
&&
args
.
tags
.
length
>
0
)
{
builder
.
where
(
'tags'
,
'@>'
,
args
.
tags
)
}
})
})
.
andWhere
(
builder
=>
{
.
andWhere
(
builder
=>
{
// -> Limit to specific types
// -> Limit to specific types
...
@@ -101,6 +106,7 @@ export default {
...
@@ -101,6 +106,7 @@ export default {
folderPath
:
decodeTreePath
(
decodeFolderPath
(
item
.
folderPath
)),
folderPath
:
decodeTreePath
(
decodeFolderPath
(
item
.
folderPath
)),
fileName
:
item
.
fileName
,
fileName
:
item
.
fileName
,
title
:
item
.
title
,
title
:
item
.
title
,
tags
:
item
.
tags
??
[],
createdAt
:
item
.
createdAt
,
createdAt
:
item
.
createdAt
,
updatedAt
:
item
.
updatedAt
,
updatedAt
:
item
.
updatedAt
,
...(
item
.
type
===
'folder'
)
&&
{
...(
item
.
type
===
'folder'
)
&&
{
...
...
server/graph/schemas/tree.graphql
View file @
d51fc36b
...
@@ -13,6 +13,7 @@ extend type Query {
...
@@ -13,6 +13,7 @@ extend type Query {
parentPath
:
String
parentPath
:
String
locale
:
String
locale
:
String
types
:
[
TreeItemType
]
types
:
[
TreeItemType
]
tags
:
[
String
]
limit
:
Int
limit
:
Int
offset
:
Int
offset
:
Int
orderBy
:
TreeOrderBy
orderBy
:
TreeOrderBy
...
...
server/locales/en.json
View file @
d51fc36b
...
@@ -110,8 +110,8 @@
...
@@ -110,8 +110,8 @@
"admin.auth.vendor"
:
"Vendor"
,
"admin.auth.vendor"
:
"Vendor"
,
"admin.auth.vendorWebsite"
:
"Website"
,
"admin.auth.vendorWebsite"
:
"Website"
,
"admin.blocks.add"
:
"Add Block"
,
"admin.blocks.add"
:
"Add Block"
,
"admin.blocks.builtin"
:
"Built-in
component
"
,
"admin.blocks.builtin"
:
"Built-in"
,
"admin.blocks.custom"
:
"Custom
component
"
,
"admin.blocks.custom"
:
"Custom"
,
"admin.blocks.isEnabled"
:
"Enabled"
,
"admin.blocks.isEnabled"
:
"Enabled"
,
"admin.blocks.saveSuccess"
:
"Blocks state saved successfully."
,
"admin.blocks.saveSuccess"
:
"Blocks state saved successfully."
,
"admin.blocks.subtitle"
:
"Manage dynamic components available for use inside pages."
,
"admin.blocks.subtitle"
:
"Manage dynamic components available for use inside pages."
,
...
...
server/models/pages.mjs
View file @
d51fc36b
...
@@ -366,6 +366,7 @@ export class Page extends Model {
...
@@ -366,6 +366,7 @@ export class Page extends Model {
fileName
:
last
(
pathParts
),
fileName
:
last
(
pathParts
),
locale
:
page
.
locale
,
locale
:
page
.
locale
,
title
:
page
.
title
,
title
:
page
.
title
,
tags
,
meta
:
{
meta
:
{
authorId
:
page
.
authorId
,
authorId
:
page
.
authorId
,
contentType
:
page
.
contentType
,
contentType
:
page
.
contentType
,
...
@@ -649,6 +650,7 @@ export class Page extends Model {
...
@@ -649,6 +650,7 @@ export class Page extends Model {
// -> Update tree
// -> Update tree
await
WIKI
.
db
.
knex
(
'tree'
).
where
(
'id'
,
page
.
id
).
update
({
await
WIKI
.
db
.
knex
(
'tree'
).
where
(
'id'
,
page
.
id
).
update
({
title
:
page
.
title
,
title
:
page
.
title
,
tags
:
page
.
tags
,
meta
:
{
meta
:
{
authorId
:
page
.
authorId
,
authorId
:
page
.
authorId
,
contentType
:
page
.
contentType
,
contentType
:
page
.
contentType
,
...
...
server/models/tree.mjs
View file @
d51fc36b
...
@@ -120,9 +120,10 @@ export class Tree extends Model {
...
@@ -120,9 +120,10 @@ export class Tree extends Model {
* @param {string} args.title - Title of the page to add
* @param {string} args.title - Title of the page to add
* @param {string} args.locale - Locale code of the page to add
* @param {string} args.locale - Locale code of the page to add
* @param {string} args.siteId - UUID of the site in which the page will be added
* @param {string} args.siteId - UUID of the site in which the page will be added
* @param {string[]} [args.tags] - Tags of the assets
* @param {Object} [args.meta] - Extra metadata
* @param {Object} [args.meta] - Extra metadata
*/
*/
static
async
addPage
({
id
,
parentId
,
parentPath
,
fileName
,
title
,
locale
,
siteId
,
meta
=
{}
})
{
static
async
addPage
({
id
,
parentId
,
parentPath
,
fileName
,
title
,
locale
,
siteId
,
tags
=
[],
meta
=
{}
})
{
const
folder
=
(
parentId
||
parentPath
)
?
await
WIKI
.
db
.
tree
.
getFolder
({
const
folder
=
(
parentId
||
parentPath
)
?
await
WIKI
.
db
.
tree
.
getFolder
({
id
:
parentId
,
id
:
parentId
,
path
:
parentPath
,
path
:
parentPath
,
...
@@ -147,6 +148,7 @@ export class Tree extends Model {
...
@@ -147,6 +148,7 @@ export class Tree extends Model {
hash
:
generateHash
(
fullPath
),
hash
:
generateHash
(
fullPath
),
locale
:
locale
,
locale
:
locale
,
siteId
,
siteId
,
tags
,
meta
,
meta
,
navigationId
:
siteId
,
navigationId
:
siteId
,
}).
returning
(
'*'
)
}).
returning
(
'*'
)
...
@@ -164,9 +166,10 @@ export class Tree extends Model {
...
@@ -164,9 +166,10 @@ export class Tree extends Model {
* @param {string} args.title - Title of the asset to add
* @param {string} args.title - Title of the asset to add
* @param {string} args.locale - Locale code of the asset to add
* @param {string} args.locale - Locale code of the asset to add
* @param {string} args.siteId - UUID of the site in which the asset will be added
* @param {string} args.siteId - UUID of the site in which the asset will be added
* @param {string[]} [args.tags] - Tags of the assets
* @param {Object} [args.meta] - Extra metadata
* @param {Object} [args.meta] - Extra metadata
*/
*/
static
async
addAsset
({
id
,
parentId
,
parentPath
,
fileName
,
title
,
locale
,
siteId
,
meta
=
{}
})
{
static
async
addAsset
({
id
,
parentId
,
parentPath
,
fileName
,
title
,
locale
,
siteId
,
tags
=
[],
meta
=
{}
})
{
const
folder
=
(
parentId
||
parentPath
)
?
await
WIKI
.
db
.
tree
.
getFolder
({
const
folder
=
(
parentId
||
parentPath
)
?
await
WIKI
.
db
.
tree
.
getFolder
({
id
:
parentId
,
id
:
parentId
,
path
:
parentPath
,
path
:
parentPath
,
...
@@ -191,6 +194,7 @@ export class Tree extends Model {
...
@@ -191,6 +194,7 @@ export class Tree extends Model {
hash
:
generateHash
(
fullPath
),
hash
:
generateHash
(
fullPath
),
locale
:
locale
,
locale
:
locale
,
siteId
,
siteId
,
tags
,
meta
meta
}).
returning
(
'*'
)
}).
returning
(
'*'
)
...
...
ux/quasar.config.js
View file @
d51fc36b
...
@@ -90,6 +90,7 @@ module.exports = configure(function (ctx) {
...
@@ -90,6 +90,7 @@ module.exports = configure(function (ctx) {
distDir
:
'../assets'
,
distDir
:
'../assets'
,
extendViteConf
(
viteConf
)
{
extendViteConf
(
viteConf
)
{
if
(
ctx
.
prod
)
{
viteConf
.
build
.
assetsDir
=
'_assets'
viteConf
.
build
.
assetsDir
=
'_assets'
viteConf
.
build
.
rollupOptions
=
{
viteConf
.
build
.
rollupOptions
=
{
...
viteConf
.
build
.
rollupOptions
??
{},
...
viteConf
.
build
.
rollupOptions
??
{},
...
@@ -106,6 +107,7 @@ module.exports = configure(function (ctx) {
...
@@ -106,6 +107,7 @@ module.exports = configure(function (ctx) {
'prosemirror-model'
,
'prosemirror-model'
,
'prosemirror-view'
'prosemirror-view'
]
]
}
},
},
// viteVuePluginOptions: {},
// viteVuePluginOptions: {},
...
...
ux/src/boot/externals.js
View file @
d51fc36b
import
{
boot
}
from
'quasar/wrappers'
import
{
boot
}
from
'quasar/wrappers'
import
{
usePageStore
}
from
'src/stores/page'
import
{
useSiteStore
}
from
'src/stores/site'
import
{
useSiteStore
}
from
'src/stores/site'
import
{
useUserStore
}
from
'src/stores/user'
import
{
useUserStore
}
from
'src/stores/user'
export
default
boot
(()
=>
{
export
default
boot
((
{
router
}
)
=>
{
if
(
import
.
meta
.
env
.
SSR
)
{
if
(
import
.
meta
.
env
.
SSR
)
{
global
.
WIKI_STORES
=
{
global
.
WIKI_STATE
=
{
page
:
usePageStore
(),
site
:
useSiteStore
(),
site
:
useSiteStore
(),
user
:
useUserStore
()
user
:
useUserStore
()
}
}
global
.
WIKI_ROUTER
=
router
}
else
{
}
else
{
window
.
WIKI_STORES
=
{
window
.
WIKI_STATE
=
{
page
:
usePageStore
(),
site
:
useSiteStore
(),
site
:
useSiteStore
(),
user
:
useUserStore
()
user
:
useUserStore
()
}
}
window
.
WIKI_ROUTER
=
router
}
}
})
})
ux/src/components/AccountMenu.vue
View file @
d51fc36b
<
template
lang=
'pug'
>
<
template
lang=
'pug'
>
q-btn.
q-ml-md(flat, round, dense, color='grey
')
q-btn.
account-avbtn.q-ml-md(flat, round, dense, color='custom-color
')
q-icon(
q-icon(
v-if='!userStore.authenticated || !userStore.hasAvatar'
v-if='!userStore.authenticated || !userStore.hasAvatar'
name='las la-user-circle'
name='las la-user-circle'
...
@@ -49,5 +49,7 @@ const { t } = useI18n()
...
@@ -49,5 +49,7 @@ const { t } = useI18n()
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.account-avbtn
{
color
:
rgba
(
255
,
255
,
255
,.
6
);
}
</
style
>
</
style
>
ux/src/components/HeaderSearch.vue
View file @
d51fc36b
...
@@ -28,10 +28,10 @@ q-toolbar(
...
@@ -28,10 +28,10 @@ q-toolbar(
)
)
q-icon(v-else, name='las la-search')
q-icon(v-else, name='las la-search')
template(v-slot:append)
template(v-slot:append)
q-badge.q-mr-sm(
q-badge.
search-kbdbadge.
q-mr-sm(
v-if='!state.searchIsFocused'
v-if='!state.searchIsFocused'
label='Ctrl+K'
label='Ctrl+K'
color='
grey-7
'
color='
custom-color
'
outline
outline
@click='searchField.focus()'
@click='searchField.focus()'
)
)
...
@@ -221,4 +221,8 @@ onBeforeUnmount(() => {
...
@@ -221,4 +221,8 @@ onBeforeUnmount(() => {
border-radius
:
4px
;
border-radius
:
4px
;
}
}
}
}
.search-kbdbadge
{
color
:
rgba
(
255
,
255
,
255
,.
5
);
}
</
style
>
</
style
>
ux/src/components/NavEditOverlay.vue
View file @
d51fc36b
...
@@ -242,7 +242,8 @@ q-layout(view='hHh lpR fFf', container)
...
@@ -242,7 +242,8 @@ q-layout(view='hHh lpR fFf', container)
color='primary'
color='primary'
)
)
q-menu(content-class='shadow-7')
q-menu(content-class='shadow-7')
icon-picker-dialog(v-model='state.current.icon')
.q-pa-lg: em [ TODO: Icon Picker Dialog ]
// icon-picker-dialog(v-model='pageStore.icon')
q-separator.q-my-sm(inset)
q-separator.q-my-sm(inset)
q-item
q-item
blueprint-icon(icon='link')
blueprint-icon(icon='link')
...
...
ux/src/components/NavSidebar.vue
View file @
d51fc36b
...
@@ -9,7 +9,7 @@ q-scroll-area.sidebar-nav(
...
@@ -9,7 +9,7 @@ q-scroll-area.sidebar-nav(
dark
dark
)
)
template(v-for='item of siteStore.nav.items', :key='item.id')
template(v-for='item of siteStore.nav.items', :key='item.id')
q-item-label.
text-blue-2
.text-caption.text-wordbreak-all(
q-item-label.
sidebar-nav-header
.text-caption.text-wordbreak-all(
v-if='item.type === `header`'
v-if='item.type === `header`'
header
header
)
{{
item
.
label
}}
)
{{
item
.
label
}}
...
@@ -175,5 +175,9 @@ watch(() => pageStore.navigationId, (newValue) => {
...
@@ -175,5 +175,9 @@ watch(() => pageStore.navigationId, (newValue) => {
border-left
:
10px
solid
rgba
(
255
,
255
,
255
,.
25
);
border-left
:
10px
solid
rgba
(
255
,
255
,
255
,.
25
);
}
}
}
}
&
-header
{
color
:
rgba
(
255
,
255
,
255
,.
75
)
!
important
;
}
}
}
</
style
>
</
style
>
ux/src/components/PageHeader.vue
View file @
d51fc36b
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
q-badge(color='grey' floating rounded)
q-badge(color='grey' floating rounded)
q-icon(name='las la-pen', size='xs', padding='xs xs')
q-icon(name='las la-pen', size='xs', padding='xs xs')
q-menu(content-class='shadow-7')
q-menu(content-class='shadow-7')
icon-picker-dialog(v-model='pageStore.icon')
.q-pa-lg: em [ TODO: Icon Picker Dialog ]
// icon-picker-dialog(v-model='pageStore.icon')
q-icon.rounded-borders(
q-icon.rounded-borders(
v-else
v-else
:name='pageStore.icon'
:name='pageStore.icon'
...
...
ux/src/components/PagePropertiesDialog.vue
View file @
d51fc36b
...
@@ -62,6 +62,9 @@ q-card.page-properties-dialog
...
@@ -62,6 +62,9 @@ q-card.page-properties-dialog
name='las la-icons'
name='las la-icons'
color='primary'
color='primary'
)
)
q-menu(content-class='shadow-7')
.q-pa-lg: em [ TODO: Icon Picker Dialog ]
// icon-picker-dialog(v-model='pageStore.icon')
q-input(
q-input(
v-if='pageStore.path !== `home`'
v-if='pageStore.path !== `home`'
v-model='pageStore.alias'
v-model='pageStore.alias'
...
...
ux/src/layouts/MainLayout.vue
View file @
d51fc36b
...
@@ -57,7 +57,7 @@ q-layout(view='hHh Lpr lff')
...
@@ -57,7 +57,7 @@ q-layout(view='hHh Lpr lff')
dense
dense
icon='las la-globe'
icon='las la-globe'
color='blue-7'
color='blue-7'
text-color='
blue-2
'
text-color='
custom-color
'
:label='commonStore.locale'
:label='commonStore.locale'
:aria-label='commonStore.locale'
:aria-label='commonStore.locale'
size='sm'
size='sm'
...
@@ -69,13 +69,16 @@ q-layout(view='hHh Lpr lff')
...
@@ -69,13 +69,16 @@ q-layout(view='hHh Lpr lff')
dense
dense
icon='las la-sitemap'
icon='las la-sitemap'
color='blue-7'
color='blue-7'
text-color='
blue-2
'
text-color='
custom-color
'
label='Browse'
label='Browse'
aria-label='Browse'
aria-label='Browse'
size='sm'
size='sm'
)
)
nav-sidebar
nav-sidebar
q-bar.bg-blue-9.text-white(dense, v-if='userStore.authenticated')
q-bar.sidebar-footerbtns.text-white(
v-if='userStore.authenticated'
dense
)
q-btn.col(
q-btn.col(
icon='las la-dharmachakra'
icon='las la-dharmachakra'
label='Edit Nav'
label='Edit Nav'
...
@@ -186,12 +189,20 @@ const isSidebarMini = computed(() => {
...
@@ -186,12 +189,20 @@ const isSidebarMini = computed(() => {
background
:
linear-gradient
(
to
bottom
,
rgba
(
255
,
255
,
255
,.
1
)
0%
,
rgba
(
0
,
0
,
0
,
.05
)
100%
);
background
:
linear-gradient
(
to
bottom
,
rgba
(
255
,
255
,
255
,.
1
)
0%
,
rgba
(
0
,
0
,
0
,
.05
)
100%
);
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,.
2
);
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,.
2
);
height
:
38px
;
height
:
38px
;
.q-btn
{
color
:
rgba
(
255
,
255
,
255
,.
8
);
}
}
}
.sidebar-mini
{
.sidebar-mini
{
height
:
100%
;
height
:
100%
;
}
}
.sidebar-footerbtns
{
background-color
:
rgba
(
255
,
255
,
255
,.
1
);
}
body
.body--dark
{
body
.body--dark
{
background-color
:
$dark-6
;
background-color
:
$dark-6
;
}
}
...
...
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