diff --git a/public/index.html b/public/index.html
index e87f052..5742287 100644
--- a/public/index.html
+++ b/public/index.html
@@ -230,6 +230,7 @@
margin-top: 16px;
height: 320px;
display: flex;
+ align-items: flex-start;
max-width: 100%;
overflow: auto;
}
diff --git a/src/computersandblues/lodestone/app.cljs b/src/computersandblues/lodestone/app.cljs
index b91fc8c..1671a3c 100644
--- a/src/computersandblues/lodestone/app.cljs
+++ b/src/computersandblues/lodestone/app.cljs
@@ -134,7 +134,9 @@
:redirect_uri (:redirect_uri application)}))})
(.then (fn [res]
(let [bearer-token (-> res :body :access_token)
- application (assoc application :bearer_token bearer-token)]
+ application (assoc application :bearer_token bearer-token)
+ path (-> js/location .-pathname)]
+ (.replaceState js/history nil "" path) ; remove ?code= param
(db/put! ::db/application application)
application)))))
@@ -356,9 +358,12 @@
"video" [:video {:controls true}
[:source {:type (str "video/" ext) :src remote-url}]
[:a {:href (:remote_url attachment)} (str "Original video at " (:remote_url attachment))]]
- "gifv" [:video {:loop true :autoplay true :muted true}
- [:source {:type (str "video/" ext) :src remote-url}]
- [:a {:href (:remote_url attachment)} (str "Original video at " (:remote_url attachment))]]
+ "gifv" (let [autoplay (r/atom false)
+ toggle-autoplay #(swap! autoplay not)]
+ (fn []
+ [:video {:loop true :autoplay @autoplay :muted true :on-pointer-enter toggle-autoplay}
+ [:source {:type (str "video/" ext) :src remote-url}]
+ [:a {:href (:remote_url attachment)} (str "Original video at " (:remote_url attachment))]]))
[:div [:strong "Unsupported attachment"]
[debug attachment]])))