Skip to content

Commit a86d4f4

Browse files
committed
Redesign authorize contributor page
1 parent 3f5002e commit a86d4f4

2 files changed

Lines changed: 69 additions & 52 deletions

File tree

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,62 @@
11
<script>
2-
import { Container } from '$lib/layout';
2+
import { base } from '$app/paths';
33
import { loading } from '$routes/store';
4+
import { app } from '$lib/stores/app';
5+
import { Typography } from '@appwrite.io/pink-svelte';
46
57
loading.set(false);
68
</script>
79

8-
<Container>
9-
<slot />
10-
</Container>
10+
<div class="auth-bg">
11+
<section>
12+
<div class="console-container">
13+
<slot />
14+
</div>
15+
</section>
16+
<footer>
17+
<Typography.Eyebrow color="--fgcolor-neutral-secondary">POWERED BY</Typography.Eyebrow>
18+
{#if $app.themeInUse === 'dark'}
19+
<img
20+
src="{base}/images/appwrite-logo-dark.svg"
21+
width="120"
22+
height="22"
23+
alt="Appwrite Logo" />
24+
{:else}
25+
<img
26+
src="{base}/images/appwrite-logo-light.svg"
27+
width="120"
28+
height="22"
29+
alt="Appwrite Logo" />
30+
{/if}
31+
</footer>
32+
</div>
33+
34+
<style lang="scss">
35+
.auth-bg {
36+
position: fixed;
37+
background: var(--bgcolor-neutral-primary, #fff);
38+
background-size: cover;
39+
top: 0;
40+
left: 0;
41+
height: 100%;
42+
width: 100%;
43+
display: flex;
44+
flex-direction: column;
45+
align-items: center;
46+
justify-content: center;
47+
justify-content: space-between;
48+
section {
49+
flex: 1;
50+
display: flex;
51+
align-items: center;
52+
}
53+
footer {
54+
padding: 2rem 1rem;
55+
display: flex;
56+
gap: 0.5rem;
57+
justify-content: center;
58+
align-items: center;
59+
flex-wrap: wrap;
60+
}
61+
}
62+
</style>
Lines changed: 13 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<script lang="ts">
2-
import { app } from '$lib/stores/app';
3-
import AppwriteLogoDark from '$lib/images/appwrite-logo-dark.svg';
4-
import AppwriteLogoLight from '$lib/images/appwrite-logo-light.svg';
52
import { Vcs, Client } from '@appwrite.io/console';
63
import { onMount } from 'svelte';
74
import { getApiEndpoint } from '$lib/stores/sdk';
5+
import { Badge, Layout, Typography } from '@appwrite.io/pink-svelte';
6+
import { Button } from '$lib/elements/forms';
87
98
export let data;
109
@@ -52,49 +51,15 @@
5251
}
5352
</script>
5453

55-
<section class="container" style="display: grid; place-items: center; min-height: 100vh;">
56-
<div class="u-flex u-flex-vertical u-cross-center" style="width: 100%">
57-
<div class="card" style="min-width: 600px; max-width: 100%;">
58-
<h1 class="heading-level-2">Authorize External Deployment</h1>
59-
<small style="margin-block-start: 8px;display: block;"
60-
>The deployment for pull request <code class="inline-code"
61-
>#{providerPullRequestId}</code> is awaiting approval. When authorized, deployments
62-
will be started.
63-
</small>
64-
65-
<div class="with-borders" style="margin-block-start: 1rem;display: block;">
66-
<button disabled={loading} on:click={approveDeployment} class="button" type="button"
67-
>Approve Deployment</button>
68-
</div>
69-
70-
{#if error}
71-
<p style="margin-block-start: 1rem" class="u-color-text-danger">{error}</p>
72-
{/if}
73-
74-
{#if success}
75-
<p style="margin-block-start: 1rem" class="u-color-text-success">{success}</p>
76-
{/if}
77-
</div>
78-
<div class="u-gap-4 u-flex u-main-center u-cross-center" style="margin-block-start: 2rem;">
79-
<span class="text">Powered by</span>
80-
<a
81-
href="https://appwrite.io/"
82-
target="_blank"
83-
style="display: grid;place-items: center;">
84-
{#if $app.themeInUse === 'dark'}
85-
<img
86-
src={AppwriteLogoDark}
87-
width="120"
88-
class="u-block u-only-dark"
89-
alt="Appwrite Logo" />
90-
{:else}
91-
<img
92-
src={AppwriteLogoLight}
93-
width="120"
94-
class="u-block u-only-light"
95-
alt="Appwrite Logo" />
96-
{/if}
97-
</a>
98-
</div>
99-
</div>
54+
<section class="container" style="display: grid; place-items: center;">
55+
<Layout.Stack gap="l" alignItems="center" style="width: 500px;">
56+
{#if error}
57+
<Badge type="error" variant="secondary" content={error} />
58+
{/if}
59+
<Typography.Title size="l" align="center" variant="m-500">
60+
The deployment for pull request #{providerPullRequestId}
61+
is awaiting approval. When authorized, deployments will be started.
62+
</Typography.Title>
63+
<Button on:click={approveDeployment} secondary>Approve Deployment</Button>
64+
</Layout.Stack>
10065
</section>

0 commit comments

Comments
 (0)