From c4118a58403662667975ba197c8933c80afbb1bb Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 12:59:15 +0200 Subject: [PATCH 1/9] Add title to moments stat link --- src/pages/Event.js | 1 + src/styles/stats.css | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Event.js b/src/pages/Event.js index 55e964f..ff46236 100644 --- a/src/pages/Event.js +++ b/src/pages/Event.js @@ -274,6 +274,7 @@ function Event() { 'moments': metrics && metrics.momentsUploaded > 0 ? { text: formatStat(metrics.momentsUploaded), + title: `View uploaded moments on ${event.name}`, link: `${POAP_MOMENTS_URL}/drop/${event.id}`, external: true, } diff --git a/src/styles/stats.css b/src/styles/stats.css index 3c052f5..5cf516d 100644 --- a/src/styles/stats.css +++ b/src/styles/stats.css @@ -58,7 +58,7 @@ margin-top: .2rem; } -.stat .stat-name[title] { +.stat span.stat-name[title] { cursor: help; text-decoration: underline dotted; } From 1ff732b541ade3f7a0b7dbafa57d6ef8bc762acb Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 13:06:39 +0200 Subject: [PATCH 2/9] Move margin left on common stats to css --- src/components/Stats.js | 1 - src/styles/stats.css | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Stats.js b/src/components/Stats.js index 0b11ce9..a9c6408 100644 --- a/src/components/Stats.js +++ b/src/components/Stats.js @@ -14,7 +14,6 @@ function Stats({ stats, highlight }) { style={{ paddingLeft: highlight !== statName && index === 0 ? '.5rem' : undefined, paddingRight: highlight !== statName && index + 1 === entries.length ? '.5rem' : undefined, - marginLeft: highlight && highlight !== statName ? '.5rem' : undefined, }} >
diff --git a/src/styles/stats.css b/src/styles/stats.css index 5cf516d..a59ad0d 100644 --- a/src/styles/stats.css +++ b/src/styles/stats.css @@ -10,6 +10,10 @@ border-color: #efeeff; } +.stats.highlighted .stat.common { + margin-left: .5rem; +} + .stats .stats-content { margin: -.35rem; display: flex; From 92fb92d24fdbf96cd8ee1f336015526d67198a86 Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 13:08:37 +0200 Subject: [PATCH 3/9] Add hover of link on stat --- src/components/Stats.js | 2 +- src/styles/stats.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Stats.js b/src/components/Stats.js index a9c6408..0213299 100644 --- a/src/components/Stats.js +++ b/src/components/Stats.js @@ -10,7 +10,7 @@ function Stats({ stats, highlight }) { {entries.map(([statName, stat], index) => (
Date: Wed, 9 Aug 2023 13:11:30 +0200 Subject: [PATCH 4/9] Fix style in stat --- src/components/Stats.js | 4 ---- src/styles/stats.css | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/Stats.js b/src/components/Stats.js index 0213299..14cdcc6 100644 --- a/src/components/Stats.js +++ b/src/components/Stats.js @@ -11,10 +11,6 @@ function Stats({ stats, highlight }) {
{typeof stat === 'object' diff --git a/src/styles/stats.css b/src/styles/stats.css index 0fad281..91338af 100644 --- a/src/styles/stats.css +++ b/src/styles/stats.css @@ -14,6 +14,14 @@ margin-left: .5rem; } +.stats.highlighted .stat.common:first-child { + padding-left: .5rem; +} + +.stats.highlighted .stat.common:last-child { + padding-right: .5rem; +} + .stats .stats-content { margin: -.35rem; display: flex; From 88fbf751efad7d74f655b65c94a4e68e61b4be7a Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 13:51:09 +0200 Subject: [PATCH 5/9] Replace external icon --- src/components/LinkButton.js | 10 ++++------ src/styles/link-button.css | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/LinkButton.js b/src/components/LinkButton.js index 45191f6..37c8e65 100644 --- a/src/components/LinkButton.js +++ b/src/components/LinkButton.js @@ -1,6 +1,10 @@ +import { OpenNewWindow } from 'iconoir-react' import '../styles/link-button.css' function LinkButton({ title, icon, href, children, external = false, secondary = false }) { + if (external) { + icon = + } return ( )} - {external && ( - - - - - )} {children} diff --git a/src/styles/link-button.css b/src/styles/link-button.css index 85e3cd3..6520141 100644 --- a/src/styles/link-button.css +++ b/src/styles/link-button.css @@ -84,11 +84,13 @@ .link-button.secondary:hover .link-button-content { background-color: #968cff; color: white; + stroke: white; + fill: white; border-color: #5e58a5; } .link-button .link-button-content .link-button-icon { position: relative; top: 2px; - margin-right: .1rem; + margin-right: .25rem; } From b0cf20f20e09342e2f846b039588a306ad1fb41c Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 13:51:30 +0200 Subject: [PATCH 6/9] Set svg colors in buttons --- src/styles/button.css | 10 ++++++++++ src/styles/link-button.css | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/src/styles/button.css b/src/styles/button.css index 06ecb71..1ab5595 100644 --- a/src/styles/button.css +++ b/src/styles/button.css @@ -20,6 +20,8 @@ .button.primary .button-content { background-color: #968cff; color: white; + stroke: white; + fill: white; border-color: #5e58a5; } @@ -30,12 +32,16 @@ .button.secondary:hover .button-content { background-color: #968cff; color: white; + stroke: white; + fill: white; border-color: #5e58a5; } .button.active .button-content { background-color: #968cff; color: white; + stroke: white; + fill: white; font-weight: 700; border-color: #5e58a5; } @@ -44,6 +50,8 @@ background-color: #f5f4ff; border-color: #dddaff; color: lightslategray; + stroke: lightslategray; + fill: lightslategray; opacity: .8; cursor: default; } @@ -63,6 +71,8 @@ cursor: pointer; background-color: white; color: #7c72e2; + stroke: #7c72e2; + fill: #7c72e2; border: .1rem solid #dddaff; font-weight: 700; transition: background-color .3s ease-out,transform .3s ease-out,border-color .3s ease-out; diff --git a/src/styles/link-button.css b/src/styles/link-button.css index 6520141..a4e615c 100644 --- a/src/styles/link-button.css +++ b/src/styles/link-button.css @@ -48,6 +48,8 @@ .link-button.primary .link-button-content { color: white; + stroke: white; + fill: white; background-color: #968cff; border-color: #473e6b; transition: background-color .3s ease-out,transform .3s ease-out,border-color .3s ease-out; @@ -77,6 +79,8 @@ padding: 0 .8rem; background-color: white; color: #7c72e2; + stroke: #7c72e2; + fill: #7c72e2; border: .1rem solid #dddaff; transition: background-color .3s ease-out,transform .3s ease-out,border-color .3s ease-out; } From a4744d3b6c3329a2d4eeb2df6824e75124def4b6 Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 14:00:31 +0200 Subject: [PATCH 7/9] Add upload moment button on event --- src/components/LinkButton.js | 2 +- src/pages/Event.js | 13 +++++++++++++ src/styles/event-buttons.css | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/LinkButton.js b/src/components/LinkButton.js index 37c8e65..69b1cd9 100644 --- a/src/components/LinkButton.js +++ b/src/components/LinkButton.js @@ -2,7 +2,7 @@ import { OpenNewWindow } from 'iconoir-react' import '../styles/link-button.css' function LinkButton({ title, icon, href, children, external = false, secondary = false }) { - if (external) { + if (external && !icon) { icon = } return ( diff --git a/src/pages/Event.js b/src/pages/Event.js index ff46236..5312db5 100644 --- a/src/pages/Event.js +++ b/src/pages/Event.js @@ -24,6 +24,7 @@ import Progress from '../components/Progress' import ButtonExportAddressCsv from '../components/ButtonExportAddressCsv' import ButtonAdd from '../components/ButtonAdd' import ButtonExpand from '../components/ButtonExpand' +import LinkButton from '../components/LinkButton' import '../styles/event.css' function Event() { @@ -292,6 +293,18 @@ function Event() { > export csv , + + + + )} + />, ]} > {caching && diff --git a/src/styles/event-buttons.css b/src/styles/event-buttons.css index ad93961..b732118 100644 --- a/src/styles/event-buttons.css +++ b/src/styles/event-buttons.css @@ -17,3 +17,7 @@ display: flex; gap: .5rem; } + +.event-buttons .buttons a.link-button.secondary { + margin-top: -.4rem; +} From 803d9f593865954ddde10184e02a5f902b459517 Mon Sep 17 00:00:00 2001 From: Juan M Date: Wed, 9 Aug 2023 14:07:03 +0200 Subject: [PATCH 8/9] Invert moment links --- src/pages/Event.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/Event.js b/src/pages/Event.js index 5312db5..760cff2 100644 --- a/src/pages/Event.js +++ b/src/pages/Event.js @@ -275,8 +275,8 @@ function Event() { 'moments': metrics && metrics.momentsUploaded > 0 ? { text: formatStat(metrics.momentsUploaded), - title: `View uploaded moments on ${event.name}`, - link: `${POAP_MOMENTS_URL}/drop/${event.id}`, + title: `Upload moment on ${event.name}`, + link: `${POAP_MOMENTS_URL}/upload?drop=${event.id}`, external: true, } : undefined, @@ -294,9 +294,9 @@ function Event() { export csv , Date: Wed, 9 Aug 2023 14:16:35 +0200 Subject: [PATCH 9/9] Version 1.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4360fef..8ac68a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@poap-xyz/poap-family", - "version": "1.6.1", + "version": "1.6.2", "author": { "name": "POAP", "url": "https://poap.xyz"