Skip to content

Commit e4d9ec1

Browse files
authored
Merge pull request #141 from celenium-io/dev
Constants view
2 parents 7ac38c4 + 2e2f3a8 commit e4d9ec1

File tree

12 files changed

+441
-9
lines changed

12 files changed

+441
-9
lines changed

assets/icons.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"block": "M 12.403 1.185 C 12.137 1.13 11.863 1.13 11.597 1.185 C 11.29 1.248 11.015 1.402 10.797 1.525 L 10.737 1.558 L 4.31 5.129 C 3.902 5.356 3.698 5.469 3.63 5.619 C 3.57 5.75 3.57 5.9 3.629 6.031 C 3.696 6.181 3.9 6.296 4.307 6.525 L 11.607 10.632 C 11.751 10.712 11.822 10.752 11.897 10.768 C 11.964 10.782 12.034 10.782 12.101 10.768 C 12.177 10.752 12.249 10.712 12.391 10.632 L 19.692 6.525 C 20.099 6.296 20.303 6.182 20.371 6.031 C 20.43 5.9 20.429 5.751 20.37 5.62 C 20.301 5.47 20.097 5.356 19.689 5.13 L 13.262 1.558 L 13.202 1.524 C 12.985 1.402 12.71 1.248 12.402 1.185 Z M 21.996 8.89 C 21.996 8.442 21.996 8.218 21.901 8.087 C 21.818 7.973 21.691 7.899 21.551 7.883 C 21.391 7.865 21.195 7.975 20.804 8.195 L 13.408 12.355 C 13.259 12.439 13.185 12.48 13.131 12.539 C 13.083 12.591 13.047 12.653 13.025 12.721 C 13 12.797 13 12.882 13 13.052 L 13 21.228 C 13 21.675 13 21.898 13.094 22.029 C 13.176 22.143 13.302 22.218 13.442 22.234 C 13.602 22.253 13.797 22.144 14.187 21.928 L 20.663 18.331 L 20.726 18.297 C 20.956 18.169 21.248 18.009 21.471 17.767 C 21.664 17.557 21.81 17.31 21.899 17.039 C 22.002 16.726 22.001 16.395 22 16.131 L 22 16.059 C 22 14.096 21.997 10.756 21.996 8.89 Z M 9.814 21.928 C 10.204 22.144 10.399 22.253 10.559 22.234 C 10.698 22.217 10.824 22.143 10.906 22.029 C 11 21.899 11 21.675 11 21.228 L 11 13.052 C 11 12.882 11 12.797 10.975 12.721 C 10.953 12.654 10.917 12.592 10.869 12.54 C 10.815 12.48 10.741 12.439 10.593 12.355 L 3.197 8.195 C 2.805 7.975 2.609 7.865 2.449 7.883 C 2.309 7.899 2.182 7.973 2.099 8.087 C 2.005 8.217 2.005 8.442 2.004 8.89 C 2.003 10.756 2 14.096 2 16.06 L 2 16.132 C 2 16.396 1.998 16.727 2.101 17.04 C 2.191 17.31 2.337 17.559 2.53 17.768 C 2.753 18.01 3.043 18.17 3.275 18.298 L 3.338 18.332 C 5.118 19.322 8.148 21.004 9.814 21.929 Z",
7272
"settings": "M 9.742 21.554 L 9.09 20.108 C 8.856 19.59 8.463 19.16 7.968 18.88 C 7.47 18.598 6.897 18.477 6.328 18.536 L 4.731 18.704 C 4.256 18.753 3.777 18.666 3.35 18.452 C 2.926 18.24 2.572 17.909 2.331 17.5 C 1.843 16.668 1.899 15.626 2.473 14.851 L 3.418 13.571 C 4.108 12.637 4.108 11.362 3.418 10.428 L 2.473 9.148 C 1.9 8.373 1.844 7.332 2.33 6.5 C 2.571 6.091 2.924 5.76 3.349 5.548 C 3.776 5.334 4.254 5.247 4.729 5.296 L 6.331 5.464 C 6.9 5.523 7.474 5.403 7.972 5.12 C 8.465 4.839 8.857 4.409 9.09 3.892 L 9.742 2.446 C 9.936 2.016 10.252 1.65 10.653 1.393 C 11.474 0.867 12.526 0.867 13.347 1.393 C 13.747 1.65 14.064 2.015 14.257 2.446 L 14.915 3.892 C 15.148 4.409 15.539 4.839 16.032 5.12 C 16.53 5.402 17.103 5.523 17.672 5.464 L 19.27 5.296 C 19.745 5.246 20.224 5.334 20.65 5.548 C 21.076 5.761 21.43 6.092 21.669 6.5 C 22.158 7.331 22.102 8.374 21.527 9.149 L 20.582 10.429 C 20.245 10.884 20.064 11.434 20.063 12 C 20.061 12.568 20.241 13.121 20.577 13.578 L 21.522 14.858 C 22.094 15.633 22.15 16.674 21.664 17.506 C 21.424 17.916 21.07 18.247 20.645 18.459 C 20.218 18.673 19.74 18.76 19.265 18.71 L 17.668 18.543 C 17.099 18.484 16.525 18.604 16.027 18.886 C 15.533 19.167 15.142 19.596 14.91 20.108 L 14.258 21.554 C 14.064 21.984 13.748 22.35 13.347 22.607 C 12.526 23.133 11.474 23.133 10.653 22.607 C 10.254 22.352 9.938 21.986 9.743 21.554 Z M 12 9 C 10.343 9 9 10.343 9 12 C 9 13.657 10.343 15 12 15 C 13.657 15 15 13.657 15 12 C 15 10.343 13.657 9 12 9 Z",
7373
"plus-circle": "M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM12 7C12.5523 7 13 7.44772 13 8V11H16C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H13V16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16V13H8C7.44772 13 7 12.5523 7 12C7 11.4477 7.44772 11 8 11H11V8C11 7.44772 11.4477 7 12 7Z",
74+
"constant": "M6 18.5C6 18.3674 5.94728 18.2403 5.85352 18.1465C5.75975 18.0527 5.63261 18 5.5 18H5V19H5.5C5.63261 19 5.75975 18.9473 5.85352 18.8535C5.94728 18.7597 6 18.6326 6 18.5ZM20 17C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H11C10.4477 19 10 18.5523 10 18C10 17.4477 10.4477 17 11 17H20ZM20 11C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H11C10.4477 13 10 12.5523 10 12C10 11.4477 10.4477 11 11 11H20ZM5.99023 5.40234C5.97106 5.30611 5.92392 5.21689 5.85352 5.14648C5.75975 5.05272 5.63261 5 5.5 5C5.36739 5 5.24025 5.05272 5.14648 5.14648C5.05272 5.24025 5 5.36739 5 5.5V7H6V5.5L5.99023 5.40234ZM20 5C20.5523 5 21 5.44772 21 6C21 6.55228 20.5523 7 20 7H11C10.4477 7 10 6.55228 10 6C10 5.44772 10.4477 5 11 5H20ZM6 15.5C6 15.3674 5.94728 15.2403 5.85352 15.1465C5.75975 15.0527 5.63261 15 5.5 15H5V16H5.5L5.59766 15.9902C5.69388 15.9711 5.78311 15.9239 5.85352 15.8535C5.94728 15.7597 6 15.6326 6 15.5ZM8 15.5C8 16.045 7.81889 16.5694 7.49512 17C7.81889 17.4306 8 17.955 8 18.5C8 19.163 7.73642 19.7987 7.26758 20.2676C6.79874 20.7364 6.16304 21 5.5 21H4C3.44772 21 3 20.5523 3 20V14L3.00488 13.8975C3.05621 13.3933 3.48232 13 4 13H5.5C6.16304 13 6.79874 13.2636 7.26758 13.7324C7.73642 14.2013 8 14.837 8 15.5ZM8 10C8 10.5523 7.55228 11 7 11C6.44772 11 6 10.5523 6 10V9H5V10C5 10.5523 4.55228 11 4 11C3.44772 11 3 10.5523 3 10V5.5C3 4.83696 3.26358 4.20126 3.73242 3.73242C4.20126 3.26358 4.83696 3 5.5 3C6.16304 3 6.79874 3.26358 7.26758 3.73242C7.73642 4.20126 8 4.83696 8 5.5V10Z",
7475
"code": "M14.9764 3.21714C15.0962 2.67801 14.7563 2.14383 14.2171 2.02403C13.678 1.90422 13.1438 2.24415 13.024 2.78328L9.02403 20.7833C8.90422 21.3224 9.24416 21.8566 9.78329 21.9764C10.3224 22.0962 10.8566 21.7563 10.9764 21.2171L14.9764 3.21714ZM7.70711 6.29314C8.09763 6.68366 8.09763 7.31683 7.70711 7.70735L3.41421 12.0002L7.70711 16.2931C8.09763 16.6836 8.09763 17.3168 7.70711 17.7073C7.31658 18.0978 6.68342 18.0978 6.29289 17.7073L1.29289 12.7073C0.90237 12.3168 0.90237 11.6836 1.29289 11.2931L6.29289 6.29314C6.68342 5.90261 7.31658 5.90261 7.70711 6.29314ZM16.2929 6.29314C16.6834 5.90261 17.3166 5.90261 17.7071 6.29314L22.7071 11.2931C23.0976 11.6836 23.0976 12.3168 22.7071 12.7073L17.7071 17.7073C17.3166 18.0978 16.6834 18.0978 16.2929 17.7073C15.9024 17.3168 15.9024 16.6836 16.2929 16.2931L20.5858 12.0002L16.2929 7.70735C15.9024 7.31683 15.9024 6.68366 16.2929 6.29314Z",
7576
"treemap": "M11 3.6C11 3.03995 11 2.75992 10.891 2.54601C10.7951 2.35785 10.6422 2.20487 10.454 2.10899C10.2401 2 9.96005 2 9.4 2H6.16146C5.63433 1.99998 5.17954 1.99997 4.80497 2.03057C4.40963 2.06287 4.01641 2.13419 3.63803 2.32698C3.07354 2.6146 2.6146 3.07354 2.32698 3.63803C2.13419 4.01641 2.06287 4.40963 2.03057 4.80497C1.99997 5.17954 1.99998 5.63429 2 6.16142V17.8385C1.99998 18.3657 1.99997 18.8205 2.03057 19.195C2.06287 19.5904 2.13419 19.9836 2.32698 20.362C2.6146 20.9265 3.07354 21.3854 3.63803 21.673C4.01641 21.8658 4.40963 21.9371 4.80497 21.9694C5.17954 22 5.6343 22 6.16144 22H9.4C9.96005 22 10.2401 22 10.454 21.891C10.6422 21.7951 10.7951 21.6422 10.891 21.454C11 21.2401 11 20.9601 11 20.4V3.6ZM13 20.4C13 20.9601 13 21.2401 13.109 21.454C13.2049 21.6422 13.3578 21.7951 13.546 21.891C13.7599 22 14.0399 22 14.6 22H17.8386C18.3657 22 18.8205 22 19.195 21.9694C19.5904 21.9371 19.9836 21.8658 20.362 21.673C20.9265 21.3854 21.3854 20.9265 21.673 20.362C21.8658 19.9836 21.9371 19.5904 21.9694 19.195C22 18.8205 22 18.3657 22 17.8386V14.6C22 14.0399 22 13.7599 21.891 13.546C21.7951 13.3578 21.6422 13.2049 21.454 13.109C21.2401 13 20.9601 13 20.4 13H14.6C14.0399 13 13.7599 13 13.546 13.109C13.3578 13.2049 13.2049 13.3578 13.109 13.546C13 13.7599 13 14.0399 13 14.6V20.4ZM21.454 10.891C21.2401 11 20.9601 11 20.4 11H14.6C14.0399 11 13.7599 11 13.546 10.891C13.3578 10.7951 13.2049 10.6422 13.109 10.454C13 10.2401 13 9.96005 13 9.4V3.6C13 3.03995 13 2.75992 13.109 2.54601C13.2049 2.35785 13.3578 2.20487 13.546 2.10899C13.7599 2 14.0399 2 14.6 2H17.8386C18.3657 1.99998 18.8205 1.99997 19.195 2.03057C19.5904 2.06287 19.9836 2.13419 20.362 2.32698C20.9265 2.6146 21.3854 3.07354 21.673 3.63803C21.8658 4.01641 21.9371 4.40963 21.9694 4.80497C22 5.17954 22 5.6343 22 6.16144V9.4C22 9.96005 22 10.2401 21.891 10.454C21.7951 10.6422 21.6422 10.7951 21.454 10.891Z",
7677
"trash": "M 15 2 C 15.552 2 16 2.448 16 3 C 16 3.552 15.552 4 15 4 L 9 4 C 8.448 4 8 3.552 8 3 C 8 2.448 8.448 2 9 2 Z M 21 5 C 21.552 5 22 5.448 22 6 C 22 6.552 21.552 7 21 7 L 19.936 7 L 19.294 16.625 L 19.294 16.632 C 19.243 17.385 19.202 18.007 19.128 18.515 C 19.049 19.045 18.926 19.529 18.668 19.98 C 18.268 20.682 17.665 21.247 16.938 21.6 C 16.471 21.826 15.979 21.917 15.445 21.96 C 14.934 22 14.309 22 13.555 22 L 10.445 22 C 9.691 22 9.066 22 8.555 21.96 C 8.021 21.917 7.53 21.826 7.062 21.6 C 6.335 21.247 5.731 20.683 5.331 19.98 C 5.074 19.529 4.951 19.045 4.873 18.515 C 4.798 18.006 4.756 17.381 4.706 16.625 L 4.064 7 L 3 7 C 2.448 7 2 6.552 2 6 C 2 5.448 2.448 5 3 5 Z M 11 10.5 C 11 9.948 10.552 9.5 10 9.5 C 9.448 9.5 9 9.948 9 10.5 L 9 15.5 C 9 16.052 9.448 16.5 10 16.5 C 10.552 16.5 11 16.052 11 15.5 Z M 13 10.5 L 13 15.5 C 13 16.052 13.448 16.5 14 16.5 C 14.552 16.5 15 16.052 15 15.5 L 15 10.5 C 15 9.948 14.552 9.5 14 9.5 C 13.448 9.5 13 9.948 13 10.5 Z",

components/CopyButton.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const handleCopy = (target) => {
4040
:name="!isCopied ? 'copy' : 'check'"
4141
:size="size"
4242
:color="!isCopied ? 'tertiary' : 'green'"
43+
hoverColor="primary"
4344
class="copyable"
4445
/>
4546
</template>

components/Icon.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ const isSplitted = () => {
9090
animation: skeleton 1s ease-in-out infinite;
9191
}
9292
93+
.hovered {
94+
transition: all 0.2s ease;
95+
96+
&:hover {
97+
fill: v-bind(hoverColorVar);
98+
}
99+
}
100+
93101
@keyframes skeleton {
94102
0% {
95103
opacity: 1;

components/LeftSidebar.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,9 @@ const toolsLinks = reactive([
170170
path: "/gas",
171171
},
172172
{
173-
icon: "zap",
173+
icon: "constant",
174174
name: "Constants",
175-
callback: () => {
176-
modalsStore.open("constants")
177-
},
175+
path: "/constants",
178176
},
179177
{
180178
icon: "bookmark",

components/cmd/CommandMenu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ const rawDeveloperActions = [
626626
subtitle: "Command",
627627
runText: "View Constants",
628628
callback: () => {
629-
modalsStore.open("constants")
629+
router.push("/constants")
630630
},
631631
},
632632
{

components/modals/ModalsManager.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import BlobModal from "./BlobModal.vue"
44
import ChartModal from "./ChartModal.vue"
55
import CommitmentModal from "./CommitmentModal.vue"
66
import ConfirmationModal from "./ConfirmationModal.vue"
7-
import ConstantsModal from "./ConstantsModal.vue"
87
import EditBookmarkAliasModal from "./EditBookmarkAliasModal.vue"
98
import ImportBookmarksModal from "./ImportBookmarksModal.vue"
109
import ODSModal from "./ODSModal.vue"
@@ -32,7 +31,6 @@ const modalsStore = useModalsStore()
3231
<BlobModal :show="modalsStore.modals.blob" @onClose="modalsStore.close('blob')" />
3332
<CommitmentModal :show="modalsStore.modals.commitment" @onClose="modalsStore.close('commitment')" />
3433
<ConfirmationModal :show="modalsStore.modals.confirmation" @onClose="modalsStore.close('confirmation')" />
35-
<ConstantsModal :show="modalsStore.modals.constants" @onClose="modalsStore.close('constants')" />
3634
<EditBookmarkAliasModal :show="modalsStore.modals.edit_alias" @onClose="modalsStore.close('edit_alias')" />
3735
<ImportBookmarksModal :show="modalsStore.modals.import" @onClose="modalsStore.close('import')" />
3836
<ODSModal :show="modalsStore.modals.ods" @onClose="modalsStore.close('ods')" />

components/ui/Tooltip.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const props = defineProps({
2424
wide: { type: Boolean, default: null },
2525
disabled: { type: Boolean, default: false },
2626
delay: { type: [String, Number], default: 0 },
27+
width: { type: String, required: false },
2728
triggerWidth: { type: String, required: false, default: null },
2829
})
2930
@@ -35,6 +36,7 @@ const tip = ref(null)
3536
3637
const styles = reactive({
3738
transform: `translate3d(0, 0, 0)`,
39+
maxWidth: props.width,
3840
})
3941
4042
watch(

0 commit comments

Comments
 (0)