Compare commits

...

2 Commits

  1. 33
      Makefile
  2. 20
      pages/index.html

33
Makefile

@ -9,6 +9,39 @@ all:
portable: clean all portable: clean all
cd bin/ && cp ../COPYING . && cp ../README.md . && zip -r dela.zip * && mv dela.zip .. cd bin/ && cp ../COPYING . && cp ../README.md . && zip -r dela.zip * && mv dela.zip ..
cross: clean
mkdir -p bin
mkdir -p bin/dela_linux_x64
mkdir -p bin/dela_linux_x32
mkdir -p bin/dela_windows_x64
mkdir -p bin/dela_windows_arm64
mkdir -p bin/dela_darwin_x64
mkdir -p bin/dela_darwin_arm64
mkdir -p bin/dela_freebsd_x64
mkdir -p bin/dela_freebsd_arm64
cd src && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build && mv dela ../bin/dela_linux_x64
cd src && CGO_ENABLED=0 GOOS=linux GOARCH=386 go build && mv dela ../bin/dela_linux_x32
cd src && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build && mv dela.exe ../bin/dela_windows_x64
cd src && CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build && mv dela.exe ../bin/dela_windows_arm64
cd src && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build && mv dela ../bin/dela_darwin_x64
cd src && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build && mv dela ../bin/dela_darwin_arm64
cd src && CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 go build && mv dela ../bin/dela_freebsd_x64
cd src && CGO_ENABLED=0 GOOS=openbsd GOARCH=arm64 go build && mv dela ../bin/dela_freebsd_arm64
mkdir -p bin/includes
cp -r pages bin/includes
cp -r scripts bin/includes
cp -r static bin/includes
cp COPYING bin/includes
cp LICENSE* bin/includes
cp README.md bin/includes
clean: clean:
rm -rf bin rm -rf bin

20
pages/index.html

@ -46,21 +46,13 @@ async function displayTodos(showDone) {
// Display // Display
let timeCreated = new Date(item.timeCreatedUnix * 1000); let timeCreated = new Date(item.timeCreatedUnix * 1000);
if (item.completionTimeUnix != 0) { let timeDone = new Date(item.completionTimeUnix * 1000);
let timeDone = new Date(item.completionTimeUnix * 1000); todosDiv.innerHTML += "<tr><td>" + item.text + "</td>" +
"<td>" + " " + timeCreated.getDate() + "/" + (timeCreated.getMonth() + 1) + "/" + timeCreated.getFullYear() + " | " +
timeDone.getDate() + "/" + (timeDone.getMonth() + 1) + "/" + timeDone.getFullYear() + "</td>" +
"<td>" + "<button class='btn btn-danger' id='" +
todoDeleteBtnID + "'><img src='/static/images/trash3-fill.svg'></button></td></tr>";
todosDiv.innerHTML += "<tr><td>" + item.text + "</td>" +
"<td>" + " " + timeCreated.getDate() + "/" + (timeCreated.getMonth() + 1) + "/" + timeCreated.getFullYear() + "</td>" +
"<td>" + " " + timeDone.getDate() + "/" + (timeDone.getMonth() + 1) + "/" + timeDone.getFullYear() + "</td>" +
"<td>" + "<button class='btn btn-danger' id='" +
todoDeleteBtnID + "'><img src='/static/images/trash3-fill.svg'></button></td></tr>";
} else {
todosDiv.innerHTML += "<tr><td>" + item.text + "</td>" +
"<td>" + " " + timeCreated.getDate() + "/" + (timeCreated.getMonth() + 1) + "/" + timeCreated.getFullYear() + "</td>" +
"<td></td>" +
"<td>" + "<button class='btn btn-danger' id='" +
todoDeleteBtnID + "'><img src='/static/images/trash3-fill.svg'></button></td></tr>";
}
todosDisplayed.push({item: item, buttonDel: todoDeleteBtnID}); todosDisplayed.push({item: item, buttonDel: todoDeleteBtnID});

Loading…
Cancel
Save