diff --git a/Taskido/view.js b/Taskido/view.js index 2ff8c7d..52abf02 100644 --- a/Taskido/view.js +++ b/Taskido/view.js @@ -1,4 +1,4 @@ -let {pages, inbox, select, taskOrder, taskFiles, globalTaskFilter, dailyNoteFolder, dailyNoteFormat, done, sort, carryForwardOverdue, carryForwardUnplanned, carryForwardStars, dateFormat, options} = input; +let {pages, inbox, select, taskOrder, taskFiles, globalTaskFilter, dailyNoteFolder, dailyNoteFormat, done, sort, css, carryForwardOverdue, carryForwardUnplanned, carryForwardStars, dateFormat, options} = input; // Error Handling if (!pages && pages!="") { dv.span('> [!ERROR] Missing pages parameter\n> \n> Please set the pages parameter like\n> \n> `pages: ""`'); return false }; @@ -23,6 +23,7 @@ var dailyNoteRegEx = momentToRegex(dailyNoteFormat); // Set Root const rootNode = dv.el("div", "", {cls: "taskido "+options, attr: {id: "taskido"+tid}}); +if (css) { var style = document.createElement("style"); style.innerHTML = css; rootNode.querySelector("span").append(style) }; // Icons var doneIcon = ''; @@ -38,6 +39,7 @@ var tagIcon = ' " + header}; var link = item.link.path.replace("'", "'"); var text = item.text; var posEndLine = item.position.start.line; @@ -581,6 +585,8 @@ function getTimeline(tasks) { info += "" + forwardIcon + "" + item.relative + ""; }; + info += "" + fileIcon + "" + file + ""; + if (item.priorityLabel) { info += "" + priorityIcon + "" + item.priorityLabel + ""; }; @@ -600,7 +606,7 @@ function getTimeline(tasks) { text = text.replace(tag, ""); }); - var task = "" + eval(cls+"Icon") + "" + file + "" + info + "" + text + ""; + var task = "" + eval(cls+"Icon") + "" + file + "" + info + "" + text + ""; content += task; }); @@ -622,4 +628,4 @@ function getTimeline(tasks) { yearNode.setAttribute("data-types", containedTypesPerYear); }; -}; + };