Skip to content

Commit a07b06c

Browse files
committed
minor changes
1 parent 466bbce commit a07b06c

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

src/routes/_DeviceCard.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
on:click={() => {
6666
removeModal = true;
6767
}}
68-
><Trash class="text-blue-700 dark:text-red-700" />
68+
><Trash class="text-blue-600 dark:text-blue-500" />
6969
</Button>
7070
<Button
7171
name="Button"
@@ -74,7 +74,7 @@
7474
editFunc(ieeeAddr);
7575
}}
7676
>
77-
<AdjustmentsHorizontal class="text-blue-700 dark:text-red-700" />
77+
<AdjustmentsHorizontal class="text-blue-600 dark:text-blue-500" />
7878
</Button>
7979
</ButtonGroup>
8080
</span>

src/routes/_Stats.svelte

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
TableHeadCell
1111
} from 'flowbite-svelte';
1212
console.log(stats);
13-
const Z_INIT = 300;
13+
const Z_INIT = 254;
1414
let lock = false;
1515
let zcount = 0;
1616
@@ -32,8 +32,9 @@
3232
}
3333
</script>
3434

35-
<Card size="sm">
36-
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Stats</h5>
35+
<Card size="md" class="w-[25rem]">
36+
<div class="mb-5 flex justify-between"><h5 class="inline-block mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Stats</h5>
37+
<Button class="w-1/2" color="blue" disabled={zcount>0 ?true:false} pill outline on:click={zjoin}>{zcount > 0 ? 'Join timeout: '+zcount+' sec' : 'Enable Zigbee join'}</Button></div>
3738
<p class="font-normal text-gray-700 dark:text-gray-400">
3839
<Table divClass="relative overflow-x-auto sm:rounded-lg border-2 border-dashed">
3940
<TableBody>
@@ -81,7 +82,7 @@
8182
class="odd:bg-white even:bg-gray-100 dark:odd:bg-gray-800 dark:even:bg-gray-700"
8283
>
8384
<TableHeadCell scope="col" class="px-6 py-3">Last Boot:</TableHeadCell>
84-
<TableBodyCell class="pr-6 text-right break-words whitespace-break-spaces"
85+
<TableBodyCell class="w-5 pr-6 text-right break-words whitespace-break-spaces"
8586
>{new Date(stats.uptime).toUTCString()}</TableBodyCell
8687
>
8788
</TableBodyRow>
@@ -112,12 +113,4 @@
112113
</TableBody>
113114
</Table>
114115
</p>
115-
</Card>
116-
117-
<div class="mt-8">
118-
<Button color="blue" pill outline on:click={zjoin}>Enable Zigbee join</Button>
119-
<span
120-
class="mb-2 ml-5 inline-block text-lg font-medium tracking-tight text-gray-900 dark:text-white"
121-
style="visibility: {zcount > 0 ? 'visible' : 'hidden'}">Join timeout: {zcount} sec</span
122-
>
123-
</div>
116+
</Card>

src/routes/stats/zigbee/join/+server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { mClient } from '$lib/_mqtt';
33
export async function POST({ params, request }) {
44
await mClient.publish(
55
'zigbee2mqtt/bridge/request/permit_join',
6-
JSON.stringify({ value: true, time: 300 })
6+
JSON.stringify({ value: true, time: 254 })
77
);
88

99
console.log('Zigbee2Mqtt joining enabled');

0 commit comments

Comments
 (0)