mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
dashboard fix: dont allow create until versions is populated
This commit is contained in:
parent
058be8344b
commit
ea113a9cfe
5
.changeset/selfish-clocks-end.md
Normal file
5
.changeset/selfish-clocks-end.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@pockethost/dashboard': patch
|
||||
---
|
||||
|
||||
Dashboard fix: Don't allow instance creation until versions are available
|
@ -1,11 +1,10 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
globalInstancesStore,
|
||||
isUserPaid,
|
||||
userSubscriptionType,
|
||||
versions,
|
||||
} from '$util/stores'
|
||||
import { values } from '@s-libs/micro-dash'
|
||||
import { SubscriptionType } from 'pockethost/common'
|
||||
import Creator from './Creator.svelte'
|
||||
import Paywall from './Paywall.svelte'
|
||||
import { MAX_INSTANCE_COUNTS } from '$src/env'
|
||||
@ -13,9 +12,10 @@
|
||||
let instanceCount = 0
|
||||
let canCreate = false
|
||||
$: {
|
||||
console.log(MAX_INSTANCE_COUNTS[$userSubscriptionType])
|
||||
instanceCount = values($globalInstancesStore).length
|
||||
canCreate = instanceCount < MAX_INSTANCE_COUNTS[$userSubscriptionType]
|
||||
canCreate =
|
||||
instanceCount < MAX_INSTANCE_COUNTS[$userSubscriptionType] &&
|
||||
$versions.length > 0
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user