-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from mpiorowski/new-ui
new ui
- Loading branch information
Showing
376 changed files
with
2,773 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: | ||
- release/** | ||
jobs: | ||
lint-client: | ||
uses: ./.github/workflows/lint-client.yml | ||
lint-server: | ||
needs: | ||
- lint-client | ||
uses: ./.github/workflows/lint-server.yml | ||
deploy-users: | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: superfly/flyctl-actions/setup-flyctl@master | ||
- run: flyctl deploy --remote-only | ||
working-directory: service-users | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Lint client | ||
on: | ||
workflow_call: | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./client | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- run: npm ci | ||
- run: cp .env.dist .env | ||
- run: npm run build | ||
- run: npm run lint | ||
#- run: npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Lint server | ||
on: | ||
workflow_call: | ||
|
||
# Make sure CI fails on all warnings, including Clippy lints | ||
env: | ||
RUSTFLAGS: "-Dwarnings" | ||
|
||
jobs: | ||
utils: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features | ||
working-directory: service-utils | ||
users: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features | ||
working-directory: service-users | ||
notes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features | ||
working-directory: service-notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: Pull request | ||
on: | ||
pull_request: | ||
jobs: | ||
lint-client: | ||
uses: ./.github/workflows/lint-client.yml | ||
lint-server: | ||
uses: ./.github/workflows/lint-server.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
files |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script lang="ts"> | ||
import Button from "$lib/form/Button.svelte"; | ||
import XIcon from "$lib/icons/XIcon.svelte"; | ||
import { createEventDispatcher } from "svelte"; | ||
import { fade, slide } from "svelte/transition"; | ||
export let open: boolean; | ||
const dispatch = createEventDispatcher(); | ||
function clickOutside() { | ||
dispatch("clickOutside"); | ||
} | ||
$: console.log(open); | ||
</script> | ||
|
||
{#if open} | ||
<div | ||
transition:fade={{ duration: 200 }} | ||
class="absolute top-0 right-0 w-screen h-screen bg-black bg-opacity-50 z-40" | ||
on:click={clickOutside} | ||
on:keypress={(e) => { | ||
if (e.key === "Escape") { | ||
clickOutside(); | ||
} | ||
}} | ||
/> | ||
<div | ||
class="absolute grid grid-rows-[60px_1fr_60px] top-0 right-0 h-screen max-w-xl w-full bg-primary-700 z-50" | ||
transition:slide={{ duration: 200, axis: "x" }} | ||
> | ||
<div class="flex flex-row justify-between items-center px-6"> | ||
<div> | ||
<slot name="header" /> | ||
</div> | ||
<button | ||
on:click={clickOutside} | ||
class="w-8 h-8 flex justify-center items-center hover:text-primary-300" | ||
> | ||
<XIcon /> | ||
</button> | ||
</div> | ||
<div> | ||
<slot name="content" /> | ||
</div> | ||
<div class="flex flex-row justify-end items-center px-6 gap-4"> | ||
<div class="w-28"> | ||
<Button | ||
type="button" | ||
variant="secondary" | ||
on:click={clickOutside} | ||
> | ||
Close | ||
</Button> | ||
</div> | ||
<slot name="footer" /> | ||
</div> | ||
</div> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script lang="ts"> | ||
import { fade } from "svelte/transition"; | ||
let open = false; | ||
const transitionConfig = { | ||
duration: 100, | ||
delay: 0, | ||
easing: cubicInOut, | ||
}; | ||
// Thank yoo ChatGPT :) | ||
function cubicInOut(t: number) { | ||
if (t < 0.5) return 4 * t * t * t; | ||
return (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; | ||
} | ||
function useClickOutisde(node: HTMLElement) { | ||
const handleClick = (event: MouseEvent) => { | ||
if (node && !node.contains(event.target as Node)) { | ||
open = false; | ||
} | ||
}; | ||
document.addEventListener("click", handleClick); | ||
return { | ||
destroy() { | ||
document.removeEventListener("click", handleClick); | ||
}, | ||
}; | ||
} | ||
</script> | ||
|
||
<div use:useClickOutisde> | ||
<button | ||
class="flex self-center" | ||
on:click={() => { | ||
open = !open; | ||
}} | ||
> | ||
<slot name="button" /> | ||
</button> | ||
<div | ||
class="relative" | ||
on:keypress={() => { | ||
open = false; | ||
}} | ||
on:click={() => { | ||
open = false; | ||
}} | ||
> | ||
{#if open} | ||
<div | ||
class="absolute right-0 top-1 whitespace-nowrap shadow-lg" | ||
transition:fade={transitionConfig} | ||
> | ||
<slot name="dropdown" /> | ||
</div> | ||
{/if} | ||
</div> | ||
</div> |
Oops, something went wrong.