Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paladin board #50

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/gem-farm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Binary file modified app/gem-farm/public/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions app/gem-farm/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
href="https://unpkg.com/nes.css@latest/css/nes.min.css"
rel="stylesheet"
/>

<title>Gem Farm</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Paladin Board</title>
</head>
<body>
<noscript>
Expand Down
59 changes: 48 additions & 11 deletions app/gem-farm/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,74 @@
<template>
<div class="relative h-full min-h-screen">
<TheNavBar />
<div class="relative h-full min-h-screen content">
<div class="pt-10 px-10 flex justify-center align-middle">
<p class="text-4xl pt-3 px-1 mt-1 text-black underline">GEM</p>
<img :width="50" :height="50" src="./assets/400x600.gif" />
<p class="text-4xl pt-3 px-2 mt-1 text-black underline">FARM</p>
<p class="text-4xl pt-3 px-1 mt-1 title text-white">Paladin</p>
<img :width="80" :height="80" src="./assets/logo.png" />
<p class="text-4xl pt-3 px-2 mt-1 title text-white">Board</p>
</div>
<div class="italic mt-5 text-center">by Gemworks</div>
<!-- <div class="italic mt-5 text-center"></div> -->

<div class="p-10">
<router-view />
</div>

<div class="pt-10"></div>
<TheCat />
<TheFooter />
</div>
</template>

<script>
import TheNavBar from '@/components/TheNavBar';
import TheFooter from '@/components/gem-farm/TheFooter';
import TheCat from '@/components/gem-farm/TheCat';
export default {
components: { TheCat, TheFooter, TheNavBar },
components: { TheFooter },
};
</script>

<style>
@font-face {
font-family: 'VT323-Regular';
src: url('./assets/fonts/VT323-Regular.ttf');
}
* {
font-family: 'Press Start 2P', monospace;
font-family: 'VT323-Regular', monospace;
cursor: url(https://cur.cursors-4u.net/sports/spo-1/spo15.cur), auto !important;
color: white;
}
input[type='radio']:checked + span {
@apply text-black;
}
.content {
background: #303331;
}
.title {
font-family: 'Blackadder ITC';
font-weight: bold;
margin-top: auto;
margin-bottom: auto;
}
.nes-container {
animation: effect 2s linear infinite;
border-style: dotted;
}
.btn {
color: white;
border-color: #7b4ff5;
border-width: 1.5px;
padding-right: 0.8em;
padding-left: 0.8em;
}

@keyframes effect {
0% {
border-color: #4fc0f5;
-webkit-background-clip: text;
}
50% {
border-color: #c53ce7;
-webkit-background-clip: text;
}
100% {
border-color: #4fc0f5;
-webkit-background-clip: text;
}
}
</style>
10 changes: 10 additions & 0 deletions app/gem-farm/src/assets/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/gem-farm/src/assets/fonts/VT323-Regular.ttf
Binary file not shown.
Binary file added app/gem-farm/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/gem-farm/src/assets/spo15.cur
Binary file not shown.
3 changes: 3 additions & 0 deletions app/gem-farm/src/assets/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 21 additions & 12 deletions app/gem-farm/src/components/ConfigPane.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
<template>
<div class="flex justify-center mb-10">
<div class="nes-select is-dark flex-1">
<select required id="cluster" v-model="chosenCluster">
<option :value="Cluster.Mainnet">Mainnet</option>
<option :value="Cluster.Devnet">Devnet</option>
<option :value="Cluster.Testnet">Testnet</option>
<option :value="Cluster.Localnet">Localnet</option>
</select>
</div>
<div class="nes-select is-dark flex-1">
<div class="flex justify-center mb-10 row">
<!-- <div class="flex-1"></div> -->
<div class="nes-select is-dark justify-center flex col-md-4 col-sm-12">
<select required id="wallet" v-model="chosenWallet">
<option class="text-gray-500" :value="null">Choose wallet..</option>
<option class="text-gray-500" :value="null">Connect wallet..</option>
<option :value="WalletName.Phantom">Phantom</option>
<option :value="WalletName.Sollet">Sollet</option>
<option :value="WalletName.SolletExtension">Sollet Extension</option>
<option :value="WalletName.Solflare">Solflare</option>
<option :value="WalletName.SolflareWeb">Solflare Web</option>
</select>
</div>
<!-- <div class="flex-1"></div> -->
</div>
</template>

Expand Down Expand Up @@ -61,4 +55,19 @@ export default defineComponent({
});
</script>

<style scoped></style>
<style scoped>
#wallet {
font-size: 1.5em;
text-align: center;
border-image-source: none;
border-top-style: dotted;
border-right-style: solid;
border-bottom-style: dotted;
border-left-style: solid;
border-radius: 5px;
animation: effect 2s linear infinite;
}
div.nes-select.is-dark.flex::after {
display: none;
}
</style>
2 changes: 1 addition & 1 deletion app/gem-farm/src/components/gem-bank/NFTGrid.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="nes-container with-title">
<p class="title">{{ title }}</p>
<p class="title bg-dark">{{ title }}</p>
<slot />
<div class="flex flex-wrap">
<NFTCard
Expand Down
51 changes: 27 additions & 24 deletions app/gem-farm/src/components/gem-bank/Vault.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(toWalletNFTs && toWalletNFTs.length) ||
(toVaultNFTs && toVaultNFTs.length)
"
class="nes-btn is-primary mr-5"
class="btn is-primary mr-5"
@click="moveNFTsOnChain"
>
Move Gems!
Expand All @@ -15,17 +15,18 @@
</div>

<!--wallet + vault view-->
<div class="flex items-stretch">
<div class="flex row">
<!--left-->
<NFTGrid
title="Your wallet"
class="flex-1"
:nfts="desiredWalletNFTs"
@selected="handleWalletSelected"
/>

<div class="col-sm-12 m-2">
<NFTGrid
title="Your wallet"
class="flex-1"
:nfts="desiredWalletNFTs"
@selected="handleWalletSelected"
/>
</div>
<!--mid-->
<div class="m-2 flex flex-col">
<!-- <div class="m-2 flex flex-col">
<ArrowButton
:disabled="vaultLocked"
class="my-2"
Expand All @@ -37,23 +38,25 @@
:left="true"
@click="moveNFTsFE(true)"
/>
</div>
</div> -->

<!--right-->
<NFTGrid
v-if="bank && vault"
title="Your vault"
class="flex-1"
:nfts="desiredVaultNFTs"
@selected="handleVaultSelected"
>
<div
v-if="vaultLocked"
class="locked flex-col justify-center items-center align-center"
<div class="col-sm-12 m-2">
<NFTGrid
v-if="bank && vault"
title="Your vault"
class="flex-1"
:nfts="desiredVaultNFTs"
@selected="handleVaultSelected"
>
<p class="mt-10">This vault is locked!</p>
</div>
</NFTGrid>
<div
v-if="vaultLocked"
class="locked flex-col justify-center items-center align-center"
>
<p class="mt-10">This vault is locked!</p>
</div>
</NFTGrid>
</div>
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions app/gem-farm/src/components/gem-farm/AuthorizeFunder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<label for="authorizeFunder"></label>
<input id="authorizeFunder" class="nes-input" v-model="toAuthorize" />
</div>
<button class="nes-btn is-primary mb-5">Authorize</button>
<button class="btn is-primary mb-5">Authorize</button>
</form>
<!--DEauthorize-->
<form class="flex-1" @submit.prevent="deauthorizeFunder">
Expand All @@ -20,7 +20,7 @@
v-model="toDeauthorize"
/>
</div>
<button class="nes-btn is-primary mb-5">Deauthorize</button>
<button class="btn is-primary mb-5">Deauthorize</button>
</form>
</div>
<!--list of current funders-->
Expand Down
2 changes: 1 addition & 1 deletion app/gem-farm/src/components/gem-farm/BankWhitelist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>

<div class="mt-2">
<button class="nes-btn is-primary">Update</button>
<button class="btn is-primary">Update</button>
</div>
</form>

Expand Down
37 changes: 19 additions & 18 deletions app/gem-farm/src/components/gem-farm/FarmerDisplay.vue
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
<template>
<div class="nes-container with-title">
<p class="title">Your Staking Account</p>
<div class="mb-2">
<p class="title bg-dark">Your Staking Account</p>
<!-- <div class="mb-2">
state:
<p class="inline-block bg-yellow-200">
<p class="inline-block">
{{ parseFarmerState(farmerAcc) }}
</p>
</div>
<div class="mb-2">Your identity: {{ farmerAcc.identity.toBase58() }}</div>
<div class="mb-2">Associated vault: {{ farmerAcc.vault.toBase58() }}</div>
<div class="mb-2">Gems staked: {{ farmerAcc.gemsStaked }}</div>
<div class="mb-2">
Min staking ends: {{ parseDate(farmerAcc.minStakingEndsTs) }}
</div>
</div> -->
<div class="mb-2">Total NFTs: 1000</div>
<div class="mb-2">NFTs Staked: {{ farmAcc.gemsStaked }}</div>
<div class="mb-2">Percentage Staked: {{ farmAcc.gemsStaked * 100 / 1000 }}</div>
<div class="mb-5">
Cooldown ends: {{ parseDate(farmerAcc.cooldownEndsTs) }}
PALD Earned: {{ farmAcc.rewardA.funds.totalAccruedToStakers }}
</div>

<div class="flex mb-5">
<div class="flex-1 mr-5">
<div class="flex mb-5 row">
<div class="flex-1 m-2 col-sm-12">
<FarmerRewardDisplay
:key="farmerAcc.rewardA"
:farmReward="farmAcc.rewardA"
:reward="farmerAcc.rewardA"
title="Reward A"
title="PALD"
/>
</div>
<div class="flex-1">
<!-- <div class="flex-1 m-2 col-sm-12">
<FarmerRewardDisplay
:key="farmerAcc.rewardB"
:farmReward="farmAcc.rewardB"
:reward="farmerAcc.rewardB"
title="Reward B"
/>
</div>
</div> -->
</div>
<button class="nes-btn is-primary mb-5" @click="refreshFarmer">
<button class="btn is-dark mb-5" @click="refreshFarmer">
Refresh account
</button>
</div>
Expand Down Expand Up @@ -98,4 +95,8 @@ export default defineComponent({
});
</script>

<style scoped></style>
<style scoped>
.nes-container .with-title .title{
background-color: black;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="nes-container with-title">
<p class="title">{{ title }}</p>
<p class="title bg-dark">{{ title }}</p>
<div class="mb-2">Accrued reward: {{ reward.accruedReward }}</div>
<div class="mb-2">Paid out reward: {{ reward.paidOutReward }}</div>
<div v-if="parseRewardType(farmReward) === 'variable'">
Expand Down
6 changes: 3 additions & 3 deletions app/gem-farm/src/components/gem-farm/FundCancelLock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@
</div>
<!--buttons-->
<div class="flex mb-5">
<button type="submit" class="nes-btn is-primary mr-5">Fund</button>
<button type="submit" class="btn is-primary mr-5">Fund</button>
<button
type="button"
class="nes-btn is-error mr-5"
class="btn is-error mr-5"
@click="cancelReward"
>
Cancel
</button>
<button type="button" class="nes-btn is-warning" @click="lockReward">
<button type="button" class="btn is-warning" @click="lockReward">
Lock
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/gem-farm/src/components/gem-farm/InitFarm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
v-model="unstakingFeeLamp"
/>
</div>
<button class="nes-btn is-primary mb-5" type="submit">Start farm*</button>
<button class="btn is-primary mb-5" type="submit">Start farm*</button>
<p class="mb-5">* this creates an associated Gem Bank automatically</p>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/gem-farm/src/components/gem-farm/RefreshFarmer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<label for="farmer">Farmer to refresh:</label>
<input id="farmer" v-model="farmer" class="nes-input" />
</div>
<button class="mb-5 nes-btn is-primary" type="submit">Refresh</button>
<button class="mb-5 btn is-primary" type="submit">Refresh</button>
</form>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion app/gem-farm/src/components/gem-farm/TestMint.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="nes-container with-title">
<p class="title">Create Test Reward Mint</p>
<button class="nes-btn is-primary" @click="createTestReward">
<button class="btn is-primary" @click="createTestReward">
Create Test Mint
</button>
<div v-if="mint">
Expand Down
Loading