mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
feature(cloudcmd) --name: add ability to set tab name in web browser
This commit is contained in:
parent
9ef0dd02dd
commit
9cdca9efe5
12 changed files with 93 additions and 20 deletions
|
|
@ -33,8 +33,20 @@ module.exports.formatMsg = (msg, name, status) => {
|
|||
* Функция возвращает заголовок веб страницы
|
||||
* @path
|
||||
*/
|
||||
module.exports.getTitle = (path) => {
|
||||
return NAME + ' - ' + (path || Path());
|
||||
module.exports.getTitle = (options) => {
|
||||
options = options || {};
|
||||
|
||||
const path = options.path || Path();
|
||||
const name = options.name;
|
||||
|
||||
const array = [
|
||||
name || NAME,
|
||||
path,
|
||||
];
|
||||
|
||||
return array
|
||||
.filter(Boolean)
|
||||
.join(' - ');
|
||||
};
|
||||
|
||||
/** Функция получает адреса каждого каталога в пути
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue