Skip to content

Commit 4c2847d

Browse files
committed
ref: .store suffix
1 parent 801d078 commit 4c2847d

File tree

98 files changed

+810
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+810
-685
lines changed

app.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ import { fetchHead } from "@/services/api/main"
1717
import { fetchLatestBlocks } from "@/services/api/block"
1818
1919
/** Store */
20-
import { useNodeStore } from "@/store/node"
21-
import { useAppStore } from "@/store/app"
22-
import { useBookmarksStore } from "@/store/bookmarks"
23-
import { useSettingsStore } from "@/store/settings"
24-
import { useEnumStore } from "@/store/enums"
25-
import { useLegalStore } from "@/store/legal"
26-
import { useNotificationsStore } from "@/store/notifications"
27-
import { useRollupsRankingStore } from "@/store/rollupsrank"
20+
import { useNodeStore } from "@/store/node.store"
21+
import { useAppStore } from "@/store/app.store"
22+
import { useBookmarksStore } from "@/store/bookmarks.store"
23+
import { useSettingsStore } from "@/store/settings.store"
24+
import { useEnumStore } from "@/store/enums.store"
25+
import { useLegalStore } from "@/store/legal.store"
26+
import { useNotificationsStore } from "@/store/notifications.store"
27+
import { useActivityStore } from "@/store/activity.store"
2828
const nodeStore = useNodeStore()
2929
const appStore = useAppStore()
3030
const bookmarksStore = useBookmarksStore()
3131
const settingsStore = useSettingsStore()
3232
const enumStore = useEnumStore()
3333
const legalStore = useLegalStore()
3434
const notificationsStore = useNotificationsStore()
35-
const rollupsRankingStore = useRollupsRankingStore()
35+
const activityStore = useActivityStore()
3636
3737
bookmarksStore.$subscribe((mutation, state) => {
3838
localStorage.setItem("bookmarks", JSON.stringify(state.bookmarks))
@@ -43,7 +43,7 @@ settingsStore.$subscribe((mutation, state) => {
4343
legalStore.$subscribe((mutation, state) => {
4444
localStorage.setItem("legal", JSON.stringify(state.legal))
4545
})
46-
rollupsRankingStore.$subscribe((mutation, state) => {
46+
activityStore.$subscribe((mutation, state) => {
4747
localStorage.setItem("rollups_ranking", JSON.stringify(state.rollups_ranking))
4848
})
4949
@@ -96,7 +96,7 @@ onMounted(async () => {
9696
}
9797
9898
settingsStore.init()
99-
rollupsRankingStore.init()
99+
activityStore.init()
100100
101101
const runtimeConfig = useRuntimeConfig()
102102
amp.init(runtimeConfig.public.AMP)

components/ActionBar.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@ import Search from "@/components/modules/navigation/Search.vue"
1111
import { isMobile } from "@/services/utils"
1212
1313
/** Store */
14-
import { useAppStore } from "@/store/app"
14+
import { useAppStore } from "@/store/app.store"
1515
const appStore = useAppStore()
1616
</script>
1717

1818
<template>
1919
<Flex wide align="center" justify="between" gap="24" :class="$style.wrapper">
2020
<Flex wide align="center" gap="12">
21-
<Button v-if="isMobile()" @click="appStore.showSidebar = !appStore.showSidebar" type="secondary" size="medium" :class="$style.menu_btn">
21+
<Button
22+
v-if="isMobile()"
23+
@click="appStore.showSidebar = !appStore.showSidebar"
24+
type="secondary"
25+
size="medium"
26+
:class="$style.menu_btn"
27+
>
2228
<Icon name="menu" size="16" color="primary" />
2329
</Button>
2430

components/AmountInCurrency.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { amountToString } from "@/services/utils"
66
import Tooltip from "@/components/ui/Tooltip.vue"
77
88
/** Store */
9-
import { useAppStore } from "@/store/app"
9+
import { useAppStore } from "@/store/app.store"
1010
const appStore = useAppStore()
1111
1212
const currentPrice = computed(() => appStore.currentPrice)
@@ -74,12 +74,12 @@ const calculatedAmount = computed(() => {
7474
...defaultCurrencyStyle,
7575
...props.styles.currency,
7676
},
77-
}
77+
},
7878
}
7979
8080
let tiaDisplay
8181
let tiaExchange
82-
if (finalAmount.amount.unit === 'utia') {
82+
if (finalAmount.amount.unit === "utia") {
8383
tiaExchange = finalAmount.amount.value / 1_000_000
8484
8585
if (finalAmount.amount.currency === "TIA") {

components/BadgeValue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { space } from "@/services/utils"
66
77
/** Store */
8-
import { useNotificationsStore } from "@/store/notifications"
8+
import { useNotificationsStore } from "@/store/notifications.store"
99
const notificationsStore = useNotificationsStore()
1010
1111
const props = defineProps({

components/BookmarkButton.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import Button from "@/components/ui/Button.vue"
66
import { capitilize } from "@/services/utils"
77
88
/** Store */
9-
import { useBookmarksStore } from "@/store/bookmarks"
10-
import { useCacheStore } from "@/store/cache"
11-
import { useModalsStore } from "@/store/modals"
12-
import { useNotificationsStore } from "@/store/notifications"
9+
import { useBookmarksStore } from "@/store/bookmarks.store"
10+
import { useCacheStore } from "@/store/cache.store"
11+
import { useModalsStore } from "@/store/modals.store"
12+
import { useNotificationsStore } from "@/store/notifications.store"
1313
const bookmarksStore = useBookmarksStore()
1414
const cacheStore = useCacheStore()
1515
const modalsStore = useModalsStore()

components/Connection.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { disconnect } from "@/services/wallet"
99
import { arabica, mainnet, mammoth, mocha } from "@/services/chains"
1010
1111
/** Store */
12-
import { useAppStore } from "@/store/app"
13-
import { useModalsStore } from "@/store/modals"
14-
import { useNotificationsStore } from "@/store/notifications"
12+
import { useAppStore } from "@/store/app.store"
13+
import { useModalsStore } from "@/store/modals.store"
14+
import { useNotificationsStore } from "@/store/notifications.store"
1515
const appStore = useAppStore()
1616
const modalsStore = useModalsStore()
1717
const notificationsStore = useNotificationsStore()

components/CopyButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
/** Store */
3-
import { useNotificationsStore } from "@/store/notifications"
3+
import { useNotificationsStore } from "@/store/notifications.store"
44
const notificationsStore = useNotificationsStore()
55
66
const props = defineProps({

components/Feed.vue

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import Tooltip from "@/components/ui/Tooltip.vue"
1313
import { fetchPriceSeries } from "@/services/api/stats"
1414
1515
/** Store */
16-
import { useAppStore } from "@/store/app"
17-
import { useRollupsRankingStore } from "@/store/rollupsrank"
16+
import { useAppStore } from "@/store/app.store"
17+
import { useActivityStore } from "@/store/activity.store"
1818
const appStore = useAppStore()
19-
const rollupRankingStore = useRollupsRankingStore()
19+
const activityStore = useActivityStore()
2020
2121
const head = computed(() => appStore.lastHead)
2222
const currentPrice = computed(() => appStore.currentPrice)
@@ -26,15 +26,15 @@ const totalSupplyUSD = computed(() => totalSupply.value * currentPrice.value?.cl
2626
const totalFees = computed(() => head.value.total_fee / 1_000_000)
2727
const totalFeesUSD = computed(() => totalFees.value * currentPrice.value?.close)
2828
const topRollup = computed(() => {
29-
let rankCategory = getRankCategory(roundTo(rollupRankingStore?.rollups_ranking?.top_rollup?.rank / 10, 0))
29+
let rankCategory = getRankCategory(roundTo(activityStore?.rollups_ranking?.top_rollup?.rank / 10, 0))
3030
return {
31-
slug: rollupRankingStore?.rollups_ranking?.top_rollup?.slug,
32-
name: rollupRankingStore?.rollups_ranking?.top_rollup?.name,
31+
slug: activityStore?.rollups_ranking?.top_rollup?.slug,
32+
name: activityStore?.rollups_ranking?.top_rollup?.name,
3333
rank: {
3434
name: rankCategory?.name,
35-
score: rollupRankingStore?.rollups_ranking?.top_rollup?.rank,
35+
score: activityStore?.rollups_ranking?.top_rollup?.rank,
3636
color: rankCategory?.color,
37-
}
37+
},
3838
}
3939
})
4040
@@ -46,16 +46,16 @@ const price = reactive({
4646
})
4747
4848
onMounted(async () => {
49-
const dataSeries = await fetchPriceSeries( {from: parseInt(DateTime.now().minus({ days: 3 }).ts / 1_000)})
49+
const dataSeries = await fetchPriceSeries({ from: parseInt(DateTime.now().minus({ days: 3 }).ts / 1_000) })
5050
series.value = dataSeries
5151
appStore.currentPrice = series.value[0]
5252
price.value = parseFloat(series.value[0].close)
5353
5454
const prevDayClosePrice = parseFloat(series.value[1].close)
5555
price.diff = (Math.abs(prevDayClosePrice - price.value) / ((prevDayClosePrice + price.value) / 2)) * 100
56-
let side = 'stay'
56+
let side = "stay"
5757
if (price.value - prevDayClosePrice !== 0) {
58-
side = price.value - prevDayClosePrice > 0 ? 'rise' : 'fall'
58+
side = price.value - prevDayClosePrice > 0 ? "rise" : "fall"
5959
}
6060
price.side = side
6161
})
@@ -69,12 +69,20 @@ onMounted(async () => {
6969
<NuxtLink :to="`/rollup/rank/${topRollup?.slug}`">
7070
<Tooltip>
7171
<Flex align="center" gap="6" :class="$style.stat">
72-
<Icon v-if="topRollup?.name" name="laurel" size="14" :color="topRollup?.rank?.color" :style="{marginTop: '1px'}" />
73-
<Icon v-else name="laurel" size="14" color="tertiary" :class="$style.icon" :style="{marginTop: '1px'}" />
72+
<Icon
73+
v-if="topRollup?.name"
74+
name="laurel"
75+
size="14"
76+
:color="topRollup?.rank?.color"
77+
:style="{ marginTop: '1px' }"
78+
/>
79+
<Icon v-else name="laurel" size="14" color="tertiary" :class="$style.icon" :style="{ marginTop: '1px' }" />
7480
<Flex align="center" gap="4">
7581
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Top Rollup:</Text>
7682
77-
<Text v-if="topRollup?.name" size="12" weight="600" color="secondary" noWrap :class="$style.value"> {{ topRollup?.name }} </Text>
83+
<Text v-if="topRollup?.name" size="12" weight="600" color="secondary" noWrap :class="$style.value">
84+
{{ topRollup?.name }}
85+
</Text>
7886
<Skeleton v-else w="40" h="12" />
7987
</Flex>
8088
</Flex>
@@ -103,7 +111,9 @@ onMounted(async () => {
103111
<Flex align="center" gap="4">
104112
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Txs:</Text>
105113
106-
<Text v-if="head.total_tx" size="12" weight="600" noWrap :class="$style.value">{{ abbreviate(head.total_tx) }}</Text>
114+
<Text v-if="head.total_tx" size="12" weight="600" noWrap :class="$style.value">{{
115+
abbreviate(head.total_tx)
116+
}}</Text>
107117
<Skeleton v-else w="40" h="12" />
108118
</Flex>
109119
</Flex>

components/LeftSidebar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { StatusMap } from "@/services/constants/node"
1313
import { isMainnet, isMobile } from "@/services/utils"
1414
1515
/** Store */
16-
import { useAppStore } from "@/store/app"
17-
import { useNodeStore } from "@/store/node"
18-
import { useModalsStore } from "@/store/modals"
16+
import { useAppStore } from "@/store/app.store"
17+
import { useNodeStore } from "@/store/node.store"
18+
import { useModalsStore } from "@/store/modals.store"
1919
const appStore = useAppStore()
2020
const nodeStore = useNodeStore()
2121
const modalsStore = useModalsStore()

components/Notifications.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Button from "@/components/ui/Button.vue"
55
/**
66
* Store
77
*/
8-
import { useNotificationsStore } from "@/store/notifications"
8+
import { useNotificationsStore } from "@/store/notifications.store"
99
const notificationsStore = useNotificationsStore()
1010
1111
const handleActionCallback = (callback, notification) => {

0 commit comments

Comments
 (0)