Skip to content

Commit 950ee46

Browse files
authored
Update UI button labels (#487)
1 parent fdcdca2 commit 950ee46

File tree

6 files changed

+24
-17
lines changed

6 files changed

+24
-17
lines changed

packages/ui/src/common/icons/WizIcon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1+
<svg xmlns="http://www.w3.org/2000/svg" class="vertical-align" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
22
<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z"/>
33
<path d="m14 7 3 3"/>
44
<path d="M5 6v4"/>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1+
<svg xmlns="http://www.w3.org/2000/svg" class="vertical-align" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
22
<path d="M18 6 6 18"/>
33
<path d="m6 6 12 12"/>
44
</svg>

packages/ui/src/common/styles/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ body {
1313
font-family: var(--sans-serif);
1414
}
1515

16+
svg.vertical-align {
17+
vertical-align: calc(-1 * var(--icon-adjust));
18+
}
19+
1620
svg.keepcolor {
1721
fill: currentColor;
1822
}

packages/ui/src/solidity/App.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,9 @@
335335
class="action-button"
336336
class:disabled={opts?.upgradeable === "transparent"}
337337
on:click={remixHandler}
338-
title="Open in Remix"
339338
>
340339
<RemixIcon />
341-
340+
Open in Remix
342341
</button>
343342
<div slot="content">
344343
Transparent upgradeable contracts are not supported on Remix.
@@ -437,7 +436,7 @@
437436
}
438437
}
439438
>
440-
Deploy with Defender
439+
<ArrowsLeft /> Deploy
441440
</button>
442441
</div>
443442
{/if}

packages/ui/src/solidity/DefenderDeployModal.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
{#if isOpen}
2525
<div
26-
class="fixed right-3.5 rounded-r-3xl h-[calc(100vh-84px)] w-[360px] bg-white z-20"
26+
class="fixed right-3.5 rounded-r-3xl h-[calc(100vh-84px)] w-[360px] bg-white z-30"
2727
transition:fly={{x: 380, duration: 450 }}
2828
>
2929
<div class="p-2 h-full flex flex-col">
@@ -40,7 +40,7 @@
4040
id="defender-deploy"
4141
title="Defender Deploy"
4242
src={devMode ? 'http://localhost:5173' : 'https://defender-deploy-wizard.netlify.app/'}
43-
class={`fixed z-30 right-3.5 w-[360px] h-[calc(100vh-84px)] border-none
43+
class={`fixed z-30 right-3.5 w-[360px] h-[calc(100vh-84px)] border-none
4444
${!showIframe ? 'invisible' : ''}
4545
${!loaded ? 'hidden' : ''}`}
4646
on:load={handleLoad}

packages/ui/src/solidity/Wiz.svelte

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
</script>
156156

157157
<div class="absolute bottom-8 right-8 h-[calc(100%-188px)]">
158-
<div class={`${showing ? '' : 'hidden'} ${expanded ? 'w-[40rem]' : 'w-80'} max-w-[400px] min-h-[200px] absolute flex flex-col-reverse right-0 bottom-[4.5rem] border-0 shadow-xl bg-gray-50 rounded-md animate-fade-up max-h-full overflow-y-auto z-50`}>
158+
<div class={`${showing ? '' : 'hidden'} ${expanded ? 'w-[40rem]' : 'w-80'} max-w-[400px] min-h-[200px] absolute flex flex-col-reverse right-0 bottom-[3.75rem] border-0 shadow-xl bg-gray-50 rounded-md animate-fade-up max-h-full overflow-y-auto z-20`}>
159159
<div class={`flex flex-col-reverse gap-3 overflow-y-auto p-4 h-[calc(100%-800px)]`}>
160160
<div class="w-full flex items-center justify-between gap-2">
161161
<textarea bind:value={input} on:keypress={listener} placeholder="Ask me anything..." class="w-full text-sm shadow-lg h-32 p-4 rounded-md outline-none border-0 resize-none" />
@@ -235,17 +235,21 @@
235235
</div>
236236
</div>
237237
</div>
238-
<button class="z-50 absolute flex right-0 bottom-0 items-center justify-center border-0 shadow-xl bg-gray-50 h-16 w-16 p-4 rounded-full cursor-pointer hover:bg-white" on:click={() => {
239-
showing = !showing
240-
}}>
241-
{#if showing}
238+
{#if showing}
239+
<button class="text-sm z-20 absolute flex right-0 bottom-1 items-center justify-center border-0 shadow-xl bg-gray-50 h-10 w-10 p-4 rounded-full cursor-pointer hover:bg-white" on:click={() => {
240+
showing = false
241+
}}>
242242
<div class="animate-fade-in">
243243
<XIcon />
244244
</div>
245-
{:else}
246-
<div class="animate-fade-in" title="AI Assistant">
247-
<WizIcon />
245+
</button>
246+
{:else}
247+
<button class="text-sm z-20 absolute flex right-0 bottom-1 items-center justify-center border-0 shadow-xl bg-gray-50 h-10 w-32 p-4 rounded-full cursor-pointer hover:bg-white" on:click={() => {
248+
showing = true
249+
}}>
250+
<div class="animate-fade-in">
251+
<WizIcon /> AI Assistant
248252
</div>
249-
{/if}
250-
</button>
253+
</button>
254+
{/if}
251255
</div>

0 commit comments

Comments
 (0)