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
1914d405
Commit
1914d405
authored
Jan 31, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: set rtl correctly if default lang is non-rtl
parent
429c2673
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
admin-groups.vue
client/components/admin/admin-groups.vue
+1
-1
common.js
server/controllers/common.js
+5
-1
No files found.
client/components/admin/admin-groups.vue
View file @
1914d405
...
...
@@ -57,7 +57,7 @@
v-icon(v-on='on') mdi-lock-outline
span System Group
template(slot='no-data')
v-alert.ma-3(icon='
warning
', :value='true', outline) No groups to display.
v-alert.ma-3(icon='
mdi-alert
', :value='true', outline) No groups to display.
.text-xs-center.py-2(v-if='pageCount > 1')
v-pagination(v-model='pagination', :length='pageCount')
</
template
>
...
...
server/controllers/common.js
View file @
1914d405
...
...
@@ -47,6 +47,7 @@ router.get(['/e', '/e/*'], async (req, res, next) => {
}
_
.
set
(
res
,
'locals.siteConfig.lang'
,
pageArgs
.
locale
)
_
.
set
(
res
,
'locals.siteConfig.rtl'
,
req
.
i18n
.
dir
())
if
(
pageHelper
.
isReservedPath
(
pageArgs
.
path
))
{
return
next
(
new
Error
(
'Cannot create this page because it starts with a system reserved path.'
))
...
...
@@ -110,6 +111,7 @@ router.get(['/h', '/h/*'], async (req, res, next) => {
}
_
.
set
(
res
,
'locals.siteConfig.lang'
,
pageArgs
.
locale
)
_
.
set
(
res
,
'locals.siteConfig.rtl'
,
req
.
i18n
.
dir
())
const
page
=
await
WIKI
.
models
.
pages
.
getPageFromDb
({
path
:
pageArgs
.
path
,
...
...
@@ -195,6 +197,7 @@ router.get(['/s', '/s/*'], async (req, res, next) => {
}
_
.
set
(
res
,
'locals.siteConfig.lang'
,
pageArgs
.
locale
)
_
.
set
(
res
,
'locals.siteConfig.rtl'
,
req
.
i18n
.
dir
())
if
(
!
WIKI
.
auth
.
checkAccess
(
req
.
user
,
[
'read:source'
],
pageArgs
))
{
return
res
.
render
(
'unauthorized'
,
{
action
:
'source'
})
...
...
@@ -252,11 +255,12 @@ router.get('/*', async (req, res, next) => {
}
_
.
set
(
res
,
'locals.siteConfig.lang'
,
pageArgs
.
locale
)
_
.
set
(
res
,
'locals.siteConfig.rtl'
,
req
.
i18n
.
dir
())
if
(
page
)
{
_
.
set
(
res
.
locals
,
'pageMeta.title'
,
page
.
title
)
_
.
set
(
res
.
locals
,
'pageMeta.description'
,
page
.
description
)
const
sidebar
=
await
WIKI
.
models
.
navigation
.
getTree
({
cache
:
true
})
const
sidebar
=
await
WIKI
.
models
.
navigation
.
getTree
({
cache
:
true
,
locale
:
pageArgs
.
locale
})
const
injectCode
=
{
css
:
WIKI
.
config
.
theming
.
injectCSS
,
head
:
WIKI
.
config
.
theming
.
injectHead
,
...
...
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