Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #19

Merged
merged 50 commits into from
Jan 31, 2024
Merged

Dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
39dbfd9
Add donation links
GusevPM Jan 22, 2024
64f32db
Add cross-env
GusevPM Jan 22, 2024
be117ab
Change queries
GusevPM Jan 23, 2024
20fd4bf
Fix transactions widget
GusevPM Jan 23, 2024
ee910d8
Fix transactions widget
GusevPM Jan 23, 2024
cb24771
Remove func parameter in fetchSeries
GusevPM Jan 23, 2024
60e5a85
Add button
GusevPM Jan 23, 2024
a580741
Fix transactions widget
GusevPM Jan 23, 2024
e22f0eb
Update license.yml
xdeq Jan 24, 2024
f962f5b
Update license.yml
xdeq Jan 24, 2024
de13a1a
Fix Nan bug in transactions widget
GusevPM Jan 24, 2024
848ccf3
Rollups table and page v1
GusevPM Jan 25, 2024
ad48b33
Add charts for rollups
GusevPM Jan 25, 2024
7ec6cc0
Fix pagination
GusevPM Jan 25, 2024
da9bb00
Change time visual for rollup overview
GusevPM Jan 25, 2024
45a794f
Change endpoints and table
GusevPM Jan 25, 2024
2794aa9
feat(search): double focus + autocomplete
xdeq Jan 26, 2024
efff4b7
feat: bookmarks
xdeq Jan 26, 2024
87d7f68
Add links to terms and policy
GusevPM Jan 26, 2024
ca67b41
Merge branch 'CLS-206-add-links-to-terms-and-privacy' into CLS-180-do…
GusevPM Jan 26, 2024
7916a03
Update license.yml
GusevPM Jan 26, 2024
af81a29
Fix icon and description
GusevPM Jan 27, 2024
547aea1
fix(CommandMenu): focus unk
xdeq Jan 28, 2024
4b1649f
some fixes for bookmark item
xdeq Jan 28, 2024
447dd76
feat(feed): tia price
xdeq Jan 29, 2024
b6cf2f2
feat: connect wallet test
xdeq Jan 29, 2024
06ed20d
feat: heatmap for gas price
xdeq Jan 29, 2024
348062d
feat(CommandMenu): clear bookmarks
xdeq Jan 29, 2024
e5ca1a1
feat(bookmarks): import & export & merge effect
xdeq Jan 29, 2024
495712d
fix(ImportBookmarksModal): disable merge effect on modal close
xdeq Jan 29, 2024
686e1dd
fix(bookmarks): open bookmarks link
xdeq Jan 29, 2024
ff925a5
feat(ConfirmationModal): color type
xdeq Jan 29, 2024
8f56da0
feat(bookmarks): alias name
xdeq Jan 29, 2024
369a8fa
fix(Feed): tooltip for tia price
xdeq Jan 29, 2024
45921e6
Fix height, add github, hide logo and social links if empty
GusevPM Jan 29, 2024
8c1c4bc
Fix version link alignment
GusevPM Jan 29, 2024
fff3e6e
Some small text changes
GusevPM Jan 29, 2024
c0ea70b
Fix rollup github tooltip
GusevPM Jan 29, 2024
a49e56e
Merge pull request #17 from celenium-io/CLS-209-change-text-for-place…
xdeq Jan 29, 2024
2b498b9
Merge pull request #15 from celenium-io/CLS-167-add-rollups
xdeq Jan 29, 2024
164ad88
Merge pull request #12 from celenium-io/CLS-180-donation-links
xdeq Jan 29, 2024
4a4a7d7
Merge pull request #16 from celenium-io/CLS-185-change-blobs-endpoints
xdeq Jan 29, 2024
ca25f33
Merge pull request #14 from celenium-io/CLS-190-return-button-from-tr…
xdeq Jan 29, 2024
27b8c86
Merge pull request #13 from celenium-io/CLS-207-change-histogram-queries
xdeq Jan 29, 2024
46bfd33
Merge branch 'dev' of github.com:celenium-io/celenium-interface into dev
xdeq Jan 29, 2024
65297c1
ref tx page: messages + events + raw data modal
xdeq Jan 31, 2024
c3fd4cc
test keplr
xdeq Jan 31, 2024
eba3008
Feed price + GasPriceHeatMap
GusevPM Jan 31, 2024
f65e381
Merge pull request #18 from celenium-io/Small-fixes-before-release
xdeq Jan 31, 2024
268e5be
feat: load more events
xdeq Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: yarn --frozen-lockfile --production
- uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
- uses: daynin/[email protected]
with:
exclude-private-packages: true
Expand Down
9 changes: 9 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ import CommandMenu from "@/components/cmd/CommandMenu.vue"

/** Store */
import { useAppStore } from "@/store/app"
import { useBookmarksStore } from "@/store/bookmarks"
const appStore = useAppStore()
const bookmarksStore = useBookmarksStore()
bookmarksStore.$subscribe((mutation, state) => {
localStorage.setItem("bookmarks", JSON.stringify(state.bookmarks))
})

onMounted(async () => {
const runtimeConfig = useRuntimeConfig()
amp.init(runtimeConfig.public.AMP)

if (localStorage.bookmarks) {
bookmarksStore.bookmarks = JSON.parse(localStorage.bookmarks)
}

Socket.init()

const data = await fetchHead()
Expand Down
14 changes: 12 additions & 2 deletions assets/icons.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion assets/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $grayscale: (

/* General */
--brand: #924dff;
--blue: #0b84fe;
--blue: #076acd;
--red: #eb5757;
--orange: #ff5a17;
--light-orange: #ff8351;
Expand All @@ -50,6 +50,9 @@ $grayscale: (
--btn-white-bg: rgba(255, 255, 255, 90%);
--btn-white-bg-hover: rgba(255, 255, 255, 75%);
--btn-white-bg-active: rgba(255, 255, 255, 90%);
--btn-red-bg: rgba(235, 87, 87, 100%);
--btn-red-bg-hover: rgba(235, 87, 87, 75%);
--btn-red-bg-active: rgba(235, 87, 87, 90%);
--btn-secondary-bg: rgba(255, 255, 255, 8%);
--btn-secondary-bg-hover: rgba(255, 255, 255, 10%);
--btn-secondary-bg-active: rgba(255, 255, 255, 7%);
Expand Down
64 changes: 64 additions & 0 deletions components/Feed.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
<script setup>
/** Vendor */
import { DateTime } from "luxon"

/** Services */
import { comma, formatBytes, abbreviate } from "@/services/utils"

/** UI */
import Tooltip from "@/components/ui/Tooltip.vue"

/** API */
import { fetchPrice, fetchPriceSeries } from "@/services/api/stats"

/** Store */
import { useAppStore } from "@/store/app"
const appStore = useAppStore()

const head = computed(() => appStore.head)

const series = ref([])
const price = reactive({
value: 0,
diff: 0,
side: null,
})

onMounted(async () => {
const dataPrice = await fetchPrice()
const dataSeries = await fetchPriceSeries()
price.value = parseFloat(dataPrice.close)
series.value = dataSeries

const prevDayClosePrice = parseFloat(series.value[1].close)
price.diff = (Math.abs(prevDayClosePrice - price.value) / ((prevDayClosePrice + price.value) / 2)) * 100
price.side = price.value - prevDayClosePrice > 0 ? "rise" : "fall"
})
</script>

<template>
Expand Down Expand Up @@ -86,6 +110,46 @@ const head = computed(() => appStore.head)
<template #content> {{ comma(head.total_fee) }} UTIA </template>
</Tooltip>
</Flex>

<Tooltip position="end">
<Flex align="center" gap="6" :class="$style.stat">
<Icon name="coin" size="12" color="secondary" :class="$style.icon" />

<Flex align="center" gap="4">
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">TIA:</Text>

<Text v-if="price.value" size="12" weight="600" noWrap :class="$style.value"> ${{ price.value.toFixed(2) }} </Text>
<Skeleton v-else w="36" h="12" />
</Flex>

<Flex v-if="price.diff" align="center" gap="4">
<Icon v-if="price.side === 'rise'" name="arrow-circle-right-up" size="12" color="neutral-green" />
<Icon v-else name="arrow-circle-right-down" size="12" color="red" />

<Text size="12" weight="600" :color="price.side === 'rise' ? 'neutral-green' : 'red'" noWrap>
{{ price.diff.toFixed(2) }}%</Text
>
</Flex>
<Skeleton v-else w="50" h="12" />
</Flex>

<template #content>
<Flex direction="column" gap="6">
<Flex align="center" gap="4">
<Text color="primary">Price diff from the previous day</Text>
</Flex>

<Flex align="center" gap="4">
<Text color="tertiary">{{ DateTime.fromISO(series[1].time).setLocale("en").toFormat("ff") }} -></Text>
<Text color="primary">${{ parseFloat(series[1].close).toFixed(2) }}</Text>
</Flex>

<Flex align="center" gap="4">
<Text size="11" color="tertiary">Binance quotes</Text>
</Flex>
</Flex>
</template>
</Tooltip>
</Flex>
</Flex>
</template>
Expand Down
1 change: 1 addition & 0 deletions components/Flex.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup>
/** Vendor */
import { ref, computed } from "vue"
const wrapper = ref(null)
Expand Down
42 changes: 25 additions & 17 deletions components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,39 @@ const handleChangeTheme = (theme) => {
<Flex align="center" gap="8">
<Icon name="logo" size="14" color="tertiary" />
<Text size="13" weight="500" color="secondary">Celenium</Text>
<Text size="13" weight="500" color="tertiary">- Celestia Explorer, {{ new Date().getFullYear() }}</Text>
</Flex>

<Flex align="center" gap="16">
<Text size="13" weight="500" color="tertiary">-</Text>
<Text size="13" weight="500" color="tertiary">Celestia Explorer</Text>
<a :href="`https://github.com/celenium-io/celenium-interface/releases/tag/v${appConfig.version}`" target="_blank">
<Flex>
<Text size="12" weight="600" color="support">
Version <Text color="tertiary">{{ appConfig.version }}</Text>
</Text>
<Text size="13" weight="500" color="support">v</Text>
<Text size="13" weight="500" color="tertiary">{{ appConfig.version }}</Text>
</Flex>
</a>
</Flex>

<NuxtLink to="https://celenium.io/address/celestia15ans77hr2uxefyn6fa2lcsvpngwevuaugth7f5">
<Flex align="center" gap="8">
<Text size="12" weight="500" color="support">Donations: </Text>
<Text size="12" weight="500" color="tertiary">celestia</Text>
<Flex align="center" gap="3">
<div v-for="dot in 3" class="dot" />
<Flex align="center" gap="8">
<NuxtLink to="https://www.pklab.io/terms" :class="$style.link">
<Text size="12" weight="500" color="tertiary">Terms of Use</Text>
</NuxtLink>
<NuxtLink to="https://www.pklab.io/privacy" :class="$style.link">
<Text size="12" weight="500" color="tertiary">Privacy Policy</Text>
</NuxtLink>
</Flex>

<Flex align="center" gap="8">
<Text size="12" weight="500" color="support">Donations:</Text>
<a :href="`https://celenium.io/address/celestia15ans77hr2uxefyn6fa2lcsvpngwevuaugth7f5`" target="_blank">
<Flex>
<Text size="12" weight="500" color="tertiary">TIA</Text>
</Flex>
<Text size="12" weight="500" color="tertiary">wevu augt h7f5</Text>
</Flex>
</NuxtLink>
</a>
<a :href="`https://etherscan.io/address/0x9FfB1cb28c55735e77B352eE918b4F0c3595a761`" target="_blank">
<Flex>
<Text size="12" weight="500" color="tertiary">ETH</Text>
</Flex>
</a>
</Flex>
</Flex>

<Flex direction="column" align="end" gap="16">
<Flex align="center" gap="16">
<Dropdown side="top">
Expand Down
39 changes: 35 additions & 4 deletions components/TheHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ const showPopup = ref(false)

const head = computed(() => appStore.head)

const featurePreviewMode = ref(false)
const isWalletAvailable = ref(false)

const account = ref("")

const getAccounts = async () => {
const offlineSigner = window.getOfflineSigner("celestia")
const accounts = await offlineSigner.getAccounts()
if (accounts.length) account.value = accounts[0].address
}

onMounted(async () => {
featurePreviewMode.value = localStorage.featurePreview
isWalletAvailable.value = !!window.keplr
})

watch(
() => showPopup.value,
() => {
Expand Down Expand Up @@ -64,6 +80,12 @@ const isActive = (link) => {
const handleNavigate = (url) => {
window.location.replace(url)
}

const handleConnect = async () => {
await window.keplr.enable("celestia")

getAccounts()
}
</script>

<template>
Expand Down Expand Up @@ -105,7 +127,7 @@ const handleNavigate = (url) => {
</NuxtLink>
</Flex>

<Flex align="center" gap="12">
<Flex align="center" gap="8">
<Dropdown>
<Tooltip v-if="head" position="end">
<Flex align="center" gap="8" :class="[$style.network]">
Expand All @@ -117,7 +139,6 @@ const handleNavigate = (url) => {
<Text color="primary"><template v-if="!head.synced">Not</template> Synced </Text>
</template>
</Tooltip>
<Skeleton v-else w="68" h="12" />

<template #popup>
<DropdownTitle>Network</DropdownTitle>
Expand All @@ -142,6 +163,16 @@ const handleNavigate = (url) => {
</Flex>
</template>
</Tooltip>

<Button
v-if="featurePreviewMode"
@click="handleConnect"
type="white"
size="small"
:disabled="!isWalletAvailable || account.length"
>
{{ account ? `celestia...${account.slice(-6)}` : "Connect" }}
</Button>
</Flex>
</Flex>

Expand Down Expand Up @@ -297,8 +328,8 @@ const handleNavigate = (url) => {
height: 28px;

border-radius: 8px;
background: linear-gradient(var(--op-10), var(--op-3));
box-shadow: inset 0 0 0 1px var(--op-10), 0 2px 8px rgba(0, 0, 0, 8%);
background: var(--op-5);
box-shadow: inset 0 0 0 1px var(--op-5);

padding: 0 12px;

Expand Down
Loading
Loading