Skip to content

Commit

Permalink
menu items icons and menu option for user guides
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Jul 28, 2022
1 parent ab87b48 commit 650186e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions tomatic/ui/components/menubutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const MenuContent = function(options) {
hoverable: true,
className: 'colored',
disabled: item.disabled,
front: item.icon,
events: {
onclick: item.action,
},
Expand Down
17 changes: 16 additions & 1 deletion tomatic/ui/graella.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,40 +52,55 @@ var Doc = function(message) {

const scriptLauncherBase = 'http://tomatic.somenergia.lan:5000';
const menuOptions = function() { return [{
icon: "🕜",
title: "Planificador de Graelles",
action: function() {
location.href = "/api/planner/";
},
},{
icon: "📊",
title: "Estadístiques de trucades",
action: function() {
location.href = scriptLauncherBase + "/runner/statshistory";
},
},{
icon: "📢",
title: "En Tomàtic diu...",
action: function() {
location.href = scriptLauncherBase + "/runner/says";
},
},{
title: "Reomple el torn que toca a la cua",
icon: "🔄",
title: "Restableix el torn a la cua",
action: function() {
location.href = scriptLauncherBase + "/runner/reloadqueue";
},
},{
icon: "🏷️",
title: "Anotacions: Actualitza categories",
action: function() {
CallInfoPage.settingsDialog()
},
},{
icon: "🚀",
title: "Altres scripts de Centraleta",
action: function() {
location.href = scriptLauncherBase;
},
},{
icon: "😎",
title: "Kumato mode",
action: function() {
Tomatic.toggleKumato()
},
},{
icon: "🛟",
navigation: true,
title: "Guies d'usuaria i videos",
action: function() {
const url = 'https://github.com/Som-Energia/somenergia-tomatic/blob/master/doc/userguide.md';
window.open(url, '_blank');
},
}]};

const toolbarRow = function(title) {
Expand Down

0 comments on commit 650186e

Please sign in to comment.