From 2940cc06f22a490bd4a420e867511d7e77a75d64 Mon Sep 17 00:00:00 2001 From: matze Date: Sat, 19 Nov 2022 12:53:04 +0100 Subject: [PATCH] sync --- frontend/src/components/Beneficiary.jsx | 11 ++--- frontend/src/components/CardBeneficiary.jsx | 16 +++++--- frontend/src/components/CardTestator.jsx | 11 +++-- frontend/src/components/Testator.jsx | 13 +++--- frontend/src/css/Beneficiary.css | 10 ----- frontend/src/css/Buttons.css | 4 +- frontend/src/css/Card.css | 45 +++++++++++---------- frontend/src/css/Testator.css | 10 ----- roadmap.md | 3 +- 9 files changed, 54 insertions(+), 69 deletions(-) delete mode 100755 frontend/src/css/Beneficiary.css delete mode 100755 frontend/src/css/Testator.css diff --git a/frontend/src/components/Beneficiary.jsx b/frontend/src/components/Beneficiary.jsx index e662d44..7c4c476 100755 --- a/frontend/src/components/Beneficiary.jsx +++ b/frontend/src/components/Beneficiary.jsx @@ -1,6 +1,5 @@ import { useState, useEffect } from 'react' import "../css/Banner.css"; -import "../css/Beneficiary.css"; import CardBeneficiary from "./CardBeneficiary.jsx"; import eth from "../eth/eth.js" import {ethers} from "ethers"; @@ -91,12 +90,10 @@ function Beneficiary() { } return ( -
-
- {(will_beneficiary).map((item, index) => - - )} -
+
+ {(will_beneficiary).map((item, index) => + + )}
) } diff --git a/frontend/src/components/CardBeneficiary.jsx b/frontend/src/components/CardBeneficiary.jsx index 2261cd8..0255558 100755 --- a/frontend/src/components/CardBeneficiary.jsx +++ b/frontend/src/components/CardBeneficiary.jsx @@ -13,11 +13,13 @@ async function withdraw(){ } return ( -
+

ID: {props.id}


+ +
@@ -39,18 +41,20 @@ async function withdraw(){
-
+
- { props.amount > 0 ? + { props.amount > 0 ?
- : + : } -
-
+ +
+ +
) } diff --git a/frontend/src/components/CardTestator.jsx b/frontend/src/components/CardTestator.jsx index e308cfa..be72962 100755 --- a/frontend/src/components/CardTestator.jsx +++ b/frontend/src/components/CardTestator.jsx @@ -8,11 +8,13 @@ function CardTestator(props) { return ( -
+

ID: {props.id}


+ +
@@ -34,12 +36,13 @@ function CardTestator(props) {
-
- - + +
+
+
) } diff --git a/frontend/src/components/Testator.jsx b/frontend/src/components/Testator.jsx index 4d57f55..4302eea 100755 --- a/frontend/src/components/Testator.jsx +++ b/frontend/src/components/Testator.jsx @@ -1,6 +1,5 @@ import { useState, useEffect } from 'react' import "../css/Banner.css" -import "../css/Testator.css"; import CardTestator from "./CardTestator.jsx"; import eth from "../eth/eth.js" import {ethers} from "ethers"; @@ -43,7 +42,7 @@ function Testator() { beneficiary: will_testator.beneficiary, withdrawDate: withdrawdateNew } - } + } catch(e) { console.log("Invalid withdrawDate"); var myWill = { @@ -84,12 +83,10 @@ function Testator() { } return ( -
-
- {(will_beneficiary).map((item, index) => - - )} -
+
+ {(will_beneficiary).map((item, index) => + + )}
) } diff --git a/frontend/src/css/Beneficiary.css b/frontend/src/css/Beneficiary.css deleted file mode 100755 index 67f15af..0000000 --- a/frontend/src/css/Beneficiary.css +++ /dev/null @@ -1,10 +0,0 @@ -.Beneficiary { - margin-left: 20vh; - margin-right: 20vh; - margin-top: 5vh; -} - -.BeneficiaryContainer { - display: flex; - flex-wrap: wrap; -} diff --git a/frontend/src/css/Buttons.css b/frontend/src/css/Buttons.css index 1b6934b..bd28baa 100755 --- a/frontend/src/css/Buttons.css +++ b/frontend/src/css/Buttons.css @@ -5,7 +5,7 @@ font-weight: bold; border: none; border-radius: 20px; - margin-right: 10px; + width: 100px; } .withdrawBtn:hover { @@ -20,11 +20,13 @@ .extendBtn { padding: 10px; + width: 100px; background: #be60e0; color: white; font-weight: bold; border: none; border-radius: 20px; + margin-top: 10px; } .extendBtn:hover { diff --git a/frontend/src/css/Card.css b/frontend/src/css/Card.css index 254b23e..6e165cb 100755 --- a/frontend/src/css/Card.css +++ b/frontend/src/css/Card.css @@ -1,11 +1,21 @@ -.CardBeneficiary { +.CardContainer { + margin-left: 20vh; + margin-right: 20vh; + margin-top: 5vh; + + display: flex; + flex-direction: column; + align-items: center; +} + + +.Card { display: flex; flex-direction: column; - justify-content: space-between; background: #fffdf9; color: #595959; - width: 250px; - height: 300px; + width: 900px; + height: 210px; border-radius: 12px; padding-left: 20px; padding-right: 20px; @@ -16,31 +26,22 @@ -moz-box-shadow: 0px 0px 35px -2px rgba(110,110,110,0.49); } +.cardContent { + display: flex; + justify-content: space-between; + flex-direction: row; + align-items: center; + padding-top: 20px; +} + table td { padding-right: 15px; padding-bottom: 5px; } .btnArea { - //border: 1px solid black; - margin-bottom: 25px; -} - - -.CardTestator { display: flex; flex-direction: column; + //border: 1px solid black; justify-content: space-between; - background: #fffdf9; - color: #595959; - width: 250px; - height: 300px; - border-radius: 12px; - padding-left: 20px; - padding-right: 20px; - padding-top: 20px; - margin: 20px; - box-shadow: 0px 0px 35px -2px rgba(110,110,110,0.49); --webkit-box-shadow: 0px 0px 35px -2px rgba(110,110,110,0.49); --moz-box-shadow: 0px 0px 35px -2px rgba(110,110,110,0.49); } diff --git a/frontend/src/css/Testator.css b/frontend/src/css/Testator.css deleted file mode 100755 index 312069f..0000000 --- a/frontend/src/css/Testator.css +++ /dev/null @@ -1,10 +0,0 @@ -.Testator { - margin-left: 20vh; - margin-right: 20vh; - margin-top: 5vh; -} - -.TestatorContainer { - display: flex; - flex-wrap: wrap; -} diff --git a/roadmap.md b/roadmap.md index d00a383..a4a0748 100644 --- a/roadmap.md +++ b/roadmap.md @@ -1,2 +1,3 @@ # Roadmap -- [ ] Die Card soll über die ganze Zeile gehen. +- [x] Die Card soll über die ganze Zeile gehen. +- [ ] Button Funktionalität unter Testator implementieren.