Repos / pytaku / fef0847f53
commit fef0847f5376ad85d2f0f62ee10871ad99c7f4f4
Author: Bùi Thành Nhân <hi@imnhan.com>
Date:   Mon Aug 24 19:27:57 2020 +0700

    consistent read icon
    
    Also using icon font is safer than direct unicode char, which isn't
    guaranteed to render correctly on all devices.

diff --git a/pyproject.toml b/pyproject.toml
index 5e59ea2..06bc4d0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "pytaku"
-version = "0.3.3"
+version = "0.3.4"
 description = ""
 authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
 license = "AGPL-3.0-only"
diff --git a/src/pytaku/static/js/routes/title.js b/src/pytaku/static/js/routes/title.js
index c5a368e..bd865ff 100644
--- a/src/pytaku/static/js/routes/title.js
+++ b/src/pytaku/static/js/routes/title.js
@@ -82,13 +82,13 @@ function Title(initialVNode) {
                         },
                       }),
                       m(Button, {
-                        icon: "eye",
+                        icon: "check-square",
                         disabled:
                           isMarkingAllAsRead || allAreRead ? "disabled" : null,
                         text: isMarkingAllAsRead
                           ? "submitting..."
                           : allAreRead
-                          ? "no new chapters"
+                          ? "all read!"
                           : "read all",
                         color: "green",
                         title: allAreRead
diff --git a/src/pytaku/static/js/utils.js b/src/pytaku/static/js/utils.js
index dd428a2..db9fd9e 100644
--- a/src/pytaku/static/js/utils.js
+++ b/src/pytaku/static/js/utils.js
@@ -16,7 +16,7 @@ const Button = {
 
 const Chapter = {
   view: (vnode) =>
-    m("div.utils--chapter" + (vnode.attrs.chapter.is_read ? " read" : ""), [
+    m("div.utils--chapter", [
       m(
         m.route.Link,
         {
@@ -24,6 +24,9 @@ const Chapter = {
           class: "touch-friendly",
         },
         [
+          vnode.attrs.chapter.is_read
+            ? m("i.icon.icon-check-square.utils--chapter--read-icon")
+            : null,
           m("span", fullChapterName(vnode.attrs.chapter)),
           vnode.attrs.chapter.groups.map((group) =>
             m("span.utils--chapter--group", truncate(group, 20))
diff --git a/src/pytaku/static/spa.css b/src/pytaku/static/spa.css
index f2bebf5..358858b 100644
--- a/src/pytaku/static/spa.css
+++ b/src/pytaku/static/spa.css
@@ -346,3 +346,6 @@ .utils--chapter--group {
   border: 1px solid #aaa;
   background-color: #eee;
 }
+.utils--chapter--read-icon {
+  color: green;
+}