From 8dfeef861972bcdf2b8171b3ed518254ce6d4c91 Mon Sep 17 00:00:00 2001 From: daiagi Date: Fri, 8 Sep 2023 22:27:06 +0700 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=94=A7=20wrong=20slash=20direction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/shared/TransactionLoader.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/shared/TransactionLoader.vue b/components/shared/TransactionLoader.vue index 390ffb1527..b7921d46ff 100644 --- a/components/shared/TransactionLoader.vue +++ b/components/shared/TransactionLoader.vue @@ -124,7 +124,7 @@ const estmiatedTimeLeft = computed(() => { const explorerLink = computed(() => { const explorerBaseUrl = chainPropListOf(urlPrefix.value).blockExplorer - return `${explorerBaseUrl}extrinsic\\${props.transactionId}` + return `${explorerBaseUrl}extrinsic/${props.transactionId}` }) const activeStep = computed(() => { From a18fb9822915c3f1e893407ef2307ec5ec1a46f7 Mon Sep 17 00:00:00 2001 From: tnaylor Date: Sun, 10 Sep 2023 22:01:15 +0200 Subject: [PATCH 2/7] refactor: update vuesocialshare dependency and add as a nuxt plugin --- nuxt.config.js | 1 - package.json | 2 +- plugins/vueSocialSharing.ts | 8 ++++---- pnpm-lock.yaml | 18 ++++++++++++------ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index 30e25e8f8b..ebc95fc669 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -172,7 +172,6 @@ export default defineNuxtConfig({ // '~/plugins/pwa', // '~/plugins/vueAudioVisual', // '~/plugins/vueClipboard', - // '~/plugins/vueSocialSharing', // '~/plugins/vueTippy', // '~/plugins/safeHref', ], diff --git a/package.json b/package.json index 5c7024d7ed..dfa67879e7 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "vue-clipboard2": "^0.3.3", "vue-dompurify-html": "^4.1.4", "vue-infinite-loading": "^2.4.5", - "vue-social-sharing": "^3.0.9", + "vue-social-sharing": "4.0.0-alpha4", "vue-tippy": "^6.3.1", "workbox-window": "^6.6.0" }, diff --git a/plugins/vueSocialSharing.ts b/plugins/vueSocialSharing.ts index 6f9c38e333..9f526f2ce7 100644 --- a/plugins/vueSocialSharing.ts +++ b/plugins/vueSocialSharing.ts @@ -1,5 +1,5 @@ -// import Vue from 'vue' -// import VueSocialSharing from 'vue-social-sharing' +import VueSocialSharing from 'vue-social-sharing' -// Vue.use(VueSocialSharing) -export default defineNuxtPlugin(() => undefined) +export default defineNuxtPlugin((nuxtApp) => { + nuxtApp.vueApp.use(VueSocialSharing) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0954a5a65f..8b9a8ee85d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: false @@ -186,8 +186,8 @@ importers: specifier: ^2.4.5 version: 2.4.5(vue@3.3.4) vue-social-sharing: - specifier: ^3.0.9 - version: 3.0.9(vue@3.3.4) + specifier: 4.0.0-alpha4 + version: 4.0.0-alpha4(vue@3.3.4) vue-tippy: specifier: ^6.3.1 version: 6.3.1(vue@3.3.4) @@ -3606,6 +3606,7 @@ packages: dependencies: is-glob: 4.0.3 micromatch: 4.0.5 + napi-wasm: 1.1.0 bundledDependencies: - napi-wasm @@ -5473,6 +5474,7 @@ packages: /@substrate/smoldot-light@0.7.9: resolution: {integrity: sha512-HP8iP7sFYlpSgjjbo0lqHyU+gu9lL2hbDNce6dWk5/10mFFF9jKIFGfui4zCecUY808o/Go9pan/31kMJoLbug==} + requiresBuild: true dependencies: pako: 2.1.0 ws: 8.14.0 @@ -10657,6 +10659,9 @@ packages: engines: {node: ^14 || ^16 || >=18} hasBin: true + /napi-wasm@1.1.0: + resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} + /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true @@ -12461,6 +12466,7 @@ packages: /smoldot@1.0.4: resolution: {integrity: sha512-N3TazI1C4GGrseFH/piWyZCCCRJTRx2QhDfrUKRT4SzILlW5m8ayZ3QTKICcz1C/536T9cbHHJyP7afxI6Mi1A==} + requiresBuild: true dependencies: pako: 2.1.0 ws: 8.14.0 @@ -13916,10 +13922,10 @@ packages: '@vue/devtools-api': 6.5.0 vue: 3.3.4 - /vue-social-sharing@3.0.9(vue@3.3.4): - resolution: {integrity: sha512-Yg4oz5cSkr7ieMAgumwoRLnFhAaoUGCsN8lZE9yUkuQzbKid8yBOn4mLjfx/DA/E8nxYjunAfIUFs7eKIkBjPA==} + /vue-social-sharing@4.0.0-alpha4(vue@3.3.4): + resolution: {integrity: sha512-hMbgpZkY5aRAiznSB/sgzdMVgdSbkmIHEaELX7pUbuUd6KS1Z/GAi7a/q0Qn+GFn0+6qMMvwyp3ZOE0+WYPQ1w==} peerDependencies: - vue: ^2.6.10 + vue: ^3.0.0 dependencies: vue: 3.3.4 dev: false From 128a4a5df8f4af85cbf878a8ec4742ac9fa57e0c Mon Sep 17 00:00:00 2001 From: roiLeo Date: Mon, 11 Sep 2023 09:26:29 +0200 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=94=A7=20gql=20queries=20dynamic=20im?= =?UTF-8?q?port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composables/useGraphql.ts | 1 + utils/queryPathResolver.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/composables/useGraphql.ts b/composables/useGraphql.ts index 253bd5353d..e88b4ea551 100644 --- a/composables/useGraphql.ts +++ b/composables/useGraphql.ts @@ -40,6 +40,7 @@ export default function ({ variables: extraVariables = {}, }: DoFetchParams = {}) { const query = await resolveQueryPath(prefix, queryName) + console.log(query) try { const { data: result } = await useAsyncQuery({ diff --git a/utils/queryPathResolver.ts b/utils/queryPathResolver.ts index ee002de0c0..981269fdc4 100644 --- a/utils/queryPathResolver.ts +++ b/utils/queryPathResolver.ts @@ -3,7 +3,9 @@ function resolveQueryPath( queryName: string ): Promise { const path = getPath(prefix) - return import(/* @vite-ignore */ `../queries/${path}${queryName}.graphql`) + const MODULES = import.meta.glob('../queries/**/*.graphql') + return MODULES[`../queries/${path}${queryName}.graphql`]() + // return import(/* @vite-ignore */ `../queries/${path}${queryName}.graphql`) } function getPath(prefix: string) { From 8826e0fa3331be0b0cf1ebce82318de3454e9f2d Mon Sep 17 00:00:00 2001 From: roiLeo Date: Mon, 11 Sep 2023 09:36:07 +0200 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=94=A7=20gql=20queries=20dynamic=20im?= =?UTF-8?q?port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composables/useGraphql.ts | 1 - utils/queryPathResolver.ts | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composables/useGraphql.ts b/composables/useGraphql.ts index e88b4ea551..253bd5353d 100644 --- a/composables/useGraphql.ts +++ b/composables/useGraphql.ts @@ -40,7 +40,6 @@ export default function ({ variables: extraVariables = {}, }: DoFetchParams = {}) { const query = await resolveQueryPath(prefix, queryName) - console.log(query) try { const { data: result } = await useAsyncQuery({ diff --git a/utils/queryPathResolver.ts b/utils/queryPathResolver.ts index 981269fdc4..e540523a2c 100644 --- a/utils/queryPathResolver.ts +++ b/utils/queryPathResolver.ts @@ -2,9 +2,12 @@ function resolveQueryPath( prefix: string, queryName: string ): Promise { + // TODO: find a better way? const path = getPath(prefix) const MODULES = import.meta.glob('../queries/**/*.graphql') - return MODULES[`../queries/${path}${queryName}.graphql`]() + return MODULES[`../queries/${path}${queryName}.graphql`]() as Promise< + typeof import('*.graphql') + > // return import(/* @vite-ignore */ `../queries/${path}${queryName}.graphql`) } From 900c5f369a0c0a1467781bde5356d0949b221c21 Mon Sep 17 00:00:00 2001 From: roiLeo Date: Mon, 11 Sep 2023 09:49:33 +0200 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=94=A7=20gql=20profile=20activity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bsx/Create/CreateToken.vue | 2 ++ components/profile/activityTab/Activity.vue | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/bsx/Create/CreateToken.vue b/components/bsx/Create/CreateToken.vue index e6f892036b..0b21d2e5d0 100644 --- a/components/bsx/Create/CreateToken.vue +++ b/components/bsx/Create/CreateToken.vue @@ -206,6 +206,8 @@ const fetchCollections = async () => { account: accountId.value, }) + console.log(newCollections) + const { data: { collectionEntities }, } = newCollections diff --git a/components/profile/activityTab/Activity.vue b/components/profile/activityTab/Activity.vue index f9cde6acc2..ffa3b51fff 100644 --- a/components/profile/activityTab/Activity.vue +++ b/components/profile/activityTab/Activity.vue @@ -53,9 +53,10 @@ const activeFilters = computed(() => filters.filter((queryParam) => route.query[queryParam] === 'true') ) -const { urlPrefix } = usePrefix() +const { client, urlPrefix } = usePrefix() const queryPrefix = urlPrefix.value === 'ksm' ? 'chain-rmrk' : '' const { data } = useGraphql({ + clientName: client.value, queryName: 'allEventsByProfile', queryPrefix, variables: { @@ -64,7 +65,7 @@ const { data } = useGraphql({ }) watch(data, () => { - events.value = [...sortedEventByDate(data.value?.events || [], 'DESC')] + events.value = [...sortedEventByDate(data.value?.value.events || [], 'DESC')] }) const interactionToFilterMap = { From 4e21af7a6c081ef6cba4e185bbad0d9bb0c3780d Mon Sep 17 00:00:00 2001 From: roiLeo Date: Mon, 11 Sep 2023 09:51:41 +0200 Subject: [PATCH 6/7] =?UTF-8?q?=E2=9E=96=20console.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bsx/Create/CreateToken.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/bsx/Create/CreateToken.vue b/components/bsx/Create/CreateToken.vue index 0b21d2e5d0..e6f892036b 100644 --- a/components/bsx/Create/CreateToken.vue +++ b/components/bsx/Create/CreateToken.vue @@ -206,8 +206,6 @@ const fetchCollections = async () => { account: accountId.value, }) - console.log(newCollections) - const { data: { collectionEntities }, } = newCollections From d4203bb144f91f43cfa3032947f91a4cfed0f66c Mon Sep 17 00:00:00 2001 From: roiLeo Date: Mon, 11 Sep 2023 10:08:46 +0200 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=94=A7=20NeoModal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection/voteDrop/DropContainer.vue | 9 +-- .../common/ConnectWallet/WalletAssetMenu.vue | 4 +- .../src/components/NeoModalExtend/plugin.js | 69 ------------------- .../src/components/NeoModalExtend/plugin.ts | 1 - 4 files changed, 5 insertions(+), 78 deletions(-) delete mode 100644 libs/ui/src/components/NeoModalExtend/plugin.js diff --git a/components/collection/voteDrop/DropContainer.vue b/components/collection/voteDrop/DropContainer.vue index e35ff7501c..245ad65a71 100644 --- a/components/collection/voteDrop/DropContainer.vue +++ b/components/collection/voteDrop/DropContainer.vue @@ -59,7 +59,6 @@
import('@/components/collection/unlockable/UnlockableLoader.vue') ) -const { $neoModal, $i18n } = useNuxtApp() -const root = ref() +const { $i18n } = useNuxtApp() +const { neoModal } = useProgrammatic() const { accountId } = useAuth() const imageList = ref([]) @@ -275,8 +273,7 @@ const mintButtonDisabled = computed( const handleMint = async () => { if (!isLogIn.value) { - $neoModal.open({ - parent: root?.value, + neoModal.open({ ...ConnectWalletModalConfig, }) return diff --git a/components/common/ConnectWallet/WalletAssetMenu.vue b/components/common/ConnectWallet/WalletAssetMenu.vue index 8e945e7453..a42be3f7e5 100644 --- a/components/common/ConnectWallet/WalletAssetMenu.vue +++ b/components/common/ConnectWallet/WalletAssetMenu.vue @@ -63,7 +63,7 @@ import { useLangStore } from '@/stores/lang' const { urlPrefix } = usePrefix() const { isBasilisk } = useIsChain(urlPrefix) const { toggleColorMode, isDarkMode } = useTheme() -const { $neoModal } = useNuxtApp() +const { neoModal } = useProgrammatic() const langStore = useLangStore() @@ -97,7 +97,7 @@ onMounted(() => { }) const closeModal = () => { - $neoModal.closeAll() + neoModal.closeAll() } diff --git a/libs/ui/src/components/NeoModalExtend/plugin.js b/libs/ui/src/components/NeoModalExtend/plugin.js deleted file mode 100644 index 7c7f760683..0000000000 --- a/libs/ui/src/components/NeoModalExtend/plugin.js +++ /dev/null @@ -1,69 +0,0 @@ -export default () => undefined -// import Vue from 'vue' -// import Modal from './NeoModalExtend.vue' - -// import { merge } from '@oruga-ui/oruga/src/utils/helpers' -// import InstanceRegistry from '@oruga-ui/oruga/src/utils/InstanceRegistry' - -// let instances = new InstanceRegistry() -// let openListener = [] -// // fork https://github.com/oruga-ui/oruga/blob/4915c4dbcb1a6c2cd39bc7660d41916b330bc0cd/packages/oruga/src/components/modal/index.js#L12 implementation -// const ModalProgrammatic = { -// addOpenListener(callback) { -// openListener.push(callback) -// }, -// removeOpenListener(callback) { -// openListener = openListener.filter((e) => e !== callback) -// }, -// open(params) { -// let parent -// if (typeof params === 'string') { -// params = { -// content: params, -// } -// } - -// const defaultParam = { -// programmatic: { instances }, -// scroll: 'clip', -// } -// if (params.parent) { -// parent = params.parent -// delete params.parent -// } -// let slot -// if (Array.isArray(params.content)) { -// slot = params.content -// delete params.content -// } -// const propsData = merge(defaultParam, params) - -// if (window.Promise) { -// propsData.promise = new Promise((p1, p2) => { -// propsData.programmatic.resolve = p1 -// propsData.programmatic.reject = p2 -// }) -// } - -// const ModalComponent = Vue.extend(Modal) -// const instance = new ModalComponent({ -// parent, -// el: document.createElement('div'), -// propsData, -// }) -// if (slot) { -// instance.$slots.default = slot -// } -// for (let callback of openListener) { -// callback.call(null) -// } -// return instance -// }, -// closeAll() { -// instances.walk((entry) => { -// entry.close(...arguments) -// }) -// }, -// } - -// export default ModalProgrammatic diff --git a/libs/ui/src/components/NeoModalExtend/plugin.ts b/libs/ui/src/components/NeoModalExtend/plugin.ts index a1a9fba45a..2d960a278e 100644 --- a/libs/ui/src/components/NeoModalExtend/plugin.ts +++ b/libs/ui/src/components/NeoModalExtend/plugin.ts @@ -44,7 +44,6 @@ const ModalProgrammatic = { return vnode.component?.proxy as InstanceType }, closeAll() { - console.log(instances) instances.walk((entry) => { // eslint-disable-next-line prefer-rest-params entry.close(...arguments)