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 @@
:return-object='false'
:hint='$t(`admin:general.contentLicenseHint`)'
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
.overline.grey--text.pa-4 SEO
...
...
@@ -280,6 +288,7 @@ export default {
analyticsId
:
''
,
company
:
''
,
contentLicense
:
''
,
footerOverride
:
''
,
logoUrl
:
''
,
featureAnalytics
:
false
,
featurePageRatings
:
false
,
...
...
@@ -308,6 +317,7 @@ export default {
logoUrl
:
sync
(
'site/logoUrl'
),
company
:
sync
(
'site/company'
),
contentLicense
:
sync
(
'site/contentLicense'
),
footerOverride
:
sync
(
'site/footerOverride'
),
activeModal
:
sync
(
'editor/activeModal'
),
contentLicenses
()
{
return
[
...
...
@@ -346,6 +356,7 @@ export default {
$analyticsId: String
$company: String
$contentLicense: String
$footerOverride: String
$logoUrl: String
$pageExtensions: String
$featurePageRatings: Boolean
...
...
@@ -369,6 +380,7 @@ export default {
analyticsId: $analyticsId
company: $company
contentLicense: $contentLicense
footerOverride: $footerOverride
logoUrl: $logoUrl
pageExtensions: $pageExtensions
featurePageRatings: $featurePageRatings
...
...
@@ -401,6 +413,7 @@ export default {
analyticsId
:
_
.
get
(
this
.
config
,
'analyticsId'
,
''
),
company
:
_
.
get
(
this
.
config
,
'company'
,
''
),
contentLicense
:
_
.
get
(
this
.
config
,
'contentLicense'
,
''
),
footerOverride
:
_
.
get
(
this
.
config
,
'footerOverride'
,
''
),
logoUrl
:
_
.
get
(
this
.
config
,
'logoUrl'
,
''
),
pageExtensions
:
_
.
get
(
this
.
config
,
'pageExtensions'
,
''
),
featurePageRatings
:
_
.
get
(
this
.
config
,
'featurePageRatings'
,
false
),
...
...
@@ -426,6 +439,7 @@ export default {
this
.
siteTitle
=
this
.
config
.
title
this
.
company
=
this
.
config
.
company
this
.
contentLicense
=
this
.
config
.
contentLicense
this
.
footerOverride
=
this
.
config
.
footerOverride
this
.
logoUrl
=
this
.
config
.
logoUrl
}
catch
(
err
)
{
this
.
$store
.
commit
(
'pushGraphError'
,
err
)
...
...
@@ -461,6 +475,7 @@ export default {
analyticsId
company
contentLicense
footerOverride
logoUrl
pageExtensions
featurePageRatings
...
...
client/store/site.js
View file @
e954b50a
...
...
@@ -5,6 +5,7 @@ import { make } from 'vuex-pathify'
const
state
=
{
company
:
siteConfig
.
company
,
contentLicense
:
siteConfig
.
contentLicense
,
footerOverride
:
siteConfig
.
footerOverride
,
dark
:
siteConfig
.
darkMode
,
tocPosition
:
siteConfig
.
tocPosition
,
mascot
:
true
,
...
...
client/themes/default/components/nav-footer.vue
View file @
e954b50a
<
template
lang=
"pug"
>
v-footer.justify-center(:color='bgColor', inset)
.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
-
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
]
...
...
@@ -29,6 +31,7 @@ export default {
computed
:
{
company
:
get
(
'site/company'
),
contentLicense
:
get
(
'site/contentLicense'
),
footerOverride
:
get
(
'site/footerOverride'
),
bgColor
()
{
if
(
!
this
.
$vuetify
.
theme
.
dark
)
{
return
this
.
color
...
...
server/app/data.yml
View file @
e954b50a
...
...
@@ -44,6 +44,7 @@ defaults:
title
:
Wiki.js
company
:
'
'
contentLicense
:
'
'
footerOverride
:
'
'
logoUrl
:
https://static.requarks.io/logo/wikijs-butterfly.svg
pageExtensions
:
-
md
...
...
server/graph/resolvers/site.js
View file @
e954b50a
...
...
@@ -17,6 +17,7 @@ module.exports = {
title
:
WIKI
.
config
.
title
,
company
:
WIKI
.
config
.
company
,
contentLicense
:
WIKI
.
config
.
contentLicense
,
footerOverride
:
WIKI
.
config
.
footerOverride
,
logoUrl
:
WIKI
.
config
.
logoUrl
,
pageExtensions
:
WIKI
.
config
.
pageExtensions
.
join
(
', '
),
...
WIKI
.
config
.
seo
,
...
...
@@ -60,6 +61,10 @@ module.exports = {
WIKI
.
config
.
contentLicense
=
args
.
contentLicense
}
if
(
args
.
hasOwnProperty
(
'footerOverride'
))
{
WIKI
.
config
.
footerOverride
=
args
.
footerOverride
}
if
(
args
.
hasOwnProperty
(
'logoUrl'
))
{
WIKI
.
config
.
logoUrl
=
_
.
trim
(
args
.
logoUrl
)
}
...
...
@@ -120,7 +125,7 @@ module.exports = {
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
)
{
WIKI
.
app
.
enable
(
'trust proxy'
)
...
...
server/graph/schemas/site.graphql
View file @
e954b50a
...
...
@@ -32,6 +32,7 @@ type SiteMutation {
analyticsId
:
String
company
:
String
contentLicense
:
String
footerOverride
:
String
logoUrl
:
String
pageExtensions
:
String
authAutoLogin
:
Boolean
...
...
@@ -81,6 +82,7 @@ type SiteConfig {
analyticsId
:
String
company
:
String
contentLicense
:
String
footerOverride
:
String
logoUrl
:
String
pageExtensions
:
String
authAutoLogin
:
Boolean
...
...
server/master.js
View file @
e954b50a
...
...
@@ -154,6 +154,7 @@ module.exports = async () => {
rtl
:
WIKI
.
config
.
lang
.
rtl
,
company
:
WIKI
.
config
.
company
,
contentLicense
:
WIKI
.
config
.
contentLicense
,
footerOverride
:
WIKI
.
config
.
footerOverride
,
logoUrl
:
WIKI
.
config
.
logoUrl
}
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 = {
fNames
.
old
=
fMatch
[
1
]
fNames
.
new
=
fMatch
[
4
]
}
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
(
'//'
,
'/'
)
}
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