This commit is contained in:
tatianamac
2019-11-26 14:50:43 -08:00
parent 8a55660ed0
commit 6d5445ecc5
13894 changed files with 2233957 additions and 0 deletions

View File

@ -0,0 +1,24 @@
(function (angular) {
const SECTION_NAME = "history";
angular
.module("BrowserSync")
.controller("HelpAboutController", [
"options",
"pagesConfig",
helpAboutController
]);
/**
* @param options
* @param pagesConfig
*/
function helpAboutController(options, pagesConfig) {
var ctrl = this;
ctrl.options = options.bs;
ctrl.section = pagesConfig[SECTION_NAME];
}
})(angular);

View File

View File

@ -0,0 +1,8 @@
<div bs-panel="controls outline">
<h1 bs-heading><icon icon="{{ctrl.section.icon}}"></icon> {{ctrl.section.title}}</h1>
</div>
<div bs-panel id="bs-help">
<div bs-panel-content="basic">
<p>Help page</p>
</div>
</div>

View File

@ -0,0 +1,49 @@
const PLUGIN_NAME = "Help / About";
/**
* @type {{plugin: Function, plugin:name: string, markup: string}}
*/
module.exports = {
/**
* Plugin init
*/
"plugin": function () {},
/**
* Hooks
*/
"hooks": {
"markup": fileContent("/../../../static/content/help.content.html"),
"client:js": fileContent("/help.client.js"),
"templates": [
getPath("/help.directive.html")
],
"page": {
path: "/help",
title: PLUGIN_NAME,
template: "help.html",
controller: "HelpAboutController",
order: 6,
icon: "help"
}
},
/**
* Plugin name
*/
"plugin:name": PLUGIN_NAME
};
/**
* @param filepath
* @returns {*}
*/
function getPath (filepath) {
return require("path").join(__dirname, filepath);
}
/**
* @param filepath
* @returns {*}
*/
function fileContent (filepath) {
return require("fs").readFileSync(getPath(filepath), "utf-8");
}