Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
persona-non-google
Commits
d6d46396
Commit
d6d46396
authored
Sep 11, 2021
by
Barış Soner Uşaklı
Browse files
fix: #531, acp page on subfolder install
parent
ef4fd1b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
library.js
View file @
d6d46396
...
...
@@ -6,9 +6,11 @@ const user = require.main.require('./src/user');
const
library
=
module
.
exports
;
library
.
init
=
async
function
(
params
)
{
const
{
app
,
middleware
}
=
params
;
app
.
get
(
'
/admin/plugins/persona
'
,
middleware
.
admin
.
buildHeader
,
renderAdmin
);
app
.
get
(
'
/api/admin/plugins/persona
'
,
renderAdmin
);
const
{
router
,
middleware
}
=
params
;
const
routeHelpers
=
require
.
main
.
require
(
'
./src/routes/helpers
'
);
routeHelpers
.
setupAdminPageRoute
(
router
,
'
/admin/plugins/persona
'
,
middleware
,
[],
(
req
,
res
)
=>
{
res
.
render
(
'
admin/plugins/persona
'
,
{});
});
};
library
.
addAdminNavigation
=
async
function
(
header
)
{
...
...
@@ -58,10 +60,6 @@ library.getThemeConfig = async function (config) {
return
config
;
};
function
renderAdmin
(
req
,
res
)
{
res
.
render
(
'
admin/plugins/persona
'
,
{});
}
library
.
addUserToTopic
=
async
function
(
hookData
)
{
const
settings
=
await
meta
.
settings
.
get
(
'
persona
'
);
if
(
settings
.
enableQuickReply
===
'
on
'
)
{
...
...
Write
Preview
Supports
Markdown
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