Skip to content

Commit

Permalink
Server log in UI (#468)
Browse files Browse the repository at this point in the history
* Clean-up - require log in to view the form manager.

* Remove "build-image-kansas" deploy job
  • Loading branch information
danielnaab authored Jan 29, 2025
1 parent 05f4b6d commit 7a208f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@ jobs:
app-name: server-doj
tag-name: ${{ github.ref_name }}

build-image-kansas:
uses: ./.github/workflows/_docker-build-image.yml
secrets: inherit
with:
app-name: server-kansas
tag-name: ${{ github.ref_name }}

deploy:
needs: [build-image-doj, build-image-kansas]
needs: [build-image-doj]
uses: ./.github/workflows/_terraform-apply.yml
secrets: inherit
with:
Expand Down
19 changes: 17 additions & 2 deletions packages/server/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
---
import AppFormManager from '../components/AppFormManager';
import { getServerContext } from '../config/astro.js';
import { getServerContext, getUserSession } from '../config/astro.js';
import Layout from '../layouts/Layout.astro';
import * as routes from '../routes.js';
const { baseUrl, uswdsRoot } = await getServerContext(Astro);
const loggedIn = !!(await getUserSession(Astro)).session;
---

<Layout title="10x Access to Justice">
<AppFormManager client:only="react" ctx={{ baseUrl, uswdsRoot }} />
{
loggedIn ? (
<AppFormManager client:only="react" ctx={{ baseUrl, uswdsRoot }} />
) : (
<div class="grid-container">
<h1>10x Forms Platform</h1>
<p class="usa-prose">Welcome to the 10x Forms Platform web server.</p>
<p class="usa-prose">
Authorized users may <a href={routes.getLoginUrl(baseUrl)}>sign in</a>{' '}
to test the Forms Platform.
</p>
</div>
)
}
</Layout>

0 comments on commit 7a208f7

Please sign in to comment.