Skip to content

Commit

Permalink
Added margin to popup buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Sep 19, 2024
1 parent 7c52730 commit 67c564f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/pages/components/Label.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span>
<span {...$$restProps}>
<slot></slot>
</span>

Expand Down
25 changes: 17 additions & 8 deletions src/pages/popup_src/Buttons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
})
}}
>
<Label>{browser.i18n.getMessage("redirect") || "Redirect"}</Label>
<Label class="margin">{browser.i18n.getMessage("redirect") || "Redirect"}</Label>
<RedirectIcon />
</Row>
{/if}
Expand All @@ -121,12 +121,12 @@
window.close()
})}
>
<Label>{browser.i18n.getMessage("switchInstance") || "Switch Instance"}</Label>
<Label class="margin">{browser.i18n.getMessage("switchInstance") || "Switch Instance"}</Label>
<SwitchInstanceIcon />
</Row>
{/if}
<Row class="interactive" on:click={removeInstance}>
<Label>
<Label class="margin">
{browser.i18n.getMessage("remove") || "Remove"}
+
{browser.i18n.getMessage("switchInstance") || "Switch Instance"}
Expand All @@ -135,15 +135,15 @@
</Row>
{:else}
<Row class={"interactive " + (autoPicking ? "disabled" : "")} on:click={removeAndAutoPickInstance}>
<Label>
<Label class="margin">
{browser.i18n.getMessage("remove") || "Remove"}
+
{browser.i18n.getMessage("autoPickInstance") || "Auto Pick Instance"}
</Label>
<AutoPickIcon />
</Row>
<Row class={"interactive " + (autoPicking ? "disabled" : "")} on:click={addAutoPickInstance}>
<Label>
<Label class="margin">
{browser.i18n.getMessage("autoPickInstance") || "Auto Pick Instance"}
</Label>
<AutoPickIcon />
Expand All @@ -153,7 +153,7 @@

{#if redirectToOriginal}
<Row class="interactive" on:click={() => servicesHelper.copyRaw(url)}>
<Label>{browser.i18n.getMessage("copyOriginal") || "Copy Original"}</Label>
<Label class="margin">{browser.i18n.getMessage("copyOriginal") || "Copy Original"}</Label>
<CopyIcon />
</Row>
<Row
Expand All @@ -166,7 +166,7 @@
})
}}
>
<Label>{browser.i18n.getMessage("redirectToOriginal" || "Redirect to Original")}</Label>
<Label class="margin">{browser.i18n.getMessage("redirectToOriginal" || "Redirect to Original")}</Label>
<RedirectToOriginalIcon />
</Row>
{/if}
Expand Down Expand Up @@ -195,7 +195,7 @@
window.close()
})}
>
<Label>{browser.i18n.getMessage("settings")}</Label>
<Label class="margin">{browser.i18n.getMessage("settings")}</Label>
<SettingsIcon />
</Row>
</div>
Expand Down Expand Up @@ -238,4 +238,13 @@
margin-right: 0;
margin-left: 5px;
}
:global(.margin) {
margin-right: 5px;
margin-left: 0;
}
:global(.margin_rtl) {
margin-right: 0;
margin-left: 5px;
}
</style>

0 comments on commit 67c564f

Please sign in to comment.