Skip to content

Commit

Permalink
feat: Time format switch (#720)
Browse files Browse the repository at this point in the history
Co-authored-by: Michele F. <michele-franchi@users.noreply.github.com>
  • Loading branch information
janmichek and michele-franchi authored May 13, 2024
1 parent 90afed8 commit b986617
Show file tree
Hide file tree
Showing 86 changed files with 381 additions and 207 deletions.
4 changes: 2 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { compileTemplate } from 'vue/compiler-sfc'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: './src',
css: ['@/styles/main.css'],
css: ['@/assets/styles/main.css'],
devServer: {
port: 8080,
},
Expand Down Expand Up @@ -45,7 +45,7 @@ export default defineNuxtConfig({
plugins: {
autoprefixer: {},
'@csstools/postcss-global-data': {
files: ['src/styles/settings/_variables.css'],
files: ['src/assets/styles/settings/_variables.css'],
},
'postcss-custom-media': {},
'postcss-import': {},
Expand Down
6 changes: 6 additions & 0 deletions src/assets/icons/clock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/AccountActivitiesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</hint-tooltip>
</th>
<th>
Time
<time-toggle-button/>
<hint-tooltip>
{{ accountHints.activityTime }}
</hint-tooltip>
Expand Down Expand Up @@ -50,7 +50,7 @@
<td>
<block-time-cell
:height="activity.height"
:datetime="activity.time"/>
:timestamp="activity.time"/>
</td>
<td>
<account-activity-type-cell
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountActivitiesTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<tr class="account-activities-table-condensed__row">
<th class="account-activities-table-condensed__header">
<app-tooltip>
Time
<time-toggle-button/>
<template #tooltip>
{{ accountHints.activityTime }}
</template>
Expand All @@ -36,7 +36,7 @@
<td class="account-activities-table-condensed__data">
<block-time-cell
:height="activity.height"
:datetime="activity.time"/>
:timestamp="activity.time"/>
</td>
</tr>
<tr class="account-activities-table-condensed__row">
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountNamesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</hint-tooltip>
</th>
<th>
Expires
<time-toggle-button>Expires</time-toggle-button>
<hint-tooltip>
{{ accountHints.expires }}
</hint-tooltip>
Expand All @@ -34,7 +34,7 @@
<td>
<block-time-cell
:height="name.expirationHeight"
:datetime="name.expiration"/>
:timestamp="name.expiration"/>
</td>
<td>
<value-hash-ellipsed
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountNamesTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<tr class="account-names-table-condensed__row">
<th class="account-names-table-condensed__header">
<app-tooltip>
Expires
<time-toggle-button>Expires</time-toggle-button>
<template #tooltip>
{{ accountHints.expires }}
</template>
Expand All @@ -34,7 +34,7 @@
<td class="account-names-table-condensed__data">
<block-time-cell
:height="name.expirationHeight"
:datetime="name.expiration"/>
:timestamp="name.expiration"/>
</td>
</tr>
<tr class="account-names-table-condensed__row">
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountTransactionsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</hint-tooltip>
</th>
<th>
Time
<time-toggle-button/>
<hint-tooltip>
{{ accountHints.time }}
</hint-tooltip>
Expand Down Expand Up @@ -40,7 +40,7 @@
<td>
<block-time-cell
:height="transaction.createdHeight"
:datetime="transaction.created"/>
:timestamp="transaction.created"/>
</td>
<td>
{{ transaction.type }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountTransactionsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr class="account-transactions-table-condensed__row">
<th class="account-transactions-table-condensed__header">
<app-tooltip>
Time
<time-toggle-button/>
<template #tooltip>
{{ accountHints.time }}
</template>
Expand All @@ -32,7 +32,7 @@
<td class="account-transactions-table-condensed__data">
<block-time-cell
:height="transaction.createdHeight"
:datetime="transaction.created"/>
:timestamp="transaction.created"/>
</td>
</tr>
<tr class="account-transactions-table-condensed__row">
Expand Down
4 changes: 2 additions & 2 deletions src/components/BlockTimeCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ height }}
</app-link>
</div>
<datetime-label :datetime="datetime"/>
<timestamp-label :timestamp="timestamp"/>
</template>

<script setup>
Expand All @@ -14,7 +14,7 @@ defineProps({
type: Number,
required: true,
},
datetime: {
timestamp: {
type: Object,
required: true,
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContractCallTransactionsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</hint-tooltip>
</th>
<th>
Time
<time-toggle-button/>
<hint-tooltip>
{{ contractsHints.callTransactionsTime }}
</hint-tooltip>
Expand Down Expand Up @@ -40,7 +40,7 @@
<td>
<block-time-cell
:height="transaction.createdHeight"
:datetime="transaction.created"/>
:timestamp="transaction.created"/>
</td>
<td>
<value-hash-ellipsed
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContractCallTransactionsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr class="contract-call-transactions-table-condensed__row">
<th class="contract-call-transactions-table-condensed__header">
<app-tooltip>
Time
<time-toggle-button/>
<template #tooltip>
{{ contractsHints.callTransactionsTime }}
</template>
Expand All @@ -31,7 +31,7 @@
<td class="contract-call-transactions-table-condensed__data">
<block-time-cell
:height="transaction.createdHeight"
:datetime="transaction.created"/>
:timestamp="transaction.created"/>
</td>
</tr>
<tr class="contract-call-transactions-table-condensed__row">
Expand Down
21 changes: 15 additions & 6 deletions src/components/ContractDetailsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,28 @@
</tr>
<tr class="contract-details-panel__row">
<th class="contract-details-panel__table-header">
Created
Created Height
<hint-tooltip>
{{ contractsHints.contractCreated }}
{{ contractsHints.contractCreatedHeight }}
</hint-tooltip>
</th>
<td class="contract-details-panel__data">
<app-link :to="`/keyblocks/${contractDetails.creationHeight}`">
{{ contractDetails.creationHeight }}
</app-link>
(
<datetime-label :datetime="contractDetails.creationDate"/>
)
</td>
</tr>
<tr class="contract-details-panel__row">
<th class="contract-details-panel__table-header">
Created
<hint-tooltip>
{{ contractsHints.contractCreated }}
</hint-tooltip>
</th>
<td class="contract-details-panel__data">
<timestamp-label
:timestamp="contractDetails.creationDate"
:is-extended="true"/>
</td>
</tr>
<tr
Expand Down Expand Up @@ -198,7 +208,6 @@ import AppLink from '@/components/AppLink'
import CopyChip from '@/components/CopyChip'
import AppChip from '@/components/AppChip'
import { formatAePrice, formatAettosToAe, formatEllipseHash } from '@/utils/format'
import DatetimeLabel from '@/components/DatetimeLabel'
import { contractsHints } from '@/utils/hints/contractsHints'
import HintTooltip from '@/components/HintTooltip'
import TokenSymbolIcon from '@/components/TokenSymbolIcon'
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContractEventsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</hint-tooltip>
</th>
<th>
Created
<time-toggle-button>Created</time-toggle-button>
<hint-tooltip>
{{ contractsHints.eventsCreated }}
</hint-tooltip>
Expand Down Expand Up @@ -38,7 +38,7 @@
<td :class="[{'contract-events-table__data--expanded': isExpanded.includes(index)}]">
<block-time-cell
:height="event.createdHeight"
:datetime="event.created"/>
:timestamp="event.created"/>
</td>
<td :class="[{'contract-events-table__data--expanded': isExpanded.includes(index)}]">
{{ event.eventName || 'N/A' }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContractEventsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<tr class="contract-events-table-condensed__row">
<th class="contract-events-table-condensed__header">
<app-tooltip>
Created
<time-toggle-button>Created</time-toggle-button>
<template #tooltip>
{{ contractsHints.eventsCreated }}
</template>
Expand All @@ -31,7 +31,7 @@
<td class="contract-events-table-condensed__data">
<block-time-cell
:height="event.createdHeight"
:datetime="event.created"/>
:timestamp="event.created"/>
</td>
</tr>
<tr class="contract-events-table-condensed__row">
Expand Down
38 changes: 19 additions & 19 deletions src/components/ContractVerifiedTable.vue
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
<template>
<table class="contract-verified-table-condensed__table">
<tr class="contract-verified-table-condensed__row">
<th class="contract-verified-table-condensed__header">
<table class="contract-verified-table__table">
<tr class="contract-verified-table__row">
<th class="contract-verified-table__header">
License
<hint-tooltip>
{{ contractVerifiedHints.license }}
</hint-tooltip>
</th>
<td class="contract-verified-table-condensed__data">
<td class="contract-verified-table__data">
{{ verificationDetails.license }}
</td>
</tr>
<tr class="contract-verified-table-condensed__row">
<th class="contract-verified-table-condensed__header">
<tr class="contract-verified-table__row">
<th class="contract-verified-table__header">
Compiler Version
<hint-tooltip>
{{ contractVerifiedHints.compiler }}
</hint-tooltip>
</th>
<td class="contract-verified-table-condensed__data">
<td class="contract-verified-table__data">
{{ verificationDetails.compiler }}
</td>
</tr>
<tr class="contract-verified-table-condensed__row">
<th class="contract-verified-table-condensed__header">
<tr class="contract-verified-table__row">
<th class="contract-verified-table__header">
Entry File
<hint-tooltip>
{{ contractVerifiedHints.entryFile }}
</hint-tooltip>
</th>
<td class="contract-verified-table-condensed__data">
<td class="contract-verified-table__data">
{{ verificationDetails.entryFile }}
</td>
</tr>
<tr class="contract-verified-table-condensed__row">
<th class="contract-verified-table-condensed__header">
Verified At
<tr class="contract-verified-table__row">
<th class="contract-verified-table__header">
<time-toggle-button>Verified At</time-toggle-button>
<hint-tooltip>
{{ contractVerifiedHints.verifiedAt }}
</hint-tooltip>
</th>
<td class="contract-verified-table-condensed__data">
<datetime-label :datetime="verificationDetails.verifiedAt"/>
<td class="contract-verified-table__data">
<timestamp-label :timestamp="verificationDetails.verifiedAt"/>
</td>
</tr>
<tr class="contract-verified-table-condensed__row">
<th class="contract-verified-table-condensed__header">
<tr class="contract-verified-table__row">
<th class="contract-verified-table__header">
Entrypoint
<hint-tooltip>
{{ contractVerifiedHints.initCallParameters }}
</hint-tooltip>
</th>
<td class="contract-verified-table-condensed__data">
<td class="contract-verified-table__data">
{{ verificationDetails.initCallParameters }}
</td>
</tr>
Expand All @@ -73,7 +73,7 @@ defineProps({
</script>

<style scoped>
.contract-verified-table-condensed {
.contract-verified-table {
&__table {
padding: 0 var(--space-1) var(--space-7);
margin-bottom: var(--space-5);
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContractsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</hint-tooltip>
</th>
<th>
Created
<time-toggle-button>Created</time-toggle-button>
<hint-tooltip>
{{ contractsHints.created }}
</hint-tooltip>
Expand Down Expand Up @@ -43,7 +43,7 @@
<td class="contracts-table__data">
<block-time-cell
:height="contract.createdHeight"
:datetime="contract.created"/>
:timestamp="contract.created"/>
</td>
<td class="contracts-table__data">
<value-hash-ellipsed
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContractsTableCondensed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<tr class="contracts-table-condensed__row">
<th class="contracts-table-condensed__header">
<app-tooltip>
Created
<time-toggle-button>Created</time-toggle-button>
<template #tooltip>
{{ contractsHints.created }}
</template>
Expand All @@ -35,7 +35,7 @@
<td class="contracts-table-condensed__data">
<block-time-cell
:height="contract.createdHeight"
:datetime="contract.created"/>
:timestamp="contract.created"/>
</td>
</tr>
<tr class="contracts-table-condensed__row">
Expand Down
Loading

0 comments on commit b986617

Please sign in to comment.