Skip to content

Commit

Permalink
Merge pull request #12 from Sav22999/new-release
Browse files Browse the repository at this point in the history
2.1.1
  • Loading branch information
Sav22999 authored Oct 8, 2023
2 parents 768e285 + 30fcac8 commit e9de7bc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ You can open an issue and there you must describe the feedback, the bug or the n

See folder <code>screenshots</code> to see screenshots also of the older versions.

<img src=screenshots/2.0/1.png" width="400px"></img><img src="screenshots/2.0/2.png" width="400px"></img><img src="screenshots/2.0/3.png" width="400px"></img>
<img src="screenshots/2.1/1.png" width="400px"></img><img src="screenshots/2.1/2.png" width="400px"></img><img src="screenshots/2.1/3.png" width="400px"></img>
20 changes: 18 additions & 2 deletions js/all-websites.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ function loadAllWebsites(clear = true, load_all_websites = true, apply_filter =
let websites_to_use = getWebsitesToUse(websites_json);

//console.log(websites_to_use)
websites_to_use = sortByColumn("website", websites_to_use, false, false);
if (apply_filter) {
//websites_to_use = sortByColumn("website", websites_to_use, false, false);
}
showWebsitesTable(websites_to_use, apply_filter);

} else {
Expand Down Expand Up @@ -418,7 +420,11 @@ function getTHeadTable(websites, last_seven_days) {
tableHeaderElement.textContent = "Website";
tableHeaderElement.id = "th-website";
tableHeaderElement.classList.add("th-sort-by-column");
if (sorted_by === "" || sorted_by === "website-asc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-asc");
if (sorted_by === "" || sorted_by === "website-asc") {
tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-asc");
sorted_by = "website-asc";
}
if (sorted_by === "website-desc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-desc");
tableHeaderElement.onclick = function () {
websites = sortByColumn("website", websites);
}
Expand All @@ -428,6 +434,8 @@ function getTHeadTable(websites, last_seven_days) {
tableHeaderElement.textContent = "Status";
tableHeaderElement.id = "th-status";
tableHeaderElement.classList.add("th-sort-by-column");
if (sorted_by === "status-asc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-asc");
if (sorted_by === "status-desc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-desc");
tableHeaderElement.onclick = function () {
websites = sortByColumn("status", websites);
}
Expand All @@ -437,6 +445,8 @@ function getTHeadTable(websites, last_seven_days) {
tableHeaderElement.textContent = "Category";
tableHeaderElement.id = "th-category";
tableHeaderElement.classList.add("th-sort-by-column");
if (sorted_by === "category-asc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-asc");
if (sorted_by === "category-desc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-desc");
tableHeaderElement.onclick = function () {
websites = sortByColumn("category", websites);
}
Expand All @@ -446,6 +456,8 @@ function getTHeadTable(websites, last_seven_days) {
tableHeaderElement.textContent = "Since install";
tableHeaderElement.id = "th-since-install";
tableHeaderElement.classList.add("th-sort-by-column");
if (sorted_by === "since-install-asc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-asc");
if (sorted_by === "since-install-desc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-desc");
tableHeaderElement.onclick = function () {
websites = sortByColumn("since-install", websites);
}
Expand All @@ -457,6 +469,8 @@ function getTHeadTable(websites, last_seven_days) {
tableHeaderElement.textContent = date_to_show;
tableHeaderElement.id = "th-date-" + date;
tableHeaderElement.classList.add("th-sort-by-column");
if (sorted_by === "th-date-" + date + "-asc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-asc");
if (sorted_by === "th-date-" + date + "-desc") tableHeaderElement.classList.add("th-sort-by-column-sel", "sort-by-column-desc");
tableHeaderElement.onclick = function () {
websites = sortByColumn("date-" + date, websites);
}
Expand Down Expand Up @@ -593,6 +607,8 @@ function showWebsitesTable(websites, apply_filter = true) {
let tableTHeadElement = getTHeadTable(websites, getLastSevenDays());
tableElement.append(tableTHeadElement);

websites = sortByColumn(sorted_by.replace("-asc", "").replace("-desc", ""), websites, false, false);

let tableTBodyElement = getTBodyTable(websites, getLastSevenDays());
tableElement.append(tableTBodyElement);

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Limite",
"version": "2.1",
"version": "2.1.1",
"author": "Saverio Morelli (Sav22999)",
"description": "Check how much time you spend on each website every day.\nOptimise your productivity, your time and your life as well.\nDon't lose precious time!",
"icons": {
Expand Down
Binary file modified screenshots/2.1/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/2.1/2.xcf
Binary file not shown.

0 comments on commit e9de7bc

Please sign in to comment.