diff --git a/.gitignore b/.gitignore index a447c1e1..d52a1d20 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ yarn-error.log* *.ntvs* *.njsproj *.sln +.yarn +.yarnrc diff --git a/package.json b/package.json index 1373e1d4..47ca7073 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-block-explorer", - "version": "1.2.7", + "version": "1.2.8", "description": "..", "productName": "Telos Block Explorer", "author": "DonaldPeat ", diff --git a/src/components/Footer.vue b/src/components/Footer.vue index 026f25f2..224523c2 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -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, @@ -18,7 +18,7 @@ export default { diff --git a/src/components/MapData.vue b/src/components/MapData.vue index 04305aac..a98e7e9f 100644 --- a/src/components/MapData.vue +++ b/src/components/MapData.vue @@ -34,7 +34,7 @@ export default defineComponent({
Head Block
-
{{HeadBlock}}
+
{{HeadBlock.toLocaleString()}}
@@ -52,7 +52,7 @@ export default defineComponent({
Irreversible Block
-
{{lastIrreversibleBlock}}
+
{{lastIrreversibleBlock.toLocaleString()}}
diff --git a/src/config/BaseChain.ts b/src/config/BaseChain.ts index fe34f1a2..045f8485 100644 --- a/src/config/BaseChain.ts +++ b/src/config/BaseChain.ts @@ -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', @@ -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, @@ -98,6 +93,7 @@ export default abstract class BaseChain implements Chain { abstract getUsdPrice(): Promise; abstract getMapDisplay(): boolean; abstract getTheme(): Theme; + abstract getFooterLinks(): FooterLink[]; getUiCustomization(): UiCustomization { return baseUiConfiguration; diff --git a/src/config/chains/eos/index.ts b/src/config/chains/eos/index.ts index 77b9e666..756ea229 100644 --- a/src/config/chains/eos/index.ts +++ b/src/config/chains/eos/index.ts @@ -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'; @@ -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' }, + ]; + } } diff --git a/src/config/chains/jungle/index.ts b/src/config/chains/jungle/index.ts index 56df1ada..375f9465 100644 --- a/src/config/chains/jungle/index.ts +++ b/src/config/chains/jungle/index.ts @@ -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'; @@ -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' }, + ]; + } } diff --git a/src/config/chains/telos-testnet/index.ts b/src/config/chains/telos-testnet/index.ts index cf3f5bfc..532f38a1 100644 --- a/src/config/chains/telos-testnet/index.ts +++ b/src/config/chains/telos-testnet/index.ts @@ -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'; @@ -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' }, + ]; + } } diff --git a/src/config/chains/telos/index.ts b/src/config/chains/telos/index.ts index 9b036be7..942a72b4 100644 --- a/src/config/chains/telos/index.ts +++ b/src/config/chains/telos/index.ts @@ -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'; @@ -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' }, + ]; + } } diff --git a/src/config/chains/ux/index.ts b/src/config/chains/ux/index.ts index b4f6d819..dc5ee878 100644 --- a/src/config/chains/ux/index.ts +++ b/src/config/chains/ux/index.ts @@ -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'; @@ -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' }, + ]; + } } diff --git a/src/config/chains/wax/index.ts b/src/config/chains/wax/index.ts index 077af1db..e0dd49b7 100644 --- a/src/config/chains/wax/index.ts +++ b/src/config/chains/wax/index.ts @@ -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'; @@ -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' }, + ]; + } } diff --git a/src/pages/Error404.vue b/src/pages/Error404.vue index 6d04f85b..974ec925 100644 --- a/src/pages/Error404.vue +++ b/src/pages/Error404.vue @@ -1,20 +1,26 @@ + + diff --git a/src/router/routes.ts b/src/router/routes.ts index f3b8e3ea..0f1836d6 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -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') }], }, ]; diff --git a/src/types/Chain.d.ts b/src/types/Chain.d.ts index c086d3b0..7f1c3c17 100644 --- a/src/types/Chain.d.ts +++ b/src/types/Chain.d.ts @@ -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; @@ -23,4 +23,5 @@ export interface Chain { getUiCustomization(): UiCustomization; getFiltersSupported(prop: string): boolean; isTestnet(): boolean; + getFooterLinks(): FooterLink[]; } diff --git a/src/types/UiCustomization.ts b/src/types/UiCustomization.ts index ca213460..1ee22023 100644 --- a/src/types/UiCustomization.ts +++ b/src/types/UiCustomization.ts @@ -31,7 +31,6 @@ export interface AccountPageSettings { } export interface UiCustomization { - footerLinks: FooterLink[]; headerSettings: HeaderSettings; accountPageSettings: AccountPageSettings; }