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
e954b50a
You need to sign in or sign up before continuing.
Unverified
Commit
e954b50a
authored
Feb 16, 2023
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: footer text override option
parent
f972a9c7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
3 deletions
+31
-3
admin-general.vue
client/components/admin/admin-general.vue
+15
-0
site.js
client/store/site.js
+1
-0
nav-footer.vue
client/themes/default/components/nav-footer.vue
+4
-1
data.yml
server/app/data.yml
+1
-0
site.js
server/graph/resolvers/site.js
+6
-1
site.graphql
server/graph/schemas/site.graphql
+2
-0
master.js
server/master.js
+1
-0
storage.js
server/modules/storage/git/storage.js
+1
-1
No files found.
client/components/admin/admin-general.vue
View file @
e954b50a
...
@@ -82,6 +82,14 @@
...
@@ -82,6 +82,14 @@
:return-object='false'
:return-object='false'
:hint='$t(`admin:general.contentLicenseHint`)'
:hint='$t(`admin:general.contentLicenseHint`)'
persistent-hint
persistent-hint
)
v-text-field.mt-3(
outlined
:label='$t(`admin:general.footerOverride`)'
v-model='config.footerOverride'
prepend-icon='mdi-page-layout-footer'
persistent-hint
:hint='$t(`admin:general.footerOverrideHint`)'
)
)
v-divider
v-divider
.overline.grey--text.pa-4 SEO
.overline.grey--text.pa-4 SEO
...
@@ -280,6 +288,7 @@ export default {
...
@@ -280,6 +288,7 @@ export default {
analyticsId
:
''
,
analyticsId
:
''
,
company
:
''
,
company
:
''
,
contentLicense
:
''
,
contentLicense
:
''
,
footerOverride
:
''
,
logoUrl
:
''
,
logoUrl
:
''
,
featureAnalytics
:
false
,
featureAnalytics
:
false
,
featurePageRatings
:
false
,
featurePageRatings
:
false
,
...
@@ -308,6 +317,7 @@ export default {
...
@@ -308,6 +317,7 @@ export default {
logoUrl
:
sync
(
'site/logoUrl'
),
logoUrl
:
sync
(
'site/logoUrl'
),
company
:
sync
(
'site/company'
),
company
:
sync
(
'site/company'
),
contentLicense
:
sync
(
'site/contentLicense'
),
contentLicense
:
sync
(
'site/contentLicense'
),
footerOverride
:
sync
(
'site/footerOverride'
),
activeModal
:
sync
(
'editor/activeModal'
),
activeModal
:
sync
(
'editor/activeModal'
),
contentLicenses
()
{
contentLicenses
()
{
return
[
return
[
...
@@ -346,6 +356,7 @@ export default {
...
@@ -346,6 +356,7 @@ export default {
$analyticsId: String
$analyticsId: String
$company: String
$company: String
$contentLicense: String
$contentLicense: String
$footerOverride: String
$logoUrl: String
$logoUrl: String
$pageExtensions: String
$pageExtensions: String
$featurePageRatings: Boolean
$featurePageRatings: Boolean
...
@@ -369,6 +380,7 @@ export default {
...
@@ -369,6 +380,7 @@ export default {
analyticsId: $analyticsId
analyticsId: $analyticsId
company: $company
company: $company
contentLicense: $contentLicense
contentLicense: $contentLicense
footerOverride: $footerOverride
logoUrl: $logoUrl
logoUrl: $logoUrl
pageExtensions: $pageExtensions
pageExtensions: $pageExtensions
featurePageRatings: $featurePageRatings
featurePageRatings: $featurePageRatings
...
@@ -401,6 +413,7 @@ export default {
...
@@ -401,6 +413,7 @@ export default {
analyticsId
:
_
.
get
(
this
.
config
,
'analyticsId'
,
''
),
analyticsId
:
_
.
get
(
this
.
config
,
'analyticsId'
,
''
),
company
:
_
.
get
(
this
.
config
,
'company'
,
''
),
company
:
_
.
get
(
this
.
config
,
'company'
,
''
),
contentLicense
:
_
.
get
(
this
.
config
,
'contentLicense'
,
''
),
contentLicense
:
_
.
get
(
this
.
config
,
'contentLicense'
,
''
),
footerOverride
:
_
.
get
(
this
.
config
,
'footerOverride'
,
''
),
logoUrl
:
_
.
get
(
this
.
config
,
'logoUrl'
,
''
),
logoUrl
:
_
.
get
(
this
.
config
,
'logoUrl'
,
''
),
pageExtensions
:
_
.
get
(
this
.
config
,
'pageExtensions'
,
''
),
pageExtensions
:
_
.
get
(
this
.
config
,
'pageExtensions'
,
''
),
featurePageRatings
:
_
.
get
(
this
.
config
,
'featurePageRatings'
,
false
),
featurePageRatings
:
_
.
get
(
this
.
config
,
'featurePageRatings'
,
false
),
...
@@ -426,6 +439,7 @@ export default {
...
@@ -426,6 +439,7 @@ export default {
this
.
siteTitle
=
this
.
config
.
title
this
.
siteTitle
=
this
.
config
.
title
this
.
company
=
this
.
config
.
company
this
.
company
=
this
.
config
.
company
this
.
contentLicense
=
this
.
config
.
contentLicense
this
.
contentLicense
=
this
.
config
.
contentLicense
this
.
footerOverride
=
this
.
config
.
footerOverride
this
.
logoUrl
=
this
.
config
.
logoUrl
this
.
logoUrl
=
this
.
config
.
logoUrl
}
catch
(
err
)
{
}
catch
(
err
)
{
this
.
$store
.
commit
(
'pushGraphError'
,
err
)
this
.
$store
.
commit
(
'pushGraphError'
,
err
)
...
@@ -461,6 +475,7 @@ export default {
...
@@ -461,6 +475,7 @@ export default {
analyticsId
analyticsId
company
company
contentLicense
contentLicense
footerOverride
logoUrl
logoUrl
pageExtensions
pageExtensions
featurePageRatings
featurePageRatings
...
...
client/store/site.js
View file @
e954b50a
...
@@ -5,6 +5,7 @@ import { make } from 'vuex-pathify'
...
@@ -5,6 +5,7 @@ import { make } from 'vuex-pathify'
const
state
=
{
const
state
=
{
company
:
siteConfig
.
company
,
company
:
siteConfig
.
company
,
contentLicense
:
siteConfig
.
contentLicense
,
contentLicense
:
siteConfig
.
contentLicense
,
footerOverride
:
siteConfig
.
footerOverride
,
dark
:
siteConfig
.
darkMode
,
dark
:
siteConfig
.
darkMode
,
tocPosition
:
siteConfig
.
tocPosition
,
tocPosition
:
siteConfig
.
tocPosition
,
mascot
:
true
,
mascot
:
true
,
...
...
client/themes/default/components/nav-footer.vue
View file @
e954b50a
<
template
lang=
"pug"
>
<
template
lang=
"pug"
>
v-footer.justify-center(:color='bgColor', inset)
v-footer.justify-center(:color='bgColor', inset)
.caption.grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-1`')
.caption.grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-1`')
template(v-if='company && company.length > 0 && contentLicense !== ``')
template(v-if='footerOverride')
span
{{
footerOverride
}}
|
template(v-else-if='company && company.length > 0 && contentLicense !== ``')
span(v-if='contentLicense === `alr`')
{{
$t
(
'common:footer.copyright'
,
{
company
:
company
,
year
:
currentYear
,
interpolation
:
{
escapeValue
:
false
}
}
)
}}
|&
nbsp
;
span(v-if='contentLicense === `alr`')
{{
$t
(
'common:footer.copyright'
,
{
company
:
company
,
year
:
currentYear
,
interpolation
:
{
escapeValue
:
false
}
}
)
}}
|&
nbsp
;
span
(
v
-
else
)
{{
$t
(
'common:footer.license'
,
{
company
:
company
,
license
:
$t
(
'common:license.'
+
contentLicense
),
interpolation
:
{
escapeValue
:
false
}
}
)
}}
|&
nbsp
;
span
(
v
-
else
)
{{
$t
(
'common:footer.license'
,
{
company
:
company
,
license
:
$t
(
'common:license.'
+
contentLicense
),
interpolation
:
{
escapeValue
:
false
}
}
)
}}
|&
nbsp
;
span
{{
$t
(
'common:footer.poweredBy'
)
}}
#
[
a
(
href
=
'https://wiki.js.org'
,
ref
=
'nofollow'
)
Wiki
.
js
]
span
{{
$t
(
'common:footer.poweredBy'
)
}}
#
[
a
(
href
=
'https://wiki.js.org'
,
ref
=
'nofollow'
)
Wiki
.
js
]
...
@@ -29,6 +31,7 @@ export default {
...
@@ -29,6 +31,7 @@ export default {
computed
:
{
computed
:
{
company
:
get
(
'site/company'
),
company
:
get
(
'site/company'
),
contentLicense
:
get
(
'site/contentLicense'
),
contentLicense
:
get
(
'site/contentLicense'
),
footerOverride
:
get
(
'site/footerOverride'
),
bgColor
()
{
bgColor
()
{
if
(
!
this
.
$vuetify
.
theme
.
dark
)
{
if
(
!
this
.
$vuetify
.
theme
.
dark
)
{
return
this
.
color
return
this
.
color
...
...
server/app/data.yml
View file @
e954b50a
...
@@ -44,6 +44,7 @@ defaults:
...
@@ -44,6 +44,7 @@ defaults:
title
:
Wiki.js
title
:
Wiki.js
company
:
'
'
company
:
'
'
contentLicense
:
'
'
contentLicense
:
'
'
footerOverride
:
'
'
logoUrl
:
https://static.requarks.io/logo/wikijs-butterfly.svg
logoUrl
:
https://static.requarks.io/logo/wikijs-butterfly.svg
pageExtensions
:
pageExtensions
:
-
md
-
md
...
...
server/graph/resolvers/site.js
View file @
e954b50a
...
@@ -17,6 +17,7 @@ module.exports = {
...
@@ -17,6 +17,7 @@ module.exports = {
title
:
WIKI
.
config
.
title
,
title
:
WIKI
.
config
.
title
,
company
:
WIKI
.
config
.
company
,
company
:
WIKI
.
config
.
company
,
contentLicense
:
WIKI
.
config
.
contentLicense
,
contentLicense
:
WIKI
.
config
.
contentLicense
,
footerOverride
:
WIKI
.
config
.
footerOverride
,
logoUrl
:
WIKI
.
config
.
logoUrl
,
logoUrl
:
WIKI
.
config
.
logoUrl
,
pageExtensions
:
WIKI
.
config
.
pageExtensions
.
join
(
', '
),
pageExtensions
:
WIKI
.
config
.
pageExtensions
.
join
(
', '
),
...
WIKI
.
config
.
seo
,
...
WIKI
.
config
.
seo
,
...
@@ -60,6 +61,10 @@ module.exports = {
...
@@ -60,6 +61,10 @@ module.exports = {
WIKI
.
config
.
contentLicense
=
args
.
contentLicense
WIKI
.
config
.
contentLicense
=
args
.
contentLicense
}
}
if
(
args
.
hasOwnProperty
(
'footerOverride'
))
{
WIKI
.
config
.
footerOverride
=
args
.
footerOverride
}
if
(
args
.
hasOwnProperty
(
'logoUrl'
))
{
if
(
args
.
hasOwnProperty
(
'logoUrl'
))
{
WIKI
.
config
.
logoUrl
=
_
.
trim
(
args
.
logoUrl
)
WIKI
.
config
.
logoUrl
=
_
.
trim
(
args
.
logoUrl
)
}
}
...
@@ -120,7 +125,7 @@ module.exports = {
...
@@ -120,7 +125,7 @@ module.exports = {
forceDownload
:
_
.
get
(
args
,
'uploadForceDownload'
,
WIKI
.
config
.
uploads
.
forceDownload
)
forceDownload
:
_
.
get
(
args
,
'uploadForceDownload'
,
WIKI
.
config
.
uploads
.
forceDownload
)
}
}
await
WIKI
.
configSvc
.
saveToDb
([
'host'
,
'title'
,
'company'
,
'contentLicense'
,
'seo'
,
'logoUrl'
,
'pageExtensions'
,
'auth'
,
'editShortcuts'
,
'features'
,
'security'
,
'uploads'
])
await
WIKI
.
configSvc
.
saveToDb
([
'host'
,
'title'
,
'company'
,
'contentLicense'
,
'
footerOverride'
,
'
seo'
,
'logoUrl'
,
'pageExtensions'
,
'auth'
,
'editShortcuts'
,
'features'
,
'security'
,
'uploads'
])
if
(
WIKI
.
config
.
security
.
securityTrustProxy
)
{
if
(
WIKI
.
config
.
security
.
securityTrustProxy
)
{
WIKI
.
app
.
enable
(
'trust proxy'
)
WIKI
.
app
.
enable
(
'trust proxy'
)
...
...
server/graph/schemas/site.graphql
View file @
e954b50a
...
@@ -32,6 +32,7 @@ type SiteMutation {
...
@@ -32,6 +32,7 @@ type SiteMutation {
analyticsId
:
String
analyticsId
:
String
company
:
String
company
:
String
contentLicense
:
String
contentLicense
:
String
footerOverride
:
String
logoUrl
:
String
logoUrl
:
String
pageExtensions
:
String
pageExtensions
:
String
authAutoLogin
:
Boolean
authAutoLogin
:
Boolean
...
@@ -81,6 +82,7 @@ type SiteConfig {
...
@@ -81,6 +82,7 @@ type SiteConfig {
analyticsId
:
String
analyticsId
:
String
company
:
String
company
:
String
contentLicense
:
String
contentLicense
:
String
footerOverride
:
String
logoUrl
:
String
logoUrl
:
String
pageExtensions
:
String
pageExtensions
:
String
authAutoLogin
:
Boolean
authAutoLogin
:
Boolean
...
...
server/master.js
View file @
e954b50a
...
@@ -154,6 +154,7 @@ module.exports = async () => {
...
@@ -154,6 +154,7 @@ module.exports = async () => {
rtl
:
WIKI
.
config
.
lang
.
rtl
,
rtl
:
WIKI
.
config
.
lang
.
rtl
,
company
:
WIKI
.
config
.
company
,
company
:
WIKI
.
config
.
company
,
contentLicense
:
WIKI
.
config
.
contentLicense
,
contentLicense
:
WIKI
.
config
.
contentLicense
,
footerOverride
:
WIKI
.
config
.
footerOverride
,
logoUrl
:
WIKI
.
config
.
logoUrl
logoUrl
:
WIKI
.
config
.
logoUrl
}
}
res
.
locals
.
langs
=
await
WIKI
.
models
.
locales
.
getNavLocales
({
cache
:
true
})
res
.
locals
.
langs
=
await
WIKI
.
models
.
locales
.
getNavLocales
({
cache
:
true
})
...
...
server/modules/storage/git/storage.js
View file @
e954b50a
...
@@ -160,7 +160,7 @@ module.exports = {
...
@@ -160,7 +160,7 @@ module.exports = {
fNames
.
old
=
fMatch
[
1
]
fNames
.
old
=
fMatch
[
1
]
fNames
.
new
=
fMatch
[
4
]
fNames
.
new
=
fMatch
[
4
]
}
else
{
}
else
{
fNames
.
old
=
(
fMatch
[
1
]
+
fMatch
[
2
]
+
fMatch
[
4
]).
replace
(
'//'
,
'/'
)
,
fNames
.
old
=
(
fMatch
[
1
]
+
fMatch
[
2
]
+
fMatch
[
4
]).
replace
(
'//'
,
'/'
)
fNames
.
new
=
(
fMatch
[
1
]
+
fMatch
[
3
]
+
fMatch
[
4
]).
replace
(
'//'
,
'/'
)
fNames
.
new
=
(
fMatch
[
1
]
+
fMatch
[
3
]
+
fMatch
[
4
]).
replace
(
'//'
,
'/'
)
}
}
const
fPath
=
path
.
join
(
this
.
repoPath
,
fNames
.
new
)
const
fPath
=
path
.
join
(
this
.
repoPath
,
fNames
.
new
)
...
...
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