Skip to content

Commit

Permalink
Merge pull request #801 from telosnetwork/develop
Browse files Browse the repository at this point in the history
v1.2.8-rc
  • Loading branch information
donnyquixotic authored Nov 7, 2023
2 parents 86170c8 + d9bd37f commit c5e83d2
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
.yarn
.yarnrc
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "open-block-explorer",
"version": "1.2.7",
"version": "1.2.8",
"description": "..",
"productName": "Telos Block Explorer",
"author": "DonaldPeat <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { computed } from 'vue';
export default {
name: 'AppFooter',
setup() {
const footerLinks = computed(() => ConfigManager.get().getCurrentChain().getUiCustomization().footerLinks);
const footerLinks = computed(() => ConfigManager.get().getCurrentChain().getFooterLinks());
return {
footerLinks,
Expand All @@ -18,7 +18,7 @@ export default {

<div class="row footer-background justify-center text-center q-py-md">
<div v-for="footerLink in footerLinks" :key="footerLink.label" class="col-lg-1 col-md-2 col-sm-2 col-xs-4 q-pa-md">
<a class="no-dec" :href="footerLink.url">{{footerLink.label}}</a>
<a class="no-dec" :href="footerLink.url" target="_blank">{{footerLink.label}}</a>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/MapData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default defineComponent({
<div class="col-3">
<div class="row">
<div class="col-12 text-subtitle1 text-weight-thin text-uppercase">Head Block</div>
<div class="col-12 text-subtitle1 text-bold">{{HeadBlock}}</div>
<div class="col-12 text-subtitle1 text-bold">{{HeadBlock.toLocaleString()}}</div>
</div>
</div>
<div class="col-1">
Expand All @@ -52,7 +52,7 @@ export default defineComponent({
<div class="col-3">
<div class="row">
<div class="col-12 text-subtitle1 text-weight-thin text-uppercase">Irreversible Block</div>
<div class="col-12 text-subtitle1 text-bold">{{lastIrreversibleBlock}}</div>
<div class="col-12 text-subtitle1 text-bold">{{lastIrreversibleBlock.toLocaleString()}}</div>
</div>
</div>
</div>
Expand Down
8 changes: 2 additions & 6 deletions src/config/BaseChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { RpcEndpoint } from 'universal-authenticator-library';
import { PriceChartData } from 'src/types/PriceChartData';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { UiCustomization } from 'src/types/UiCustomization';
import { FooterLink, UiCustomization } from 'src/types/UiCustomization';

export const DEFAULT_THEME = {
primary: '#11589e',
Expand Down Expand Up @@ -35,11 +35,6 @@ export const DEFAULT_THEME = {
};

export const baseUiConfiguration: UiCustomization = {
footerLinks: [
{ label: 'LEGAL', url: 'https://telos.net/legal' },
{ label: 'PRIVACY', url: 'https://telos.net/privacy-policy' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
],
headerSettings: {
hideLoginHandler: false,

Expand Down Expand Up @@ -98,6 +93,7 @@ export default abstract class BaseChain implements Chain {
abstract getUsdPrice(): Promise<number>;
abstract getMapDisplay(): boolean;
abstract getTheme(): Theme;
abstract getFooterLinks(): FooterLink[];

getUiCustomization(): UiCustomization {
return baseUiConfiguration;
Expand Down
9 changes: 9 additions & 0 deletions src/config/chains/eos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { PriceChartData } from 'src/types/PriceChartData';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { FooterLink } from 'src/types/UiCustomization';

const CHAIN_ID =
'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906';
Expand Down Expand Up @@ -124,4 +125,12 @@ export default class EOS extends BaseChain {
}
return true;
}

getFooterLinks(): FooterLink[] {
return [
{ label: 'TERMS', url: 'https://eosnetwork.com/terms-of-use/' },
{ label: 'PRIVACY', url: 'https://eosnetwork.com/privacy-policy/' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
];
}
}
9 changes: 9 additions & 0 deletions src/config/chains/jungle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { PriceChartData } from 'src/types/PriceChartData';
import { getEmptyPriceChartData } from 'src/api/price';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { FooterLink } from 'src/types/UiCustomization';

const CHAIN_ID =
'73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d';
Expand Down Expand Up @@ -136,4 +137,12 @@ export default class TelosTestnet extends BaseChain {
isTestnet(): boolean {
return true;
}

getFooterLinks(): FooterLink[] {
return [
{ label: 'TERMS', url: 'https://eosnetwork.com/terms-of-use/' },
{ label: 'PRIVACY', url: 'https://eosnetwork.com/privacy-policy/' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
];
}
}
9 changes: 9 additions & 0 deletions src/config/chains/telos-testnet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { PriceChartData } from 'src/types/PriceChartData';
import { getEmptyPriceChartData } from 'src/api/price';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { FooterLink } from 'src/types/UiCustomization';

const CHAIN_ID =
'1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f';
Expand Down Expand Up @@ -138,4 +139,12 @@ export default class TelosTestnet extends BaseChain {
isTestnet(): boolean {
return true;
}

getFooterLinks(): FooterLink[] {
return [
{ label: 'LEGAL', url: 'https://telos.net/legal' },
{ label: 'PRIVACY', url: 'https://telos.net/privacy-policy' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
];
}
}
9 changes: 9 additions & 0 deletions src/config/chains/telos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
import { PriceChartData } from 'src/types/PriceChartData';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { FooterLink } from 'src/types/UiCustomization';

const CHAIN_ID =
'4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11';
Expand Down Expand Up @@ -141,4 +142,12 @@ export default class Telos extends BaseChain {
}
return true;
}

getFooterLinks(): FooterLink[] {
return [
{ label: 'LEGAL', url: 'https://telos.net/legal' },
{ label: 'PRIVACY', url: 'https://telos.net/privacy-policy' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
];
}
}
9 changes: 9 additions & 0 deletions src/config/chains/ux/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getEmptyPriceChartData } from 'src/api/price';
import { PriceChartData } from 'src/types/PriceChartData';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { FooterLink } from 'src/types/UiCustomization';

const CHAIN_ID =
'8fc6dce7942189f842170de953932b1f66693ad3788f766e777b6f9d22335c02';
Expand Down Expand Up @@ -93,4 +94,12 @@ export default class UX extends BaseChain {
}
return true;
}

getFooterLinks(): FooterLink[] {
return [
{ label: 'TERMS', url: 'https://uxnetwork.io/static/Terms.pdf' },
{ label: 'PRIVACY', url: 'https://uxnetwork.io/static/PP.pdf' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
];
}
}
9 changes: 9 additions & 0 deletions src/config/chains/wax/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { PriceChartData } from 'src/types/PriceChartData';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types';
import { FooterLink } from 'src/types/UiCustomization';

const CHAIN_ID =
'1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4';
Expand Down Expand Up @@ -96,4 +97,12 @@ export default class EOS extends BaseChain {
}
return true;
}

getFooterLinks(): FooterLink[] {
return [
{ label: 'TERMS', url: 'https://www.wax.io/terms-of-service' },
{ label: 'PRIVACY', url: 'https://www.wax.io/privacy-policy' },
{ label: 'REPOSITORY', url: 'https://github.com/telosnetwork/open-block-explorer' },
];
}
}
17 changes: 14 additions & 3 deletions src/pages/Error404.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<script lang="ts">
import { DEFAULT_THEME } from 'src/config/BaseChain';
import { defineComponent } from 'vue';
export default defineComponent({
name: 'Error404Page',
setup () {
return {
secondary: DEFAULT_THEME.secondary,
};
},
});
</script>

<template>
<div class="fullscreen bg-blue text-white text-center q-pa-md flex flex-center">
<div>
<div class="text-primary text-center q-pa-md flex flex-center q-my-lg">
<div class="message-404">
<div class="text-xl">404</div>
<div class="text-h2">Oops. Nothing here...</div>
<q-btn
class="q-mt-xl"
color="white"
text-color="blue"
:text-color="secondary"
unelevated
to="/"
label="Go Home"
Expand All @@ -23,3 +29,8 @@ export default defineComponent({
</div>
</div>
</template>

<style lang="sass">
.message-404
color: var(--q-secondary)
</style>
3 changes: 2 additions & 1 deletion src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ const routes: RouteRecordRaw[] = [
// but you can also remove it
{
path: '/:catchAll(.*)*',
component: () => import('pages/Error404.vue'),
component: () => import('layouts/MainLayout.vue'),
children: [{ path: '', component: () => import('pages/Error404.vue') }],
},
];

Expand Down
3 changes: 2 additions & 1 deletion src/types/Chain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RpcEndpoint } from 'universal-authenticator-library';
import { PriceChartData } from 'src/types/PriceChartData';
import { Theme } from 'src/types/Theme';
import { Token } from 'src/types/Actions';
import { UiCustomization } from 'src/types/UiCustomization';
import { FooterLink, UiCustomization } from 'src/types/UiCustomization';

export interface Chain {
getName(): string;
Expand All @@ -23,4 +23,5 @@ export interface Chain {
getUiCustomization(): UiCustomization;
getFiltersSupported(prop: string): boolean;
isTestnet(): boolean;
getFooterLinks(): FooterLink[];
}
1 change: 0 additions & 1 deletion src/types/UiCustomization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface AccountPageSettings {
}

export interface UiCustomization {
footerLinks: FooterLink[];
headerSettings: HeaderSettings;
accountPageSettings: AccountPageSettings;
}

0 comments on commit c5e83d2

Please sign in to comment.