Skip to content

Commit

Permalink
Merge pull request #300 from consensusnetworks/new-app-design
Browse files Browse the repository at this point in the history
New app design
  • Loading branch information
DemogorGod authored Mar 30, 2023
2 parents 982b827 + 1b94184 commit 09c8324
Show file tree
Hide file tree
Showing 46 changed files with 2,098 additions and 2,045 deletions.
5 changes: 3 additions & 2 deletions apps/landing/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ import Scrambler from '@/components/Scrambler.vue'
</div>
<div class="flex flex-col justify-center items-end gap-[25px]">
<div class="flex gap-[3px]">
<!-- , 'Permissionless.', 'Any wallet.' -->
<Scrambler
:phrases="['No minimum amount.', 'Maximum staking rewards.']"
:phrases="['No minimum amount.', 'Maximum staking rewards.', 'Your keys, your coins.']"
:repeat="true"
:delay="300"
:text-class="'font-semibold text-[20px] text-[#3a3a3a] leading-[30px] tracking-normal'"
:transform-timer="10"
:transform-timer="5"
/>
<span class="pulse w-[2px] rounded bg-primary" />
</div>
Expand Down
9 changes: 0 additions & 9 deletions apps/web/public/BTC.svg

This file was deleted.

File renamed without changes
88 changes: 88 additions & 0 deletions apps/web/src/components/charts/LineChartJS.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import Chart, { ChartItem } from 'chart.js/auto'
// eslint-disable-next-line no-undef
const props = defineProps({
id: {
type: String,
required: true,
},
legend: {
type: Boolean,
default: false
},
xGridLines: {
type: Boolean,
default: false
},
yGridLines: {
type: Boolean,
default: false
}
})
const chart = ref(null as any)
onMounted(() => {
chart.value = new Chart(document.getElementById(props.id) as ChartItem , {
type : 'line',
data : {
labels : [ 'Jan 22', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
'Sep', 'Oct', 'Nov', 'Dec', 'Jan 23', 'Feb', 'Mar' ],
datasets : [
{
data : [ 186, 205, 1321, 1516, 2107, 5478, 186, 205,
2191, 3133, 3221, 4783, 5478, 186, 205 ],
label : 'Net Value',
borderColor : '#C1D3F8',
fill: false,
tension: 0.4,
}]
},
options : {
responsive: true,
plugins: {
legend: {
display: props.legend,
}
},
interaction: {
intersect: false,
},
scales: {
x: {
border: {
display: true,
color: '#BFBFBF'
},
grid: {
display: props.xGridLines,
drawTicks: true,
color: '#F2F2F2'
}
},
y: {
border: {
display: true,
color: '#BFBFBF'
},
grid: {
display: props.yGridLines,
drawTicks: true,
color: '#F2F2F2'
},
}
}
}
})
})
</script>

<template>
<div>
<canvas
:id="props.id"
class="w-full h-full"
/>
</div>
</template>
2 changes: 1 addition & 1 deletion apps/web/src/composables/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function usePrice() {
return data[to]
}

function convertToWholeUnits (currency: Currency, amount: number) {
function convertToWholeUnits (currency: Currency | string, amount: number) {
switch (currency) {
case 'BTC':
return amount / 100000000
Expand Down
92 changes: 20 additions & 72 deletions apps/web/src/composables/router.ts
Original file line number Diff line number Diff line change
@@ -1,80 +1,26 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { createWebHistory, createRouter } from 'vue-router'

// @ts-ignore
import Landing from '@/pages/landing/Landing.vue'
// @ts-ignore
import Staking from '@/pages/staking/Staking.vue'
// @ts-ignore
import ETHStaking from '@/pages/staking/components/ETHStaking.vue'
// @ts-ignore
import ETHWalletSelect from '@/pages/staking/components/ETHWalletSelect.vue'
// @ts-ignore
import ETHConfirmStake from '@/pages/staking/components/ETHConfirmStake.vue'
// @ts-ignore
import Assets from '@/pages/assets/Assets.vue'
// @ts-ignore
/* eslint-disable @typescript-eslint/ban-ts-comment */
import Dashboard from '@/pages/dashboard/Dashboard.vue'
import Test from '@/pages/test/Test.vue'
// @ts-ignore
import ChartTest from '@/pages/chart-test/ChartTest.vue'
// @ts-ignore
import FrontPage from '@/pages/landing/views/FrontPage.vue'
// @ts-ignore
import UserDashboard from '@/pages/user-dash/UserDashboard.vue'
// import NotFound from '@/pages/not-found/NotFound.vue'

import Auth from '@/pages/auth/Auth.vue'

const routes = [
{
path: '/',
name: Landing,
component: Landing,
meta: { authorize: [] },
},
{
path: '/user-dashboard:id',
name: UserDashboard,
component: UserDashboard,
meta: { authorize: [] },
},
{
path: '/stake',
name: Staking,
component: Staking,
meta: { authorize: [] },
children: [
{
path: 'eth',
component: ETHStaking,
},
{
path: 'eth/select-wallet',
component: ETHWalletSelect,
},
{
path: 'eth/confirm-stake',
component: ETHConfirmStake,
}
]
},
// {
// path: '/assets',
// name: Assets,
// component: Assets,
// meta: { authorize: [] }
// },
{
path: '/test',
name: Test,
component: Test,
meta: { authorize: [] }
},
// {
// path: '/:catchAll(.*)',
// name: NotFound,
// component: NotFound,
// meta: { authorize: [] }
// }
{
path: '/',
name: Dashboard,
component: Dashboard,
},
{
path: '/auth',
name: Auth,
component: Auth,
},
{
path: '/test',
name: Test,
component: Test,
},
]


Expand All @@ -83,5 +29,7 @@ const router = createRouter({
routes
})

// TO DO: Add a routing beforeEach that
// dynamically fixes rerouting to auth page

export default router
Loading

0 comments on commit 09c8324

Please sign in to comment.