Browse Source

add time wrapper for scheduled/deadline

GoldinGuy 4 years ago
parent
commit
7282c15ee1
3 changed files with 11 additions and 9 deletions
  1. 4 4
      src/main/frontend/components/block.cljs
  2. 1 1
      src/main/frontend/handler/repeated.cljs
  3. 6 4
      yarn.lock

+ 4 - 4
src/main/frontend/components/block.cljs

@@ -350,8 +350,7 @@
     [:span.timestamp (cond-> {:active (str active)}
                        class
                        (assoc :class class))
-     prefix
-     (timestamp-to-string t)]))
+     prefix (timestamp-to-string t)]))
 
 (defn range [{:keys [start stop]} stopped?]
   [:div {:class "timestamp-range"
@@ -1695,8 +1694,9 @@
                         (state/set-editor-show-date-picker! true)
                         (state/set-timestamp-block! {:block block
                                                      :typ typ
-                                                     :show? show?}))))}
-       (repeated/timestamp->text ast)]]
+                                                     :show? show?}))))} 
+        [:span.time-start "<"] [:time (repeated/timestamp->text ast)] [:span.time-stop ">"]
+        ]]
      (when (true? @show?)
        (let [ts (repeated/timestamp->map ast)]
          [:div.my-4

+ 1 - 1
src/main/frontend/handler/repeated.cljs

@@ -59,7 +59,7 @@
                                 ""
                                 (str " " repeater)))
                          repeater)]
-     (util/format "<%s%s>"
+     (util/format "%s%s"
                   (tf/unparse custom-formatter start-time)
                   (if (string/blank? time-repeater)
                     ""

+ 6 - 4
yarn.lock

@@ -6382,10 +6382,10 @@ mkdirp@^1.0.3:
   resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
   integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
 
[email protected].2:
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-1.1.2.tgz#075d431614f010337b043cdd44762098656b21b4"
-  integrity sha512-d669JnfvcalPP6XbDXb7A8cHbbnuhkUkOJ+cihzm20Gt8669L+bfEwwBscryhxwNARIXvibm0NVh4LYTfAlzjw==
[email protected].3:
+  version "1.1.3"
+  resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-1.1.3.tgz#283e1b4f671a6c39e7697000d05c4ef50f5528ba"
+  integrity sha512-BnMjdfoZbPsgTM1MiSSkJE+4K5yBXNzNFkrLPQeERjXXbSwb9jAEMCdIJJL5c1boDMIkMdUW7Pr1xFwQaTBvGQ==
   dependencies:
     yargs "^12.0.2"
 
@@ -7866,6 +7866,8 @@ react-icons@^2.2.7:
   version "2.2.7"
   resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-2.2.7.tgz#d7860826b258557510dac10680abea5ca23cf650"
   integrity sha512-0n4lcGqzJFcIQLoQytLdJCE0DKSA9dkwEZRYoGrIDJZFvIT6Hbajx5mv9geqhqFiNjUgtxg8kPyDfjlhymbGFg==
+  dependencies:
+    react-icon-base "2.1.0"
 
 react-is@^16.3.1, react-is@^16.8.1:
   version "16.13.1"