aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-02-22 17:40:55 +0100
committerMel <einebeere@gmail.com>2022-02-22 17:40:55 +0100
commit069ee95ddc9981d86a4ed39a2826aaf8781ea505 (patch)
tree93ca5e3139524ae87047a7d6a9b08af5b0afa976
parent7f16e7c5ea7db95d77b40e4690148f478ebae674 (diff)
downloadrook-069ee95ddc9981d86a4ed39a2826aaf8781ea505.tar.zst
rook-069ee95ddc9981d86a4ed39a2826aaf8781ea505.zip
Fix toast styling on Request side
-rw-r--r--assets/src/components/RequestPage.svelte6
-rw-r--r--assets/src/components/SharePage.svelte6
-rw-r--r--assets/src/components/Toasts.svelte10
3 files changed, 18 insertions, 4 deletions
diff --git a/assets/src/components/RequestPage.svelte b/assets/src/components/RequestPage.svelte
index 69981b4..4443e5a 100644
--- a/assets/src/components/RequestPage.svelte
+++ b/assets/src/components/RequestPage.svelte
@@ -24,6 +24,12 @@
.data-view {
border: solid 1px #cccccc;
}
+
+ .toast {
+ color: black;
+ background-color: white;
+ border: solid 1px #cccccc;
+ }
</style>
</svelte:head>
diff --git a/assets/src/components/SharePage.svelte b/assets/src/components/SharePage.svelte
index 9c40c67..123f918 100644
--- a/assets/src/components/SharePage.svelte
+++ b/assets/src/components/SharePage.svelte
@@ -33,6 +33,12 @@
.data-view {
border: solid 1px #626262;
}
+
+ .toast {
+ color: white;
+ background-color: black;
+ border: solid 1px #626262;
+ }
</style>
</svelte:head>
diff --git a/assets/src/components/Toasts.svelte b/assets/src/components/Toasts.svelte
index f909831..2f5b6a9 100644
--- a/assets/src/components/Toasts.svelte
+++ b/assets/src/components/Toasts.svelte
@@ -4,6 +4,9 @@
import CloseIcon from "./icons/CloseIcon.svelte";
import FlashIcon from "./icons/FlashIcon.svelte";
import LightbulbIcon from "./icons/LightbulbIcon.svelte";
+ import { isClientShare } from "../state/constant_state";
+
+ const iconColor = isClientShare() ? "white" : "black";
function trim(str: string) {
return str.slice(0, 100) + (str.length > 100 ? "..." : "");
@@ -14,14 +17,14 @@
{#each $toasts as toast (toast.id)}
<ul class="toast" in:scale out:scale>
<div class="button" on:click={() => dismissToast(toast)}>
- <CloseIcon color="white" />
+ <CloseIcon color={iconColor} />
</div>
<li>
{#if toast.type === ToastType.INFO}
- <LightbulbIcon color="white" />
+ <LightbulbIcon color={iconColor} />
{:else}
- <FlashIcon color="white" />
+ <FlashIcon color={iconColor} />
{/if}
</li>
@@ -47,7 +50,6 @@
.toast {
width: 300px;
- background-color: black;
border: solid 1px #626262;
padding: 17px 20px;
font-size: 12px;