@stubber/ui 1.13.2 → 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
<script>import { Button } from "../../components/button/index";
|
|
2
2
|
import * as Popover from "../../components/popover/index";
|
|
3
|
-
import { onMount } from "svelte";
|
|
4
3
|
export let consoleOrigin = "";
|
|
5
4
|
export let stubsOrigin = "";
|
|
6
5
|
export let builderOrigin = "";
|
|
7
|
-
export let
|
|
6
|
+
export let active_app;
|
|
8
7
|
let stubsUrl = `${stubsOrigin}/_/inbox/assigned`;
|
|
9
8
|
let consoleUrl = `${consoleOrigin}/_/contacts`;
|
|
10
9
|
let builderUrl = `${builderOrigin}/_/drive/folders`;
|
|
11
|
-
let detectedOrigin = "";
|
|
12
|
-
onMount(() => {
|
|
13
|
-
if (currentOrigin === void 0) {
|
|
14
|
-
detectedOrigin = window.location.origin;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
$: activeOrigin = currentOrigin !== void 0 ? currentOrigin : detectedOrigin;
|
|
18
|
-
$: isStubsActive = activeOrigin === stubsOrigin;
|
|
19
|
-
$: isConsoleActive = activeOrigin === consoleOrigin;
|
|
20
|
-
$: isBuilderActive = activeOrigin === builderOrigin;
|
|
21
10
|
</script>
|
|
22
11
|
|
|
23
12
|
<Popover.Root>
|
|
@@ -30,7 +19,7 @@ $: isBuilderActive = activeOrigin === builderOrigin;
|
|
|
30
19
|
<!-- Stubs -->
|
|
31
20
|
<Button
|
|
32
21
|
href={stubsUrl}
|
|
33
|
-
class="h-20 w-20 {
|
|
22
|
+
class="h-20 w-20 {active_app == 'stubs' ? 'bg-surface-100 opacity-40' : ''}"
|
|
34
23
|
variant="ghost"
|
|
35
24
|
>
|
|
36
25
|
<div class="flex flex-col items-center space-y-2 text-surface-700">
|
|
@@ -41,7 +30,7 @@ $: isBuilderActive = activeOrigin === builderOrigin;
|
|
|
41
30
|
<!-- Console -->
|
|
42
31
|
<Button
|
|
43
32
|
href={consoleUrl}
|
|
44
|
-
class="h-20 w-20 {
|
|
33
|
+
class="h-20 w-20 {active_app == 'console' ? 'bg-surface-100 opacity-40' : ''}"
|
|
45
34
|
variant="ghost"
|
|
46
35
|
>
|
|
47
36
|
<div class="flex flex-col items-center space-y-2 text-surface-700">
|
|
@@ -52,7 +41,7 @@ $: isBuilderActive = activeOrigin === builderOrigin;
|
|
|
52
41
|
<!-- Builder -->
|
|
53
42
|
<Button
|
|
54
43
|
href={builderUrl}
|
|
55
|
-
class="h-20 w-20 {
|
|
44
|
+
class="h-20 w-20 {active_app == 'builder' ? 'bg-surface-100 opacity-40' : ''}"
|
|
56
45
|
variant="ghost"
|
|
57
46
|
>
|
|
58
47
|
<div class="flex flex-col items-center space-y-2 text-surface-700">
|