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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4144 new wallet changes #4222

Merged
merged 7 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions components/common/WalletModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@
icon-right="chevron-right"
expanded
@click="setWallet(wallet)">
<span class="pl-4">
<span>
<b-image
:src="wallet.img"
class="is-32x32 is-inline-block"
style="vertical-align: middle"></b-image>
<span class="is-size-6">{{ wallet.name }}</span>
<span class="is-size-6 ml-2">{{ wallet.name }}</span>
</span>
</b-button>
</div>

<div
v-if="hasSelectedWalletProvider && !hasWalletProviderExtension"
class="buttons">
<div
class="wallet-name subtitle is-fullwidth is-size-6 has-text-centered is-lowercase mb-0 pt-4 pb-4">
<div class="wallet-name subtitle is-fullwidth is-size-6 is-lowercase">
<b-image
:src="selectedWalletProvider.img"
class="is-32x32 is-inline-block"
Expand Down Expand Up @@ -83,10 +82,10 @@
<b-dropdown
ref="address-chooser"
v-model="account"
:mobile-modal="false"
class="wallet-chooser">
<template #trigger>
<div
class="wallet-name subtitle is-size-6 has-text-centered is-lowercase mb-0 pt-4 pb-4">
<div class="wallet-name subtitle is-size-6 is-lowercase">
<b-image
:src="selectedWalletProvider.img"
class="is-32x32 is-inline-block"
Expand Down Expand Up @@ -247,6 +246,8 @@ export default class WalletModal extends mixins(UseApiMixin, ChainMixin) {
font-family: 'Work Sans';
font-style: normal;
position: relative;
border: 1px solid $k-dark;

.wallet {
max-width: 280px;
.wallet-chooser {
Expand All @@ -259,9 +260,12 @@ export default class WalletModal extends mixins(UseApiMixin, ChainMixin) {
.dropdown-content {
box-shadow: none;
padding-top: 0px;
border: none;
a {
padding: 0.375rem 1rem;
height: 29px;
padding: 5px 32px;
prachi00 marked this conversation as resolved.
Show resolved Hide resolved
&:hover {
background-color: $k-accentlight2;
}
}
}
}
Expand All @@ -271,7 +275,7 @@ export default class WalletModal extends mixins(UseApiMixin, ChainMixin) {
background-color: #000000;
}
&.modal-card {
background: #1f1f1f;
background: $k-dark;
backdrop-filter: $frosted-glass-light-backdrop-filter;
//position: relative;
z-index: 1;
Expand All @@ -288,7 +292,7 @@ export default class WalletModal extends mixins(UseApiMixin, ChainMixin) {
.modal-card-head {
background: unset;
border-bottom: 1px solid #000000;
//font-size: 1rem;
padding: 8px 32px;

.delete {
height: 40px;
Expand All @@ -314,18 +318,27 @@ export default class WalletModal extends mixins(UseApiMixin, ChainMixin) {
border: 0;
border-radius: 0;
justify-content: space-between;
background-color: #ffffff;
font-weight: 600;
border-bottom: 1px solid #000000;
background-color: $white;
border-bottom: 1px solid $k-dark;
margin-bottom: 0;
height: 60px;
padding: 8px 32px;

&:hover {
background-color: $k-accentlight2;
}
}

a {
border-bottom: 1px solid #000000;
margin-bottom: 0;
}
}

.wallet-name {
padding: 10px 32px;
margin-bottom: 0;
}
prachi00 marked this conversation as resolved.
Show resolved Hide resolved
}

.modal-card-bg {
Expand Down
10 changes: 10 additions & 0 deletions styles/themes/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ html.dark-mode {
background: $k-dark !important;
border: 1px solid $white;
border-radius: unset;

&:hover {
background-color: $k-accentlight2dark!important;
}
}
}
.modal-card-bg {
Expand All @@ -221,6 +225,12 @@ html.dark-mode {
color: $background-dark !important;
}
}
.dropdown-content .dropdown-item {
&:hover {
background-color: $k-accentlight2dark!important;
}
}

}

.image-outline {
Expand Down
7 changes: 6 additions & 1 deletion utils/config/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ export const SupportedWallets = () => {
}
const allWallets = createWalletInstanceList(PCWalletExtensionList)
const wallets = allWallets.filter((wallet) => wallet.installed)
return wallets.length > 0 ? wallets : allWallets
const sourceIds = new Set(wallets.map((d) => d.source))
const allWalletsUpdates = [
...wallets,
...allWallets.filter((d) => !sourceIds.has(d.source)),
]
return allWalletsUpdates
}

export function getWalletBySource(
Expand Down