Created the text module
This commit is contained in:
26
modules/text/module.js
Normal file
26
modules/text/module.js
Normal file
@ -0,0 +1,26 @@
|
||||
const Joi = require("joi");
|
||||
const {getLinkById} = require("../../server/controller/link");
|
||||
|
||||
module.exports.onClick = async (id, accessId, metaData, controller) => {
|
||||
controller.locals.meta.title = (await getLinkById(id)).title;
|
||||
controller.render(__dirname + "/web/index");
|
||||
}
|
||||
|
||||
module.exports.info = {
|
||||
name: "Link mit Text",
|
||||
icon: "clipboard",
|
||||
validationSchema: Joi.object({
|
||||
content: Joi.string().required(),
|
||||
}),
|
||||
meta: [{
|
||||
name: "Link-Einstellungen",
|
||||
type: "default",
|
||||
fields: {
|
||||
content: {
|
||||
type: "text",
|
||||
name: "Dein Text",
|
||||
description: "Der anzuzeigende Text"
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
Reference in New Issue
Block a user