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
b7442443
Commit
b7442443
authored
Apr 04, 2017
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use existing values during configure mode
parent
4f1c37a3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
16 deletions
+31
-16
configure.min.js
assets/js/configure.min.js
+0
-0
configure.js
client/js/configure.js
+29
-6
config.sample.yml
config.sample.yml
+0
-9
configure.js
configure.js
+0
-1
index.pug
views/configure/index.pug
+2
-0
No files found.
assets/js/configure.min.js
View file @
b7442443
This source diff could not be displayed because it is too large. You can
view the blob
instead.
client/js/configure.js
View file @
b7442443
'use strict'
'use strict'
/* global appconfig */
import
jQuery
from
'jquery'
import
jQuery
from
'jquery'
import
_
from
'lodash'
import
_
from
'lodash'
import
Vue
from
'vue'
import
Vue
from
'vue'
...
@@ -43,14 +45,14 @@ jQuery(document).ready(function ($) {
...
@@ -43,14 +45,14 @@ jQuery(document).ready(function ($) {
results
:
[]
results
:
[]
},
},
conf
:
{
conf
:
{
title
:
'Wiki'
,
title
:
appconfig
.
title
||
'Wiki'
,
host
:
'http://'
,
host
:
appconfig
.
host
||
'http://'
,
port
:
80
,
port
:
appconfig
.
port
||
80
,
lang
:
'en'
,
lang
:
appconfig
.
lang
||
'en'
,
db
:
'mongodb://localhost:27017/wiki'
,
db
:
appconfig
.
db
||
'mongodb://localhost:27017/wiki'
,
pathData
:
'./data'
,
pathData
:
'./data'
,
pathRepo
:
'./repo'
,
pathRepo
:
'./repo'
,
gitUseRemote
:
true
,
gitUseRemote
:
(
appconfig
.
git
!==
false
)
,
gitUrl
:
''
,
gitUrl
:
''
,
gitBranch
:
'master'
,
gitBranch
:
'master'
,
gitAuthType
:
'ssh'
,
gitAuthType
:
'ssh'
,
...
@@ -108,6 +110,27 @@ jQuery(document).ready(function ($) {
...
@@ -108,6 +110,27 @@ jQuery(document).ready(function ($) {
return
perc
return
perc
}
}
},
},
mounted
:
function
()
{
if
(
appconfig
.
paths
)
{
this
.
conf
.
pathData
=
appconfig
.
paths
.
data
||
'./data'
this
.
conf
.
pathRepo
=
appconfig
.
paths
.
repo
||
'./repo'
}
if
(
appconfig
.
git
!==
false
&&
_
.
isPlainObject
(
appconfig
.
git
))
{
this
.
conf
.
gitUrl
=
appconfig
.
git
.
url
||
''
this
.
conf
.
gitBranch
=
appconfig
.
git
.
branch
||
'master'
if
(
_
.
isPlainObject
(
appconfig
.
git
.
auth
))
{
this
.
conf
.
gitAuthType
=
appconfig
.
git
.
auth
.
type
||
'ssh'
this
.
conf
.
gitAuthSSHKey
=
appconfig
.
git
.
auth
.
privateKey
||
''
this
.
conf
.
gitAuthUser
=
appconfig
.
git
.
auth
.
username
||
''
this
.
conf
.
gitAuthPass
=
appconfig
.
git
.
auth
.
password
||
''
this
.
conf
.
gitAuthSSL
=
(
appconfig
.
git
.
auth
.
sslVerify
!==
false
)
}
if
(
_
.
isPlainObject
(
appconfig
.
git
.
signature
))
{
this
.
conf
.
gitSignatureName
=
appconfig
.
git
.
signature
.
name
||
''
this
.
conf
.
gitSignatureEmail
=
appconfig
.
git
.
signature
.
email
||
''
}
}
},
methods
:
{
methods
:
{
proceedToWelcome
:
function
(
ev
)
{
proceedToWelcome
:
function
(
ev
)
{
this
.
state
=
'welcome'
this
.
state
=
'welcome'
...
...
config.sample.yml
View file @
b7442443
...
@@ -94,15 +94,6 @@ auth:
...
@@ -94,15 +94,6 @@ auth:
sessionSecret
:
1234567890abcdefghijklmnopqrstuvxyz
sessionSecret
:
1234567890abcdefghijklmnopqrstuvxyz
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
# Administrator email
# ---------------------------------------------------------------------
# An admin account will be created using the email specified here.
# The password is set to "admin123" by default. Change it immediately
# upon login!!!
admin
:
admin@company.com
# ---------------------------------------------------------------------
# Database Connection String
# Database Connection String
# ---------------------------------------------------------------------
# ---------------------------------------------------------------------
# You can also use an ENV variable by using $ENV_VAR_NAME as the value
# You can also use an ENV variable by using $ENV_VAR_NAME as the value
...
...
configure.js
View file @
b7442443
...
@@ -323,7 +323,6 @@ module.exports = (port, spinner) => {
...
@@ -323,7 +323,6 @@ module.exports = (port, spinner) => {
}
else
{
}
else
{
conf
.
auth
=
{
local
:
{
enabled
:
true
}
}
conf
.
auth
=
{
local
:
{
enabled
:
true
}
}
}
}
conf
.
admin
=
req
.
body
.
adminEmail
conf
.
db
=
req
.
body
.
db
conf
.
db
=
req
.
body
.
db
if
(
req
.
body
.
gitUseRemote
===
false
)
{
if
(
req
.
body
.
gitUseRemote
===
false
)
{
conf
.
git
=
false
conf
.
git
=
false
...
...
views/configure/index.pug
View file @
b7442443
...
@@ -10,6 +10,8 @@ html(data-logic='configure')
...
@@ -10,6 +10,8 @@ html(data-logic='configure')
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png')
// JS / CSS
// JS / CSS
script(type='text/javascript').
var appconfig = !{JSON.stringify(conf)};
script(type='text/javascript', src='/js/configure.min.js')
script(type='text/javascript', src='/js/configure.min.js')
body
body
...
...
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