Skip to content

Commit

Permalink
New create vesting balance page added
Browse files Browse the repository at this point in the history
Added a new page for creating vesting balances
Updated the drop-down navigation menu contents
  • Loading branch information
grctest committed Sep 12, 2024
1 parent 3af6fd2 commit 4cef990
Show file tree
Hide file tree
Showing 40 changed files with 1,061 additions and 17 deletions.
427 changes: 427 additions & 0 deletions src/components/CreateVestingBalance.jsx

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions src/components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,28 @@ export default function Home(properties) {
</ul>
</HoverCardContent>
</HoverCard>

<HoverCard key="create_vesting">
<HoverCardTrigger asChild>
<a href="/create_vesting/index.html" style={{ textDecoration: "none" }}>
<Card className="h-full hover:shadow-md hover:shadow-black">
<CardHeader>
<CardTitle>{t("Home:create_vesting.title")}</CardTitle>
<CardDescription>{t("Home:create_vesting.subtitle")}</CardDescription>
</CardHeader>
</Card>
</a>
</HoverCardTrigger>
<HoverCardContent className="w-80 text-sm pt-1">
<ul className="ml-2 list-disc [&>li]:mt-2">
<li>{t("Home:create_vesting.hover1")}</li>
<li>{t("Home:create_vesting.hover2")}</li>
<li>{t("Home:create_vesting.hover3")}</li>
<li>{t("Home:create_vesting.hover4")}</li>
</ul>
</HoverCardContent>
</HoverCard>

</div>

<h4 className="mt-3 mb-2">
Expand Down
55 changes: 53 additions & 2 deletions src/components/PageHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,26 @@ export default function PageHeader(properties) {
text={t("PageHeader:poolExchange")}
icon="💱"
/>
<MenuRow url="/stake/index.html" text={t("PageHeader:poolStake")} icon="🔒" />
<MenuRow
url="/swap/index.html"
text={t("PageHeader:simpleSwap")}
icon="🔄"
/>
<MenuRow
url="/stake/index.html"
text={t("PageHeader:poolStake")}
icon="🔒"
/>
<MenuRow
url="/transfer/index.html"
text={t("PageHeader:transferAssets")}
icon="💸"
/>
<MenuRow
url="/create_vesting/index.html"
text={t("PageHeader:vestAssets")}
icon="🫰"
/>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading={t("PageHeader:formsOfDebtHeading")}>
Expand All @@ -159,6 +173,11 @@ export default function PageHeader(properties) {
text={t("PageHeader:createDebt")}
icon="💵"
/>
<MenuRow
url="/tfunds/index.html"
text={t("PageHeader:sameTFunds")}
icon="🤖"
/>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading={t("PageHeader:overviewsHeading")}>
Expand All @@ -177,10 +196,42 @@ export default function PageHeader(properties) {
text={t("PageHeader:creditDeals")}
icon="🤝"
/>
<MenuRow
url="/offers/index.html"
text={t("PageHeader:creditOffers")}
icon="📜"
/>
<MenuRow
url="/vesting/index.html"
text={t("PageHeader:vestingBalances")}
icon="⌚"
/>
<MenuRow
url="/predictions/index.html"
text={t("PageHeader:predictions")}
icon="🎲"
/>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading={t("PageHeader:assetsHeading")}>
<MenuRow
url="/create_prediction/index.html"
text={t("PageHeader:createPrediction")}
icon="🔮"
/>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading={t("PageHeader:settingsHeading")}>
<MenuRow url="/ltm/index.html" text={t("PageHeader:buyLTM")} icon="🏅" />
<MenuRow
url="/ltm/index.html"
text={t("PageHeader:buyLTM")}
icon="🏅"
/>
<MenuRow
url="/nodes/index.html"
text={t("PageHeader:nodes")}
icon="🌐"
/>
</CommandGroup>
</CommandList>
</Command>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Predictions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,8 @@ export default function Predictions(properties) {
{
issueAmount > humanReadableBackingAssetBalance
? <Badge variant="destructive">
<ExclamationTriangleIcon className="mr-2"/> {t("Predictions:insufficient_funds")}
</Badge>
<ExclamationTriangleIcon className="mr-2"/> {t("Predictions:insufficient_funds")}
</Badge>
: null
}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/Vesting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ export default function Vesting(properties) {
: null
}
</>

</CardContent>
</Card>
{
Expand Down
29 changes: 29 additions & 0 deletions src/data/locales/da/CreateVestingBalance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"selectAccount": "Vælg Konto",
"card": {
"title": "Oprettelse af aktivoptjeningssaldo",
"description": "Opret en optjeningssaldo for en konto. "
},
"amount": "Beløb til vest",
"amountDescription": "Dette er mængden af ​​aktiver, du planlægger at placere i en optjeningssaldo for målkontoen.",
"target": "Målkonto",
"targetDescription": "Dette er den konto, der vil modtage optjeningssaldoen.",
"policy": "Vesting balance politik",
"policyDescription": "Du kan bruge en af ​​to politikker: Coin Days Destroyed eller Lineær Vesting med Cliff. ",
"asset": "Aktiv",
"assetDescription": "Dette er det aktiv, der vil blive placeret i optjeningsbalancen.",
"ccd": "Møntdage ødelagt",
"lvc": "Lineær Vesting med Cliff",
"startClaim": "Krav startdato",
"startClaimDescription": "Dette er den dato, hvor kontoen kan begynde at gøre krav på den optjente saldo.",
"vestingSeconds": "Optjening sekunder",
"vestingSecondsDescription": "Dette er det antal sekunder, som saldoen optjenes over.",
"beginTime": "Begynd tid",
"beginTimeDescription": "Dette er tidspunktet, hvor optjeningssaldoen begynder at optjenes.",
"vestingCliffSeconds": "Vesting klippe sekunder",
"vestingCliffSecondsDescription": "Dette er antallet af sekunder efter starttidspunktet, før saldoen begynder optjening.",
"vestingDurationSeconds": "Optjeningsvarighed sekunder",
"vestingDurationSecondsDescription": "Dette er det antal sekunder, som saldoen optjenes over.",
"dialogHeader": "Oprettelse af en ny Vesting Balance",
"myAccount": "Din konto"
}
8 changes: 8 additions & 0 deletions src/data/locales/da/Home.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,13 @@
"hover2": "Opret nemt en ny Same-T-fond.",
"hover3": "Opdater eller slet dine eksisterende Same-T-midler.",
"hover4": "Same-T-midler er en måde at tjene passivt på dine besiddelser."
},
"create_vesting": {
"title": "🫰 Vestaktiver",
"subtitle": "Skab optjening til dig selv eller andre",
"hover1": "Oprettelse af en optjeningsbalance giver dig mulighed for at låse en mængde aktiver op i en bestemt periode.",
"hover2": "Du kan bruge en af ​​to typer optjening: Coin Days Destroyed og Linear Vesting with Cliff.",
"hover3": "Coin Days Destroyed-politikkens effekt er at kræve en vis mængde \"rente\", før den fulde saldo kan trækkes tilbage. ",
"hover4": "Lineær Vesting med Cliff-politik bruges til at efterligne traditionelle aktieoptjeningkontrakter, hvor et vist beløb hver dag optjenes, indtil det er fuldt modnet."
}
}
12 changes: 11 additions & 1 deletion src/data/locales/da/PageHeader.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
"topMarkets": "Topmarkeder",
"creditDeals": "Kreditaftaler",
"settingsHeading": "Indstillinger",
"simpleSwap": "Simpelt bytte",
"vestAssets": "Vest Aktiver",
"sameTFunds": "Same-T Funds",
"creditOffers": "Kredittilbud",
"vestingBalances": "Optjening af saldi",
"predictions": "Forudsigelser",
"createPrediction": "Opret forudsigelse",
"assetsHeading": "Oprettelse af aktiver",
"nodes": "Noder",
"buyLTM": "Køb LTM",
"english": "engelsk (en)",
"danish": "dansk (da)",
Expand Down Expand Up @@ -50,7 +59,8 @@
"offers": "Overvåg og administrer dine kredittilbud med nedenstående formular.",
"vesting": "Overvåg og træk dine optjente saldi med nedenstående formular.",
"predictions": "Find et forudsigelsesmarkedsaktiv nedenfor for at spille på.",
"tfunds": "Find, opret, opdater eller slet Same-T-midler nedenfor!"
"tfunds": "Find, opret, opdater eller slet Same-T-midler nedenfor!",
"create_vesting": "Brug denne formular til at oprette en optjeningssaldo for enhver konto!"
},
"back": "Gå tilbage",
"usage": "Designet til brug med ",
Expand Down
29 changes: 29 additions & 0 deletions src/data/locales/de/CreateVestingBalance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"selectAccount": "Wählen Sie Konto aus",
"card": {
"title": "Ersteller des Vermögensausgleichsguthabens",
"description": "Erstellen Sie ein Sperrguthaben für ein Konto. "
},
"amount": "Zu übertragender Betrag",
"amountDescription": "Dies ist der Betrag an Vermögenswerten, den Sie in ein Vesting-Guthaben für das Zielkonto einzahlen möchten.",
"target": "Zielkonto",
"targetDescription": "Dies ist das Konto, auf das das Sperrguthaben überwiesen wird.",
"policy": "Vesting-Saldo-Richtlinie",
"policyDescription": "Sie können eine von zwei Richtlinien verwenden: Coin Days Destroyed oder Linear Vesting with Cliff. ",
"asset": "Vermögenswert",
"assetDescription": "Dabei handelt es sich um den Vermögenswert, der in den Freizügigkeitssaldo eingezahlt wird.",
"ccd": "Münztage zerstört",
"lvc": "Lineares Vesting mit Cliff",
"startClaim": "Beginndatum des Anspruchs",
"startClaimDescription": "Dies ist das Datum, an dem das Konto mit der Inanspruchnahme des unverfallbaren Guthabens beginnen kann.",
"vestingSeconds": "Vesting-Sekunden",
"vestingSecondsDescription": "Dies ist die Anzahl der Sekunden, über die das Guthaben unverfallbar wird.",
"beginTime": "Beginne die Zeit",
"beginTimeDescription": "Dies ist der Zeitpunkt, zu dem die Sperrung des Restbetrags beginnt.",
"vestingCliffSeconds": "Klippensekunden zugeteilt",
"vestingCliffSecondsDescription": "Dies ist die Anzahl der Sekunden nach der Startzeit, bevor der Restbetrag unverfallbar wird.",
"vestingDurationSeconds": "Sperrfrist in Sekunden",
"vestingDurationSecondsDescription": "Dies ist die Anzahl der Sekunden, über die das Guthaben unverfallbar wird.",
"dialogHeader": "Erstellen eines neuen Vesting-Guthabens",
"myAccount": "Ihr Konto"
}
8 changes: 8 additions & 0 deletions src/data/locales/de/Home.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,13 @@
"hover2": "Erstellen Sie ganz einfach einen neuen Same-T-Fonds.",
"hover3": "Aktualisieren oder löschen Sie Ihre vorhandenen Same-T-Gelder.",
"hover4": "Same-T-Fonds sind eine Möglichkeit, passiv an Ihren Beständen zu verdienen."
},
"create_vesting": {
"title": "🫰 Vermögenswerte übertragen",
"subtitle": "Erstellen Sie Freizügigkeitsguthaben für sich selbst oder andere",
"hover1": "Durch die Erstellung eines Sperrguthabens können Sie eine bestimmte Menge an Vermögenswerten für einen bestimmten Zeitraum sperren.",
"hover2": "Sie können einen von zwei Vesting-Typen verwenden: Coin Days Destroyed und Linear Vesting with Cliff.",
"hover3": "Die Wirkung der Coin Days Destroyed-Richtlinie besteht darin, dass ein bestimmter Betrag an „Zinsen“ anfallen muss, bevor der gesamte Restbetrag abgehoben werden kann. ",
"hover4": "Die Richtlinie „Linear Vesting with Cliff“ wird verwendet, um traditionelle Aktien-Vesting-Verträge nachzuahmen, bei denen jeden Tag ein bestimmter Betrag bis zur vollständigen Fälligkeit unverfallbar wird."
}
}
12 changes: 11 additions & 1 deletion src/data/locales/de/PageHeader.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
"topMarkets": "Top-Märkte",
"creditDeals": "Kreditgeschäfte",
"settingsHeading": "Einstellungen",
"simpleSwap": "Einfacher Tausch",
"vestAssets": "Vest-Vermögen",
"sameTFunds": "Same-T-Fonds",
"creditOffers": "Kreditangebote",
"vestingBalances": "Freizügigkeitsguthaben",
"predictions": "Vorhersagen",
"createPrediction": "Vorhersage erstellen",
"assetsHeading": "Vermögenserstellung",
"nodes": "Knoten",
"buyLTM": "Kaufen Sie LTM",
"english": "Englisch (en)",
"danish": "Dänisch (da)",
Expand Down Expand Up @@ -51,7 +60,8 @@
"vesting": "Überwachen und heben Sie Ihr Sperrguthaben mit dem untenstehenden Formular ab.",
"create_prediction": "Verwenden Sie das folgende Formular, um ein Prognosemarkt-Asset zu erstellen.",
"predictions": "Suchen Sie unten nach einem Prognosemarkt-Asset, auf das Sie wetten können.",
"tfunds": "Suchen, erstellen, aktualisieren oder löschen Sie unten Same-T-Fonds!"
"tfunds": "Suchen, erstellen, aktualisieren oder löschen Sie unten Same-T-Fonds!",
"create_vesting": "Verwenden Sie dieses Formular, um ein Sperrguthaben für jedes Konto zu erstellen!"
},
"back": "Geh zurück",
"usage": "Konzipiert für den Einsatz mit ",
Expand Down
29 changes: 29 additions & 0 deletions src/data/locales/en/CreateVestingBalance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"selectAccount": "Select Account",
"card": {
"title": "Asset Vesting Balance creator",
"description": "Create a vesting balance for an account. The balance will vest over the period of time you specify."
},
"amount": "Amount to vest",
"amountDescription": "This is the amount of assets you plan on placing into a vesting balance for the target account.",
"target": "Target account",
"targetDescription": "This is the account that will receive the vesting balance.",
"policy": "Vesting balance policy",
"policyDescription": "You can use one of two policies: Coin Days Destroyed or Linear Vesting with Cliff. Coin Days Destroyed policy's effect is to require a certain amount of “interest” to accrue before the full balance may be withdrawn. Interest accrues as coindays (balance * length held). If some of the balance is withdrawn, the remaining balance must be held longer. Linear Vesting with Cliff policy is used to mimic traditional stock vesting contracts where each day a certain amount vests until it is fully matured.",
"asset": "Asset",
"assetDescription": "This is the asset that will be placed into the vesting balance.",
"ccd": "Coin Days Destroyed",
"lvc": "Linear Vesting with Cliff",
"startClaim": "Claim start date",
"startClaimDescription": "This is the date when the account can start claiming the vested balance.",
"vestingSeconds": "Vesting seconds",
"vestingSecondsDescription": "This is the number of seconds over which the balance will vest.",
"beginTime": "Begin time",
"beginTimeDescription": "This is the time at which the vesting balance will begin vesting.",
"vestingCliffSeconds": "Vesting cliff seconds",
"vestingCliffSecondsDescription": "This is the number of seconds after the begin time before the balance will begin vesting.",
"vestingDurationSeconds": "Vesting duration seconds",
"vestingDurationSecondsDescription": "This is the number of seconds over which the balance will vest.",
"dialogHeader": "Creating a new Vesting Balance",
"myAccount": "Your account"
}
8 changes: 8 additions & 0 deletions src/data/locales/en/Home.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,13 @@
"hover2": "Easily create a new Same-T fund.",
"hover3": "Update or delete your existing Same-T funds.",
"hover4": "Same-T funds are a way to earn passively from your holdings."
},
"create_vesting": {
"title": "🫰 Vest Assets",
"subtitle": "Create vesting balances for yourself or others",
"hover1": "Creating a vesting balance allows you to lock up a quantity of assets for a set period of time.",
"hover2": "You can use one of two vesting types: Coin Days Destroyed and Linear Vesting with Cliff.",
"hover3": "Coin Days Destroyed policy's effect is to require a certain amount of “interest” to accrue before the full balance may be withdrawn. Interest accrues as coindays (balance * length held). If some of the balance is withdrawn, the remaining balance must be held longer.",
"hover4": "Linear Vesting with Cliff policy is used to mimic traditional stock vesting contracts where each day a certain amount vests until it is fully matured."
}
}
12 changes: 11 additions & 1 deletion src/data/locales/en/PageHeader.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
"topMarkets": "Top markets",
"creditDeals": "Credit deals",
"settingsHeading": "Settings",
"simpleSwap": "Simple swap",
"vestAssets": "Vest Assets",
"sameTFunds": "Same-T Funds",
"creditOffers": "Credit offers",
"vestingBalances": "Vesting balances",
"predictions": "Predictions",
"createPrediction": "Create prediction",
"assetsHeading": "Asset creation",
"nodes": "Nodes",
"buyLTM": "Buy LTM",
"english": "English (en)",
"danish": "Danish (da)",
Expand Down Expand Up @@ -51,7 +60,8 @@
"vesting": "Monitor and withdraw your vesting balances with the below form.",
"create_prediction": "Use the form below to create a prediction market asset.",
"predictions": "Locate a prediction market asset below to bet on.",
"tfunds": "Find, create, update or delete Same-T funds below!"
"tfunds": "Find, create, update or delete Same-T funds below!",
"create_vesting": "Use this form to create a vesting balance for any account!"
},
"back": "Go back",
"usage": "Designed for use with ",
Expand Down
29 changes: 29 additions & 0 deletions src/data/locales/es/CreateVestingBalance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"selectAccount": "Seleccionar cuenta",
"card": {
"title": "Creador del saldo de adquisición de activos",
"description": "Cree un saldo de adquisición de derechos para una cuenta. "
},
"amount": "Cantidad a otorgar",
"amountDescription": "Esta es la cantidad de activos que planea colocar en un saldo de adquisición de derechos para la cuenta objetivo.",
"target": "Cuenta objetivo",
"targetDescription": "Esta es la cuenta que recibirá el saldo de adquisición de derechos.",
"policy": "Política de saldo adquirido",
"policyDescription": "Puede utilizar una de dos políticas: Coin Days Destroyed o Linear Vesting with Cliff. ",
"asset": "Activo",
"assetDescription": "Este es el activo que se colocará en el saldo de adquisición de derechos.",
"ccd": "Días de monedas destruidos",
"lvc": "Adquisición lineal con acantilado",
"startClaim": "Fecha de inicio del reclamo",
"startClaimDescription": "Esta es la fecha en la que la cuenta puede comenzar a reclamar el saldo adquirido.",
"vestingSeconds": "Segundos de adquisición de derechos",
"vestingSecondsDescription": "Esta es la cantidad de segundos durante los cuales se otorgará el saldo.",
"beginTime": "hora de inicio",
"beginTimeDescription": "Este es el momento en el que el saldo adquirido comenzará a adquirir derechos.",
"vestingCliffSeconds": "Segundos del acantilado adquirido",
"vestingCliffSecondsDescription": "Esta es la cantidad de segundos después de la hora de inicio antes de que el saldo comience a adquirir derechos.",
"vestingDurationSeconds": "Duración de la concesión segundos",
"vestingDurationSecondsDescription": "Esta es la cantidad de segundos durante los cuales se otorgará el saldo.",
"dialogHeader": "Crear un nuevo saldo de adquisición de derechos",
"myAccount": "tu cuenta"
}
Loading

0 comments on commit 4cef990

Please sign in to comment.