Skip to content

Commit

Permalink
Merge pull request #292 from Concordium/frontend-format
Browse files Browse the repository at this point in the history
Run frontend formatting
  • Loading branch information
limemloh authored Nov 5, 2024
2 parents 93eda76 + 084896d commit fd09fa2
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 41 deletions.
2 changes: 1 addition & 1 deletion frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/generated
src/types/generated.ts
4 changes: 2 additions & 2 deletions frontend/src/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ body {
justify-content: center;
align-items: center;
border: 1px solid #787594;
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.2);
}

.month-picker-input {
@apply bg-theme-background-primary-elevated-nontrans
@apply bg-theme-background-primary-elevated-nontrans;
}

.month-picker-input-container {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/BakerDetails/BakerDetailsPoolAPY.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<template #title>Total APY ({{ periodText }})</template>
<template #default>
<span v-if="data && Number.isFinite(data.totalApy)" class="numerical">
{{formatPercentage(data.totalApy!)}}%
{{ formatPercentage(data.totalApy!) }}%
</span>
<span v-else>-</span>
</template>
Expand All @@ -39,7 +39,7 @@
<template #title>Validator APY ({{ periodText }})</template>
<template #default>
<span v-if="data && Number.isFinite(data.bakerApy)" class="numerical">
{{formatPercentage(data.bakerApy!)}}%
{{ formatPercentage(data.bakerApy!) }}%
</span>
<span v-else>-</span>
</template>
Expand All @@ -51,7 +51,7 @@
v-if="data && Number.isFinite(data.delegatorsApy)"
class="numerical"
>
{{formatPercentage(data.delegatorsApy!)}}%
{{ formatPercentage(data.delegatorsApy!) }}%
</span>
<span v-else>-</span>
</template>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/Contracts/Events/contractEvents.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const getEntrypoint = (receiveName: string) => receiveName.substring(receiveName.indexOf('.') + 1);
export const getEntrypoint = (receiveName: string) =>
receiveName.substring(receiveName.indexOf('.') + 1)
9 changes: 6 additions & 3 deletions frontend/src/components/Details/MessageHEX.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<template>
<div class="w-full">
<div>Message (hexadecimal):
<InfoTooltip text="Input parameters given to activity entrypoint. You can copy the hexadecimal string and decode the message if the contract uses a schema."/>
<div>
Message (hexadecimal):
<InfoTooltip
text="Input parameters given to activity entrypoint. You can copy the hexadecimal string and decode the message if the contract uses a schema."
/>
</div>
<div class="flex">
<code class="truncate w-36">
Expand All @@ -16,7 +19,7 @@
</div>
</template>
<script lang="ts" setup>
import InfoTooltip from '../atoms/InfoTooltip.vue';
import InfoTooltip from '../atoms/InfoTooltip.vue'
import TextCopy from '../atoms/TextCopy.vue'
type Props = {
Expand Down
16 changes: 10 additions & 6 deletions frontend/src/components/Module/ModuleDetailsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ type Props = {
moduleReference: string
}
const pageDropdownEvents = usePageDropdown();
const pageDropdownRejectedEvents = usePageDropdown();
const pageDropdownLinkedContracts = usePageDropdown();
const pageDropdownEvents = usePageDropdown()
const pageDropdownRejectedEvents = usePageDropdown()
const pageDropdownLinkedContracts = usePageDropdown()
const pageOffsetInfoLinkingEvents = usePaginationOffset(pageDropdownEvents.take);
const pageOffsetInfoRejectedEvents = usePaginationOffset(pageDropdownRejectedEvents.take);
const pageOffsetInfoLinkedContracts = usePaginationOffset(pageDropdownLinkedContracts.take);
const pageOffsetInfoLinkingEvents = usePaginationOffset(pageDropdownEvents.take)
const pageOffsetInfoRejectedEvents = usePaginationOffset(
pageDropdownRejectedEvents.take
)
const pageOffsetInfoLinkedContracts = usePaginationOffset(
pageDropdownLinkedContracts.take
)
const props = defineProps<Props>()
const moduleReference = ref(props.moduleReference)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"
class="numerical"
>
{{formatPercentage(passiveDelegationData.apy7days!)}}%
{{ formatPercentage(passiveDelegationData.apy7days!) }}%
</span>
<span v-else>-</span>
</template>
Expand All @@ -46,7 +46,7 @@
"
class="numerical"
>
{{formatPercentage(passiveDelegationData.apy30days!)}}%
{{ formatPercentage(passiveDelegationData.apy30days!) }}%
</span>
<span v-else>-</span>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<span>
Validator <BakerLink :id="event.bakerId" /> set block reward commission
to {{ event.bakingRewardCommission * 100 }}%</span
Validator <BakerLink :id="event.bakerId" /> set block reward commission to
{{ event.bakingRewardCommission * 100 }}%</span
>
</template>

Expand Down
5 changes: 1 addition & 4 deletions frontend/src/components/atoms/Amount.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<span
class="inline-block"
data-testid="amount"
>
<span class="inline-block" data-testid="amount">
{{ symbol }}
<span class="numerical"> {{ formatNumber(amounts[0]) }}</span>

Expand Down
17 changes: 14 additions & 3 deletions frontend/src/components/icons/ChevronDoubleLeftCustomIcon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" />
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5"
/>
</svg>
</template>
17 changes: 14 additions & 3 deletions frontend/src/components/icons/ChevronDoubleRightCustomIcon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" />
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5"
/>
</svg>
</template>
17 changes: 14 additions & 3 deletions frontend/src/components/icons/ChevronLeftCustomIcon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.75 19.5L8.25 12l7.5-7.5"
/>
</svg>
</template>
18 changes: 14 additions & 4 deletions frontend/src/components/icons/ChevronRightCustomIcon.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
</svg>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5"
/>
</svg>
</template>

10 changes: 6 additions & 4 deletions frontend/src/utils/infoTooltips.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

export const RECEIVE_NAME = "Entrypoint of the activity of the contract. Entrypoint appears with the contract name as a prefix, e.g., contract_name.mint.";
export const INIT_NAME = "Constructor name which is used when initializing the contract. Appears with the init_ prefix, e.g., init_contructor_name.";
export const MODULE = "Container which holds execution code for one-or-more contracts.";
export const RECEIVE_NAME =
'Entrypoint of the activity of the contract. Entrypoint appears with the contract name as a prefix, e.g., contract_name.mint.'
export const INIT_NAME =
'Constructor name which is used when initializing the contract. Appears with the init_ prefix, e.g., init_contructor_name.'
export const MODULE =
'Container which holds execution code for one-or-more contracts.'

0 comments on commit fd09fa2

Please sign in to comment.