mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-20 13:28:20 +02:00
Fix default action on profile squeak card click (#2004)
* Fix prevent default on profile following click * Fix prevent default on squeak card action click * Update frontend build
This commit is contained in:
parent
7bb63d853e
commit
d30029aed1
10 changed files with 24 additions and 17 deletions
|
|
@ -39,6 +39,7 @@ const SqueakCard = React.memo(function SqueakCard(props) {
|
|||
}
|
||||
|
||||
const resqueak = (e,id, resqueakId) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation()
|
||||
if(props.history.location.pathname.slice(1,5) === 'prof'){
|
||||
info = { dest: "profile", id, resqueakId }
|
||||
|
|
@ -47,12 +48,16 @@ const SqueakCard = React.memo(function SqueakCard(props) {
|
|||
}
|
||||
|
||||
const deleteSqueak = (e,id) => {
|
||||
e.stopPropagation()
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
dispatch(setDeleteSqueak(id));
|
||||
}
|
||||
|
||||
const toggleModal = (e, type) => {
|
||||
if(e){ e.stopPropagation() }
|
||||
if(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
setStyleBody(!styleBody)
|
||||
if(type === 'parent'){setParent(true)}else{setParent(false)}
|
||||
setTimeout(()=>{ setModalOpen(!modalOpen) },20)
|
||||
|
|
@ -153,11 +158,12 @@ const SqueakCard = React.memo(function SqueakCard(props) {
|
|||
0
|
||||
</div>
|
||||
</div>
|
||||
<div onClick={(e)=>
|
||||
<div onClick={(e)=> {
|
||||
e.preventDefault();
|
||||
props.squeak.getLikedTimeMs() ?
|
||||
unlikeSqueak(e, props.squeak.getSqueakHash()) :
|
||||
likeSqueak(e, props.squeak.getSqueakHash())
|
||||
} className="card-button-wrap heart-wrap">
|
||||
}} className="card-button-wrap heart-wrap">
|
||||
<div className="card-icon heart-icon">
|
||||
{props.squeak.getLikedTimeMs() ?
|
||||
<ICON_HEARTFULL styles={{fill:'rgb(224, 36, 94)'}}/> :
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ const ProfileCard = (props) => {
|
|||
<div className="search-user-username">@{profile.getPubkey()}</div>
|
||||
</div>
|
||||
<div onClick={(e)=>{
|
||||
e.preventDefault();
|
||||
profile.getFollowing() ?
|
||||
unfollowUser(e,profile.getProfileId()) :
|
||||
followUser(e,profile.getProfileId())
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.1879ee6f.chunk.css",
|
||||
"main.js": "/static/js/main.07693939.chunk.js",
|
||||
"main.js.map": "/static/js/main.07693939.chunk.js.map",
|
||||
"main.js": "/static/js/main.3beba8f4.chunk.js",
|
||||
"main.js.map": "/static/js/main.3beba8f4.chunk.js.map",
|
||||
"runtime-main.js": "/static/js/runtime-main.642dcf2e.js",
|
||||
"runtime-main.js.map": "/static/js/runtime-main.642dcf2e.js.map",
|
||||
"static/js/2.c5da907d.chunk.js": "/static/js/2.c5da907d.chunk.js",
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
"static/js/5.e6f4a57d.chunk.js": "/static/js/5.e6f4a57d.chunk.js",
|
||||
"static/js/5.e6f4a57d.chunk.js.map": "/static/js/5.e6f4a57d.chunk.js.map",
|
||||
"index.html": "/index.html",
|
||||
"precache-manifest.9f50eac5210a372dbd43bd204f43c166.js": "/precache-manifest.9f50eac5210a372dbd43bd204f43c166.js",
|
||||
"precache-manifest.cd11a4f02bbcfdc07690653865a2a87e.js": "/precache-manifest.cd11a4f02bbcfdc07690653865a2a87e.js",
|
||||
"service-worker.js": "/service-worker.js",
|
||||
"static/css/3.1f6bb621.chunk.css.map": "/static/css/3.1f6bb621.chunk.css.map",
|
||||
"static/css/4.6512f3a3.chunk.css.map": "/static/css/4.6512f3a3.chunk.css.map",
|
||||
|
|
@ -30,6 +30,6 @@
|
|||
"static/js/runtime-main.642dcf2e.js",
|
||||
"static/js/2.c5da907d.chunk.js",
|
||||
"static/css/main.1879ee6f.chunk.css",
|
||||
"static/js/main.07693939.chunk.js"
|
||||
"static/js/main.3beba8f4.chunk.js"
|
||||
]
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#1da1f2"/><meta nam="description" content="Squeaknode!"/><meta name="og:title" content="Squeaknode"/><meta name="og:description" content="check out my the Squeaknode I made"/><link href="https://fonts.googleapis.com/css2?family=Assistant&display=swap" rel="stylesheet"><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Squeaknode</title><link href="/static/css/main.1879ee6f.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],f=0,d=[];f<i.length;f++)o=i[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(s&&s(t);d.length;)d.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1,4:1,5:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"1f6bb621",4:"6512f3a3",5:"3aaab79d"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(s=u[c]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(l===n||l===a))return t()}var f=document.getElementsByTagName("style");for(c=0;c<f.length;c++){var s;if((l=(s=f[c]).getAttribute("data-href"))===n||l===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],d.parentNode.removeChild(d),r(u)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"3367fbde",4:"6ed25fb6",5:"e6f4a57d"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var f=0;f<c.length;f++)t(c[f]);var s=l;r()}([])</script><script src="/static/js/2.c5da907d.chunk.js"></script><script src="/static/js/main.07693939.chunk.js"></script></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#1da1f2"/><meta nam="description" content="Squeaknode!"/><meta name="og:title" content="Squeaknode"/><meta name="og:description" content="check out my the Squeaknode I made"/><link href="https://fonts.googleapis.com/css2?family=Assistant&display=swap" rel="stylesheet"><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Squeaknode</title><link href="/static/css/main.1879ee6f.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],f=0,d=[];f<i.length;f++)o=i[f],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(s&&s(t);d.length;)d.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var c=r[o];0!==a[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[];o[e]?t.push(o[e]):0!==o[e]&&{3:1,4:1,5:1}[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="static/css/"+({}[e]||e)+"."+{3:"1f6bb621",4:"6512f3a3",5:"3aaab79d"}[e]+".chunk.css",a=i.p+n,u=document.getElementsByTagName("link"),c=0;c<u.length;c++){var l=(s=u[c]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(l===n||l===a))return t()}var f=document.getElementsByTagName("style");for(c=0;c<f.length;c++){var s;if((l=(s=f[c]).getAttribute("data-href"))===n||l===a)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],d.parentNode.removeChild(d),r(u)},d.href=a,document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){o[e]=0})));var r=a[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=a[e]=[t,n]}));t.push(r[2]=n);var u,c=document.createElement("script");c.charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"3367fbde",4:"6ed25fb6",5:"e6f4a57d"}[e]+".chunk.js"}(e);var l=new Error;u=function(t){c.onerror=c.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,r[1](l)}a[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:c})}),12e4);c.onerror=c.onload=u,document.head.appendChild(c)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var c=this["webpackJsonptwitter-frontend"]=this["webpackJsonptwitter-frontend"]||[],l=c.push.bind(c);c.push=t,c=c.slice();for(var f=0;f<c.length;f++)t(c[f]);var s=l;r()}([])</script><script src="/static/js/2.c5da907d.chunk.js"></script><script src="/static/js/main.3beba8f4.chunk.js"></script></body></html>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
self.__precacheManifest = (self.__precacheManifest || []).concat([
|
||||
{
|
||||
"revision": "c67bae670573e55237e3950c26d6f512",
|
||||
"revision": "39b553feeb160b9e76feb079deff478c",
|
||||
"url": "/index.html"
|
||||
},
|
||||
{
|
||||
|
|
@ -16,7 +16,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
|||
"url": "/static/css/5.3aaab79d.chunk.css"
|
||||
},
|
||||
{
|
||||
"revision": "5d5cce5081fd0c3b4345",
|
||||
"revision": "251dbf1eb7a9428fa687",
|
||||
"url": "/static/css/main.1879ee6f.chunk.css"
|
||||
},
|
||||
{
|
||||
|
|
@ -40,8 +40,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
|
|||
"url": "/static/js/5.e6f4a57d.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "5d5cce5081fd0c3b4345",
|
||||
"url": "/static/js/main.07693939.chunk.js"
|
||||
"revision": "251dbf1eb7a9428fa687",
|
||||
"url": "/static/js/main.3beba8f4.chunk.js"
|
||||
},
|
||||
{
|
||||
"revision": "1b149485713f8341b38a",
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
|
||||
|
||||
importScripts(
|
||||
"/precache-manifest.9f50eac5210a372dbd43bd204f43c166.js"
|
||||
"/precache-manifest.cd11a4f02bbcfdc07690653865a2a87e.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
Loading…
Add table
Add a link
Reference in a new issue