From b2cb6b686b179bf2e3c29ed37d065ae900e3d68e Mon Sep 17 00:00:00 2001 From: hassnian Date: Sat, 2 Sep 2023 14:15:09 +0500 Subject: [PATCH 001/207] add: switch filter poistion on desktop --- components/profile/activityTab/Activity.vue | 59 ++++++++++++++------- components/profile/activityTab/History.vue | 18 ++++++- components/shared/ResponsiveTable.vue | 15 +----- composables/useResponsive.ts | 18 +++++++ 4 files changed, 77 insertions(+), 33 deletions(-) create mode 100644 composables/useResponsive.ts diff --git a/components/profile/activityTab/Activity.vue b/components/profile/activityTab/Activity.vue index db24350a57..ed37815138 100644 --- a/components/profile/activityTab/Activity.vue +++ b/components/profile/activityTab/Activity.vue @@ -1,24 +1,44 @@ @@ -28,6 +48,7 @@ import { Interaction } from '@/components/rmrk/service/scheme' import { sortedEventByDate } from '@/utils/sorting' import FilterButton from '@/components/profile/FilterButton.vue' import { Interaction as InteractionEnum } from '@kodadot1/minimark/v1' +import Pagination from '@/components/rmrk/Gallery/Pagination.vue' import { NeoButton } from '@kodadot1/brick' const route = useRoute() const { replaceUrl } = useReplaceUrl() diff --git a/components/profile/activityTab/History.vue b/components/profile/activityTab/History.vue index fb0cccea7c..359c8ecd26 100644 --- a/components/profile/activityTab/History.vue +++ b/components/profile/activityTab/History.vue @@ -1,7 +1,16 @@ diff --git a/composables/useResponsive.ts b/composables/useResponsive.ts new file mode 100644 index 0000000000..6b65d13c31 --- /dev/null +++ b/composables/useResponsive.ts @@ -0,0 +1,18 @@ +import { useResizeObserver } from '@vueuse/core' +import { type Ref } from 'vue/types' + +export default function (container: Ref) { + const desktop = ref(true) + const desktopBreakPoint = 1024 + const variant = computed(() => (desktop.value ? 'Desktop' : 'Touch')) + + useResizeObserver(container, (entry) => { + if (entry[0].contentRect.width >= desktopBreakPoint) { + desktop.value = true + } else { + desktop.value = false + } + }) + + return { variant, desktop } +} From e3321ccdee98858980ff9f80da9e06ba9387cb8b Mon Sep 17 00:00:00 2001 From: hassnian Date: Sat, 2 Sep 2023 14:26:28 +0500 Subject: [PATCH 002/207] style: margin on mobile --- components/profile/activityTab/History.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/profile/activityTab/History.vue b/components/profile/activityTab/History.vue index 359c8ecd26..8f8faa29a0 100644 --- a/components/profile/activityTab/History.vue +++ b/components/profile/activityTab/History.vue @@ -8,9 +8,8 @@ :desktop="desktop" :update-current-page="updateCurrentPage" /> -
+
Date: Sat, 2 Sep 2023 14:29:08 +0500 Subject: [PATCH 003/207] style: wrap filters --- components/profile/activityTab/Activity.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/profile/activityTab/Activity.vue b/components/profile/activityTab/Activity.vue index ed37815138..8bc6f467d4 100644 --- a/components/profile/activityTab/Activity.vue +++ b/components/profile/activityTab/Activity.vue @@ -11,7 +11,7 @@ }">
-
+
Date: Sat, 2 Sep 2023 14:42:35 +0500 Subject: [PATCH 004/207] add table margin on desktop --- components/profile/activityTab/History.vue | 75 ++++++++++++---------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/components/profile/activityTab/History.vue b/components/profile/activityTab/History.vue index 8f8faa29a0..dacb56f3ac 100644 --- a/components/profile/activityTab/History.vue +++ b/components/profile/activityTab/History.vue @@ -18,41 +18,46 @@ preserve-scroll />
- - - - - +
+ + + + + +
From 82d65d341da02091487ba8ed36119dea95bb7155 Mon Sep 17 00:00:00 2001 From: hassnian Date: Mon, 4 Sep 2023 09:38:04 +0500 Subject: [PATCH 005/207] fix: use route --- components/profile/activityTab/History.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/profile/activityTab/History.vue b/components/profile/activityTab/History.vue index af0febc926..f08f0f46b4 100644 --- a/components/profile/activityTab/History.vue +++ b/components/profile/activityTab/History.vue @@ -109,7 +109,7 @@ const { decimals } = useChain() const container = ref(null) const { desktop } = useResponsive(container) -const currentPage = ref(parseInt($route.query?.page) || 1) +const currentPage = ref(parseInt(route.query?.page) || 1) const event = ref(HistoryEventType.BUY) const data = ref([]) const copyTableData = ref([]) From 33ff15296c6c2e920ce3f5bab531402c4fdac3f4 Mon Sep 17 00:00:00 2001 From: hassnian Date: Mon, 4 Sep 2023 09:46:46 +0500 Subject: [PATCH 006/207] fix: range before and after --- components/profile/activityTab/Activity.vue | 2 ++ components/profile/activityTab/History.vue | 2 ++ components/rmrk/Gallery/Pagination.vue | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/profile/activityTab/Activity.vue b/components/profile/activityTab/Activity.vue index 8bc6f467d4..8304e17c85 100644 --- a/components/profile/activityTab/Activity.vue +++ b/components/profile/activityTab/Activity.vue @@ -30,6 +30,8 @@ :value="currentPage" :total="total" :per-page="itemsPerPage" + :range-before="2" + :range-after="2" replace enable-listen-keyboard-event preserve-scroll diff --git a/components/profile/activityTab/History.vue b/components/profile/activityTab/History.vue index f08f0f46b4..9e33eb9853 100644 --- a/components/profile/activityTab/History.vue +++ b/components/profile/activityTab/History.vue @@ -13,6 +13,8 @@ v-model="currentPage" :total="total" :per-page="itemsPerPage" + :range-before="2" + :range-after="2" replace enable-listen-keyboard-event preserve-scroll /> diff --git a/components/rmrk/Gallery/Pagination.vue b/components/rmrk/Gallery/Pagination.vue index a7b62b3b1a..e18a875dd7 100644 --- a/components/rmrk/Gallery/Pagination.vue +++ b/components/rmrk/Gallery/Pagination.vue @@ -5,8 +5,8 @@ (), @@ -46,6 +48,8 @@ const props = withDefaults( perPage: 20, hasMagicBtn: false, simple: false, + rangeBefore: 3, + rangeAfter: 3, } ) const emit = defineEmits(['input']) From c0b4f230308d8131c7fa91fc3402759ca87371a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9E=9C=E5=B1=B1=E5=A4=A7=E5=9C=A3?= <316783812@qq.com> Date: Thu, 7 Sep 2023 01:23:43 +0800 Subject: [PATCH 007/207] chore: add vitest coverage --- package.json | 1 + pnpm-lock.yaml | 61 +++++++++++++++++++++++++++++++++++++++++++++++- vitest.config.js | 1 + 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 63b2b58839..f2f7fe213b 100644 --- a/package.json +++ b/package.json @@ -138,6 +138,7 @@ "@types/markdown-it": "^12.2.3", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", + "@vitest/coverage-istanbul": "^0.34.3", "@vue/test-utils": "^1.3.6", "@vueuse/core": "^9.13.0", "@vueuse/nuxt": "^9.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a402b0245..546d67d32e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,6 +246,9 @@ importers: '@typescript-eslint/parser': specifier: ^5.62.0 version: 5.62.0(eslint@8.48.0)(typescript@4.9.5) + '@vitest/coverage-istanbul': + specifier: ^0.34.3 + version: 0.34.3(vitest@0.34.3) '@vue/test-utils': specifier: ^1.3.6 version: 1.3.6(vue@2.7.14) @@ -9105,6 +9108,22 @@ packages: vitest: 0.34.3(jsdom@19.0.0)(sass@1.66.1) dev: true + /@vitest/coverage-istanbul@0.34.3(vitest@0.34.3): + resolution: {integrity: sha512-RdEGzydbbalyDLmmJ5Qm+T3Lrubw/U9iCnhzM2B1V57t4cVa1t6uyfIHdv68d1au4PRzkLhY7Xouwuhb7BeG+Q==} + peerDependencies: + vitest: '>=0.32.0 <1' + dependencies: + istanbul-lib-coverage: 3.2.0 + istanbul-lib-instrument: 6.0.0 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.5 + test-exclude: 6.0.0 + vitest: 0.34.3(jsdom@19.0.0)(sass@1.66.1) + transitivePeerDependencies: + - supports-color + dev: true + /@vitest/expect@0.34.3: resolution: {integrity: sha512-F8MTXZUYRBVsYL1uoIft1HHWhwDbSzwAU9Zgh8S6WFC3YgVb4AnFV2GXO3P5Em8FjEYaZtTnQYoNwwBrlOMXgg==} dependencies: @@ -16512,6 +16531,19 @@ packages: engines: {node: '>=8'} dev: true + /istanbul-lib-instrument@6.0.0: + resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==} + engines: {node: '>=10'} + dependencies: + '@babel/core': 7.22.11 + '@babel/parser': 7.22.14 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + dev: true + /istanbul-lib-report@3.0.0: resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} engines: {node: '>=8'} @@ -16521,6 +16553,26 @@ packages: supports-color: 7.2.0 dev: true + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + dependencies: + istanbul-lib-coverage: 3.2.0 + make-dir: 4.0.0 + supports-color: 7.2.0 + dev: true + + /istanbul-lib-source-maps@4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + istanbul-lib-coverage: 3.2.0 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + dev: true + /istanbul-reports@3.1.5: resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} engines: {node: '>=8'} @@ -17342,6 +17394,13 @@ packages: dependencies: semver: 6.3.1 + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + dependencies: + semver: 7.5.4 + dev: true + /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: false @@ -24340,7 +24399,7 @@ packages: dev: true github.com/thisismydesign/sitemap-module/cd4dc22293b9b67e8ebb5b3c49840e67c108e312: - resolution: {tarball: https://codeload.github.com/thisismydesign/sitemap-module/tar.gz/cd4dc22293b9b67e8ebb5b3c49840e67c108e312} + resolution: {commit: cd4dc22293b9b67e8ebb5b3c49840e67c108e312, repo: git+ssh://git@github.com/thisismydesign/sitemap-module.git, type: git} name: '@nuxtjs/sitemap' version: 2.4.0 engines: {node: '>=8.9.0', npm: '>=5.0.0'} diff --git a/vitest.config.js b/vitest.config.js index a437781941..efa537be84 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -17,6 +17,7 @@ export default defineConfig({ environment: 'jsdom', alias: [{ find: /^vue$/, replacement: 'vue/dist/vue.runtime.common.js' }], coverage: { + provider: 'istanbul', reporter: ['text', 'json', 'html'], }, }, From 44353031bd6f3fdb12e4482ba1e7cc97004c2cf9 Mon Sep 17 00:00:00 2001 From: Luke Fishman Date: Wed, 6 Sep 2023 12:59:25 +0700 Subject: [PATCH 008/207] remove required prop console warnings --- components/shared/TabItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/shared/TabItem.vue b/components/shared/TabItem.vue index 63ce95a23c..04316a2c4d 100644 --- a/components/shared/TabItem.vue +++ b/components/shared/TabItem.vue @@ -22,7 +22,7 @@ withDefaults( to?: string fullWidth?: boolean noShadow?: boolean - tag: string + tag?: string }>(), { to: '', From 903e40c2246d187d88dc30bd9211cb54224f933f Mon Sep 17 00:00:00 2001 From: Jarsen <31397967+Jarsen136@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:34:49 +0800 Subject: [PATCH 009/207] feat: Replace free drop with new one --- components/collection/unlockable/UnlockableContainer.vue | 8 ++++++-- components/collection/unlockable/UnlockableLandingTag.vue | 2 +- components/collection/unlockable/const.ts | 2 +- components/collection/unlockable/utils.ts | 5 +++-- components/drops/Drops.vue | 4 ++-- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/components/collection/unlockable/UnlockableContainer.vue b/components/collection/unlockable/UnlockableContainer.vue index ea1fe13057..68ecfeccfc 100644 --- a/components/collection/unlockable/UnlockableContainer.vue +++ b/components/collection/unlockable/UnlockableContainer.vue @@ -40,7 +40,7 @@
-
+