Skip to content

Commit 16e457f

Browse files
authored
Merge pull request #125 from celenium-io/ms-2-part-2
Fix blob vue
2 parents 45414a5 + cbfe37d commit 16e457f

File tree

7 files changed

+1735
-4448
lines changed

7 files changed

+1735
-4448
lines changed

components/modules/blob/DataInspector.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup>
22
/** Vendor */
33
import { DateTime } from "luxon"
4-
import iconv from "iconv-lite"
54
65
/** Store */
76
import { useSettingsStore } from "@/store/settings"
@@ -63,7 +62,7 @@ const hexToUint8Array = (hex) => {
6362
}
6463
6564
const decode = (bytes) => {
66-
return iconv.decode(new Uint8Array(bytes.map((b) => parseInt(`0x${b}`, 16))), "IBM437")
65+
return bytes.map((b) => String.fromCharCode(null, new Uint8Array([parseInt(`0x${b}`, 16)]))).join("")
6766
}
6867
</script>
6968

components/modules/blob/HexViewer.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<script setup>
2-
/** Vendor */
3-
import iconv from "iconv-lite"
4-
52
/** Store */
63
import { useSettingsStore } from "@/store/settings"
74
const settingsStore = useSettingsStore()
@@ -151,10 +148,10 @@ const onPointerLeave = () => {
151148
152149
const decode = (byte) => {
153150
const charCode = parseInt(`0x${byte}`, 16)
154-
if (charCode >= 0 && charCode <= 31) {
151+
if ((charCode >= 0 && charCode <= 31) || (charCode >= 127 && charCode <= 159)) {
155152
return "."
156153
} else {
157-
return iconv.decode(new Uint8Array([charCode]), settingsStore.hex.characterSet)
154+
return String.fromCharCode.apply(null, new Uint8Array([charCode]))
158155
}
159156
}
160157
</script>

nuxt.config.ts

Lines changed: 125 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -5,148 +5,148 @@ import topLevelAwait from "vite-plugin-top-level-await"
55
import path from "path"
66

77
export default defineNuxtConfig({
8-
modules: ["nuxt-simple-sitemap", "@pinia/nuxt", "nuxt-og-image"],
8+
modules: ["@pinia/nuxt", "nuxt-og-image", "@nuxtjs/sitemap"],
99

10-
site: {
11-
url: "https://celenium.io",
10+
site: {
11+
url: "https://celenium.io",
1212
},
1313

14-
sitemap: {
15-
xsl: false,
14+
sitemap: {
15+
xsl: false,
1616
},
1717

18-
routeRules: {
19-
"/node": {
20-
ssr: false,
21-
},
22-
"/": {
23-
sitemap: {
24-
changefreq: "daily",
25-
priority: 1,
26-
},
27-
},
28-
"/blocks": {
29-
sitemap: {
30-
changefreq: "daily",
31-
priority: 0.9,
32-
},
33-
},
34-
"/namespaces": {
35-
sitemap: {
36-
changefreq: "daily",
37-
priority: 0.8,
38-
},
39-
},
40-
"/txs": {
41-
sitemap: {
42-
changefreq: "daily",
43-
priority: 0.7,
44-
},
45-
},
46-
"/addresses": {
47-
sitemap: {
48-
changefreq: "daily",
49-
priority: 0.6,
50-
},
51-
},
52-
"/gas": {
53-
sitemap: {
54-
changefreq: "daily",
55-
priority: 0.5,
56-
},
57-
},
58-
"/namespaces/treemap": {
59-
sitemap: {
60-
changefreq: "weekly",
61-
priority: 0.4,
62-
},
63-
},
18+
routeRules: {
19+
"/node": {
20+
ssr: false,
21+
},
22+
"/": {
23+
sitemap: {
24+
changefreq: "daily",
25+
priority: 1,
26+
},
27+
},
28+
"/blocks": {
29+
sitemap: {
30+
changefreq: "daily",
31+
priority: 0.9,
32+
},
33+
},
34+
"/namespaces": {
35+
sitemap: {
36+
changefreq: "daily",
37+
priority: 0.8,
38+
},
39+
},
40+
"/txs": {
41+
sitemap: {
42+
changefreq: "daily",
43+
priority: 0.7,
44+
},
45+
},
46+
"/addresses": {
47+
sitemap: {
48+
changefreq: "daily",
49+
priority: 0.6,
50+
},
51+
},
52+
"/gas": {
53+
sitemap: {
54+
changefreq: "daily",
55+
priority: 0.5,
56+
},
57+
},
58+
"/namespaces/treemap": {
59+
sitemap: {
60+
changefreq: "weekly",
61+
priority: 0.4,
62+
},
63+
},
6464
},
6565

66-
runtimeConfig: {
67-
public: {
68-
AMP: process.env.AMP,
69-
},
66+
runtimeConfig: {
67+
public: {
68+
AMP: process.env.AMP,
69+
},
7070
},
7171

72-
app: {
73-
head: {
74-
htmlAttrs: {
75-
lang: "en",
76-
},
77-
meta: [
78-
{ name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1" },
79-
{
80-
name: "lang",
81-
content: "en",
82-
},
83-
],
84-
link: [
85-
{
86-
id: "favicon",
87-
rel: "icon",
88-
type: "image/png",
89-
},
90-
{
91-
rel: "preconnect",
92-
href: "https://fonts.googleapis.com",
93-
},
94-
{
95-
rel: "preconnect",
96-
href: "https://fonts.gstatic.com",
97-
crossorigin: "anonymous",
98-
},
99-
{
100-
rel: "preload",
101-
as: "style",
102-
href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",
103-
onload: "this.onload=null;this.rel='stylesheet'",
104-
},
105-
{
106-
rel: "preload",
107-
as: "style",
108-
href: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@700&display=swap",
109-
onload: "this.onload=null;this.rel='stylesheet'",
110-
},
111-
{
112-
rel: "preload",
113-
as: "style",
114-
href: "https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap",
115-
onload: "this.onload=null;this.rel='stylesheet'",
116-
},
117-
],
118-
},
72+
app: {
73+
head: {
74+
htmlAttrs: {
75+
lang: "en",
76+
},
77+
meta: [
78+
{ name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1" },
79+
{
80+
name: "lang",
81+
content: "en",
82+
},
83+
],
84+
link: [
85+
{
86+
id: "favicon",
87+
rel: "icon",
88+
type: "image/png",
89+
},
90+
{
91+
rel: "preconnect",
92+
href: "https://fonts.googleapis.com",
93+
},
94+
{
95+
rel: "preconnect",
96+
href: "https://fonts.gstatic.com",
97+
crossorigin: "anonymous",
98+
},
99+
{
100+
rel: "preload",
101+
as: "style",
102+
href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",
103+
onload: "this.onload=null;this.rel='stylesheet'",
104+
},
105+
{
106+
rel: "preload",
107+
as: "style",
108+
href: "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@700&display=swap",
109+
onload: "this.onload=null;this.rel='stylesheet'",
110+
},
111+
{
112+
rel: "preload",
113+
as: "style",
114+
href: "https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap",
115+
onload: "this.onload=null;this.rel='stylesheet'",
116+
},
117+
],
118+
},
119119
},
120120

121-
css: ["@/assets/styles/base.scss", "@/assets/styles/flex.scss", "@/assets/styles/text.scss"],
121+
css: ["@/assets/styles/base.scss", "@/assets/styles/flex.scss", "@/assets/styles/text.scss"],
122122

123-
pinia: {
124-
autoImports: ["defineStore"],
123+
pinia: {
124+
autoImports: ["defineStore"],
125125
},
126126

127-
ogImage: {
128-
fonts: ["Inter:400", "Inter:600", "IBM+Plex+Mono:400"],
127+
ogImage: {
128+
fonts: ["Inter:400", "Inter:600", "IBM+Plex+Mono:400"],
129129
},
130130

131-
devtools: {
132-
enabled: false,
131+
devtools: {
132+
enabled: false,
133133
},
134134

135-
vite: {
136-
define: {
137-
global: "globalThis",
138-
},
139-
resolve: {
140-
alias: {
141-
"unenv/runtime/node/buffer/index/": path.resolve(__dirname, "./node_modules/buffer/index"),
142-
},
143-
},
144-
plugins: [wasm(), topLevelAwait(), nodePolyfills()],
145-
worker: {
146-
format: "es",
147-
plugins: () => [wasm(), topLevelAwait()],
148-
},
135+
vite: {
136+
define: {
137+
global: "globalThis",
138+
},
139+
resolve: {
140+
alias: {
141+
"unenv/runtime/node/buffer/index/": path.resolve(__dirname, "./node_modules/buffer/index"),
142+
},
143+
},
144+
plugins: [wasm(), topLevelAwait(), nodePolyfills()],
145+
worker: {
146+
format: "es",
147+
plugins: () => [wasm(), topLevelAwait()],
148+
},
149149
},
150150

151-
compatibilityDate: "2025-04-02",
152-
})
151+
compatibilityDate: "2025-04-02",
152+
})

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
},
1515
"devDependencies": {
1616
"@nuxt/devtools": "latest",
17+
"@nuxtjs/sitemap": "7.2.10",
18+
"@unhead/vue": "^2.0.0-rc.1",
1719
"cross-env": "^7.0.3",
18-
"nuxt": "3.12.4",
19-
"nuxt-og-image": "3.0.0-rc.52",
20-
"nuxt-simple-sitemap": "^4.2.0",
20+
"nuxt": "3.16.2",
21+
"nuxt-og-image": "5.1.1",
2122
"sass": "1.66.1",
2223
"sass-loader": "13.3.2",
2324
"unenv": "^1.9.0",
25+
"unstorage": "^1.0.0",
2426
"vite-plugin-top-level-await": "^1.4.4",
2527
"vite-plugin-wasm": "^3.3.0"
2628
},
@@ -29,7 +31,7 @@
2931
"@codemirror/lang-json": "^6.0.1",
3032
"@keplr-wallet/cosmos": "^0.12.70",
3133
"@openzeppelin/merkle-tree": "^1.0.6",
32-
"@pinia/nuxt": "0.4.11",
34+
"@pinia/nuxt": "0.11.0",
3335
"@sentry/vue": "^8.50.0",
3436
"@vueuse/core": "^10.9.0",
3537
"buffer": "^6.0.3",
@@ -39,13 +41,11 @@
3941
"d3-geo": "^3.1.1",
4042
"d3-hierarchy": "^3.1.2",
4143
"focus-trap": "7.5.2",
42-
"iconv-lite": "^0.6.3",
4344
"js-sha256": "^0.11.0",
4445
"lean-qr": "^2.3.2",
4546
"long": "^5.2.3",
4647
"luxon": "3.4.3",
47-
"nuxt-site-config": "^2.1.2",
48-
"pinia": "2.1.6",
48+
"pinia": "3.0.2",
4949
"protobufjs": "^7.2.6",
5050
"qrcode": "^1.5.3",
5151
"uuid": "9.0.1",

0 commit comments

Comments
 (0)