@@ -752,14 +740,6 @@ async function copyInvoice () {
}
}
- .action-button {
- background: var(--bold-a);
- color: white;
- padding: 0.5em 2em;
- margin: 1em 2em 0.5em;
- font-size: 1.1em;
- }
-
.invoice-area {
display: flex;
flex-direction: row;
diff --git a/client/src/components/LightningOverlay.svelte b/client/src/components/LightningOverlay.svelte
deleted file mode 100644
index afddc5c..0000000
--- a/client/src/components/LightningOverlay.svelte
+++ /dev/null
@@ -1,359 +0,0 @@
-
-
-
-
-
diff --git a/client/src/components/Mononaut.svelte b/client/src/components/Mononaut.svelte
index 68389c5..f1108ad 100644
--- a/client/src/components/Mononaut.svelte
+++ b/client/src/components/Mononaut.svelte
@@ -13,6 +13,19 @@
padding-bottom: 100%;
}
+.mononaut .backdrop {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: black;
+ border-radius: 50%;
+ overflow: hidden;
+}
+
.mononaut .inner {
position: absolute;
top: 0;
@@ -25,7 +38,6 @@
justify-content: center;
align-items: center;
- border-radius: 50%;
background: linear-gradient(45deg, darkviolet, transparent 100%);
}
@@ -93,148 +105,150 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+ id="ear-right"
+ d="m 35.094888,56.21721 c -6.89655,2.534431 -14.53992,-2.389386 -17.231469,-4.852391 1.23186,-3.401999 4.604949,-5.92599 8.722879,-7.236581 1.66704,-0.53056 3.45615,-0.862263 5.27469,-0.97286 9.17189,1.090452 10.68783,11.787228 3.2339,13.0061832 z"
+ style="display:inline;opacity:1;fill:#deaa87;stroke:none;stroke-width:0.21957469px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ id="head"
+ d="m 30.308872,23.862935 c -7.896397,9.705521 -12.701615,16.830049 -7.269507,28.957925 4.3062,9.614141 -0.284703,11.721588 5.683872,18.251035 5.45108,5.55247 10.178022,5.892849 13.988071,13.594771 11.299136,14.269193 22.409786,3.337588 26.080359,-5.85863 C 81.867477,56.071791 88.32321,34.989715 70.681545,21.166667 55.190177,12.328814 46.139739,12.585053 30.308872,23.862935 Z"
+ style="display:inline;fill:#784421;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+
+
+
+
-
-
+ id="face"
+ d="m 38.742559,49.51488 c 1.45629,-4.066862 6.298841,-7.992738 12.284225,-6.992558 15.425741,4.293009 4.803701,19.409911 -2.976563,18.473584 18.639296,3.573862 22.324617,26.346482 6.174076,27.17782 -12.717835,0.34267 -8.581608,-9.318628 -16.409445,-12.0269 -5.597227,-1.936527 -2.05593,-13.668839 -2.663067,-12.26885 -6.589222,8.759543 -12.047332,-0.849447 -11.528273,-9.921875 1.774561,-2.871137 4.819803,-3.699497 8.882439,-1.039433 4.789983,2.254962 5.346565,-0.781825 6.236608,-3.401788 z"
+ style="display:inline;fill:#deaa87;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ id="muzzle"
+ d="M 60.072997,75.352317 C 55.003352,70.027191 55.75107,68.927121 53.34848,66.485233 51.841457,64.88184 47.05277,62.630654 42.069361,63.849024 c -1.699146,0.415416 -4.449014,1.385616 -6.199235,3.299959 -1.682918,1.84073 -1.025774,7.464219 2.777696,9.202331 3.896358,1.78056 4.087632,2.791893 5.88943,6.981181 3.630032,8.440037 20.554285,1.586752 15.535745,-7.980178 z"
+ style="display:inline;fill:#502d16;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ id="face-inner"
+ d="m 38.957003,52.607487 c 1.042028,-2.641197 2.728748,-4.7652 10.223515,-5.17104 7.241178,0.814991 8.551291,5.869414 4.817338,8.574224 -3.147594,3.346452 -6.33337,3.393592 -8.935703,2.930689 -3.51048,-0.180022 -6.925621,-0.202977 -8.446902,2.89418 -5.220943,5.911145 -10.282881,0.05394 -10.31162,-5.662332 1.650862,-1.605418 3.81304,-2.437929 7.455186,-1.033305 4.247946,1.104042 4.568382,-0.833998 5.198186,-2.532416 z"
+ style="display:inline;fill:#e9c6af;stroke:none;stroke-width:0.19504021px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/client/src/components/Overlay.svelte b/client/src/components/Overlay.svelte
index 8080706..e9ced62 100644
--- a/client/src/components/Overlay.svelte
+++ b/client/src/components/Overlay.svelte
@@ -8,7 +8,7 @@ import { fade, fly } from 'svelte/transition'
const dispatch = createEventDispatcher()
export let name = 'none'
-export let fullHeight = false
+export let fullSize = false
let open
$: {
@@ -89,10 +89,12 @@ function close () {
max-width: 95%;
}
- &.full-height {
+ &.full-size {
height: 100%;
+ width: 100%;
.overlay-inner {
height: 100%;
+ width: 100%;
}
}
}
@@ -102,7 +104,7 @@ function close () {
{#if open}
-
+
diff --git a/client/src/components/Settings.svelte b/client/src/components/Settings.svelte
index 51a8905..c891fee 100644
--- a/client/src/components/Settings.svelte
+++ b/client/src/components/Settings.svelte
@@ -18,8 +18,8 @@ let settingConfig = {
showFPS: {
label: 'FPS'
},
- showDonation: {
- label: 'Donation Info'
+ showMessages: {
+ label: 'Message Bar'
},
vbytes: {
label: 'Size by',
diff --git a/client/src/components/Sidebar.svelte b/client/src/components/Sidebar.svelte
index 7d44fcf..1077c9f 100644
--- a/client/src/components/Sidebar.svelte
+++ b/client/src/components/Sidebar.svelte
@@ -13,6 +13,7 @@ import questionIcon from '../assets/icon/help-circle.svg'
import infoIcon from '../assets/icon/info.svg'
import atIcon from '../assets/icon/cil-at.svg'
import gridIcon from '../assets/icon/grid-icon.svg'
+import peopleIcon from '../assets/icon/cil-people.svg'
import MempoolLegend from '../components/MempoolLegend.svelte'
import ContactTab from '../components/ContactTab.svelte'
@@ -35,6 +36,10 @@ function openAbout () {
$overlay = 'about'
}
+function openSupporters () {
+ $overlay = 'supporters'
+}
+
function showBlock () {
analytics.trackEvent('viz', 'block', 'show')
$blockVisible = true
@@ -83,6 +88,11 @@ function showBlock () {
+
+
+
+
+
{#if config.dev && config.debug}
{settings('dev')}} tooltip="Debug">
diff --git a/client/src/components/SupportersOverlay.svelte b/client/src/components/SupportersOverlay.svelte
new file mode 100644
index 0000000..81402ff
--- /dev/null
+++ b/client/src/components/SupportersOverlay.svelte
@@ -0,0 +1,126 @@
+
+
+
+
+ Our Supporters
+
+ Bitfeed is only possible thanks to the generosity of our supporters:
+
+ {#if $sponsors && $sponsors.length}
+
+
Enterprise Sponsors
+
+
+ { $overlay = 'donation' }}>
+ Become a Sponsor!
+
+ {/if}
+ {#if $heroes && displayHeroes.length}
+
+ { $overlay = 'donation' }}>
+ Become a Community Hero!
+
+ {/if}
+
+
+
+
diff --git a/client/src/components/TxViz.svelte b/client/src/components/TxViz.svelte
index 8340d2d..0c14e1c 100644
--- a/client/src/components/TxViz.svelte
+++ b/client/src/components/TxViz.svelte
@@ -10,7 +10,8 @@
import Sidebar from '../components/Sidebar.svelte'
import AboutOverlay from '../components/AboutOverlay.svelte'
import DonationOverlay from '../components/DonationOverlay.svelte'
- import DonationBar from '../components/DonationBar.svelte'
+ import SupportersOverlay from '../components/SupportersOverlay.svelte'
+ import Alerts from '../components/alert/Alerts.svelte'
import { integerFormat } from '../utils/format.js'
import { exchangeRates, localCurrency, lastBlockId } from '../stores.js'
import { formatCurrency } from '../utils/fx.js'
@@ -69,7 +70,7 @@
$devEvents.addManyCallback = fakeTxs
$devEvents.addBlockCallback = fakeBlock
- if (!$settings.showDonation) $settings.showDonation = true
+ if (!$settings.showMessages) $settings.showMessages = true
})
function resize () {
@@ -437,17 +438,18 @@
{/if}
- {#if $settings.showDonation }
-
- {/if}
+ {#if $settings.showMessages }
+
+ {/if}
- {#if config.lightningEnabled }
+ {#if config.donationsEnabled }
+
{/if}
{#if config.dev && config.debug && $devSettings.guides }
diff --git a/client/src/components/alert/Alerts.svelte b/client/src/components/alert/Alerts.svelte
new file mode 100644
index 0000000..15ab3d8
--- /dev/null
+++ b/client/src/components/alert/Alerts.svelte
@@ -0,0 +1,199 @@
+
+
+
+ {#each activeAlerts as alert (alert.key)}
+
+ {#if alert && alert.component }
+ {#if alert.href}
+
+
+
+ {:else if alert.action}
+
+
+
+ {:else}
+
+
+
+ {/if}
+ {/if}
+
+ {/each}
+
+
+
diff --git a/client/src/components/alert/ByMononaut.svelte b/client/src/components/alert/ByMononaut.svelte
new file mode 100644
index 0000000..0c01b67
--- /dev/null
+++ b/client/src/components/alert/ByMononaut.svelte
@@ -0,0 +1,41 @@
+
+
+
+
Bitfeed
+
by mononaut
+
+
+
+
+
+
diff --git a/client/src/components/alert/GenericAlert.svelte b/client/src/components/alert/GenericAlert.svelte
new file mode 100644
index 0000000..8f8d1ce
--- /dev/null
+++ b/client/src/components/alert/GenericAlert.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+ {@html msg }
+
+
+ {@html shortmsg || msg }
+
+ {#if img}
+
+ {/if}
+
+
+
diff --git a/client/src/components/alert/Hero.svelte b/client/src/components/alert/Hero.svelte
new file mode 100644
index 0000000..dbe633e
--- /dev/null
+++ b/client/src/components/alert/Hero.svelte
@@ -0,0 +1,83 @@
+
+
+
+
Thank you to all of our Community Heroes!
+
+ {#each displayHeroes as hero}
+
+ {/each}
+
+
+
+
diff --git a/client/src/components/alert/Sponsored.svelte b/client/src/components/alert/Sponsored.svelte
new file mode 100644
index 0000000..798a4c0
--- /dev/null
+++ b/client/src/components/alert/Sponsored.svelte
@@ -0,0 +1,38 @@
+
+
+
+
+
diff --git a/client/src/config.js b/client/src/config.js
index b40544a..89addf6 100644
--- a/client/src/config.js
+++ b/client/src/config.js
@@ -6,10 +6,8 @@ export default {
fps: true,
websocket_path: '/ws/txs',
localSocket: false,
- nofeed: true,
+ nofeed: false,
txDelay: 10000,
- blockTimeout: 10000,
- donationAddress: "bc1qthanksv78zs5jnmysvmuuuzj09aklf8jmm49xl",
- donationHash: "5dfb3b419e38a1494f648337ce7052797b6fa4f2",
- lightningEnabled: true
+ donationsEnabled: true,
+ alertDuration: 20000,
}
diff --git a/client/src/models/BitcoinTx.js b/client/src/models/BitcoinTx.js
index cef3a48..b9b6c65 100644
--- a/client/src/models/BitcoinTx.js
+++ b/client/src/models/BitcoinTx.js
@@ -20,14 +20,15 @@ export default class BitcoinTx {
this.time = time
- if (config.donationHash && this.outputs) {
- this.outputs.forEach(output => {
- if (output.script_pub_key.includes(config.donationHash)) {
- console.log('donation!', this)
- this.highlight = true
- }
- })
- }
+ // Highlight transactions to the static donation address
+ // if (config.donationHash && this.outputs) {
+ // this.outputs.forEach(output => {
+ // if (output.script_pub_key.includes(config.donationHash)) {
+ // console.log('donation!', this)
+ // this.highlight = true
+ // }
+ // })
+ // }
// is a coinbase transaction?
if (this.inputs && this.inputs.length === 1 && this.inputs[0].prev_txid === "0000000000000000000000000000000000000000000000000000000000000000") {
diff --git a/client/src/stores.js b/client/src/stores.js
index 4537310..8243306 100644
--- a/client/src/stores.js
+++ b/client/src/stores.js
@@ -1,5 +1,5 @@
import { writable, derived } from 'svelte/store'
-export { exchangeRates } from './utils/pollStore.js'
+import { makePollStore } from './utils/pollStore.js'
import { symbols } from './utils/fx.js'
import LocaleCurrency from 'locale-currency'
import config from './config.js'
@@ -42,6 +42,16 @@ function createCachedDict (namespace, defaultValues) {
}
}
+// refresh exchange rates every minute
+export const exchangeRates = makePollStore('rates', 'https://blockchain.info/ticker', 60000, {})
+// refresh messages from donation server every hour
+// export const alerts = makePollStore('alerts', `${config.donationRoot}/api/sponsorship/msgs.json`, 3600000, [])
+export const alerts = makePollStore('alerts', `${config.donationRoot}/api/sponsorship/msgs.json`, 10000, [])
+// refresh sponsor data every hour
+export const heroes = makePollStore('heroes', `${config.donationRoot}/api/sponsorship/heroes.json`, 3600000, null)
+export const sponsors = makePollStore('sponsors', `${config.donationRoot}/api/sponsorship/sponsors.json`, 3600000, null)
+export const tiers = makePollStore('tiers', `${config.donationRoot}/api/sponsorship/tiers.json`, 3600000, null)
+
export const darkMode = writable(true)
export const serverConnected = writable(false)
export const serverDelay = writable(1000)
@@ -73,7 +83,7 @@ export const settings = createCachedDict('settings', {
showFX: true,
vbytes: false,
fancyGraphics: true,
- showDonation: true,
+ showMessages: true,
noTrack: false
})
@@ -88,7 +98,7 @@ export const nativeAntialias = writable(false)
const newVisitor = !localStorage.getItem('seen-welcome-msg')
// export const overlay = writable(newVisitor ? 'about' : null)
-export const overlay = writable('donation')
+export const overlay = writable(null)
let currencyCode = LocaleCurrency.getCurrency(navigator.language)
console.log('LOCALE: ', navigator.language, currencyCode)
diff --git a/client/src/utils/pollStore.js b/client/src/utils/pollStore.js
index e0f58a0..55e6384 100644
--- a/client/src/utils/pollStore.js
+++ b/client/src/utils/pollStore.js
@@ -1,19 +1,24 @@
import { writable } from 'svelte/store'
-function makeRatePollStore () {
+export function makePollStore (name, url, frequency, initialValue={}, responseHandler) {
let timer
- const { subscribe, set, update } = writable({})
+ const { subscribe, set, update } = writable(initialValue)
+ if (!responseHandler) responseHandler = async (response, set) => {
+ try {
+ const data = await response.json()
+ if (data) set(data)
+ } catch (error) {
+ console.log(`failed to parse polled data for ${name}: `, error)
+ }
+ }
const fetcher = () => {
- fetch(`https://blockchain.info/ticker?t=${Date.now()}`).then(async response => {
- const rates = await response.json()
- set(rates)
- }).catch(err => {
- console.log('error fetching exchange rates: ', err)
+ fetch(`${url}?t=${Date.now()}`).then(response => { responseHandler(response, set) }).catch(err => {
+ console.log(`error polling data for ${name}: `, error)
})
}
fetcher()
- timer = setInterval(fetcher, 60000)
+ timer = setInterval(fetcher, frequency || 60000)
return {
subscribe,
@@ -21,5 +26,3 @@ function makeRatePollStore () {
update
}
}
-
-export const exchangeRates = makeRatePollStore()