-
+
+
+
+ {user.name}
+
+
+ {isUserPaused ? (
+ isChainAdmin ? (
+ {user.address}
+ ) : null
+ ) : isAddressPrivate ? (
+
+ ) : (
+ {user.address}
+ )}
+
+
+
+
+ {bags.map((b) => (
+
+
+
+ ))}
- ))}
+
);
diff --git a/app/src/pages/AddressList.tsx b/app/src/pages/AddressList.tsx
index 27dbbbdff..ec99293e0 100644
--- a/app/src/pages/AddressList.tsx
+++ b/app/src/pages/AddressList.tsx
@@ -15,7 +15,7 @@ import {
IonTitle,
IonToolbar,
} from "@ionic/react";
-import { useContext, useMemo, useRef, useState } from "react";
+import { useContext, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { StoreContext } from "../stores/Store";
import { openOutline, searchOutline } from "ionicons/icons";
@@ -59,6 +59,16 @@ export default function AddressList() {
const [search, setSearch] = useState("");
const slowSearch = useDebounce(search, 500);
+
+ useEffect(() => {
+ if (authUser) {
+ const el = document.querySelector("ali-" + authUser.uid);
+ el?.scrollIntoView({
+ block: "center",
+ });
+ }
+ }, []);
+
const routeListItems = useMemo(() => {
const routeLength = route.length;
if (!chain || routeLength === 0) return [];
@@ -68,13 +78,10 @@ export default function AddressList() {
}
let topRouteIndex = 0;
if (routeListView === "dynamic") {
- const routePrivacy = chain.route_privacy || 2;
- if (routePrivacy * 2 < routeLength) {
- topRouteIndex = wrapIndex(
- meRouteIndex - (routePrivacy <= 3 ? routePrivacy : 3),
- routeLength,
- );
- }
+ topRouteIndex =
+ routeLength < 6
+ ? routeLength - 1
+ : wrapIndex(meRouteIndex - 6, routeLength);
console.log("topRouteIndex", topRouteIndex);
}
diff --git a/app/src/tailwind.css b/app/src/tailwind.css
index 3d58461d0..5954373cf 100644
--- a/app/src/tailwind.css
+++ b/app/src/tailwind.css
@@ -81,6 +81,11 @@
rgba(255, 213, 52, 1) 40px
);
}
+ .tw-shadow-bags {
+ box-shadow: 0px 0px 3px 2px #fff;
+ border-radius: 5px;
+ background-color: #fff;
+ }
}
ion-radio::part(container) {
@@ -106,3 +111,9 @@ ion-radio.radio-checked::part(mark) {
transform: rotate(45deg);
}
+
+ion-item.ion-color-primary::part(detail-icon) {
+ --detail-icon-color: var(--ion-color-light) !important;
+ --detail-icon-opacity: 0.8;
+ /* display: none !important; */
+}
From 819bf62c1f3b9dd2c0cef03a71c169c447618f56 Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
Date: Wed, 1 May 2024 11:36:16 +0200
Subject: [PATCH 03/15] Add popup form
---
.../components/react/components/Navbar.tsx | 2 +
.../components/react/components/PopupForm.tsx | 71 +++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 frontend/src/components/react/components/PopupForm.tsx
diff --git a/frontend/src/components/react/components/Navbar.tsx b/frontend/src/components/react/components/Navbar.tsx
index 213bc9df4..e130c2b93 100644
--- a/frontend/src/components/react/components/Navbar.tsx
+++ b/frontend/src/components/react/components/Navbar.tsx
@@ -5,6 +5,7 @@ import { useStore } from "@nanostores/react";
import useLocalizePath from "../util/localize_path.hooks";
import useHydrated from "../util/hydrated.hooks";
import ToastManager from "../layout/ToastManager";
+import PopupForm from "./PopupForm";
function Navbar(props: { pathname: string }) {
const { t, i18n } = useTranslation();
@@ -21,6 +22,7 @@ function Navbar(props: { pathname: string }) {
return (
<>
+
-
+
{isVisible ? (
) : (
@@ -72,7 +72,7 @@ export default function Counters() {
- {isVisible ? : "0"}
+ {new Intl.NumberFormat().format(1197375)}
{t("nCo2")}
@@ -85,11 +85,7 @@ export default function Counters() {
- {isVisible ? (
-
- ) : (
- "0"
- )}
+ {new Intl.NumberFormat().format(580544000)}
{t("nLiters")}
diff --git a/frontend/src/components/react/components/Navbar.tsx b/frontend/src/components/react/components/Navbar.tsx
index e130c2b93..63ae6e21e 100644
--- a/frontend/src/components/react/components/Navbar.tsx
+++ b/frontend/src/components/react/components/Navbar.tsx
@@ -22,7 +22,7 @@ function Navbar(props: { pathname: string }) {
return (
<>
-
+
Date: Wed, 1 May 2024 11:47:35 +0200
Subject: [PATCH 05/15] Fix vps2 deployment
---
.github/workflows/deploy-acceptance-app.yml | 2 +-
.github/workflows/deploy-acceptance-fe.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/deploy-acceptance-app.yml b/.github/workflows/deploy-acceptance-app.yml
index cc8897dfd..18c15f75b 100644
--- a/.github/workflows/deploy-acceptance-app.yml
+++ b/.github/workflows/deploy-acceptance-app.yml
@@ -35,6 +35,6 @@ jobs:
run: |
rsync -az --delete ./app/build/ admin@vps2.vps.webdock.cloud:/home/admin/acc.app.clothingloop.org/
ssh admin@vps2.vps.webdock.cloud "\
- sudo chmod -R 0775 /home/admin/acc.app.clothingloop.org/; \
+ sudo rsync -z -rlt --chown=www-data:www-data --chmod=0775 --delete /home/admin/acc.app.clothingloop.org/ /var/www/acc.app.clothingloop.org/; \
sudo systemctl reload caddy"
echo "done"
diff --git a/.github/workflows/deploy-acceptance-fe.yml b/.github/workflows/deploy-acceptance-fe.yml
index 8661eee69..0ed2fe612 100644
--- a/.github/workflows/deploy-acceptance-fe.yml
+++ b/.github/workflows/deploy-acceptance-fe.yml
@@ -35,6 +35,6 @@ jobs:
run: |
rsync -az --delete ./frontend/build/ admin@vps2.vps.webdock.cloud:/home/admin/acc.clothingloop.org/
ssh admin@vps2.vps.webdock.cloud "\
- sudo chmod -R 0775 /home/admin/acc.clothingloop.org/; \
+ sudo rsync -z -rlt --chown=www-data:www-data --chmod=0775 --delete /home/admin/acc.clothingloop.org/ /var/www/acc.clothingloop.org/; \
sudo systemctl reload caddy"
echo "done"
From cb4e5a1ae06eec234d5bd5c58d6cfffd1a8fd00f Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
Date: Wed, 1 May 2024 12:43:11 +0200
Subject: [PATCH 06/15] Better bags
---
app/src/components/AddressList/AddressListItem.tsx | 6 ++++--
app/src/tailwind.css | 10 ++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/app/src/components/AddressList/AddressListItem.tsx b/app/src/components/AddressList/AddressListItem.tsx
index 46f961ee7..9805dd289 100644
--- a/app/src/components/AddressList/AddressListItem.tsx
+++ b/app/src/components/AddressList/AddressListItem.tsx
@@ -95,12 +95,14 @@ export default function AddressListItem({
>
{bags.map((b) => (
))}
diff --git a/app/src/tailwind.css b/app/src/tailwind.css
index 5954373cf..675512c0f 100644
--- a/app/src/tailwind.css
+++ b/app/src/tailwind.css
@@ -82,8 +82,14 @@
);
}
.tw-shadow-bags {
- box-shadow: 0px 0px 3px 2px #fff;
- border-radius: 5px;
+ @apply tw-relative;
+ }
+ .tw-shadow-bags::before {
+ @apply tw-block tw-w-full tw-h-full tw-absolute -tw-z-10;
+ content: "";
+ outline: 2px solid #fff;
+ border-radius: 100%;
+ outline-offset: -0.3px;
background-color: #fff;
}
}
From 67588b74a7cf6a4734adc3d9059243f6438f8d71 Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
Date: Wed, 1 May 2024 14:19:51 +0200
Subject: [PATCH 07/15] Add more anbi text to donation page
---
.../components/react/pages/DonationForm.tsx | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/frontend/src/components/react/pages/DonationForm.tsx b/frontend/src/components/react/pages/DonationForm.tsx
index 6a4681d84..0403c1b00 100644
--- a/frontend/src/components/react/pages/DonationForm.tsx
+++ b/frontend/src/components/react/pages/DonationForm.tsx
@@ -338,6 +338,8 @@ function DonationFormContent() {
);
}
+const anbiUrl =
+ "https://www.belastingdienst.nl/wps/wcm/connect/bldcontentnl/belastingdienst/zakelijk/bijzondere_regelingen/goede_doelen/algemeen_nut_beogende_instellingen/wat_is_een_anbi";
export default function DonationForm() {
const { t } = useTranslation();
@@ -366,7 +368,7 @@ export default function DonationForm() {
+
+ Stichting Slow Fashion Movement is recognised by the Dutch tax
+ authorities as an ANBI. This stands for “Algemeen Nut Beogende
+ Instelling”, which translates to{" "}
+
+ Public Benefit Organisation
+
+ .
+
+
-
An ANBI does not pay donation tax over donations that are used
From ba3f79af79b1736b031183568bf437073162e52d Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
-
Date: Wed, 1 May 2024 14:51:26 +0200
Subject: [PATCH 08/15] survey
---
frontend/astro-i18next.config.mjs | 9 ++++++++-
frontend/public/locales/en/survey.json | 5 +++++
frontend/public/locales/nl/survey.json | 5 +++++
.../src/components/react/components/PopupForm.tsx | 15 +++++----------
4 files changed, 23 insertions(+), 11 deletions(-)
create mode 100644 frontend/public/locales/en/survey.json
create mode 100644 frontend/public/locales/nl/survey.json
diff --git a/frontend/astro-i18next.config.mjs b/frontend/astro-i18next.config.mjs
index de2ac8a7f..74d81006d 100644
--- a/frontend/astro-i18next.config.mjs
+++ b/frontend/astro-i18next.config.mjs
@@ -5,7 +5,14 @@ const languages = getLanguages(false);
/** @type {import('astro-i18next').AstroI18nextConfig} */
export default {
locales: languages,
- namespaces: ["about", "faq", "testimonials", "translation", "contribute"],
+ namespaces: [
+ "about",
+ "faq",
+ "testimonials",
+ "translation",
+ "contribute",
+ "survey",
+ ],
defaultNamespace: "translation",
load: ["server", "client"], // load i18next server and client side
i18nextServerPlugins: {
diff --git a/frontend/public/locales/en/survey.json b/frontend/public/locales/en/survey.json
new file mode 100644
index 000000000..72ff16e3a
--- /dev/null
+++ b/frontend/public/locales/en/survey.json
@@ -0,0 +1,5 @@
+{
+ "title": "Can we please ask you some questions?",
+ "body": "We are very curious how you experience the Clothing Loop! It only takes about five minutes to fill in our short survey. Your answers will be of great help to us.",
+ "btnSubmit": "Form"
+}
diff --git a/frontend/public/locales/nl/survey.json b/frontend/public/locales/nl/survey.json
new file mode 100644
index 000000000..8cd580f0d
--- /dev/null
+++ b/frontend/public/locales/nl/survey.json
@@ -0,0 +1,5 @@
+{
+ "title": "Mogen we je een paar vragen stellen?",
+ "body": "We zijn erg benieuwd hoe jij de Clothing Loop ervaart! Het duurt slechts vijf minuten om onze korte enquête in te vullen. Jouw mening is belangrijk voor ons!",
+ "btnSubmit": "Enquête"
+}
diff --git a/frontend/src/components/react/components/PopupForm.tsx b/frontend/src/components/react/components/PopupForm.tsx
index 27cae1092..45ed719d5 100644
--- a/frontend/src/components/react/components/PopupForm.tsx
+++ b/frontend/src/components/react/components/PopupForm.tsx
@@ -7,7 +7,7 @@ const maxDate = new Date(2024, 6, 1);
const url = "http://google.com";
export default function PopupForm() {
- const { t } = useTranslation();
+ const { t } = useTranslation("survey");
const [open, setOpen] = useState(false);
useEffect(() => {
if (isSSR()) return;
@@ -40,28 +40,23 @@ export default function PopupForm() {
From b1330de0242961933adceaadf79c59bc2fb0bf40 Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
-
Date: Wed, 1 May 2024 15:12:25 +0200
Subject: [PATCH 09/15] outline still gives border line
---
app/src/tailwind.css | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/src/tailwind.css b/app/src/tailwind.css
index 675512c0f..397cacd6a 100644
--- a/app/src/tailwind.css
+++ b/app/src/tailwind.css
@@ -87,9 +87,8 @@
.tw-shadow-bags::before {
@apply tw-block tw-w-full tw-h-full tw-absolute -tw-z-10;
content: "";
- outline: 2px solid #fff;
+ transform: scale(1.15);
border-radius: 100%;
- outline-offset: -0.3px;
background-color: #fff;
}
}
From 13aa9cf6957d6cb19b085d0d5b1c246b8cc86324 Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
-
Date: Wed, 1 May 2024 16:21:11 +0200
Subject: [PATCH 10/15] Fix height when address missing
---
app/src/components/AddressList/AddressListItem.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/components/AddressList/AddressListItem.tsx b/app/src/components/AddressList/AddressListItem.tsx
index 9805dd289..c62c67ca8 100644
--- a/app/src/components/AddressList/AddressListItem.tsx
+++ b/app/src/components/AddressList/AddressListItem.tsx
@@ -68,7 +68,7 @@ export default function AddressListItem({
{user.name}
@@ -77,7 +77,7 @@ export default function AddressListItem({
{user.address}
) : null
) : isAddressPrivate ? (
-
+ null
) : (
{user.address}
)}
From 01d8533cfc16ffdedc78a12e6d2b1df6087f6669 Mon Sep 17 00:00:00 2001
From: "Lucian I. Last"
-
Date: Wed, 1 May 2024 16:21:28 +0200
Subject: [PATCH 11/15] Fix hide phonenumber when missing
---
app/src/components/UserCard.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/components/UserCard.tsx b/app/src/components/UserCard.tsx
index c2b14be3e..d942e20b4 100644
--- a/app/src/components/UserCard.tsx
+++ b/app/src/components/UserCard.tsx
@@ -82,7 +82,7 @@ export default function UserCard({
}) {
const { t } = useTranslation();
const isAddressPrivate = IsPrivate(user.address);
- const isEmailPrivate = IsPrivate(user.email);
+ const isPhonePrivate = !user.phone_number || IsPrivate(user.phone_number);
const isUserAdmin = useMemo(
() => IsChainAdmin(user, chain?.uid),
[user, chain],
@@ -158,7 +158,7 @@ export default function UserCard({
- {isEmailPrivate && !user.phone_number ? null : (
+ {isPhonePrivate ? null : (
<>
Date: Wed, 1 May 2024 16:21:43 +0200
Subject: [PATCH 12/15] Set to survey in en
---
frontend/public/locales/en/survey.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/public/locales/en/survey.json b/frontend/public/locales/en/survey.json
index 72ff16e3a..d09b22545 100644
--- a/frontend/public/locales/en/survey.json
+++ b/frontend/public/locales/en/survey.json
@@ -1,5 +1,5 @@
{
"title": "Can we please ask you some questions?",
"body": "We are very curious how you experience the Clothing Loop! It only takes about five minutes to fill in our short survey. Your answers will be of great help to us.",
- "btnSubmit": "Form"
+ "btnSubmit": "Survey"
}
From 4534214fbed1cd74181e31406e395e4fb16cd10e Mon Sep 17 00:00:00 2001
From: "Lucian I. Last" -
Date: Wed, 1 May 2024 16:22:15 +0200
Subject: [PATCH 13/15] Set url form & change text size
---
frontend/src/components/react/components/PopupForm.tsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/components/react/components/PopupForm.tsx b/frontend/src/components/react/components/PopupForm.tsx
index 45ed719d5..5dabbaf2e 100644
--- a/frontend/src/components/react/components/PopupForm.tsx
+++ b/frontend/src/components/react/components/PopupForm.tsx
@@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next";
const KEY = "2024-05-form";
const maxDate = new Date(2024, 6, 1);
-const url = "http://google.com";
+const url = "https://yew6s2omgul.typeform.com/to/xoeaKKeu";
export default function PopupForm() {
const { t } = useTranslation("survey");
@@ -38,11 +38,11 @@ export default function PopupForm() {
open={open}
>