11// SPDX-License-Identifier: Apache-2.0
22
33import axios from "axios" ;
4- import { fetchString , fetchURL } from "@/config/ConfigUtils" ;
4+ import { fetchString , fetchURL , localPathToURL } from "@/config/ConfigUtils" ;
55import { inject } from "vue" ;
66import { coreConfigKey } from "@/AppKeys" ;
77
@@ -41,31 +41,31 @@ export class CoreConfig {
4141 // The name of the product as shown in the short form of the footer tagline
4242 public readonly productName : string ,
4343 // The URL of the product logo (light theme) located at the left of the top navigation bar
44- public readonly productLogoLightURL : string | null ,
44+ public readonly productLogoLightURL : string ,
4545 // The URL of the product logo (dark theme) located at the left of the top navigation bar
46- public readonly productLogoDarkURL : string | null ,
46+ public readonly productLogoDarkURL : string ,
4747 // The URL of the reduced product logo (light theme) located at the left of the top navigation bar
4848 public readonly productMiniLogoLightURL : string | null ,
4949 // The URL of the reduced product logo (dark theme) located at the left of the top navigation bar
5050 public readonly productMiniLogoDarkURL : string | null ,
5151 // The prefix used in the document title
5252 public readonly documentTitlePrefix : string ,
5353 // The description of the product as shown in the long form of the footer tagline
54- public readonly productDescription : string | null ,
54+ public readonly productDescription : string ,
5555 // The content of meta tag: name="description"
5656 public readonly metaDescription : string | null ,
5757 // The content of meta tag: property="og:url"
5858 public readonly metaURL : string | null ,
5959 // The URL of the 'BUILT ON' logo (light theme) located at the left of the footer
60- public readonly builtOnLogoLightURL : string | null ,
60+ public readonly builtOnLogoLightURL : string ,
6161 // The URL of the 'BUILT ON' logo (dark theme) located at the left of the footer
62- public readonly builtOnLogoDarkURL : string | null ,
62+ public readonly builtOnLogoDarkURL : string ,
6363 // The URL to which a click on the bottom-left 'BUILT ON' logo will navigate
6464 public readonly builtOnURL : string | null ,
6565 // The URL of the sponsor logo (light theme) located at the right of the footer
66- public readonly sponsorLogoLightURL : string | null ,
66+ public readonly sponsorLogoLightURL : string ,
6767 // The URL of the sponsor logo (dark theme) located at the right of the footer
68- public readonly sponsorLogoDarkURL : string | null ,
68+ public readonly sponsorLogoDarkURL : string ,
6969 // The URL to which a click on the bottom-right sponsor logo will navigate
7070 public readonly sponsorURL : string | null ,
7171 // The URL of the 'Terms of Use' page
@@ -88,33 +88,32 @@ export class CoreConfig {
8888 // The HTML content used as crypto unit symbol
8989 public readonly cryptoSymbol : string | null ,
9090 // The URL of the crypto logo (light theme)
91- public readonly cryptoLogoLightURL : string | null ,
91+ public readonly cryptoLogoLightURL : string ,
9292 // The URL of the crypto logo (dark theme)
93- public readonly cryptoLogoDarkURL : string | null ,
93+ public readonly cryptoLogoDarkURL : string ,
9494 // The Wallect Connect Identifier
9595 public readonly walletConnectID : string | null ,
9696 // The key for accessing Hgraph data
9797 public readonly hgraphKey : string | null
9898 ) {
9999 }
100100
101-
102101 private static parse ( obj : object ) : CoreConfig {
103102 return new CoreConfig (
104- fetchString ( obj , "productName" ) ?? "Hiero Mirror Node Explorer" ,
105- fetchURL ( obj , "productLogoLightURL" ) ,
106- fetchURL ( obj , "productLogoDarkURL" ) ,
103+ fetchString ( obj , "productName" ) ?? "Hiero Explorer" ,
104+ fetchURL ( obj , "productLogoLightURL" ) ?? localPathToURL ( "product-logo-light.png" ) ,
105+ fetchURL ( obj , "productLogoDarkURL" ) ?? localPathToURL ( "product-logo-dark.png" ) ,
107106 fetchURL ( obj , "productMiniLogoLightURL" ) ,
108107 fetchURL ( obj , "productMiniLogoDarkURL" ) ,
109108 fetchString ( obj , "documentTitlePrefix" ) ?? "Hiero" ,
110- fetchString ( obj , "productDescription" ) ?? "Hiero Mirror Node Explorer " ,
109+ fetchString ( obj , "productDescription" ) ?? "Hiero Explorer is a ledger explorer for the Hiero network. " ,
111110 fetchString ( obj , "metaDescription" ) ,
112111 fetchURL ( obj , "metaURL" ) ,
113- fetchURL ( obj , "builtOnLogoLightURL" ) ,
114- fetchURL ( obj , "builtOnLogoDarkURL" ) ,
112+ fetchURL ( obj , "builtOnLogoLightURL" ) ?? localPathToURL ( "technology-logo-light.svg" ) ,
113+ fetchURL ( obj , "builtOnLogoDarkURL" ) ?? localPathToURL ( "technology-logo-dark.svg" ) ,
115114 fetchURL ( obj , "builtOnURL" ) ,
116- fetchURL ( obj , "sponsorLogoLightURL" ) ,
117- fetchURL ( obj , "sponsorLogoDarkURL" ) ,
115+ fetchURL ( obj , "sponsorLogoLightURL" ) ?? localPathToURL ( "sponsor-logo-light.png" ) ,
116+ fetchURL ( obj , "sponsorLogoDarkURL" ) ?? localPathToURL ( "sponsor-logo-dark.png" ) ,
118117 fetchURL ( obj , "sponsorURL" ) ,
119118 fetchURL ( obj , "termsOfUseURL" ) ,
120119 fetchString ( obj , "estimatorNotice" ) ,
@@ -125,8 +124,8 @@ export class CoreConfig {
125124 fetchURL ( obj , "arweaveServerURL" ) ?? "https://arweave.net/" ,
126125 fetchString ( obj , "cryptoName" ) ?? "HBAR" ,
127126 fetchString ( obj , "cryptoSymbol" ) ,
128- fetchURL ( obj , "cryptoLogoLightURL" ) ,
129- fetchURL ( obj , "cryptoLogoDarkURL" ) ,
127+ fetchURL ( obj , "cryptoLogoLightURL" ) ?? localPathToURL ( "crypto-logo-light.svg" ) ,
128+ fetchURL ( obj , "cryptoLogoDarkURL" ) ?? localPathToURL ( "crypto-logo-dark.svg" ) ,
130129 fetchString ( obj , "walletConnectID" ) ,
131130 fetchString ( obj , "hgraphKey" )
132131 )
0 commit comments