mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix:always send valid spec, remove redundant syncing
This commit is contained in:
1 parent
414fd53579
commit
21bee30c10
3 files changed
+19
-11
No files matched your search
+4
-1
@@ -60,7 +60,10 @@
|
||||
{#key data.site.providerRepositoryId}
|
||||
<UpdateRepository site={data.site} installations={data.installations} />
|
||||
{/key}
|
||||
<UpdateBuildSettings site={data.site} frameworks={data.frameworks.frameworks} />
|
||||
<UpdateBuildSettings
|
||||
site={data.site}
|
||||
frameworks={data.frameworks.frameworks}
|
||||
specs={data.specificationsList} />
|
||||
<UpdateRuntimeSettings site={data.site} frameworks={data.frameworks.frameworks} />
|
||||
<UpdateVariables
|
||||
{sdkCreateVariable}
|
||||
|
||||
+15
-8
@@ -15,13 +15,7 @@
|
||||
import { getFrameworkIcon } from '$lib/stores/sites';
|
||||
import { page } from '$app/state';
|
||||
|
||||
let {
|
||||
site,
|
||||
frameworks
|
||||
}: {
|
||||
site: Models.Site;
|
||||
frameworks: Models.Framework[];
|
||||
} = $props();
|
||||
let { site, frameworks, specs } = $props();
|
||||
|
||||
let frameworkKey = $state(site.framework);
|
||||
let installCommand = $state(site?.installCommand);
|
||||
@@ -94,6 +88,19 @@
|
||||
adapter = selectedFramework.adapters[0].key as Adapter;
|
||||
adptr = selectedFramework.adapters[0];
|
||||
}
|
||||
let specToSend = site?.specification;
|
||||
if (!specToSend && specs && specs.specifications?.length) {
|
||||
specToSend = specs.specifications[0].slug;
|
||||
site.specification = specToSend;
|
||||
}
|
||||
if (
|
||||
specs &&
|
||||
specs.specifications?.length &&
|
||||
!specs.specifications.some((s) => s.slug === specToSend)
|
||||
) {
|
||||
specToSend = specs.specifications[0].slug;
|
||||
site.specification = specToSend;
|
||||
}
|
||||
try {
|
||||
await sdk
|
||||
.forProject(page.params.region, page.params.project)
|
||||
@@ -115,7 +122,7 @@
|
||||
site.providerBranch || undefined,
|
||||
site.providerSilentMode || undefined,
|
||||
site.providerRootDirectory || undefined,
|
||||
site?.specification || undefined
|
||||
specToSend || undefined
|
||||
);
|
||||
await invalidate(Dependencies.SITE);
|
||||
addNotification({
|
||||
|
||||
-2
@@ -19,8 +19,6 @@
|
||||
let specification = site.specification;
|
||||
let originalSpecification = site.specification;
|
||||
|
||||
$: originalSpecification = site.specification;
|
||||
|
||||
async function updateLogging() {
|
||||
try {
|
||||
await sdk
|
||||
|
||||
Reference in new issue
Block a user