Skip to content

Commit

Permalink
feat: Consider using feat view related utility classnames (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek authored Oct 19, 2023
1 parent 85927f4 commit eb9284d
Show file tree
Hide file tree
Showing 42 changed files with 143 additions and 667 deletions.
14 changes: 2 additions & 12 deletions src/components/AccountActivitiesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
@prev-clicked="loadPrevActivities"
@next-clicked="loadNextActivities">
<account-activities-table
class="account-activities-panel__account-activities-table"
class="account-activities-panel__account-activities-table u-hidden-mobile"
:account-details="accountDetails"
:account-activities="accountActivities"/>

<account-activities-table-condensed
class="account-activities-panel__account-activities-table-condensed"
class="u-hidden-desktop"
:account-details="accountDetails"
:account-activities="accountActivities"/>
</paginated-content>
Expand Down Expand Up @@ -50,24 +50,14 @@ function loadNextActivities() {
<style scoped>
.account-activities-panel {
padding: var(--space-4) var(--space-1);
@media (--desktop) {
padding: var(--space-4);
}
&__account-activities-table {
display: none;
@media (--desktop) {
display: revert;
margin-bottom: var(--space-2);
}
}
&__account-activities-table-condensed {
@media (--desktop) {
display: none;
}
}
}
</style>
21 changes: 5 additions & 16 deletions src/components/AccountNamesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
@prev-clicked="loadPrevAccountNames"
@next-clicked="loadNextAccountNames">
<account-names-table
class="account-names-panel__account-names-table"
class="account-names-panel__account-names-table u-hidden-mobile"
:account-names="accountNames"/>

<account-names-table-condensed
class="account-names-panel__account-names-table-condensed"
class="u-hidden-desktop"
:account-names="accountNames"/>
</paginated-content>
</app-panel>
Expand Down Expand Up @@ -37,20 +37,9 @@ async function loadNextAccountNames() {
</script>

<style scoped>
.account-names-panel {
&__account-names-table {
display: none;
@media (--desktop) {
display: revert;
margin-bottom: var(--space-4);
}
}
&__account-names-table-condensed {
@media (--desktop) {
display: none;
}
.account-names-panel__account-names-table {
@media (--desktop) {
margin-bottom: var(--space-4);
}
}
</style>
21 changes: 5 additions & 16 deletions src/components/AccountTokensPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
@prev-clicked="loadPrevAccountTokens"
@next-clicked="loadNextAccountTokens">
<account-tokens-table
class="account-tokens-panel__account-tokens-table"
class="u-hidden-mobile"
:account-tokens="accountTokens"/>

<account-tokens-table-condensed
class="account-tokens-panel__account-tokens-table-condensed"
class="account-tokens-panel__account-tokens-table-condensed u-hidden-desktop"
:account-tokens="accountTokens"/>
</paginated-content>
</app-panel>
Expand Down Expand Up @@ -37,20 +37,9 @@ async function loadNextAccountTokens() {
</script>

<style scoped>
.account-tokens-panel {
&__account-tokens-table {
display: none;
@media (--desktop) {
display: revert;
margin-bottom: var(--space-4);
}
}
&__account-tokens-table-condensed {
@media (--desktop) {
display: none;
}
.account-tokens-panel__account-tokens-table {
@media (--desktop) {
margin-bottom: var(--space-4);
}
}
</style>
21 changes: 5 additions & 16 deletions src/components/AccountTransactionsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
</template>

<account-transactions-table
class="account-transactions-panel__account-transactions-table"
class="account-transactions-panel__account-transactions-table u-hidden-mobile"
:account-transactions="accountTransactions"/>

<account-transactions-table-condensed
class="account-transactions-panel__account-transactions-table-condensed"
class="u-hidden-desktop"
:account-transactions="accountTransactions"/>
</paginated-content>
</app-panel>
Expand Down Expand Up @@ -65,20 +65,9 @@ function loadNextTransactions() {
</script>

<style scoped>
.account-transactions-panel {
&__account-transactions-table {
display: none;
@media (--desktop) {
display: revert;
margin-bottom: var(--space-4);
}
}
&__account-transactions-table-condensed {
@media (--desktop) {
display: none;
}
.account-transactions-panel__account-transactions-table {
@media (--desktop) {
margin-bottom: var(--space-4);
}
}
</style>
21 changes: 2 additions & 19 deletions src/components/ContractCallTransactionsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
@prev-clicked="loadPrevTransactions"
@next-clicked="loadNextTransactions">
<contract-call-transactions-table
class="contract-call-transactions-panel__table"
class="u-hidden-mobile"
:contract-call-transactions="contractCallTransactions"/>

<contract-call-transactions-table-condensed
class="contract-call-transactions-panel__table-condensed"
class="u-hidden-desktop"
:contract-call-transactions="contractCallTransactions"/>
</paginated-content>
</app-panel>
Expand Down Expand Up @@ -53,20 +53,3 @@ if (process.client) {
})
}
</script>

<style scoped>
.contract-call-transactions-panel {
&__table {
display: none;
@media (--desktop) {
display: revert;
}
}
&__table-condensed {
@media (--desktop) {
display: none;
}
}
}
</style>
29 changes: 8 additions & 21 deletions src/components/ContractDetailsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
DETAILS
</template>
<template #header>
<div class="contract-details-panel__hash">
<div class="u-hidden-mobile">
<copy-chip :label="contractDetails.id"/>
</div>
<div class="contract-details-panel__hash-ellipse">
<div class="u-hidden-desktop">
<copy-chip
:label="formatEllipseHash(contractDetails.id)"
:clipboard-text="contractDetails.id"/>
Expand Down Expand Up @@ -58,10 +58,10 @@
</th>
<td class="contract-details-panel__data">
<app-link :to="`/transactions/${contractDetails.createTransactionHash}`">
<span class="contract-details-panel__hash">
<span class="u-hidden-mobile">
{{ contractDetails.createTransactionHash }}
</span>
<span class="contract-details-panel__hash-ellipse">
<span class="u-hidden-desktop">
{{ formatEllipseHash(contractDetails.createTransactionHash) }}
</span>
</app-link>
Expand Down Expand Up @@ -94,10 +94,10 @@
</th>
<td class="contract-details-panel__data">
<app-link :to="`/accounts/${contractDetails.createdBy}`">
<span class="contract-details-panel__hash">
<span class="u-hidden-mobile">
{{ contractDetails.createdBy }}
</span>
<span class="contract-details-panel__hash-ellipse">
<span class="u-hidden-desktop">
{{ formatEllipseHash(contractDetails.createdBy) }}
</span>
</app-link>
Expand Down Expand Up @@ -127,10 +127,10 @@
</th>
<td class="contract-details-panel__data">
<app-link :to="`/accounts/${contractDetails.contractAccount}`">
<span class="contract-details-panel__hash">
<span class="u-hidden-mobile">
{{ contractDetails.contractAccount }}
</span>
<span class="contract-details-panel__hash-ellipse">
<span class="u-hidden-desktop">
{{ formatEllipseHash(contractDetails.contractAccount) }}
</span>
</app-link>
Expand Down Expand Up @@ -273,18 +273,5 @@ const contractMiddlewareUrl = computed(() =>
margin-bottom: 0;
}
}
&__hash {
display: none;
@media (--desktop) {
display: revert;
}
}
&__hash-ellipse {
@media (--desktop) {
display: none;
}
}
}
</style>
21 changes: 2 additions & 19 deletions src/components/ContractEventsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
v-if="contractEvents"
:contract-details="contractDetails"
:contract-events="contractEvents"
class="contract-events-panel__table"/>
class="u-hidden-mobile"/>

<contract-events-table-condensed
v-if="contractEvents"
:contract-details="contractDetails"
:contract-events="contractEvents"
class="contract-events-panel__table-condensed"/>
class="u-hidden-desktop"/>
</paginated-content>
</app-panel>
</template>
Expand All @@ -40,20 +40,3 @@ function loadNextEvents() {
fetchContractEvents({ queryParameters: contractEvents.value.next })
}
</script>

<style scoped>
.contract-events-panel {
&__table {
display: none;
@media (--desktop) {
display: revert;
}
}
&__table-condensed {
@media (--desktop) {
display: none;
}
}
}
</style>
25 changes: 4 additions & 21 deletions src/components/ContractsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
pagination-style="history"
@prev-clicked="loadPrevContracts"
@next-clicked="loadNextContracts">
<contract-table-condensed
:contracts="contracts"
class="contracts-panel__table-condensed"/>
<contracts-table
:contracts="contracts"
class="contracts-panel__table"/>
class="u-hidden-mobile"/>
<contract-table-condensed
:contracts="contracts"
class="u-hidden-desktop"/>
</paginated-content>
</app-panel>
</template>
Expand Down Expand Up @@ -53,20 +53,3 @@ if (process.client) {
}
</script>

<style scoped>
.contracts-panel {
&__table {
display: none;
@media (--desktop) {
display: revert;
}
}
&__table-condensed {
@media (--desktop) {
display: none;
}
}
}
</style>
17 changes: 2 additions & 15 deletions src/components/DashboardAuctionsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
name. The shorter the name, the longer the auction lives.
</template>
</dashboard-panel-header>
<dashboard-auctions-table class="dashboard-auctions-panel__table"/>
<dashboard-auctions-swiper class="dashboard-auctions-panel__swiper"/>
<dashboard-auctions-table class="u-hidden-mobile"/>
<dashboard-auctions-swiper class="u-hidden-desktop"/>
</app-panel>
</template>

Expand All @@ -26,18 +26,5 @@ import AppPanel from '@/components/AppPanel'
@media (--desktop) {
padding: var(--space-4);
}
&__swiper {
@media (--desktop) {
display: none;
}
}
&__table {
display: none;
@media (--desktop) {
display: revert;
}
}
}
</style>
7 changes: 2 additions & 5 deletions src/components/DashboardKeyblockPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@

<keyblock-table
v-if="selectedKeyblock"
class="dashboard-keyblock-panel__keyblock-table"
class="dashboard-keyblock-panel__keyblock-table u-hidden-mobile"
:keyblock="selectedKeyblock"
:stats="selectedDeltaStats"/>

<keyblock-table-condensed
v-if="selectedKeyblock"
class="dashboard-keyblock-panel__keyblock-table-condensed"
class="dashboard-keyblock-panel__keyblock-table-condensed u-hidden-desktop"
:keyblock="selectedKeyblock"
:stats="selectedDeltaStats"/>
</div>
Expand Down Expand Up @@ -95,9 +95,7 @@ const {
}
&__keyblock-table {
display: none;
@media (--desktop) {
display: revert;
margin-bottom: var(--space-2);
}
}
Expand All @@ -106,7 +104,6 @@ const {
margin: var(--space-4) 0;
@media (--desktop) {
margin: 0;
display: none;
}
}
Expand Down
Loading

0 comments on commit eb9284d

Please sign in to comment.