mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-15 12:50:47 +02:00
Show loading indicator without backdrop in timeline (#1128)
* Show load more button on timeline even when empty * Got timeline loading working without backdrop * Update frontend build
This commit is contained in:
parent
7cb78a73f9
commit
5f5a6c4039
13 changed files with 59 additions and 42 deletions
|
|
@ -222,9 +222,6 @@ export default function BuySqueakDialog({
|
|||
);
|
||||
}
|
||||
|
||||
const buttonClassname = clsx({
|
||||
[classes.buttonSuccess]: success,
|
||||
});
|
||||
|
||||
function MakeSqueakButton() {
|
||||
return (
|
||||
|
|
@ -233,7 +230,6 @@ export default function BuySqueakDialog({
|
|||
type="submit"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
className={buttonClassname}
|
||||
disabled={loading}
|
||||
>
|
||||
Buy Squeak
|
||||
|
|
|
|||
|
|
@ -84,14 +84,6 @@ export default function TimelinePage() {
|
|||
);
|
||||
}
|
||||
|
||||
function LoadingContent() {
|
||||
return (
|
||||
<Backdrop className={classes.backdrop} open={waitingForTimeline}>
|
||||
<CircularProgress color="inherit" />
|
||||
</Backdrop>
|
||||
);
|
||||
}
|
||||
|
||||
function MakeSqueakDialogContent() {
|
||||
return (
|
||||
<>
|
||||
|
|
@ -111,7 +103,6 @@ export default function TimelinePage() {
|
|||
network={network}
|
||||
setSqueaksFn={setSqueaks}
|
||||
/>
|
||||
{(squeaks.length > 0) && ViewMoreSqueaksButton()}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
@ -120,9 +111,11 @@ export default function TimelinePage() {
|
|||
return (
|
||||
<>
|
||||
<Grid item xs={12}>
|
||||
<div className={classes.root}>
|
||||
<div className={classes.wrapper}>
|
||||
<Button
|
||||
variant="contained"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
disabled={waitingForTimeline}
|
||||
onClick={() => {
|
||||
const latestSqueak = squeaks.slice(-1).pop();
|
||||
const latestSqueakHeight = (latestSqueak ? latestSqueak.getBlockHeight() : null);
|
||||
|
|
@ -134,6 +127,7 @@ export default function TimelinePage() {
|
|||
<ReplayIcon />
|
||||
View more squeaks
|
||||
</Button>
|
||||
{waitingForTimeline && <CircularProgress size={24} className={classes.buttonProgress} />}
|
||||
</div>
|
||||
</Grid>
|
||||
</>
|
||||
|
|
@ -149,6 +143,7 @@ export default function TimelinePage() {
|
|||
? SqueaksContent()
|
||||
: NoSqueaksContent()}
|
||||
</Paper>
|
||||
{ViewMoreSqueaksButton()}
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={3}>
|
||||
<Paper className={classes.paper} />
|
||||
|
|
@ -165,7 +160,6 @@ export default function TimelinePage() {
|
|||
</Fab>
|
||||
|
||||
{MakeSqueakDialogContent()}
|
||||
{LoadingContent()}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { makeStyles } from '@material-ui/styles';
|
||||
import { green } from '@material-ui/core/colors';
|
||||
|
||||
export default makeStyles((theme) => ({
|
||||
dashedBorder: {
|
||||
|
|
@ -17,7 +18,33 @@ export default makeStyles((theme) => ({
|
|||
bottom: theme.spacing(4),
|
||||
right: theme.spacing(4),
|
||||
},
|
||||
backdrop: {
|
||||
zIndex: theme.zIndex.drawer + 1,
|
||||
root: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
},
|
||||
wrapper: {
|
||||
margin: theme.spacing(1),
|
||||
position: 'relative',
|
||||
},
|
||||
buttonSuccess: {
|
||||
backgroundColor: green[500],
|
||||
'&:hover': {
|
||||
backgroundColor: green[700],
|
||||
},
|
||||
},
|
||||
fabProgress: {
|
||||
color: green[500],
|
||||
position: 'absolute',
|
||||
top: -6,
|
||||
left: -6,
|
||||
zIndex: 1,
|
||||
},
|
||||
buttonProgress: {
|
||||
color: green[500],
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
marginTop: -12,
|
||||
marginLeft: -12,
|
||||
},
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"files": {
|
||||
"main.js": "/static/js/main.45beaf28.chunk.js",
|
||||
"main.js.map": "/static/js/main.45beaf28.chunk.js.map",
|
||||
"main.js": "/static/js/main.89546d12.chunk.js",
|
||||
"main.js.map": "/static/js/main.89546d12.chunk.js.map",
|
||||
"runtime-main.js": "/static/js/runtime-main.9f0ba400.js",
|
||||
"runtime-main.js.map": "/static/js/runtime-main.9f0ba400.js.map",
|
||||
"static/css/2.ea4ba2f0.chunk.css": "/static/css/2.ea4ba2f0.chunk.css",
|
||||
"static/js/2.74e88d43.chunk.js": "/static/js/2.74e88d43.chunk.js",
|
||||
"static/js/2.74e88d43.chunk.js.map": "/static/js/2.74e88d43.chunk.js.map",
|
||||
"static/js/2.11d0c00a.chunk.js": "/static/js/2.11d0c00a.chunk.js",
|
||||
"static/js/2.11d0c00a.chunk.js.map": "/static/js/2.11d0c00a.chunk.js.map",
|
||||
"index.html": "/index.html",
|
||||
"precache-manifest.64db3d5d60e2b147bafbafed6a4f9c18.js": "/precache-manifest.64db3d5d60e2b147bafbafed6a4f9c18.js",
|
||||
"precache-manifest.b0aaf4dd980713b22b1714559b81afc7.js": "/precache-manifest.b0aaf4dd980713b22b1714559b81afc7.js",
|
||||
"service-worker.js": "/service-worker.js",
|
||||
"static/css/2.ea4ba2f0.chunk.css.map": "/static/css/2.ea4ba2f0.chunk.css.map",
|
||||
"static/js/2.74e88d43.chunk.js.LICENSE.txt": "/static/js/2.74e88d43.chunk.js.LICENSE.txt",
|
||||
"static/js/2.11d0c00a.chunk.js.LICENSE.txt": "/static/js/2.11d0c00a.chunk.js.LICENSE.txt",
|
||||
"static/media/font-awesome.min.css": "/static/media/fontawesome-webfont.fee66e71.woff",
|
||||
"static/media/google.svg": "/static/media/google.695a3160.svg",
|
||||
"static/media/logo.svg": "/static/media/logo.a0185b04.svg"
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"entrypoints": [
|
||||
"static/js/runtime-main.9f0ba400.js",
|
||||
"static/css/2.ea4ba2f0.chunk.css",
|
||||
"static/js/2.74e88d43.chunk.js",
|
||||
"static/js/main.45beaf28.chunk.js"
|
||||
"static/js/2.11d0c00a.chunk.js",
|
||||
"static/js/main.89546d12.chunk.js"
|
||||
]
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Squeak Node</title><meta name="description" content="Squeak Node is a frontend for accessing a squeak node"><meta name="keywords" content="squeak, bitcoin, lightning"><meta name="author" content="Flatlogic LLC."><link href="/static/css/2.ea4ba2f0.chunk.css" rel="stylesheet"></head><body style="font-family:Roboto,sans-serif"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,f,l=r[0],a=r[1],i=r[2],c=0,s=[];c<l.length;c++)f=l[c],Object.prototype.hasOwnProperty.call(o,f)&&o[f]&&s.push(o[f][0]),o[f]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},o={1:0},u=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var l=this["webpackJsonpsqueak-node-frontend"]=this["webpackJsonpsqueak-node-frontend"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var i=0;i<l.length;i++)r(l[i]);var p=a;t()}([])</script><script src="/static/js/2.74e88d43.chunk.js"></script><script src="/static/js/main.45beaf28.chunk.js"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Squeak Node</title><meta name="description" content="Squeak Node is a frontend for accessing a squeak node"><meta name="keywords" content="squeak, bitcoin, lightning"><meta name="author" content="Flatlogic LLC."><link href="/static/css/2.ea4ba2f0.chunk.css" rel="stylesheet"></head><body style="font-family:Roboto,sans-serif"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,f,l=r[0],a=r[1],i=r[2],c=0,s=[];c<l.length;c++)f=l[c],Object.prototype.hasOwnProperty.call(o,f)&&o[f]&&s.push(o[f][0]),o[f]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var a=t[l];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},o={1:0},u=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var l=this["webpackJsonpsqueak-node-frontend"]=this["webpackJsonpsqueak-node-frontend"]||[],a=l.push.bind(l);l.push=r,l=l.slice();for(var i=0;i<l.length;i++)r(l[i]);var p=a;t()}([])</script><script src="/static/js/2.11d0c00a.chunk.js"></script><script src="/static/js/main.89546d12.chunk.js"></script></body></html>
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "05be7bd1ef4cffb3b9b9f29e7ce71134",
|
||||
"revision": "5e8a2271411ac3d1d99c365bfbe04e3d",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
"revision": "87783a5fbc1ae331e31c",
|
||||
"revision": "22e7334fbd3ece09f682",
|
||||
"url": "/static/css/2.ea4ba2f0.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "87783a5fbc1ae331e31c",
|
||||
"url": "/static/js/2.74e88d43.chunk.js"
|
||||
"revision": "22e7334fbd3ece09f682",
|
||||
"url": "/static/js/2.11d0c00a.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "279b8724b89bf7d504758b3fa917239f",
|
||||
"url": "/static/js/2.74e88d43.chunk.js.LICENSE.txt"
|
||||
"url": "/static/js/2.11d0c00a.chunk.js.LICENSE.txt"
|
||||
},
|
||||
{
|
||||
"revision": "2bd9ea1f28e7d38cc64f",
|
||||
"url": "/static/js/main.45beaf28.chunk.js"
|
||||
"revision": "2371624be4805552f23b",
|
||||
"url": "/static/js/main.89546d12.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "cc9816de5a8639d377ea",
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.64db3d5d60e2b147bafbafed6a4f9c18.js"
|
||||
"/precache-manifest.b0aaf4dd980713b22b1714559b81afc7.js"
|
||||
);
|
||||
|
||||
self.addEventListener('message', (event) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue