|
20 | 20 | import { updateAccountCenter } from '../../store/actions' |
21 | 21 | import blocknative from '../../icons/blocknative' |
22 | 22 | import DisconnectAllConfirm from './DisconnectAllConfirm.svelte' |
| 23 | + import { getDevice } from '../../utils' |
23 | 24 |
|
24 | 25 | function disconnectAllWallets() { |
25 | 26 | $wallets$.forEach(({ label }) => disconnect({ label })) |
|
44 | 45 | ) |
45 | 46 |
|
46 | 47 | const { position } = state.get().accountCenter |
| 48 | + const device = getDevice() |
47 | 49 | </script> |
48 | 50 |
|
49 | 51 | <style> |
50 | 52 | .outer-container { |
51 | 53 | background-color: var(--onboard-gray-600, var(--gray-600)); |
52 | | - border-radius: 16px; |
| 54 | + border-radius: var(--onboard-border-radius-3, var(--border-radius-3)); |
53 | 55 | width: 100%; |
54 | 56 | filter: drop-shadow(0px 4px 16px rgba(178, 178, 178, 0.2)); |
55 | 57 | } |
|
228 | 230 | /> |
229 | 231 | {/each} |
230 | 232 | </div> |
231 | | - |
232 | 233 | <!-- actions --> |
233 | 234 | <div class="actions flex flex-column items-start"> |
234 | | - <!-- connect another wallet --> |
235 | | - <div |
236 | | - on:click={() => connect()} |
237 | | - class="action-container flex items-center pointer" |
238 | | - > |
239 | | - <div class="plus-icon flex items-center justify-center"> |
240 | | - {@html plusCircleIcon} |
241 | | - </div> |
242 | | - <span class="action-text" |
243 | | - >{$_('accountCenter.connectAnotherWallet', { |
244 | | - default: en.accountCenter.connectAnotherWallet |
245 | | - })}</span |
| 235 | + <!-- Hide for Mobile --> |
| 236 | + {#if device.type === 'desktop'} |
| 237 | + <!-- connect another wallet --> |
| 238 | + <div |
| 239 | + on:click={() => connect()} |
| 240 | + class="action-container flex items-center pointer" |
246 | 241 | > |
247 | | - </div> |
248 | | - |
249 | | - <!-- disconnect all wallets --> |
250 | | - <div |
251 | | - on:click={() => (disconnectConfirmModal = true)} |
252 | | - class="action-container flex items-center mt pointer" |
253 | | - > |
254 | | - <div class="arrow-forward flex items-center justify-center"> |
255 | | - {@html arrowForwardIcon} |
| 242 | + <div class="plus-icon flex items-center justify-center"> |
| 243 | + {@html plusCircleIcon} |
| 244 | + </div> |
| 245 | + <span class="action-text" |
| 246 | + >{$_('accountCenter.connectAnotherWallet', { |
| 247 | + default: en.accountCenter.connectAnotherWallet |
| 248 | + })}</span |
| 249 | + > |
256 | 250 | </div> |
257 | | - <span class="action-text" |
258 | | - >{$_('accountCenter.disconnectAllWallets', { |
259 | | - default: en.accountCenter.disconnectAllWallets |
260 | | - })}</span |
| 251 | + |
| 252 | + <!-- disconnect all wallets --> |
| 253 | + <div |
| 254 | + on:click={() => (disconnectConfirmModal = true)} |
| 255 | + class="action-container flex items-center mt pointer" |
261 | 256 | > |
262 | | - </div> |
| 257 | + <div class="arrow-forward flex items-center justify-center"> |
| 258 | + {@html arrowForwardIcon} |
| 259 | + </div> |
| 260 | + <span class="action-text" |
| 261 | + >{$_('accountCenter.disconnectAllWallets', { |
| 262 | + default: en.accountCenter.disconnectAllWallets |
| 263 | + })}</span |
| 264 | + > |
| 265 | + </div> |
| 266 | + {/if} |
263 | 267 | </div> |
264 | 268 | </div> |
265 | 269 |
|
|
414 | 418 | default: en.accountCenter.backToApp |
415 | 419 | })}</button |
416 | 420 | > |
417 | | - |
418 | 421 | <a |
419 | 422 | href="https://blocknative.com" |
420 | 423 | target="_blank" |
|
0 commit comments