|
21 | 21 | import { Feature, hasFeature } from '../../../lib/FeatureToggles'; |
22 | 22 |
|
23 | 23 | const devices = stores.getDevices(); |
| 24 | + const enableFingerprint = stores.getEnableFingerprint(); |
24 | 25 |
|
25 | 26 | let componentWidth: number; |
26 | 27 | let connectDialogReference: ConnectDialogContainer; |
|
38 | 39 | }; |
39 | 40 |
|
40 | 41 | let isLive3DOpen = false; |
| 42 | +
|
| 43 | + $: isFingerprintEnabled = $enableFingerprint && hasFeature(Feature.FINGERPRINT); |
| 44 | + const toggleEnabled = (event: any) => { |
| 45 | + enableFingerprint.set(event.target.checked); |
| 46 | + }; |
41 | 47 | </script> |
42 | 48 |
|
43 | 49 | <div |
|
81 | 87 | </div> |
82 | 88 | </div> |
83 | 89 |
|
| 90 | + <!-- Right part of live-graph --> |
84 | 91 | <div |
85 | | - class="absolute right-0 cursor-pointer w-45 hover:bg-secondary hover:bg-opacity-10 transition" |
| 92 | + class="absolute right-0 bottom-0 cursor-pointer h-full w-45 flex flex-col justify-between hover:bg-secondary hover:bg-opacity-10 transition" |
86 | 93 | on:click={() => (isLive3DOpen = true)}> |
87 | | - <div class="flex flex-row"> |
88 | | - {#if hasFeature(Feature.FINGERPRINT)} |
89 | | - <div class="absolute h-full"> |
90 | | - <LiveDataFingerprint gestureName="Live" /> |
91 | | - </div> |
92 | | - {/if} |
93 | | - <View3DLive width={160} height={160} freeze={isLive3DOpen} /> |
| 94 | + <div class="pt-2 pr-2 justify-end flex flex-row gap-2"> |
| 95 | + <p>Fingerprint:</p> |
| 96 | + <input |
| 97 | + type="checkbox" |
| 98 | + checked={$enableFingerprint} |
| 99 | + on:change={e => toggleEnabled(e)} |
| 100 | + on:click|stopPropagation /> |
| 101 | + </div> |
| 102 | + |
| 103 | + {#if isFingerprintEnabled} |
| 104 | + <div class="absolute h-full"> |
| 105 | + <LiveDataFingerprint gestureName="Live" /> |
| 106 | + </div> |
| 107 | + {/if} |
| 108 | + |
| 109 | + <div class="flex flex-row pl-4 justify-center"> |
| 110 | + <View3DLive width={140} height={140} freeze={isLive3DOpen} /> |
94 | 111 | </div> |
95 | 112 | </div> |
96 | 113 |
|
|
0 commit comments