From 931f04e56272e48b1b0559aab058ac4869ac02d6 Mon Sep 17 00:00:00 2001 From: Mikhail Petrov Date: Thu, 1 Feb 2024 19:02:28 +0300 Subject: [PATCH 1/3] web-fix: Save font-size for input caption in mobile Signed-off-by: Mikhail Petrov --- src/App.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.css b/src/App.css index ba8eeed..f257b33 100644 --- a/src/App.css +++ b/src/App.css @@ -128,7 +128,7 @@ label.is-error { } .input_caption { - font-size: .75rem; + font-size: .75rem !important; font-weight: 400; border-left: 2px solid #ffd781; margin-top: 1em; From 3bd400d25e349ff4d63ef87e8436e91e55c8e0c6 Mon Sep 17 00:00:00 2001 From: Mikhail Petrov Date: Thu, 1 Feb 2024 19:08:27 +0300 Subject: [PATCH 2/3] web: Remove http gw in the queries Signed-off-by: Mikhail Petrov --- .env | 1 - README.md | 3 --- src/App.js | 1 - src/Components/TreeView/TreeView.js | 4 ++-- src/api.js | 3 +-- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.env b/.env index 510b4bb..7d219b7 100644 --- a/.env +++ b/.env @@ -3,7 +3,6 @@ REACT_APP_WC_PROJECT_ID=8e39af16af0819871be6f2da61a3a038 REACT_APP_URL=https://panel.fs.neo.org/ REACT_APP_RESTGW=https://rest.fs.neo.org/v1 -REACT_APP_HTTPGW=https://http.fs.neo.org # Mainnet NeoFS contract REACT_APP_NETWORK=mainnet diff --git a/README.md b/README.md index 95bf1d9..1b91be3 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,6 @@ Set variables in `.env` file - `REACT_APP_URL` - Web application url - `REACT_APP_RESTGW` - [NeoFS REST Gateway](https://github.com/nspcc-dev/neofs-rest-gw), which we use to manage containers and object in neofs (control path) -- `REACT_APP_HTTPGW` - [NeoFS HTTP Gateway](https://github.com/nspcc-dev/neofs-http-gw), which we use to get objects ( - data path) - `REACT_APP_NETWORK` - Network of the Neo (might be `mainnet`, `testnet`) - `REACT_APP_NEOFS_ACCOUNT` - Neo3 address of the NeoFS contract @@ -69,7 +67,6 @@ You need to update the parameters in the `.env` file to make it work: ```env REACT_APP_RESTGW=http://localhost:8090/v1 -REACT_APP_HTTPGW=http://localhost:8081 ``` # Make instructions diff --git a/src/App.js b/src/App.js index ae4b067..a312208 100644 --- a/src/App.js +++ b/src/App.js @@ -39,7 +39,6 @@ export const App = () => { const [params] = useState({ rest_gw: process.env.REACT_APP_RESTGW ? process.env.REACT_APP_RESTGW : 'https://rest.t5.fs.neo.org/v1', - http_gw: process.env.REACT_APP_HTTPGW ? process.env.REACT_APP_HTTPGW : 'https://http.t5.fs.neo.org', }); const [attributes, setAttributes] = useState([]); diff --git a/src/Components/TreeView/TreeView.js b/src/Components/TreeView/TreeView.js index daacaad..8e6e369 100644 --- a/src/Components/TreeView/TreeView.js +++ b/src/Components/TreeView/TreeView.js @@ -174,7 +174,7 @@ const File = ({ className="manage_icon" onClick={() => { onModal('loading'); - api('GET', `${params.http_gw}/get/${containerItem.containerId}/${objectItem.address.objectId}`, {}, { + api('GET', `/get/${containerItem.containerId}/${objectItem.address.objectId}`, {}, { [ContentTypeHeader]: "application/json", [AuthorizationHeader]: `Bearer ${walletData.tokens.object.GET.bearer}`, }).then((data) => { @@ -207,7 +207,7 @@ const File = ({ className="manage_icon" onClick={() => { onModal('loading'); - api('GET', `${params.http_gw}/get/${containerItem.containerId}/${objectItem.address.objectId}`, {}, { + api('GET', `/get/${containerItem.containerId}/${objectItem.address.objectId}`, {}, { [ContentTypeHeader]: "application/json", [AuthorizationHeader]: `Bearer ${walletData.tokens.object.GET.bearer}`, }).then((data) => { diff --git a/src/api.js b/src/api.js index c5d1452..8743d2b 100644 --- a/src/api.js +++ b/src/api.js @@ -1,5 +1,4 @@ const rest_gw = process.env.REACT_APP_RESTGW ? process.env.REACT_APP_RESTGW : 'https://rest.t5.fs.neo.org/v1'; -const http_gw = process.env.REACT_APP_HTTPGW ? process.env.REACT_APP_HTTPGW : 'https://http.t5.fs.neo.org'; async function serverRequest(method, url, params, headers) { const json = { @@ -31,7 +30,7 @@ export default function api(method, url, params = {}, headers = {}) { }); } else { let res = response; - if (method === 'GET' && url.indexOf(`${http_gw}/get/`) !== -1) { + if (method === 'GET' && url.indexOf(`/get/`) !== -1) { res = await response.blob(); const header = response.headers.get('Content-Type'); resolve({ header, res }); From 8450fc1a2e06e12eaeb0baf0fe667179054eed91 Mon Sep 17 00:00:00 2001 From: Mikhail Petrov Date: Thu, 1 Feb 2024 19:20:54 +0300 Subject: [PATCH 3/3] web: Add btn with bearer and handler for unaccessible object closes #122 Signed-off-by: Mikhail Petrov --- public/img/icons/manage/unlock.png | Bin 0 -> 20507 bytes src/Components/TreeView/TreeView.js | 44 ++++++++++++++++++++++++++-- src/api.js | 2 +- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 public/img/icons/manage/unlock.png diff --git a/public/img/icons/manage/unlock.png b/public/img/icons/manage/unlock.png new file mode 100644 index 0000000000000000000000000000000000000000..8f7f61483dad3a33d6cacd873c69d779df12bf91 GIT binary patch literal 20507 zcmbTe2UOEd*Dv}{LV(Z%(m^0J=}7OOL<}IHh!jBxU8F_nO@bgrr7J2;P%KCbQbYlX zR1qm6LIi=RC@LiZX(HtezR&yK@7(pBbH8<;wOmikOlEeUz4!dawBy!C*;#~GAP8bN z$6;+D2o65NA!bJKzm>?5O$dT%`^Kjanc;Vo`^^sxAWgSxspau9SN`$lG)MaS`d zDQ&_>x=QVtKT`>^Cyocae|gQ^`HHw>g=tQex#ql!zss(k?fby*a|=$izI8vmA`Ie^J>MxX zO=BjGSv4EyZp05EhGN%r$!r(gV8=wy_!Cd(aEv(7?D`&iI}I<&9Fodpx}7ng{!A<- z&4TCs+Y|h+XbAj4u>ft+XZ8)1t*h}nhUl?h-a&VcGMgwG@;e=hELDy_C7_=>=g~tD z6Q06YpB`yEeR-MBfFm9vciU|LI%)h0ND@WBIfXzFN9W!j*bM~^VF*Hw z`Pn&!I$9mm^9&ADcHfh)a%3O@%!VKX<4A(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R?0tM$J8b9Y;LbEW-olhBr6cemuM%sJsBNw&4+M^J7<+dfn0-8T;h0S%N@HT( zg&5#;QN7-j=!~VP9vLoYAsY^Sr^qU$M~2);aUghBmnm!k<6vy;A*v03trd@O+vGNS zGJnZ(@X22a4MYy1x)aAXVr|WIGRDOF)~&5_oi7ar{d7n|H!|Wvj$)GTUM&%pYkOh_ zvJyu_oYMlquD5gpRk{!UAk~DN02LH$g(yM+4Ep;WkiyHr{A32ALT==ecs8UpQ2L(>9jEU;+mUo|){YW0a@0b3>xXqA`(1^k8 z^COgLNZD}E=_-*@b?%n)9q{};34>z8OeawbWb{WFn{=&b59C6QNjK)^ct2cI91s9X zZ|Z9e&-;qBLh&43T_hzbw^VT!SHO4yY!Rl3z3HGNY8%oz_0DZah5<&)Px~4 zk4yWdbdJMdZ(hSolWTxPE%~6^dP1;7!zvH8&eQh_Y$;2fc$&s}(4J5uX$lym0KM!< zacAV>BBDAREwU7?5N&$a-Wy$)c_Ql?oHYL>VzI(hJ-5as+nE4t6iA=;W4%~>Puj4e ztW`VPL|j{3##XuE7a<&bW@5LHIN3y0bc3fIltYt$c^d+yJgc+!7%_SR5>9HeyXE;N z_TAxg^zE9CIUTMab`8JKv!H!I9ceRPoY)e&%9x0+O^=Qxu56Tj(GhbchsEWe*NB&> tSWe9scTS((J}p*OdmHL? { - if (data.header.indexOf("image/") !== -1 || data.header === 'text/plain; charset=utf-8') { + if (data.status !== 200) { + onModal('failed', 'Object is not accessible without a token'); + } else if (data.header.indexOf("image/") !== -1 || data.header === 'text/plain; charset=utf-8') { const fileURL = URL.createObjectURL(data.res); window.open(fileURL, '_blank'); onModal(); @@ -202,6 +207,41 @@ const File = ({ height={40} alt="get an object by link" /> + { + onModal('loading'); + api('GET', `/get/${containerItem.containerId}/${objectItem.address.objectId}`, {}, { + [ContentTypeHeader]: "application/json", + [AuthorizationHeader]: `Bearer ${walletData.tokens.object.GET.bearer}`, + }).then((data) => { + if (data.status !== 200) { + onModal('failed', 'Something went wrong, try again'); + } else if (data.header.indexOf("image/") !== -1 || data.header === 'text/plain; charset=utf-8') { + const fileURL = URL.createObjectURL(data.res); + window.open(fileURL, '_blank'); + onModal(); + } else { + const a = document.createElement('a'); + document.body.appendChild(a); + const url = window.URL.createObjectURL(data.res); + a.href = url; + a.download = name; + a.target = '_blank'; + a.click(); + setTimeout(() => { + onModal(); + window.URL.revokeObjectURL(url); + document.body.removeChild(a); + }, 0); + } + }); + }} + width={40} + height={40} + alt="get an object by bearer" + />