mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: multiple things
This commit is contained in:
@@ -130,8 +130,10 @@
|
||||
{:then response}
|
||||
{#if response?.length}
|
||||
<ul class="table is-remove-outer-styles common-section">
|
||||
{#each response as repo}
|
||||
<li class="table-row">
|
||||
{#each response as repo, i}
|
||||
<li
|
||||
class="table-row"
|
||||
style:border-block-end={i === response.length - 1 ? 'none' : null}>
|
||||
<div class="table-col">
|
||||
<div
|
||||
class="u-flex u-cross-center u-gap-8"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { onMount } from 'svelte';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import Label from '$lib/elements/forms/label.svelte';
|
||||
import { choices, createFunction, installation, repository, runtimes } from '../store';
|
||||
|
||||
let showCustomId = false;
|
||||
@@ -77,15 +76,13 @@
|
||||
{/if}
|
||||
|
||||
{#if detectingRuntime}
|
||||
<div>
|
||||
<Label required={true}>Runtime</Label>
|
||||
<div class="card-git card is-border-dashed is-no-shadow">
|
||||
<div class="u-flex u-gap-8 u-cross-center u-main-center">
|
||||
<div class="loader u-margin-16" />
|
||||
Detecting runtime...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<InputSelect
|
||||
disabled
|
||||
label="Runtime"
|
||||
id="runtime"
|
||||
placeholder="Detecting runtime"
|
||||
value={null}
|
||||
options={[]} />
|
||||
{:else}
|
||||
<InputSelect
|
||||
label="Runtime"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { LabelCard } from '$lib/components';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { app } from '$lib/stores/app';
|
||||
import { templateConfig } from '../store';
|
||||
|
||||
async function beforeSubmit() {
|
||||
@@ -21,8 +22,8 @@
|
||||
<LabelCard
|
||||
name="behaviour"
|
||||
value="new"
|
||||
backgroundColor="var(--color-neutral-5)"
|
||||
backgroundColorHover="var(--color-neutral-10)"
|
||||
backgroundColor={$app.themeInUse === 'light' ? 'var(--color-neutral-5)' : null}
|
||||
backgroundColorHover={$app.themeInUse === 'light' ? 'var(--color-neutral-10)' : null}
|
||||
bind:group={$templateConfig.repositoryBehaviour}>
|
||||
<svelte:fragment slot="title">Create a new repository</svelte:fragment>
|
||||
Clone the template and create a new repository in your selected organization.
|
||||
@@ -30,8 +31,8 @@
|
||||
<LabelCard
|
||||
name="behaviour"
|
||||
value="existing"
|
||||
backgroundColor="var(--color-neutral-5)"
|
||||
backgroundColorHover="var(--color-neutral-10)"
|
||||
backgroundColor={$app.themeInUse === 'light' ? 'var(--color-neutral-5)' : null}
|
||||
backgroundColorHover={$app.themeInUse === 'light' ? 'var(--color-neutral-10)' : null}
|
||||
bind:group={$templateConfig.repositoryBehaviour}>
|
||||
<svelte:fragment slot="title">Add to existing repository</svelte:fragment>
|
||||
Clone the template to an existing repository in your selected organization.
|
||||
|
||||
@@ -41,9 +41,14 @@
|
||||
bind:value={$templateConfig.name}
|
||||
required />
|
||||
{#await loadRuntimes()}
|
||||
<div class="avatar is-size-x-small">
|
||||
<div class="loader u-margin-16" />
|
||||
</div>
|
||||
<InputSelect
|
||||
label="Runtime"
|
||||
id="runtime"
|
||||
placeholder="Loading runtimes..."
|
||||
required
|
||||
disabled
|
||||
options={[]}
|
||||
value={null} />
|
||||
{:then options}
|
||||
<InputSelect
|
||||
label="Runtime"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { base } from '$app/paths';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ parent }) => {
|
||||
const { organizations } = await parent();
|
||||
if (organizations.total) {
|
||||
const teamId = localStorage.getItem('organization') ?? organizations.teams[0].$id;
|
||||
throw redirect(303, `${base}/console/organization-${teamId}`);
|
||||
} else {
|
||||
throw redirect(303, `${base}/console/onboarding`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user