mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-18 13:09:08 +02:00
Change url path for pubkey page (#1873)
* Change url path for pubkey page * Update frontend build
This commit is contained in:
parent
5198467889
commit
88647dd783
12 changed files with 35 additions and 35 deletions
|
|
@ -59,7 +59,7 @@ function Layout(props) {
|
|||
<div className={classes.fakeToolbar} />
|
||||
<Switch>
|
||||
<Route path="/app/timeline" component={Timeline} />
|
||||
<Route path="/app/squeakaddress/:address" component={SqueakAddress} />
|
||||
<Route path="/app/pubkey/:pubkey" component={SqueakAddress} />
|
||||
<Route path="/app/search/:searchText" component={Search} />
|
||||
<Route path="/app/search" component={Search} />
|
||||
<Route path="/app/squeak/:hash" component={Squeak} />
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import SqueakTime from '../SqueakTime';
|
|||
import SqueakUserAvatar from '../SqueakUserAvatar';
|
||||
|
||||
import {
|
||||
goToSqueakAddressPage,
|
||||
goToPubkeyPage,
|
||||
} from '../../navigation/navigation';
|
||||
|
||||
function Alert(props) {
|
||||
|
|
@ -61,7 +61,7 @@ export default function SqueakDetailItem({
|
|||
if (!squeak) {
|
||||
return;
|
||||
}
|
||||
goToSqueakAddressPage(history, squeak.getAuthorPubkey());
|
||||
goToPubkeyPage(history, squeak.getAuthorPubkey());
|
||||
};
|
||||
|
||||
const onUnlockClick = (event) => {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import {
|
|||
getProfileImageSrcString,
|
||||
} from '../../squeakimages/images';
|
||||
import {
|
||||
goToSqueakAddressPage,
|
||||
goToPubkeyPage,
|
||||
} from '../../navigation/navigation';
|
||||
|
||||
export default function SqueakProfileDetailItem({
|
||||
|
|
@ -68,7 +68,7 @@ export default function SqueakProfileDetailItem({
|
|||
if (!squeakProfile) {
|
||||
return;
|
||||
}
|
||||
goToSqueakAddressPage(history, squeakProfile.getPubkey());
|
||||
goToPubkeyPage(history, squeakProfile.getPubkey());
|
||||
};
|
||||
|
||||
const onConfigureClick = () => {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import SqueakTime from '../SqueakTime';
|
|||
|
||||
import {
|
||||
goToSqueakPage,
|
||||
goToSqueakAddressPage,
|
||||
goToPubkeyPage,
|
||||
} from '../../navigation/navigation';
|
||||
|
||||
export default function SqueakThreadItem({
|
||||
|
|
@ -41,7 +41,7 @@ export default function SqueakThreadItem({
|
|||
if (!squeak) {
|
||||
return;
|
||||
}
|
||||
goToSqueakAddressPage(history, squeak.getAuthorPubkey());
|
||||
goToPubkeyPage(history, squeak.getAuthorPubkey());
|
||||
};
|
||||
|
||||
const onSqueakClick = (event) => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
getProfileImageSrcString,
|
||||
} from '../../squeakimages/images';
|
||||
import {
|
||||
goToSqueakAddressPage,
|
||||
goToPubkeyPage,
|
||||
} from '../../navigation/navigation';
|
||||
|
||||
export default function SqueakUserAvatar({
|
||||
|
|
@ -26,7 +26,7 @@ export default function SqueakUserAvatar({
|
|||
event.stopPropagation();
|
||||
console.log('Handling avatar click...');
|
||||
if (squeakAddress) {
|
||||
goToSqueakAddressPage(history, squeakAddress);
|
||||
goToPubkeyPage(history, squeakAddress);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ export const goToSqueakPage = (history, squeakHash) => {
|
|||
history.push(`/app/squeak/${squeakHash}`);
|
||||
};
|
||||
|
||||
export const goToSqueakAddressPage = (history, squeakAddress) => {
|
||||
history.push(`/app/squeakaddress/${squeakAddress}`);
|
||||
export const goToPubkeyPage = (history, pubkey) => {
|
||||
history.push(`/app/pubkey/${pubkey}`);
|
||||
};
|
||||
|
||||
export const goToSearchPage = (history, searchText) => {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const SQUEAKS_PER_PAGE = 10;
|
|||
export default function SqueakAddressPage() {
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
const { address } = useParams();
|
||||
const { pubkey } = useParams();
|
||||
const [squeakProfile, setSqueakProfile] = useState(null);
|
||||
const [squeaks, setSqueaks] = useState(null);
|
||||
const [createContactProfileDialogOpen, setCreateContactProfileDialogOpen] = useState(false);
|
||||
|
|
@ -45,19 +45,19 @@ export default function SqueakAddressPage() {
|
|||
|
||||
const initialLoadComplete = useMemo(() => (squeaks && !waitingForProfile), [squeaks, waitingForProfile]);
|
||||
|
||||
const getSqueakProfile = (address) => {
|
||||
const getSqueakProfile = (pubkey) => {
|
||||
setWaitingForProfile(true);
|
||||
getSqueakProfileByAddressRequest(address, (profile => {
|
||||
getSqueakProfileByAddressRequest(pubkey, (profile => {
|
||||
setWaitingForProfile(false);
|
||||
setSqueakProfile(profile);
|
||||
}));
|
||||
};
|
||||
const getSqueaks = useCallback((address, limit, lastEntry) => {
|
||||
const getSqueaks = useCallback((pubkey, limit, lastEntry) => {
|
||||
setWaitingForSqueaks(true);
|
||||
getAddressSqueakDisplaysRequest(address, limit, lastEntry, handleLoadedAddressSqueaks);
|
||||
getAddressSqueakDisplaysRequest(pubkey, limit, lastEntry, handleLoadedAddressSqueaks);
|
||||
},
|
||||
[]);
|
||||
// const subscribeSqueaks = (address) => subscribeAddressSqueakDisplaysRequest(address, (resp) => {
|
||||
// const subscribeSqueaks = (pubkey) => subscribeAddressSqueakDisplaysRequest(pubkey, (resp) => {
|
||||
// setSqueaks((prevSqueaks) => [resp].concat(prevSqueaks));
|
||||
// });
|
||||
const getNetwork = () => {
|
||||
|
|
@ -88,9 +88,9 @@ export default function SqueakAddressPage() {
|
|||
|
||||
const onDownloadSqueaksClick = (event) => {
|
||||
event.preventDefault();
|
||||
console.log('Handling download address squeaks click...');
|
||||
console.log('Handling download pubkey squeaks click...');
|
||||
setWaitingForDownload(true);
|
||||
downloadAddressSqueaksRequest(address, (response) => {
|
||||
downloadAddressSqueaksRequest(pubkey, (response) => {
|
||||
setWaitingForDownload(false);
|
||||
const downloadResult = response.getDownloadResult();
|
||||
const numPeers = downloadResult.getNumberPeers();
|
||||
|
|
@ -104,20 +104,20 @@ export default function SqueakAddressPage() {
|
|||
return;
|
||||
}
|
||||
setSqueaks([]);
|
||||
getSqueaks(address, SQUEAKS_PER_PAGE, null);
|
||||
getSqueaks(pubkey, SQUEAKS_PER_PAGE, null);
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getSqueakProfile(address);
|
||||
}, [address]);
|
||||
getSqueakProfile(pubkey);
|
||||
}, [pubkey]);
|
||||
useEffect(() => {
|
||||
getSqueaks(address, SQUEAKS_PER_PAGE, null);
|
||||
}, [getSqueaks, address]);
|
||||
getSqueaks(pubkey, SQUEAKS_PER_PAGE, null);
|
||||
}, [getSqueaks, pubkey]);
|
||||
// useEffect(() => {
|
||||
// const stream = subscribeSqueaks(address);
|
||||
// const stream = subscribeSqueaks(pubkey);
|
||||
// return () => stream.cancel();
|
||||
// }, [address]);
|
||||
// }, [pubkey]);
|
||||
useEffect(() => {
|
||||
getNetwork();
|
||||
}, []);
|
||||
|
|
@ -176,7 +176,7 @@ export default function SqueakAddressPage() {
|
|||
<CreateContactProfileDialog
|
||||
open={createContactProfileDialogOpen}
|
||||
handleClose={handleCloseCreateContactProfileDialog}
|
||||
initialAddress={address}
|
||||
initialAddress={pubkey}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
@ -263,7 +263,7 @@ export default function SqueakAddressPage() {
|
|||
disabled={waitingForSqueaks}
|
||||
onClick={() => {
|
||||
const latestSqueak = squeaks.slice(-1).pop();
|
||||
getSqueaks(address, SQUEAKS_PER_PAGE, latestSqueak);
|
||||
getSqueaks(pubkey, SQUEAKS_PER_PAGE, latestSqueak);
|
||||
}}
|
||||
>
|
||||
<ReplayIcon />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"files": {
|
||||
"main.js": "/static/js/main.f491cfef.chunk.js",
|
||||
"main.js.map": "/static/js/main.f491cfef.chunk.js.map",
|
||||
"main.js": "/static/js/main.01fc1efa.chunk.js",
|
||||
"main.js.map": "/static/js/main.01fc1efa.chunk.js.map",
|
||||
"runtime-main.js": "/static/js/runtime-main.48a1d1b9.js",
|
||||
"runtime-main.js.map": "/static/js/runtime-main.48a1d1b9.js.map",
|
||||
"static/css/2.f68b60d4.chunk.css": "/static/css/2.f68b60d4.chunk.css",
|
||||
|
|
@ -18,6 +18,6 @@
|
|||
"static/js/runtime-main.48a1d1b9.js",
|
||||
"static/css/2.f68b60d4.chunk.css",
|
||||
"static/js/2.cc4c0ab4.chunk.js",
|
||||
"static/js/main.f491cfef.chunk.js"
|
||||
"static/js/main.01fc1efa.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>Squeaknode</title><meta name="description" content="Squeaknode 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.f68b60d4.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.cc4c0ab4.chunk.js"></script><script src="/static/js/main.f491cfef.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>Squeaknode</title><meta name="description" content="Squeaknode 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.f68b60d4.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.cc4c0ab4.chunk.js"></script><script src="/static/js/main.01fc1efa.chunk.js"></script></body></html>
|
||||
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