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

fix: test preview b #164

Closed
wants to merge 12 commits into from
Closed
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
*.log*
.idea
.nuxt
.nitro
.cache
.output
dist
tests
tailwind.config.js
10 changes: 9 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
module.exports = {
extends: ["@matterlabs/eslint-config-vue"],
root: true,
extends: ["@nuxtjs/eslint-config-typescript", "@vue/eslint-config-prettier"],
rules: {
semi: ["error", "always"], // Require semicolons
quotes: ["error", "double"], // Require double quotes
"vue/multi-word-component-names": "off", // Allow multi-word component names
"vue/require-default-prop": "off", // Allow props without default values
"vue/no-multiple-template-root": "off", // Allow multiple root elements in templates
},
};
4 changes: 0 additions & 4 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
run: |
npm ci --force

- name: Lint
run: |
npm run lint

- name: Setup .env
run: |
echo "WALLET_CONNECT_PROJECT_ID=${{ secrets.WALLET_CONNECT_PROJECT_ID }}" > .env
Expand Down
6 changes: 0 additions & 6 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
</template>

<script lang="ts" setup>
import { watch } from "vue";
import { useRoute } from "vue-router";

import { useZkSyncWithdrawalsStore } from "@/store/zksync/withdrawals";
import { trackPage } from "@/utils/analytics";

useZkSyncWithdrawalsStore().updateWithdrawalsIfPossible(); // init store to update withdrawals

const route = useRoute();
Expand Down
14 changes: 2 additions & 12 deletions components/BridgeFromEthereumButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<span class="text-white">Bridge from {{ eraNetwork.l1Network?.name }}</span>
</template>
<template #underline>
<span class="text-white" v-if="!displayTotalTokens || !balance">
<span v-if="!displayTotalTokens || !balance" class="text-white">
Receive tokens from your {{ eraNetwork.l1Network?.name }} account
</span>
<span class="text-white" v-else>
<span v-else class="text-white">
You have {{ balance.length }} token{{ balance.length > 1 ? "s" : "" }} worth
{{ formatPricePretty(totalTokenBalance) }} that you can receive from {{ eraNetwork.l1Network?.name }}
</span>
Expand All @@ -27,16 +27,6 @@
</template>

<script lang="ts" setup>
import { computed, onMounted } from "vue";

import { storeToRefs } from "pinia";

import { useDestinationsStore } from "@/store/destinations";
import { useZkSyncEthereumBalanceStore } from "@/store/zksync/ethereumBalance";
import { useZkSyncProviderStore } from "@/store/zksync/provider";
import { formatPricePretty } from "@/utils/formatters";
import { calculateTotalTokensPrice } from "@/utils/helpers";

const zkSyncEthereumBalanceStore = useZkSyncEthereumBalanceStore();
const { destinations } = storeToRefs(useDestinationsStore());
const { eraNetwork } = storeToRefs(useZkSyncProviderStore());
Expand Down
2 changes: 0 additions & 2 deletions components/ConnectWalletBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@
</template>

<script lang="ts" setup>
import { useOnboardStore } from "@/store/onboard";

const onboardStore = useOnboardStore();
</script>
6 changes: 2 additions & 4 deletions components/address/AddressCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@
</template>
<template #default>
<CommonButtonLineBodyInfo class="text-left">
<template #label v-if="name">{{ name }}</template>
<template v-if="name" #label>{{ name }}</template>
<template #underline>
<span class="block break-all" :title="address">{{ address }}</span>
</template>
</CommonButtonLineBodyInfo>
</template>
<template #right v-if="$slots.right">
<template v-if="$slots.right" #right>
<slot name="right" />
</template>
</CommonButtonLineWithImg>
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/animations/TransactionProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
<script lang="ts" setup>
import { CheckIcon, XMarkIcon } from "@heroicons/vue/24/outline";

import type { PropType } from "vue";

export type AnimationState = "playing" | "stopped-in-the-end" | "failed" | "completed";

defineProps({
Expand Down
3 changes: 0 additions & 3 deletions components/common/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
</template>

<script lang="ts" setup>
import type { Component } from "vue";
import type { PropType } from "vue";

defineProps({
variant: {
type: String as PropType<"info" | "neutral" | "success" | "warning" | "error">,
Expand Down
4 changes: 1 addition & 3 deletions components/common/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@keyup.enter="checked = !checked"
>
<div class="relative">
<input type="checkbox" v-model="checked" class="sr-only" tabindex="-1" />
<input v-model="checked" type="checkbox" class="sr-only" tabindex="-1" />
<div
class="flex h-6 w-6 items-center justify-center rounded-md border-2"
:class="checked ? 'border-primary-400 bg-primary-400' : 'border-neutral-300 bg-white'"
Expand All @@ -26,8 +26,6 @@
</template>

<script lang="ts" setup>
import { computed } from "vue";

const props = defineProps({
modelValue: {
type: Boolean,
Expand Down
4 changes: 1 addition & 3 deletions components/common/CheckboxWithText.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<label class="checkbox-with-text" tabindex="0" @keyup.enter="checked = !checked">
<div class="relative">
<input type="checkbox" v-model="checked" class="sr-only" tabindex="-1" />
<input v-model="checked" type="checkbox" class="sr-only" tabindex="-1" />
<div class="checkbox-input" :class="{ checked }">
<svg v-if="checked" class="checkbox-icon" viewBox="0 0 20 20" fill="currentColor">
<path
Expand All @@ -19,8 +19,6 @@
</template>

<script lang="ts" setup>
import { computed } from "vue";

const props = defineProps({
modelValue: {
type: Boolean,
Expand Down
2 changes: 0 additions & 2 deletions components/common/CircleLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
</template>

<script lang="ts" setup>
import { computed, onBeforeUnmount, watchEffect } from "vue";

const props = defineProps({
duration: {
type: Number,
Expand Down
4 changes: 1 addition & 3 deletions components/common/ContentBlock.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<template>
<component class="content-block-container" :class="`variant-${variant}`" :is="as">
<component :is="as" class="content-block-container" :class="`variant-${variant}`">
<slot />
</component>
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/ImageLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
</template>

<script lang="ts" setup>
import { computed } from "vue";

import { useImage } from "@vueuse/core";

const props = defineProps({
Expand Down
4 changes: 1 addition & 3 deletions components/common/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
>
<div class="modal-header" :class="{ 'mb-4': title }">
<DialogTitle v-if="title" as="div" class="modal-title">{{ title }}</DialogTitle>
<button v-if="closable" @click="closeModal" data-testid="close-button">
<button v-if="closable" data-testid="close-button" @click="closeModal">
<XMarkIcon class="modal-close-icon" aria-hidden="true" />
</button>
</div>
Expand All @@ -50,8 +50,6 @@
</template>

<script lang="ts" setup>
import { computed } from "vue";

import { Dialog, DialogPanel, DialogTitle, TransitionChild, TransitionRoot } from "@headlessui/vue";
import { XMarkIcon } from "@heroicons/vue/24/outline";

Expand Down
4 changes: 0 additions & 4 deletions components/common/QrAddressInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
</template>

<script lang="ts" setup>
import { ref } from "vue";

import { isAddress } from "ethers/lib/utils";

import { checksumAddress } from "@/utils/formatters";

defineProps({
id: {
type: String,
Expand Down
7 changes: 0 additions & 7 deletions components/common/SmallInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,9 @@
</template>

<script lang="ts" setup>
import { computed, ref } from "vue";

import { XMarkIcon } from "@heroicons/vue/24/outline";
import { useFocus } from "@vueuse/core";

import type { Component, PropType } from "vue";

import { isMobile } from "@/utils/helpers";
import { TransitionOpacity } from "@/utils/transitions";

const props = defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/Spinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
</template>

<script lang="ts" setup>
import type { PropType } from "vue";

defineProps({
variant: String as PropType<"default" | "text-color" | "dark">,
});
Expand Down
5 changes: 1 addition & 4 deletions components/common/Timer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
</template>

<script lang="ts" setup>
import { computed, onBeforeMount, onBeforeUnmount, ref, watch } from "vue";

const props = defineProps({
futureDate: {
type: String,
Expand Down Expand Up @@ -35,7 +33,7 @@ watch(
{ immediate: true }
);

let intervalId: ReturnType<typeof setInterval> | undefined = undefined;
let intervalId: ReturnType<typeof setInterval> | undefined;

const formatTimeDiff = (diff: number): string => {
const hours = Math.floor(diff / (1000 * 60 * 60));
Expand Down Expand Up @@ -64,7 +62,6 @@ const updateTimer = () => {

if (diff.value === 0) {
clearInterval(intervalId);
return;
}
};

Expand Down
5 changes: 0 additions & 5 deletions components/common/TotalBalance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@
</template>

<script lang="ts" setup>
import { computed } from "vue";

import type { TokenAmount } from "@/types";
import type { PropType } from "vue";

import { calculateTotalTokensPrice } from "@/utils/helpers";

const props = defineProps({
balance: {
Expand Down
2 changes: 0 additions & 2 deletions components/common/button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/button/Label.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/button/Line.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
4 changes: 1 addition & 3 deletions components/common/button/LineWithImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
<div v-if="$slots.right" class="line-button-with-img-right">
<slot name="right" />
</div>
<component v-if="icon" :is="icon" class="line-button-with-img-icon" aria-hidden="true" />
<component :is="icon" v-if="icon" class="line-button-with-img-icon" aria-hidden="true" />
<CommonContentLoader v-else-if="iconLoading" :length="0" class="line-button-with-img-icon-loading" />
</CommonButtonLine>
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/button/TopInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/button/TopLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
</template>

<script lang="ts" setup>
import type { Component, PropType } from "vue";

defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
2 changes: 0 additions & 2 deletions components/common/input/InputLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
</template>

<script lang="ts" setup>
import { computed } from "vue";

const props = defineProps({
modelValue: {
type: String,
Expand Down
7 changes: 0 additions & 7 deletions components/common/input/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
</template>

<script lang="ts" setup>
import { computed, ref } from "vue";

import { MagnifyingGlassIcon, XMarkIcon } from "@heroicons/vue/24/outline";
import { useFocus } from "@vueuse/core";

import type { Component, PropType } from "vue";

import { isMobile } from "@/utils/helpers";
import { TransitionOpacity } from "@/utils/transitions";

const props = defineProps({
as: {
type: [String, Object] as PropType<string | Component>,
Expand Down
Loading
Loading