Disable "connect" action if no accounts are logged
All checks were successful
Docs / build (push) Successful in 2m18s
All checks were successful
Docs / build (push) Successful in 2m18s
This commit is contained in:
parent
36e9ff14f2
commit
556bb92481
2 changed files with 3 additions and 2 deletions
|
@ -279,6 +279,7 @@ export function Runner(props: { isResizing: boolean }) {
|
|||
<DropdownMenuItem
|
||||
onClick={connectionState() === 'offline' ? handleConnect : handleDisconnect}
|
||||
class="text-xs"
|
||||
disabled={currentAccountId() === undefined}
|
||||
>
|
||||
<Dynamic
|
||||
component={connectionState() === 'offline' ? LucidePlug : LucideUnplug}
|
||||
|
@ -335,7 +336,7 @@ export function Runner(props: { isResizing: boolean }) {
|
|||
</DropdownMenu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-px shrink-0 bg-border" />
|
||||
<div class="bg-border h-px shrink-0" />
|
||||
<Devtools
|
||||
class={cn('size-full grow-0', props.isResizing && 'pointer-events-none')}
|
||||
iframeRef={setDevtoolsIframe}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { computed } from 'nanostores'
|
|||
import { linkedAtom } from './link.ts'
|
||||
|
||||
export const $accounts = linkedAtom<TelegramAccount[]>('accounts')
|
||||
export const $activeAccountId = linkedAtom<string>('activeAccountId')
|
||||
export const $activeAccountId = linkedAtom<string | undefined>('activeAccountId')
|
||||
|
||||
export const $activeAccount = computed([$accounts, $activeAccountId], (accounts, activeAccountId) => {
|
||||
if (!activeAccountId) return null
|
||||
|
|
Loading…
Reference in a new issue