From 768b47985d5eed338abfbb3a45ce80083c0021c0 Mon Sep 17 00:00:00 2001 From: ixv Date: Wed, 26 May 2021 12:18:45 -0700 Subject: [PATCH] btc: change tile to svg --- pkg/arvo/app/btc-wallet.hoon | 2 +- pkg/arvo/app/btc-wallet/img/tile.png | Bin 1326 -> 0 bytes pkg/arvo/app/btc-wallet/img/tile.svg | 4 ++++ pkg/arvo/app/file-server.hoon | 1 + pkg/arvo/lib/server.hoon | 7 +++++++ pkg/arvo/mar/svg.hoon | 12 ++++++++++++ 6 files changed, 25 insertions(+), 1 deletion(-) delete mode 100644 pkg/arvo/app/btc-wallet/img/tile.png create mode 100644 pkg/arvo/app/btc-wallet/img/tile.svg create mode 100644 pkg/arvo/mar/svg.hoon diff --git a/pkg/arvo/app/btc-wallet.hoon b/pkg/arvo/app/btc-wallet.hoon index d2c061071..77bcfcecc 100644 --- a/pkg/arvo/app/btc-wallet.hoon +++ b/pkg/arvo/app/btc-wallet.hoon @@ -58,7 +58,7 @@ :- %launch-action !> :+ %add %btc-wallet - [[%custom `'/~btc' `'/~btc/img/tile.png'] %.y] + [[%custom `'/~btc' `'/~btc/img/tile.svg'] %.y] =/ warning [%settings-event !>([%put-entry %btc-wallet %warning %b %.y])] =/ currency [%settings-event !>([%put-entry %btc-wallet %currency %s 'USD'])] diff --git a/pkg/arvo/app/btc-wallet/img/tile.png b/pkg/arvo/app/btc-wallet/img/tile.png deleted file mode 100644 index 7f214414bb0df45de8baf3b78c941ebb8b6ca074..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1326 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSoCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB?qN?C$B+ufx3g>ugxw|D?gwWq=$yHvrA4Gs zXeD=MPTMq|LT9f9r)C_hxb!rgXY!VV7ZO%%@Xpx4zMZFxxn!ERbEBljPeI-gg>QSW zE|kxyDerhxaX;O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@ + + + + diff --git a/pkg/arvo/app/file-server.hoon b/pkg/arvo/app/file-server.hoon index 2e1ba7c9d..f2b910f44 100644 --- a/pkg/arvo/app/file-server.hoon +++ b/pkg/arvo/app/file-server.hoon @@ -225,6 +225,7 @@ [~ %js] (js-response:gen file) [~ %css] (css-response:gen file) [~ %png] (png-response:gen file) + [~ %svg] (svg-response:gen file) [~ %ico] (ico-response:gen file) :: [~ %html] diff --git a/pkg/arvo/lib/server.hoon b/pkg/arvo/lib/server.hoon index 52f218030..431b5db8a 100644 --- a/pkg/arvo/lib/server.hoon +++ b/pkg/arvo/lib/server.hoon @@ -106,6 +106,13 @@ ^- simple-payload:http :_ `octs [200 [['content-type' 'image/png'] ?:(cache [max-1-wk ~] ~)]] + :: + ++ svg-response + =| cache=? + |= =octs + ^- simple-payload:http + :_ `octs + [200 [['content-type' 'image/svg+xml'] ?:(cache [max-1-wk ~] ~)]] :: ++ ico-response |= =octs diff --git a/pkg/arvo/mar/svg.hoon b/pkg/arvo/mar/svg.hoon new file mode 100644 index 000000000..2911e4900 --- /dev/null +++ b/pkg/arvo/mar/svg.hoon @@ -0,0 +1,12 @@ +|_ dat=@ +++ grow + |% + ++ mime [/image/'svg+xml' (as-octs:mimes:html dat)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + ++ noun @ + -- +++ grad %mime +--