diff --git a/src/main/frontend/components/block.cljs b/src/main/frontend/components/block.cljs index 12ef3900c..a94f4248a 100644 --- a/src/main/frontend/components/block.cljs +++ b/src/main/frontend/components/block.cljs @@ -438,10 +438,6 @@ :on-click share-fn} title]))))) -(defn ar-url->http-url - [href] - (string/replace href #"^ar://" (str (state/get-arweave-gateway) "/"))) - ;; TODO: safe encoding asciis ;; TODO: image link to another link (defn image-link [config url href label metadata full_text] @@ -460,9 +456,6 @@ (util/starts-with? href "http") href - (util/starts-with? href "ar") - (ar-url->http-url href) - config/publishing? (subs href 1) @@ -1172,9 +1165,6 @@ (util/starts-with? href "http") href - (util/starts-with? href "ar") - (ar-url->http-url href) - config/publishing? (subs href 1) @@ -1370,16 +1360,6 @@ (show-link? config metadata href full_text) (media-link config url href label metadata full_text) - (= protocol "ar") - (->elem - :a.external-link - (cond-> - {:href (ar-url->http-url href) - :target "_blank"} - title - (assoc :title title)) - (map-inline config label)) - :else (->elem :a.external-link diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 2767ef40e..e7b0eb7a1 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -1481,23 +1481,27 @@ matched-alias])) (p/catch #(js/console.error "Debug: Copy Asset Error#" %)))) - (p/do! (js/console.debug "Debug: Writing Asset #" dir file-rpath) - (cond - (mobile-util/native-platform?) + (-> + (p/do! (js/console.debug "Debug: Writing Asset #" dir file-rpath) + (cond + (mobile-util/native-platform?) ;; capacitor fs accepts Blob, File implements Blob - (p/let [buffer (.arrayBuffer file) - content (base64/encodeByteArray (js/Uint8Array. buffer)) - fpath (path/path-join dir file-rpath)] - (capacitor-fs/