mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
addressed comments
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
|
||||
export type FrameworkAdapterWithStartCommand = Models.FrameworkAdapter & {
|
||||
startCommand?: string;
|
||||
};
|
||||
|
||||
export function getFrameworkIcon(framework: string) {
|
||||
switch (true) {
|
||||
case framework.toLocaleLowerCase().includes('sveltekit'):
|
||||
|
||||
@@ -155,7 +155,9 @@
|
||||
disabled={shouldDisableDisableAllButton}>Disable all</Button>
|
||||
</Layout.Stack>
|
||||
</div>
|
||||
<Divider />
|
||||
<div class="protocol-toolbar-divider">
|
||||
<Divider />
|
||||
</div>
|
||||
<div class="protocol-list-content">
|
||||
<Layout.Stack gap="xs">
|
||||
{#each $protocols.list as protocol, index}
|
||||
@@ -207,7 +209,12 @@
|
||||
|
||||
<style>
|
||||
.protocols-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.protocol-list-content {
|
||||
max-width: 36rem;
|
||||
padding-top: var(--space-6);
|
||||
}
|
||||
|
||||
.protocol-toolbar {
|
||||
@@ -220,10 +227,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.protocol-list-content {
|
||||
padding-top: var(--space-6);
|
||||
}
|
||||
|
||||
.protocol-control {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
+5
-7
@@ -3,13 +3,9 @@
|
||||
import { Fieldset, Layout, Accordion } from '@appwrite.io/pink-svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { iconPath } from '$lib/stores/app';
|
||||
import { getFrameworkIcon } from '$lib/stores/sites';
|
||||
import { getFrameworkIcon, type FrameworkAdapterWithStartCommand } from '$lib/stores/sites';
|
||||
import { EnvironmentVariables } from '$lib/components/variables';
|
||||
|
||||
type FrameworkAdapterWithStartCommand = Models.FrameworkAdapter & {
|
||||
startCommand?: string;
|
||||
};
|
||||
|
||||
export let frameworks: Models.Framework[];
|
||||
export let selectedFramework: Models.Framework;
|
||||
$: frameworkData = frameworks.find((framework) => framework.key === selectedFramework?.key);
|
||||
@@ -73,7 +69,8 @@
|
||||
<Button
|
||||
secondary
|
||||
size="s"
|
||||
disabled={adapterData?.installCommand === installCommand}
|
||||
disabled={(adapterData?.installCommand ?? '') ===
|
||||
(installCommand ?? '')}
|
||||
on:click={() => (installCommand = adapterData?.installCommand)}>
|
||||
Reset
|
||||
</Button>
|
||||
@@ -87,7 +84,8 @@
|
||||
<Button
|
||||
secondary
|
||||
size="s"
|
||||
disabled={adapterData?.buildCommand === buildCommand}
|
||||
disabled={(adapterData?.buildCommand ?? '') ===
|
||||
(buildCommand ?? '')}
|
||||
on:click={() => (buildCommand = adapterData?.buildCommand)}>
|
||||
Reset
|
||||
</Button>
|
||||
|
||||
+3
-2
@@ -27,6 +27,7 @@
|
||||
import { writable } from 'svelte/store';
|
||||
import { getLatestTag } from '$lib/helpers/github';
|
||||
import Link from '$lib/elements/link.svelte';
|
||||
import type { FrameworkAdapterWithStartCommand } from '$lib/stores/sites';
|
||||
|
||||
let {
|
||||
data
|
||||
@@ -88,7 +89,7 @@
|
||||
const adapter = fw.adapters[0];
|
||||
installCommand = adapter.installCommand || '';
|
||||
buildCommand = adapter.buildCommand || '';
|
||||
startCommand = (adapter as { startCommand?: string }).startCommand || '';
|
||||
startCommand = (adapter as FrameworkAdapterWithStartCommand).startCommand || '';
|
||||
outputDirectory = adapter.outputDirectory || '';
|
||||
}
|
||||
}
|
||||
@@ -118,7 +119,7 @@
|
||||
const adapter = fw.adapters[0];
|
||||
installCommand = adapter.installCommand || '';
|
||||
buildCommand = adapter.buildCommand || '';
|
||||
startCommand = (adapter as { startCommand?: string }).startCommand || '';
|
||||
startCommand = (adapter as FrameworkAdapterWithStartCommand).startCommand || '';
|
||||
outputDirectory = adapter.outputDirectory || '';
|
||||
}
|
||||
}
|
||||
|
||||
+1
-4
@@ -22,10 +22,7 @@
|
||||
import { currentPlan } from '$lib/stores/organization';
|
||||
import Domain from '../domain.svelte';
|
||||
import { uploader } from '$lib/stores/uploader';
|
||||
|
||||
type FrameworkAdapterWithStartCommand = Models.FrameworkAdapter & {
|
||||
startCommand?: string;
|
||||
};
|
||||
import type { FrameworkAdapterWithStartCommand } from '$lib/stores/sites';
|
||||
|
||||
export let data;
|
||||
let showExitModal = false;
|
||||
|
||||
+1
-4
@@ -28,10 +28,7 @@
|
||||
import Domain from '../../domain.svelte';
|
||||
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store';
|
||||
import { normalizeDetectedVariables, mergeVariables } from '$lib/helpers/variables';
|
||||
|
||||
type FrameworkAdapterWithStartCommand = Models.FrameworkAdapter & {
|
||||
startCommand?: string;
|
||||
};
|
||||
import type { FrameworkAdapterWithStartCommand } from '$lib/stores/sites';
|
||||
|
||||
export let data;
|
||||
let showExitModal = false;
|
||||
|
||||
+5
-7
@@ -12,13 +12,9 @@
|
||||
import { Link } from '$lib/elements';
|
||||
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
|
||||
import { adapterDataList } from './store';
|
||||
import { getFrameworkIcon } from '$lib/stores/sites';
|
||||
import { getFrameworkIcon, type FrameworkAdapterWithStartCommand } from '$lib/stores/sites';
|
||||
import { page } from '$app/state';
|
||||
|
||||
type FrameworkAdapterWithStartCommand = Models.FrameworkAdapter & {
|
||||
startCommand?: string;
|
||||
};
|
||||
|
||||
let {
|
||||
site,
|
||||
frameworks,
|
||||
@@ -308,7 +304,8 @@
|
||||
secondary
|
||||
size="s"
|
||||
on:click={() => reset('installCommand')}
|
||||
disabled={installCommand === frameworkAdapterData?.installCommand}>
|
||||
disabled={(installCommand ?? '') ===
|
||||
(frameworkAdapterData?.installCommand ?? '')}>
|
||||
Reset
|
||||
</Button>
|
||||
</Layout.Stack>
|
||||
@@ -322,7 +319,8 @@
|
||||
<Button
|
||||
secondary
|
||||
size="s"
|
||||
disabled={buildCommand === frameworkAdapterData?.buildCommand}
|
||||
disabled={(buildCommand ?? '') ===
|
||||
(frameworkAdapterData?.buildCommand ?? '')}
|
||||
on:click={() => reset('buildCommand')}>
|
||||
Reset
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user