From 0c5e42d8c359239b4ecdd983fb5b23d219c6c1fe Mon Sep 17 00:00:00 2001 From: Daniel Helm Date: Wed, 12 Jan 2022 09:48:09 -0600 Subject: [PATCH 001/108] fix brand color and image compression artifacts --- packages/website/src/images/logo.svg | 6 +++--- packages/website/src/pages/news.js | 16 +++++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/website/src/images/logo.svg b/packages/website/src/images/logo.svg index 16c695f9..1cf1118d 100644 --- a/packages/website/src/images/logo.svg +++ b/packages/website/src/images/logo.svg @@ -2,7 +2,7 @@ - - - + + + \ No newline at end of file diff --git a/packages/website/src/pages/news.js b/packages/website/src/pages/news.js index f3b9a220..ebc7374e 100644 --- a/packages/website/src/pages/news.js +++ b/packages/website/src/pages/news.js @@ -24,12 +24,12 @@ const NewsCard = ({ frontmatter, fields }) => { )} - + {title} {description && ( - + {description} )} @@ -49,7 +49,7 @@ const NewsPage = ({ data }) => {
{/* this is the gray box in the top left corner, 400px height is totally arbitrary but it works */}
@@ -81,12 +81,18 @@ export const query = graphql` external thumbnail { childImageSharp { - gatsbyImageData(width: 320, height: 170, placeholder: BLURRED, transformOptions: { cropFocus: CENTER }) + gatsbyImageData( + width: 320 + height: 170 + placeholder: BLURRED + formats: [AUTO, AVIF, WEBP] + transformOptions: { fit: COVER, cropFocus: CENTER } + ) } } avatar { childImageSharp { - gatsbyImageData(width: 40, placeholder: BLURRED, transformOptions: { cropFocus: CENTER }) + gatsbyImageData(width: 40, placeholder: BLURRED, transformOptions: { fit: COVER, cropFocus: CENTER }) } } } From 4276673c716695899b769361c7fd8f811e06b17a Mon Sep 17 00:00:00 2001 From: Daniel Helm Date: Wed, 12 Jan 2022 10:20:09 -0600 Subject: [PATCH 002/108] add homescreen stuff, crop icon and avif avatars --- packages/website/gatsby-config.js | 4 +++- packages/website/src/images/logo-sq.svg | 9 +++++++++ packages/website/src/pages/news.js | 7 ++++++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 packages/website/src/images/logo-sq.svg diff --git a/packages/website/gatsby-config.js b/packages/website/gatsby-config.js index f0aabe90..49a77eb3 100644 --- a/packages/website/gatsby-config.js +++ b/packages/website/gatsby-config.js @@ -93,7 +93,7 @@ module.exports = { background_color: `#f1f7f2`, theme_color: `#f1f7f2`, display: `minimal-ui`, - icon: `src/images/logo.svg`, // This path is relative to the root of the site. + icon: `src/images/logo-sq.svg`, // This path is relative to the root of the site. icons: [ ...defaultIcons, // when we're serving content from the portal on our pathnames that do not have @@ -105,6 +105,8 @@ module.exports = { type: `image/x-icon`, }, ], + description: `Skynet portal homepage and upload widget`, + skylink: `AQBG8n_sgEM_nlEp3G0w3vLjmdvSZ46ln8ZXHn-eObZNjA`, }, }, { diff --git a/packages/website/src/images/logo-sq.svg b/packages/website/src/images/logo-sq.svg new file mode 100644 index 00000000..ffc89c0d --- /dev/null +++ b/packages/website/src/images/logo-sq.svg @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/packages/website/src/pages/news.js b/packages/website/src/pages/news.js index ebc7374e..4dd1147b 100644 --- a/packages/website/src/pages/news.js +++ b/packages/website/src/pages/news.js @@ -92,7 +92,12 @@ export const query = graphql` } avatar { childImageSharp { - gatsbyImageData(width: 40, placeholder: BLURRED, transformOptions: { fit: COVER, cropFocus: CENTER }) + gatsbyImageData( + width: 40 + placeholder: BLURRED + formats: [AUTO, AVIF, WEBP] + transformOptions: { fit: COVER, cropFocus: CENTER } + ) } } } From ddf165a355af646afc367a609457145263138ed5 Mon Sep 17 00:00:00 2001 From: Daniel Helm Date: Wed, 12 Jan 2022 10:57:28 -0600 Subject: [PATCH 003/108] update deps --- packages/website/package.json | 2 +- packages/website/yarn.lock | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index a7aa7157..2e6416fd 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -57,7 +57,7 @@ "react-svg-loader": "3.0.3", "react-syntax-highlighter": "15.4.5", "react-use": "17.3.2", - "skynet-js": "4.0.19-beta", + "skynet-js": "^4.0.22-beta", "stream-browserify": "3.0.0", "swr": "1.1.2" }, diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 948b71b7..42605ed4 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -9143,6 +9143,11 @@ mime@^2.4.4, mime@^2.5.2: resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -11884,10 +11889,10 @@ sjcl@^1.0.8: resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a" integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ== -skynet-js@4.0.19-beta: - version "4.0.19-beta" - resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.19-beta.tgz#d4c640898c79cf69e45aa1c3c1ed5c80aa1aeced" - integrity sha512-d8/q3E3OjUxgCCAW28gNFvbahj0ks8ym122XTopbRyvAZKk9+/Z4ians9v8Tov36Z4k/un+Ilw/0i6DtM8c8Dw== +skynet-js@^4.0.22-beta: + version "4.0.22-beta" + resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.22-beta.tgz#d4b199cdb6ac00f3859f2ac477d2668425546029" + integrity sha512-DpTCuMIT5JSBTwJX3nb/qkHVAFyCeEA8fanBGzZPj4QviYK3Mmk+lZKLETd5RzxavkBtgW7VlSogmxdTDjjbyg== dependencies: axios "^0.24.0" base32-decode "^1.0.0" @@ -11895,7 +11900,7 @@ skynet-js@4.0.19-beta: base64-js "^1.3.1" blakejs "^1.1.0" buffer "^6.0.1" - mime "^2.5.2" + mime "^3.0.0" path-browserify "^1.0.1" post-me "^0.4.5" randombytes "^2.1.0" From 8d26ecb1faf4db2facfd954e5a39f1203b4015e5 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 13 Jan 2022 11:09:04 +0100 Subject: [PATCH 004/108] pin skynet-js version to 4.0.22-beta exact --- packages/website/package.json | 2 +- packages/website/yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 2e6416fd..3d648212 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -57,7 +57,7 @@ "react-svg-loader": "3.0.3", "react-syntax-highlighter": "15.4.5", "react-use": "17.3.2", - "skynet-js": "^4.0.22-beta", + "skynet-js": "4.0.22-beta", "stream-browserify": "3.0.0", "swr": "1.1.2" }, diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index 42605ed4..a49a70cd 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -11889,7 +11889,7 @@ sjcl@^1.0.8: resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a" integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ== -skynet-js@^4.0.22-beta: +skynet-js@4.0.22-beta: version "4.0.22-beta" resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.22-beta.tgz#d4b199cdb6ac00f3859f2ac477d2668425546029" integrity sha512-DpTCuMIT5JSBTwJX3nb/qkHVAFyCeEA8fanBGzZPj4QviYK3Mmk+lZKLETd5RzxavkBtgW7VlSogmxdTDjjbyg== From e3a25b6ceb4fb08f01ce462dc79092193cfc174a Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 13 Jan 2022 11:51:23 +0100 Subject: [PATCH 005/108] temporary backwards compatibility code --- packages/website/src/components/Navigation/Navigation.js | 4 ++-- packages/website/src/components/Uploader/Uploader.js | 6 ++++-- packages/website/src/services/useAccounts.js | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/website/src/components/Navigation/Navigation.js b/packages/website/src/components/Navigation/Navigation.js index 5e0c5ec4..ab96ab2a 100644 --- a/packages/website/src/components/Navigation/Navigation.js +++ b/packages/website/src/components/Navigation/Navigation.js @@ -41,8 +41,8 @@ const Navigation = ({ mode, uri }) => { }, [open]); const mobileMenuOffset = navRef.current ? navRef.current.offsetTop : 0; - const showLoginNavigation = accounts?.enabled && !accounts?.authenticated; - const showAccountNavigation = accounts?.enabled && accounts?.authenticated; + const showLoginNavigation = accounts && accounts.enabled !== false && !accounts?.authenticated; + const showAccountNavigation = accounts && accounts.enabled !== false && accounts?.authenticated; return (