Commit cad089db authored by ransome1's avatar ransome1
Browse files

Wrapping up, bumped version to 1.2.2

parent 75fedbd4
{
"name": "sleek",
"productName": "sleek",
"version": "1.2.2-rc.4",
"version": "1.2.2",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"category": "ProjectManagement",
......@@ -19,7 +19,7 @@
"main": "src/main.js",
"buildResources": "src",
"build": {
"buildVersion": "19",
"buildVersion": "20",
"files": [
"!flatpak-node${/*}",
"!snap${/*}",
......
......@@ -503,7 +503,7 @@
</td>
</tr>
</table>
<table id="getPageTitlesRow" class="settings">
<!-- <table id="getPageTitlesRow" class="settings">
<tr>
<th colspan="100%" id="getPageTitlesHeadline">Replace links with website titles</th>
</tr>
......@@ -518,7 +518,7 @@
</span>
</td>
</tr>
</table>
</table> -->
<table class="settings">
<tr>
<th colspan="100%" id="zoomHeadline"></th>
......
......@@ -52,8 +52,8 @@ function fillDatePickerInput(todo) {
// if it's still empty fill it with placeholder text
if(datePickerResult.innerHTML === "") datePickerResult.innerHTML = translations.formSelectDueDate;
// if a due date is set, the recurrence picker will be shown);
modalFormInput.value = todo.toString();
// write date into input element
//modalFormInput.value = todo.toString();
// put focus on input field
modalFormInput.focus();
......@@ -91,6 +91,8 @@ async function createDatepickerInstance(attachToElement, addDateToElement, exten
} else {
modalFormInput.value = todo.toString();
fillDatePickerInput(todo);
// resize the due date input field after date was added
......
......@@ -22,7 +22,6 @@ const todoContext = document.getElementById("todoContext");
btnSave.innerHTML = translations.save;
btnCancel.innerHTML = translations.cancel;
//datePickerInput.placeholder = translations.formSelectDueDate;
datePickerResult.innerHTML = translations.formSelectDueDate;
btnItemStatus.onclick = async function() {
......@@ -487,7 +486,7 @@ async function show(todo, templated) {
if(todo.rec) setInput(todo.rec)
// if so we paste it into the input field
//if(todo.due || todo.t) fillDatePickerInput(todo)
if(todo.due || todo.t) fillDatePickerInput(todo)
}
// resize all necessary input elements
......
......@@ -88,10 +88,6 @@ function getAndsetPageTitle(linkId, href) {
async function generateTodoTxtObjects(fileContent) {
try {
// create todo.txt objects
//if(fileContent !== undefined) items.objects = await TodoTxt.parse(fileContent, [ new SugarDueExtension(), new HiddenExtension(), new RecExtension(), new ThresholdExtension(), new PriExtension() ])
if(fileContent !== undefined) {
items.objects = new Array;
......@@ -101,7 +97,6 @@ async function generateTodoTxtObjects(fileContent) {
let l = todoArray.length;
for(let i = 0; i < l; i++) {
const todoObject = await generateTodoTxtObject(todoArray[i]);
//todoObject.raw = todoArray[i];
// push objects into array
items.objects.push(todoObject);
}
......@@ -336,7 +331,6 @@ function generateTableRow(todo) {
if(todo.complete) todoTableBodyRow.setAttribute("class", "todo completed")
// add todo string to data-item attribute
//todoTableBodyRow.setAttribute("data-item", todo.toString());
todoTableBodyRow.setAttribute("data-item", todo.raw);
// add the priority marker or a white spacer
......@@ -762,7 +756,7 @@ async function setTodoComplete(todo) {
if(typeof todo === "string") todo = await generateTodoTxtObject(todo)
// get index of todo
const index = await items.objects.map(function(item) {return item.toString(); }).indexOf(todo.toString());
const index = await items.objects.map(function(item) {return item.raw; }).indexOf(todo.raw);
// mark item as in progress
if(todo.complete) {
......@@ -887,10 +881,6 @@ async function archiveTodos() {
completeTodos = completeTodos.filter(function(element) { return element });
}
console.log(incompleteTodos);
return false;
//write completed items to done file
window.api.send("replaceFileContent", [completeTodos.join("\n").toString(), doneFile]);
......
......@@ -85,6 +85,7 @@ function getContent(file) {
return Promise.resolve(fs.readFileSync(file, {encoding: "utf-8"}, function(error, data) {
if(process.mas) stopAccessingSecurityScopedResource()
return data;
}));
......@@ -482,7 +483,11 @@ function configureWindowEvents() {
// building string to write in file
// when file is defined, but no index, it will be an archiving operation
const contentToWrite = fileAsArray.join("\n");
// remove empty elements from array
const fileAsArrayCleanedUp = fileAsArray.filter(function (obj) { return !["", null, undefined].includes(obj) })
const contentToWrite = fileAsArrayCleanedUp.join("\n");
// only for MAS (Sandboxed)
// https://gist.github.com/ngehlert/74d5a26990811eed59c635e49134d669
......
This is a test todo that needs to be cleaned up
\ No newline at end of file
......@@ -202,7 +202,8 @@ test.describe("Creating todos", () => {
"y": 10
}
});
await page.locator(":nth-match(#todoContext .dropdown-item, 5)").click();
const deleteButton = await page.locator(":nth-match(#todoContext .dropdown-item, 5)");
await deleteButton.click();
await page.waitForSelector("#btnAddTodoContainer");
});
......
......@@ -72,9 +72,9 @@
integrity sha512-CNR7qRIfCwWHNN7FnKUniva94edPdyQzil/zCwk3v6k4R6rR2Fr8i4s3PM7n/lyfPA6Zfko9z5WDzFxG9SW1uQ==
"@humanwhocodes/config-array@^0.10.5":
version "0.10.6"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.6.tgz#70b53559baf544dc2cc5eea6082bf90467ccb1dc"
integrity sha512-U/piU+VwXZsIgwnl+N+nRK12jCpHdc3s0UAc6zc1+HUgiESJxClpvYao/x9JwaN7onNeVb7kTlxlAvuEoaJ3ig==
version "0.10.7"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.7.tgz#6d53769fd0c222767e6452e8ebda825c22e9f0dc"
integrity sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==
dependencies:
"@humanwhocodes/object-schema" "^1.2.1"
debug "^4.1.1"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment