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
ec2d10c7
Commit
ec2d10c7
authored
Apr 24, 2020
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: trim and auto-remove trailing slash for Site URL in Admin General
parent
7c59bfed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
admin-auth.vue
client/components/admin/admin-auth.vue
+1
-1
site.js
server/graph/resolvers/site.js
+9
-4
No files found.
client/components/admin/admin-auth.vue
View file @
ec2d10c7
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
inset
inset
)
)
v-card.mt-4.wiki-form.animated.fadeInUp.wait-p4s
v-card.mt-4.wiki-form.animated.fadeInUp.wait-p4s
(v-if='selectedStrategy !== `local`')
v-toolbar(color='primary', dense, flat, dark)
v-toolbar(color='primary', dense, flat, dark)
.subtitle-1
{{
$t
(
'admin:auth.configReference'
)
}}
.subtitle-1
{{
$t
(
'admin:auth.configReference'
)
}}
v-card-text
v-card-text
...
...
server/graph/resolvers/site.js
View file @
ec2d10c7
const
graphHelper
=
require
(
'../../helpers/graph'
)
const
graphHelper
=
require
(
'../../helpers/graph'
)
const
_
=
require
(
'lodash'
)
/* global WIKI */
/* global WIKI */
...
@@ -25,10 +26,14 @@ module.exports = {
...
@@ -25,10 +26,14 @@ module.exports = {
},
},
SiteMutation
:
{
SiteMutation
:
{
async
updateConfig
(
obj
,
args
,
context
)
{
async
updateConfig
(
obj
,
args
,
context
)
{
let
siteHost
=
_
.
trim
(
args
.
host
)
if
(
siteHost
.
endsWith
(
'/'
))
{
siteHost
=
siteHost
.
splice
(
0
,
-
1
)
}
try
{
try
{
WIKI
.
config
.
host
=
args
.
h
ost
WIKI
.
config
.
host
=
siteH
ost
WIKI
.
config
.
title
=
args
.
title
WIKI
.
config
.
title
=
_
.
trim
(
args
.
title
)
WIKI
.
config
.
company
=
args
.
company
WIKI
.
config
.
company
=
_
.
trim
(
args
.
company
)
WIKI
.
config
.
contentLicense
=
args
.
contentLicense
WIKI
.
config
.
contentLicense
=
args
.
contentLicense
WIKI
.
config
.
seo
=
{
WIKI
.
config
.
seo
=
{
description
:
args
.
description
,
description
:
args
.
description
,
...
@@ -36,7 +41,7 @@ module.exports = {
...
@@ -36,7 +41,7 @@ module.exports = {
analyticsService
:
args
.
analyticsService
,
analyticsService
:
args
.
analyticsService
,
analyticsId
:
args
.
analyticsId
analyticsId
:
args
.
analyticsId
}
}
WIKI
.
config
.
logoUrl
=
args
.
logoUrl
WIKI
.
config
.
logoUrl
=
_
.
trim
(
args
.
logoUrl
)
WIKI
.
config
.
features
=
{
WIKI
.
config
.
features
=
{
featurePageRatings
:
args
.
featurePageRatings
,
featurePageRatings
:
args
.
featurePageRatings
,
featurePageComments
:
args
.
featurePageComments
,
featurePageComments
:
args
.
featurePageComments
,
...
...
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