Skip to content

Commit

Permalink
feat: grid design adjustments (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbo authored Oct 26, 2024
1 parent 06c2841 commit a63dfda
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 179 deletions.
12 changes: 7 additions & 5 deletions components/AppModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ onUnmounted(() => {
:data-template="modal?.template"
@on-backdrop-click="closeModal"
>
<component
v-if="modalTemplateComponent"
:is="modalTemplateComponent"
class="animate-fade-in"
></component>
<div class="max-h-[calc(100vh-100px)] overflow-y-auto">
<component
v-if="modalTemplateComponent"
:is="modalTemplateComponent"
class="animate-fade-in"
></component>
</div>
</lukso-modal>
</template>
2 changes: 1 addition & 1 deletion components/ProfileCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const hasFollowButton = computed(
:background-url="profileBackground?.url"
is-full-width
shadow="small"
:border-radius="isMobile ? 'none' : 'medium'"
:border-radius="isMobile ? 'none' : 'small'"
class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full"
>
<div slot="header" class="relative flex size-full flex-col items-center">
Expand Down
10 changes: 5 additions & 5 deletions components/__tests__/__snapshots__/ProfileCard.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`ProfileCard > should render empty profile 1`] = `
"<div id="test-wrapper">
<div class="relative">
<lukso-card variant="dapp" is-full-width="" shadow="small" border-radius="medium" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<lukso-card variant="dapp" is-full-width="" shadow="small" border-radius="small" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<div slot="header" class="relative flex size-full flex-col items-center">
<div class="absolute right-4 top-4 flex flex-col items-end gap-2">
<div>
Expand Down Expand Up @@ -61,7 +61,7 @@ exports[`ProfileCard > should render empty profile 1`] = `
exports[`ProfileCard > should render followed by info 1`] = `
"<div id="test-wrapper">
<div class="relative">
<lukso-card variant="dapp" is-full-width="" shadow="small" border-radius="medium" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<lukso-card variant="dapp" is-full-width="" shadow="small" border-radius="small" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<div slot="header" class="relative flex size-full flex-col items-center">
<div class="absolute right-4 top-4 flex flex-col items-end gap-2">
<div>
Expand Down Expand Up @@ -140,7 +140,7 @@ exports[`ProfileCard > should render followed by info 1`] = `
exports[`ProfileCard > should render profile when connected 1`] = `
"<div id="test-wrapper">
<div class="relative">
<lukso-card variant="dapp" background-url="https://example.com/background.jpg" is-full-width="" shadow="small" border-radius="medium" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<lukso-card variant="dapp" background-url="https://example.com/background.jpg" is-full-width="" shadow="small" border-radius="small" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<div slot="header" class="relative flex size-full flex-col items-center">
<div class="absolute right-4 top-4 flex flex-col items-end gap-2">
<div>
Expand Down Expand Up @@ -219,7 +219,7 @@ exports[`ProfileCard > should render profile when connected 1`] = `
exports[`ProfileCard > should render profile when not connected 1`] = `
"<div id="test-wrapper">
<div class="relative">
<lukso-card variant="dapp" background-url="https://example.com/background.jpg" is-full-width="" shadow="small" border-radius="medium" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<lukso-card variant="dapp" background-url="https://example.com/background.jpg" is-full-width="" shadow="small" border-radius="small" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<div slot="header" class="relative flex size-full flex-col items-center">
<div class="absolute right-4 top-4 flex flex-col items-end gap-2">
<div>
Expand Down Expand Up @@ -298,7 +298,7 @@ exports[`ProfileCard > should render profile when not connected 1`] = `
exports[`ProfileCard > should render unfollow button 1`] = `
"<div id="test-wrapper">
<div class="relative">
<lukso-card variant="dapp" is-full-width="" shadow="small" border-radius="medium" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<lukso-card variant="dapp" is-full-width="" shadow="small" border-radius="small" class="-mx-4 -mt-6 w-screen sm:mx-0 sm:mt-0 sm:w-full">
<div slot="header" class="relative flex size-full flex-col items-center">
<div class="absolute right-4 top-4 flex flex-col items-end gap-2">
<div>
Expand Down
5 changes: 5 additions & 0 deletions composables/web3-provider/useBaseProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ const disconnect = () => {
const { removeItem } = useLocalStorage()
const { connectedProfileAddress, isWalletConnect, walletConnectProvider } =
storeToRefs(useAppStore())
const { isEditingGrid } = storeToRefs(useGridStore())

// disconnect WalletConnect
if (isWalletConnect.value) {
walletConnectProvider.value?.disconnect()
isWalletConnect.value = false
}

// reset connected profile address
connectedProfileAddress.value = undefined
// remove connection expiry
removeItem(STORAGE_KEY.CONNECTION_EXPIRY)
// exit edit mode for grid
isEditingGrid.value = false
}

/**
Expand Down
Loading

0 comments on commit a63dfda

Please sign in to comment.