From 843a16ef8df5529301873c281ccf8dd2aa5d6dfb Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Fri, 13 Sep 2024 12:01:31 +0530 Subject: [PATCH] added more data to package data --- components/editor/panels/package/index.ftd | 4 ++ .../editor/top-bar/package-switcher.ftd | 38 ++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/components/editor/panels/package/index.ftd b/components/editor/panels/package/index.ftd index 792c7ed0..06be7272 100644 --- a/components/editor/panels/package/index.ftd +++ b/components/editor/panels/package/index.ftd @@ -63,6 +63,10 @@ ide_toggle_only_show_modified_files() string name: string url: string slug: +string domain: +string about-url: +string history-url: +string settings-url: integer updated-at: folder list folders: file list files: diff --git a/components/editor/top-bar/package-switcher.ftd b/components/editor/top-bar/package-switcher.ftd index b257b5ff..76f1a7b9 100644 --- a/components/editor/top-bar/package-switcher.ftd +++ b/components/editor/top-bar/package-switcher.ftd @@ -4,20 +4,40 @@ boolean $open: false package list packages: $vars.recent-packages --- ftd.column: -$on-mouse-enter$: $ftd.set-boolean($a = $package-switcher.open, v = true) -$on-mouse-leave$: $ftd.set-boolean($a = $package-switcher.open, v = false) +-- ftd.row: +spacing.fixed.px: 15 + + -- ftd.column: + $on-mouse-enter$: $ftd.set-boolean($a = $package-switcher.open, v = true) + $on-mouse-leave$: $ftd.set-boolean($a = $package-switcher.open, v = false) + + -- ftd.text: $vars.package-data.name + color: black + if: { vars.package-data != NULL } + + -- popup: + $open: $package-switcher.open + $open if { vars.package-data == NULL }: true + packages: $package-switcher.packages + + -- end: ftd.column - -- ftd.text: $vars.package-data.name + -- ftd.text: About + link: $vars.package-data.about-url color: black if: { vars.package-data != NULL } - -- popup: - $open: $package-switcher.open - $open if { vars.package-data == NULL }: true - packages: $package-switcher.packages + -- ftd.text: History + link: $vars.package-data.history-url + color: black + if: { vars.package-data != NULL } --- end: ftd.column + -- ftd.text: Settings + link: $vars.package-data.settings-url + color: black + if: { vars.package-data != NULL } + +-- end: ftd.row -- end: package-switcher