Skip to content

Commit

Permalink
Show authenticated user info in ide in top-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhantk232 committed Nov 14, 2024
1 parent a4cb8b5 commit 4214d8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/editor/top-bar/index.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
-- import: ui.fifthtry.com/components/editor/top-bar/file-switcher
-- import: ui.fifthtry.com/components/editor/top-bar/package-switcher
-- import: ui.fifthtry.com/components/avatar
-- import: ui.fifthtry.com/scenarios/john-doe
-- import: ui.fifthtry.com/records/user-data as ud

-- component top-bar:
module site-data: site-data
ud.user-data user-data:

-- ftd.row:
width.fixed.percent: 100
Expand All @@ -30,7 +31,13 @@ padding.px: 10
-- file-switcher.file-switcher:

-- avatar.avatar:
user-data: $john-doe.jd
if: { top-bar.user-data.is-logged-in }
user-data: $top-bar.user-data

-- ds.primary-button: $lang.sign-in
if: { !top-bar.user-data.is-logged-in }
link: $top-bar.site-data.sign-in-url
radius: curved

-- end: ftd.row
-- end: top-bar
Expand Down
4 changes: 4 additions & 0 deletions pages/ide.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
-- import: ui.fifthtry.com/components/editor/panels/package
-- import: ui.fifthtry.com/components/editor/panels/preview
-- import: ui.fifthtry.com/components/editor/welcome-screen
-- import: ui.fifthtry.com/records/user-data as ud



-- component page:
ud.user-data user-data:

-- ftd.column:
width: fill-container
height: fill-container

-- top-bar.top-bar:
user-data: $page.user-data

-- ftd.row:
width: fill-container
Expand Down
2 changes: 2 additions & 0 deletions scenarios/ide.ftd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- import: ui.fifthtry.com/pages/ide
-- import: ui.fifthtry.com/scenarios/john-doe

-- ide.page:
user-data: $john-doe.jd

0 comments on commit 4214d8a

Please sign in to comment.