diff --git a/README.md b/README.md index ca9a464f..2abf10f1 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,6 @@ If you want to use a prebuilt image from **GitHub Container Registry**, specify - **NUXT_PUBLIC_FAUCET_ADDRESS** — faucet address. - **NUXT_PUBLIC_FAUCET_MOCHA** — faucet API for the Mocha network. - **NUXT_PUBLIC_FAUCET_ARABICA** — faucet API for the Arabica network. -- **NUXT_PUBLIC_FAUCET_MAMMOTH** — faucet API for the Mammoth network. #### External Services Configuration - **NUXT_PUBLIC_BLOCKSCOUT** — used to check whether a batch exists in Blockscout. If found, a dedicated button will appear on the blob form/page. diff --git a/assets/icons.json b/assets/icons.json index e354e95e..f960568f 100644 --- a/assets/icons.json +++ b/assets/icons.json @@ -238,5 +238,6 @@ "drop": "M17 3.33989C18.5202 4.21758 19.7826 5.47997 20.6603 7.00017C21.538 8.52038 22 10.2448 22 12.0002C22 13.7556 21.5379 15.48 20.6602 17.0002C19.7825 18.5204 18.5201 19.7828 16.9999 20.6605C15.4797 21.5381 13.7552 22.0002 11.9998 22.0001C10.2445 22.0001 8.52002 21.538 6.99984 20.6603C5.47965 19.7826 4.21729 18.5202 3.33963 17C2.46198 15.4797 1.99996 13.7553 2 11.9999L2.005 11.6759C2.061 9.94888 2.56355 8.26585 3.46364 6.79089C4.36373 5.31592 5.63065 4.09934 7.14089 3.25977C8.65113 2.42021 10.3531 1.98629 12.081 2.00033C13.8089 2.01437 15.5036 2.47589 17 3.33989ZM12.823 7.43189C12.731 7.29865 12.6081 7.18973 12.4647 7.11448C12.3214 7.03924 12.1619 6.99993 12 6.99993C11.8381 6.99993 11.6786 7.03924 11.5353 7.11448C11.3919 7.18973 11.269 7.29865 11.177 7.43189L8.575 11.1959C7.553 12.8659 7.941 14.9319 9.45 16.1249C10.178 16.6923 11.0745 17.0004 11.9975 17.0004C12.9205 17.0004 13.817 16.6923 14.545 16.1249C16.055 14.9339 16.442 12.8649 15.449 11.2429L12.823 7.43189Z", "faucet": "M21 21H3C3 19.9 3.9 19 5 19H19C20.11 19 21 19.89 21 21M19 7C19 5.39 17.93 3 15 3S11 5.39 11 7V18H13V7C13 6.54 13.17 5 15 5S17 6.54 17 7H16.5V9H19.5V7H19M7 12C6.45 12 6 12.45 6 13V14H3V15H6V18H8V13C8 12.45 7.55 12 7 12M21 14H18V13C18 12.45 17.55 12 17 12S16 12.45 16 13V18H18V15H21V14Z", "commit": "M17,12C17,14.42 15.28,16.44 13,16.9V21H11V16.9C8.72,16.44 7,14.42 7,12C7,9.58 8.72,7.56 11,7.1V3H13V7.1C15.28,7.56 17,9.58 17,12M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9Z", - "laurel": "M16.956 2.057c.355.124.829.375 1.303.796a3.77 3.77 0 0 1 1.246 2.204c.173.989-.047 1.894-.519 2.683l-.123.194q-.097.147-.196.272q.066.234.117.471q.26-.178.545-.307c.851-.389 1.727-.442 2.527-.306q.226.04.346.076a1 1 0 0 1 .689.712l.029.13q.015.08.03.18a4.45 4.45 0 0 1-.324 2.496a3.94 3.94 0 0 1-1.71 1.85l-.242.12a4.23 4.23 0 0 1-2.234.349A9 9 0 0 1 17.997 15c.37.016.748.093 1.128.24c.732.28 1.299.758 1.711 1.367a3.95 3.95 0 0 1 .654 1.613a1 1 0 0 1-.356.917a3.8 3.8 0 0 1-.716.443c-.933.455-1.978.588-3.043.179l-.032-.015l-.205-.086a3.6 3.6 0 0 1-1.33-1.069l-.143-.197a4 4 0 0 1-.26-.433a6 6 0 0 1-.927.511q.18.262.337.56a7.4 7.4 0 0 1 .66 1.747a1 1 0 0 1-1.95.444l-.028-.11a6 6 0 0 0-.449-1.143C12.706 19.323 12.338 19 12 19s-.706.323-1.048.969a5.6 5.6 0 0 0-.367.874l-.082.269l-.028.11a1 1 0 0 1-1.95-.444a7.3 7.3 0 0 1 .66-1.747q.158-.298.337-.561a6.4 6.4 0 0 1-.93-.508a4 4 0 0 1-.256.43c-.366.541-.855.98-1.473 1.267l-.238.1c-.994.382-1.97.292-2.855-.091l-.188-.087a3.8 3.8 0 0 1-.716-.443a1 1 0 0 1-.356-.917a3.95 3.95 0 0 1 .654-1.613a3.6 3.6 0 0 1 1.71-1.368c.38-.146.758-.223 1.13-.24a9 9 0 0 1-.445-1.023a4.23 4.23 0 0 1-2.233-.348a4 4 0 0 1-.916-.587l-.207-.191a4 4 0 0 1-.724-.977l-.105-.216a4.45 4.45 0 0 1-.265-2.806a1 1 0 0 1 .69-.712q.119-.036.345-.076c.801-.135 1.678-.082 2.53.308q.283.129.545.304q.048-.235.112-.47a5 5 0 0 1-.194-.272c-.556-.832-.83-1.806-.642-2.877l.05-.242a3.75 3.75 0 0 1 1.027-1.803l.169-.159a4 4 0 0 1 1.303-.796a1 1 0 0 1 .975.178c.2.168.462.446.719.83c.556.833.83 1.807.642 2.878a3.77 3.77 0 0 1-1.246 2.204c-.303.27-.607.47-.879.61A7.5 7.5 0 0 0 7 10.728C7 14.23 9.285 17 12 17s5-2.77 5-6.276a7.6 7.6 0 0 0-.253-1.967a4.3 4.3 0 0 1-.881-.61a3.77 3.77 0 0 1-1.246-2.204c-.188-1.07.086-2.045.642-2.877c.257-.385.52-.663.72-.831a1 1 0 0 1 .974-.178" + "laurel": "M16.956 2.057c.355.124.829.375 1.303.796a3.77 3.77 0 0 1 1.246 2.204c.173.989-.047 1.894-.519 2.683l-.123.194q-.097.147-.196.272q.066.234.117.471q.26-.178.545-.307c.851-.389 1.727-.442 2.527-.306q.226.04.346.076a1 1 0 0 1 .689.712l.029.13q.015.08.03.18a4.45 4.45 0 0 1-.324 2.496a3.94 3.94 0 0 1-1.71 1.85l-.242.12a4.23 4.23 0 0 1-2.234.349A9 9 0 0 1 17.997 15c.37.016.748.093 1.128.24c.732.28 1.299.758 1.711 1.367a3.95 3.95 0 0 1 .654 1.613a1 1 0 0 1-.356.917a3.8 3.8 0 0 1-.716.443c-.933.455-1.978.588-3.043.179l-.032-.015l-.205-.086a3.6 3.6 0 0 1-1.33-1.069l-.143-.197a4 4 0 0 1-.26-.433a6 6 0 0 1-.927.511q.18.262.337.56a7.4 7.4 0 0 1 .66 1.747a1 1 0 0 1-1.95.444l-.028-.11a6 6 0 0 0-.449-1.143C12.706 19.323 12.338 19 12 19s-.706.323-1.048.969a5.6 5.6 0 0 0-.367.874l-.082.269l-.028.11a1 1 0 0 1-1.95-.444a7.3 7.3 0 0 1 .66-1.747q.158-.298.337-.561a6.4 6.4 0 0 1-.93-.508a4 4 0 0 1-.256.43c-.366.541-.855.98-1.473 1.267l-.238.1c-.994.382-1.97.292-2.855-.091l-.188-.087a3.8 3.8 0 0 1-.716-.443a1 1 0 0 1-.356-.917a3.95 3.95 0 0 1 .654-1.613a3.6 3.6 0 0 1 1.71-1.368c.38-.146.758-.223 1.13-.24a9 9 0 0 1-.445-1.023a4.23 4.23 0 0 1-2.233-.348a4 4 0 0 1-.916-.587l-.207-.191a4 4 0 0 1-.724-.977l-.105-.216a4.45 4.45 0 0 1-.265-2.806a1 1 0 0 1 .69-.712q.119-.036.345-.076c.801-.135 1.678-.082 2.53.308q.283.129.545.304q.048-.235.112-.47a5 5 0 0 1-.194-.272c-.556-.832-.83-1.806-.642-2.877l.05-.242a3.75 3.75 0 0 1 1.027-1.803l.169-.159a4 4 0 0 1 1.303-.796a1 1 0 0 1 .975.178c.2.168.462.446.719.83c.556.833.83 1.807.642 2.878a3.77 3.77 0 0 1-1.246 2.204c-.303.27-.607.47-.879.61A7.5 7.5 0 0 0 7 10.728C7 14.23 9.285 17 12 17s5-2.77 5-6.276a7.6 7.6 0 0 0-.253-1.967a4.3 4.3 0 0 1-.881-.61a3.77 3.77 0 0 1-1.246-2.204c-.188-1.07.086-2.045.642-2.877c.257-.385.52-.663.72-.831a1 1 0 0 1 .974-.178", + "bell-ringing": "M 8.705 21.001 L 12.705 21.001 C 13.257 21.001 13.705 20.553 13.705 20.001 C 13.705 19.448 13.257 19.001 12.705 19.001 L 8.705 19.001 C 8.153 19.001 7.705 19.448 7.705 20.001 C 7.705 20.553 8.153 21.001 8.705 21.001 Z M 3.903 0.81 C 3.773 0.579 3.556 0.409 3.3 0.338 C 3.045 0.267 2.771 0.3 2.54 0.431 C 0.957 1.327 -0.015 3.012 0 4.831 C 0.006 5.383 0.458 5.826 1.01 5.821 C 1.562 5.815 2.006 5.363 2 4.811 C 1.991 3.72 2.574 2.71 3.522 2.172 C 4.003 1.9 4.173 1.291 3.902 0.81 Z M 17.504 0.81 C 17.234 1.291 17.404 1.9 17.884 2.171 C 18.833 2.709 19.416 3.72 19.407 4.811 C 19.402 5.363 19.845 5.815 20.398 5.82 C 20.95 5.825 21.402 5.382 21.407 4.83 C 21.423 3.011 20.45 1.326 18.867 0.43 C 18.386 0.159 17.776 0.329 17.505 0.81 Z M 3.705 7.001 C 3.705 9.914 2.973 11.845 2.206 13.078 L 2.194 13.097 C 1.836 13.671 1.554 14.126 1.364 14.456 C 1.275 14.607 1.192 14.763 1.117 14.923 C 1.085 14.994 1.049 15.08 1.02 15.174 C 0.997 15.253 0.953 15.42 0.97 15.623 C 0.983 15.837 1.042 16.046 1.143 16.236 C 1.25 16.422 1.396 16.582 1.571 16.706 C 1.76 16.837 1.977 16.92 2.205 16.948 L 2.209 16.948 C 2.37 16.97 2.531 16.983 2.693 16.988 C 3.028 17.001 3.492 17.001 4.069 17.001 L 17.341 17.001 C 17.918 17.001 18.382 17.001 18.717 16.988 C 18.879 16.983 19.041 16.97 19.201 16.948 L 19.205 16.948 C 19.301 16.934 19.589 16.891 19.839 16.705 C 20.014 16.581 20.16 16.421 20.267 16.235 C 20.401 15.994 20.43 15.76 20.44 15.624 C 20.457 15.42 20.412 15.253 20.389 15.174 C 20.361 15.08 20.325 14.993 20.293 14.922 C 20.229 14.781 20.142 14.621 20.046 14.456 C 19.856 14.125 19.574 13.671 19.216 13.098 L 19.205 13.078 C 18.437 11.845 17.705 9.914 17.705 7.001 C 17.705 4.169 16 1.617 13.384 0.533 C 10.768 -0.55 7.757 0.049 5.755 2.051 C 4.442 3.364 3.705 5.144 3.705 7.001 Z M 8.705 21.001 L 12.705 21.001 C 13.257 21.001 13.705 20.553 13.705 20.001 C 13.705 19.448 13.257 19.001 12.705 19.001 L 8.705 19.001 C 8.153 19.001 7.705 19.448 7.705 20.001 C 7.705 20.553 8.153 21.001 8.705 21.001 Z M 3.903 0.81 C 3.773 0.579 3.556 0.409 3.3 0.338 C 3.045 0.267 2.771 0.3 2.54 0.431 C 0.957 1.327 -0.015 3.012 0 4.831 C 0.006 5.383 0.458 5.826 1.01 5.821 C 1.562 5.815 2.006 5.363 2 4.811 C 1.991 3.72 2.574 2.71 3.522 2.172 C 4.003 1.9 4.173 1.291 3.902 0.81 Z M 17.504 0.81 C 17.234 1.291 17.404 1.9 17.884 2.171 C 18.833 2.709 19.416 3.72 19.407 4.811 C 19.402 5.363 19.845 5.815 20.398 5.82 C 20.95 5.825 21.402 5.382 21.407 4.83 C 21.423 3.011 20.45 1.326 18.867 0.43 C 18.386 0.159 17.776 0.329 17.505 0.81 Z M 3.705 7.001 C 3.705 9.914 2.973 11.845 2.206 13.078 L 2.194 13.097 C 1.836 13.671 1.554 14.126 1.364 14.456 C 1.275 14.607 1.192 14.763 1.117 14.923 C 1.085 14.994 1.049 15.08 1.02 15.174 C 0.997 15.253 0.953 15.42 0.97 15.623 C 0.983 15.837 1.042 16.046 1.143 16.236 C 1.25 16.422 1.396 16.582 1.571 16.706 C 1.76 16.837 1.977 16.92 2.205 16.948 L 2.209 16.948 C 2.37 16.97 2.531 16.983 2.693 16.988 C 3.028 17.001 3.492 17.001 4.069 17.001 L 17.341 17.001 C 17.918 17.001 18.382 17.001 18.717 16.988 C 18.879 16.983 19.041 16.97 19.201 16.948 L 19.205 16.948 C 19.301 16.934 19.589 16.891 19.839 16.705 C 20.014 16.581 20.16 16.421 20.267 16.235 C 20.401 15.994 20.43 15.76 20.44 15.624 C 20.457 15.42 20.412 15.253 20.389 15.174 C 20.361 15.08 20.325 14.993 20.293 14.922 C 20.229 14.781 20.142 14.621 20.046 14.456 C 19.856 14.125 19.574 13.671 19.216 13.098 L 19.205 13.078 C 18.437 11.845 17.705 9.914 17.705 7.001 C 17.705 4.169 16 1.617 13.384 0.533 C 10.768 -0.55 7.757 0.049 5.755 2.051 C 4.442 3.364 3.705 5.144 3.705 7.001 Z" } diff --git a/components/Connection.vue b/components/Connection.vue index 062c580a..df3c0637 100644 --- a/components/Connection.vue +++ b/components/Connection.vue @@ -6,7 +6,7 @@ import { Dropdown, DropdownTitle, DropdownItem, DropdownDivider } from "@/compon /** Services */ import amp from "@/services/amp" import { disconnect } from "@/services/wallet" -import { arabica, mainnet, mammoth, mocha } from "@/services/chains" +import { arabica, mainnet, mocha } from "@/services/chains" /** Store */ import { useAppStore } from "@/store/app.store" @@ -30,10 +30,6 @@ switch (hostname) { appStore.network = mocha break - case "mammoth.celenium.io": - appStore.network = mammoth - break - case "localhost": appStore.network = arabica break diff --git a/components/LeftSidebar.vue b/components/LeftSidebar.vue index 78a824f8..7c7da5c4 100644 --- a/components/LeftSidebar.vue +++ b/components/LeftSidebar.vue @@ -106,6 +106,12 @@ const mainLinks = reactive([ name: "Governance", path: "/proposals", }, + { + icon: "node", + name: "Node Upgrades", + path: "/upgrades", + new: true, + }, ]) const isModularLinksCollapsed = ref(false) @@ -233,8 +239,7 @@ const handleOnClose = () => { - - 🦣 + { Mainnet Mocha-4 Arabica - Mammoth diff --git a/components/OgImage/ProposalImage.vue b/components/OgImage/ProposalImage.vue index 5e20d7a0..3bddf658 100644 --- a/components/OgImage/ProposalImage.vue +++ b/components/OgImage/ProposalImage.vue @@ -2,9 +2,6 @@ /** Vendor */ import { DateTime } from "luxon" -/** Services */ -import { comma, formatBytes } from "@/services/utils" - defineOptions({ inheritAttrs: false, }) @@ -22,10 +19,43 @@ const bgStyles = computed(() => { }, } }) + +function truncateText(text = "", maxCharsPerLine = 30, maxLines = 2) { + if (!text) return "" + + const words = text.split(/\s+/) + const lines = [] + let currentLine = "" + + for (const word of words) { + if ((currentLine + " " + word).trim().length <= maxCharsPerLine) { + currentLine = (currentLine + " " + word).trim() + } else { + lines.push(currentLine) + currentLine = word + if (lines.length >= maxLines) break + } + } + + if (lines.length < maxLines && currentLine) { + lines.push(currentLine) + } + + if (lines.length > maxLines) { + lines.length = maxLines + } + + // ellipsis + if (lines.length === maxLines && words.join(" ").length > lines.join(" ").length) { + lines[maxLines - 1] = lines[maxLines - 1].replace(/[.,;:!?-]*$/, "") + "…" + } + + return lines.join("\n") +}