-
-
Notifications
You must be signed in to change notification settings - Fork 41
add 2fa flows (wip) #604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
lucassshanks
wants to merge
39
commits into
main
Choose a base branch
from
assets-page-template
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
add 2fa flows (wip) #604
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
c19af20
build out assets section
lucassshanks 7f5a526
toggle+card
lucassshanks c5328bc
nits
lucassshanks de8ad11
nits
lucassshanks a868c9f
add button
lucassshanks 90c2a0a
stupid mistake fix
lucassshanks 59bae1d
add filter
lucassshanks cc0d9d5
stuff
lucassshanks 6cef2c7
Merge branch 'main' into assets-page-template
lucassshanks 745f6a1
fixing some stupid things from previous PR in login flow
lucassshanks afc156b
update this bad login flow to actually use svelte shallow routing
lucassshanks 165dc7c
done with nav for a while
lucassshanks 6a95bab
Merge branch 'main' into assets-page-template
lucassshanks 2fca3f7
add webauthn to settings page. todo fix some stuff
lucassshanks a30f0c1
need to fix a bunch of routing, Also check that auth data is loaded w…
lucassshanks 6c8cd5b
move all this logic to the layout since client side anyways
lucassshanks 3333b6e
Merge branch 'main' into assets-page-template
lucassshanks 0c188ce
random spelling mistake in contributing
lucassshanks 5680205
update some flows
lucassshanks 2acd52b
Merge branch 'main' into assets-page-template
lucassshanks 4a48ff3
2fa
lucassshanks c6b2b57
Merge branch 'main' into assets-page-template
lucassshanks c16fcdb
committing for merge
lucassshanks 4f7a799
Merge branch 'main' into assets-page-template
lucassshanks a6ec90e
before updating this component
lucassshanks 2de7956
fix card format to be more svelte like
lucassshanks 3f0a24a
feat(dashboard): improve grpc error handling
lennartkloock 4cd9c3d
committing working modal flow need to add webauth
lucassshanks ba6f3f7
fix(dashboard): rpcErrorToString
lennartkloock 48bc262
fix(core): exlude google rpc from tinc compiling
lennartkloock 9f21c80
fix: pb build files
lennartkloock b56ca97
docs: add pb build file comments
lennartkloock 25dcb37
Merge branch 'main' into assets-page-template
lucassshanks 75eb0d2
fix page errors
lucassshanks d4ff83b
update svelte for tanstack v6
lucassshanks 1fef5bf
use tanstack add eror handling
lucassshanks 07a3eec
commiting current and removing msw
lucassshanks d0ce9e3
remove msw and test flow
lucassshanks f17b087
add tanstack to show how simplifies flow in 2fa page
lucassshanks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
cloud/core/emails/templates/emails/register_with_email/text.stpl
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# Default Public Variables | ||
# If you want to modify any of the values, create an .env.local file to override them. | ||
|
||
PUBLIC_VITE_MSW_ENABLED=true | ||
PUBLIC_TURNSTILE_SITE_KEY=1x00000000000000000000AA | ||
# The default developement deployment we use right now. | ||
PUBLIC_GRPC_BASE_URL=https://core.lennart.scuf.dev/ |
This file contains hidden or 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 hidden or 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 hidden or 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
109 changes: 109 additions & 0 deletions
109
cloud/dashboard/src/components/assets/all-assets.svelte
This file contains hidden or 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,109 @@ | ||
<script lang="ts"> | ||
import SearchInput from "$components/search-input.svelte"; | ||
import IconLayout_3 from "$lib/images/icon-layout-3.svelte"; | ||
import IconLayout from "$lib/images/icon-layout.svelte"; | ||
import AssetCard from "./asset-card.svelte"; | ||
import Header from "./assets-header.svelte"; | ||
import SlidingToggle from "./sliding-toggle.svelte"; | ||
import TimeFilterDropdown from "./time-filter-dropdown.svelte"; | ||
import { DISPLAY_MODES } from "./types"; | ||
|
||
// Search functionality | ||
let searchQuery = $state(""); | ||
let displayMode = $state(DISPLAY_MODES.GRID); | ||
|
||
// These will come from a paginated response | ||
const streams = [ | ||
{ | ||
status: "Live", | ||
streamName: "unique-stream-name", | ||
streamId: "8a28e499d6s7987fd981293fd981293", | ||
startTime: "May 5, 04:01:11 PM EDT", | ||
duration: "1h 30min", | ||
endTime: "May 6, 04:01:11 PM EDT", | ||
}, | ||
{ | ||
status: "Live", | ||
streamName: "unique-stream-name", | ||
streamId: "8a28e499d6s7987fd981293fd981293", | ||
startTime: "May 5, 04:01:11 PM EDT", | ||
duration: "1h 30min", | ||
endTime: "May 6, 04:01:11 PM EDT", | ||
}, | ||
{ | ||
status: "Finished", | ||
streamName: "unique-stream-name", | ||
streamId: "8a28e499d6s7987fd981293fd981293", | ||
startTime: "May 5, 04:01:11 PM EDT", | ||
duration: "1h 30min", | ||
endTime: "May 6, 04:01:11 PM EDT", | ||
}, | ||
{ | ||
status: "Finished", | ||
streamName: "unique-stream-name", | ||
streamId: "8a28e499d6s7987fd981293fd981293", | ||
startTime: "May 5, 04:01:11 PM EDT", | ||
duration: "1h 30min", | ||
endTime: "May 6, 04:01:11 PM EDT", | ||
}, | ||
]; | ||
|
||
function handleDisplayModeToggle() { | ||
if (displayMode === DISPLAY_MODES.GRID) { | ||
displayMode = DISPLAY_MODES.LIST; | ||
} else { | ||
displayMode = DISPLAY_MODES.GRID; | ||
} | ||
} | ||
|
||
let selectedTimeFilter = $state("latest"); | ||
|
||
function handleTimeFilterChange(filterId: string) { | ||
selectedTimeFilter = filterId; | ||
} | ||
</script> | ||
|
||
<Header /> | ||
<div class="search-row"> | ||
<SearchInput bind:value={searchQuery} placeholder="Search..." /> | ||
<TimeFilterDropdown | ||
selectedFilter={selectedTimeFilter} | ||
onFilterChange={handleTimeFilterChange} | ||
/> | ||
<SlidingToggle | ||
leftLabel={IconLayout} | ||
rightLabel={IconLayout_3} | ||
value={displayMode === DISPLAY_MODES.GRID ? "left" : "right"} | ||
onToggle={handleDisplayModeToggle} | ||
/> | ||
</div> | ||
<div class="separator"></div> | ||
<div class="card-container"> | ||
{#each streams as stream, i (i)} | ||
<AssetCard {...stream} /> | ||
{/each} | ||
</div> | ||
|
||
<div class="separator"></div> | ||
|
||
<style> | ||
.card-container { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
} | ||
|
||
.separator { | ||
height: 1px; | ||
background-color: var(--colors-gray50); | ||
margin: 1.5rem 0; | ||
} | ||
|
||
.search-row { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-bottom: 1.5rem; | ||
gap: 0.5rem; | ||
height: 2.5rem; | ||
} | ||
</style> |
125 changes: 125 additions & 0 deletions
125
cloud/dashboard/src/components/assets/asset-card.svelte
This file contains hidden or 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,125 @@ | ||
<script lang="ts"> | ||
import IconTimelineDot from "$lib/images/icon-timeline-dot.svelte"; | ||
import IconWebhook from "$lib/images/icon-webhook.svelte"; | ||
import StreamStatusPill from "$lib/shared-components/stream-status-pill.svelte"; | ||
|
||
let { | ||
streamName = "unique-stream-name", | ||
streamId = "8a28e499d6s7987fd981293fd981293", | ||
startTime = "May 5, 04:01:11 PM EDT", | ||
duration = "1h 30min", | ||
endTime = "May 6, 04:01:11 PM EDT", | ||
} = $props(); | ||
|
||
// const statusIcon = { | ||
// live: IconRoadmapDot, | ||
// finished: IconRoadmapDot, | ||
// }; | ||
|
||
// const IconComponent = statusIcon[status as keyof typeof statusIcon]; | ||
</script> | ||
|
||
<div class="stream-card"> | ||
<div class="left-section"> | ||
<div class="status-section"> | ||
<IconWebhook /> | ||
<StreamStatusPill status="live" /> | ||
<h3 class="stream-name">{streamName}</h3> | ||
</div> | ||
<div class="stream-details"> | ||
<p class="stream-id">{streamId}</p> | ||
</div> | ||
</div> | ||
<div class="right-section"> | ||
<div class="start-time"> | ||
<span class="time">{startTime}</span> | ||
<IconTimelineDot variant="default" /> | ||
</div> | ||
<div class="time-divider"></div> | ||
<div class="end-time"> | ||
<span class="duration">{duration}</span> | ||
<span class="time">{endTime}</span> | ||
<IconTimelineDot variant="finished" /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.stream-card { | ||
background: var(--colors-gray20); | ||
border-radius: 0.75rem; | ||
padding: 0.75rem; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
cursor: pointer; | ||
transition: background-color 0.2s ease; | ||
} | ||
|
||
.left-section { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
|
||
.status-section { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 0.5rem; | ||
align-items: center; | ||
|
||
.stream-name { | ||
color: white; | ||
font-weight: 500; | ||
font-size: 0.875rem; | ||
margin: 0; | ||
} | ||
} | ||
} | ||
|
||
.stream-details { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.stream-id { | ||
color: #9ca3af; | ||
font-size: 0.75rem; | ||
margin: 0; | ||
} | ||
|
||
.right-section { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-end; | ||
text-align: right; | ||
justify-content: center; | ||
|
||
.start-time { | ||
font-size: 0.875rem; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 1rem; | ||
color: #282625; | ||
display: flex; | ||
gap: 0.5rem; | ||
} | ||
|
||
.time-divider { | ||
width: 0.125rem; | ||
align-self: right; | ||
height: 1rem; | ||
background-color: var(--colors-gray50); | ||
margin-right: 0.3rem; | ||
} | ||
|
||
.end-time { | ||
font-size: 0.875rem; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 1rem; | ||
color: #282625; | ||
display: flex; | ||
gap: 0.5rem; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.