feat: design fixes

This commit is contained in:
Arman committed 2023-08-10 16:05:27 +02:00
1 parent f8932a4bfd
commit 33c357c4b3
4 files changed
+25 -19

No files matched your search

+7 -1
View File
@@ -4,10 +4,16 @@
export let href: string;
export let icon: string = null;
export let disabled = false;
export let external = false;
</script>
<li class="drop-list-item" on:click on:keyup={clickOnEnter}>
<a {href} class="drop-button" class:is-disabled={disabled}>
<a
{href}
class="drop-button"
class:is-disabled={disabled}
target={external ? '_blank' : ''}
rel={external ? 'noopener noreferrer' : ''}>
<span class="text"><slot /></span>
{#if icon}
<span class={`icon-${icon}`} aria-hidden="true" />
@@ -37,7 +37,7 @@
if (alert === 'installation-created') {
addNotification({
type: 'success',
message: `Git installation has been successfully added`
message: `Git installation has imported to your project`
});
trackEvent(Submit.InstallationCreate);
notified = true;
@@ -38,12 +38,10 @@
}
async function loadFunctions() {
const functions = await sdk.forProject.functions.list([
return await sdk.forProject.functions.list([
Query.limit(100),
Query.equal('installationId', selectedInstallation.$id)
]);
return functions.functions;
}
</script>
@@ -53,22 +51,23 @@
headerDivider={false}
bind:show={showGitDisconnect}
onSubmit={handleSubmit}
size="small">
size="big">
<svelte:fragment slot="header">Disconnect installation</svelte:fragment>
<p>
Are you sure you want to disconnect this git installation? This will affect future
deployments to the following functions:
</p>
{#await loadFunctions()}
<div class="avatar is-size-x-small">
<div class="loader u-margin-16" />
<div class="u-flex u-main-center">
<div class="avatar is-size-x-small">
<div class="loader u-margin-16" />
</div>
</div>
{:then functions}
{#if functions.length > 0}
<p>
Are you sure you want to disconnect this git installation? This will affect future
deployments to the following functions:
</p>
{#if functions.total}
<div class="u-flex u-flex-vertical u-gap-12">
{#each functions as func}
{#each functions.functions as func}
<div class="u-flex u-main-space-between u-cross-center u-width-full-line">
<div class="u-flex u-main-start u-cross-center u-gap-8">
<Avatar
@@ -6,6 +6,7 @@
CardGrid,
DropList,
DropListItem,
DropListLink,
Heading,
Id,
PaginationInline
@@ -67,7 +68,7 @@
target.searchParams.set('projectId', $page.params.project);
target.searchParams.set('success', redirect.toString());
target.searchParams.set('failure', redirect.toString());
goto(target);
return target?.toString();
}
async function navigateInstallations() {
@@ -146,14 +147,14 @@
<span class="icon-dots-horizontal" aria-hidden="true" />
</button>
<svelte:fragment slot="list">
<DropListItem
<DropListLink
href={configureGitHub()}
icon="external-link"
on:click={() => {
showInstallationDropdown[i] = false;
configureGitHub();
}}>
Configure {ProviderNames[installation.provider]}
</DropListItem>
</DropListLink>
<DropListItem
icon="x-circle"
on:click={async () => {