Skip to content

Commit

Permalink
Restore isa json export #365
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Feb 13, 2024
1 parent 996accc commit b799f29
Show file tree
Hide file tree
Showing 8 changed files with 341 additions and 238 deletions.
2 changes: 1 addition & 1 deletion src/Client/Client.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Content Include="docs\IOntologyAPIv2.html" />
<None Include="index.html" />
<None Include="style.scss" />
<Compile Include="LocalStorage\ModalPositions.fs" />
<Compile Include="LocalStorage\Widgets.fs" />
<Compile Include="LocalStorage\SplitWindow.fs" />
<Compile Include="LocalStorage\Darkmode.fs" />
<Compile Include="Colors\NFDIColors.fs" />
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Client/MainComponents/Navbar.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let private quickAccessButtonListEnd (model: Model) dispatch =
]
prop.children [
QuickAccessButton.create(
"Save as xlsx",
"Save",
[
Bulma.icon [Html.i [prop.className "fa-solid fa-floppy-disk";]]
],
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Model.fs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ module Protocol =
static member fromString(str:string) =
match str with
| "All" -> All
| "All Curated" -> OnlyCurated
| "DataPLANT official" -> OnlyCurated
| "All Community" -> OnlyCommunities
| anyElse -> Community anyElse

Expand Down
559 changes: 328 additions & 231 deletions src/Client/Pages/JsonExporter/JsonExporter.fs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Client/Routing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type Route =
| Route.TemplateMetadata ->
createElem [ Html.i [prop.className "fa-solid fa-circle-plus" ];Html.i [prop.className "fa-solid fa-table" ]] p.toStringRdbl
| Route.FilePicker ->
createElem [ Html.i [prop.className "fa-solid fa-upload" ]] p.toStringRdbl
createElem [ Html.i [prop.className "fa-solid fa-file-signature" ]] p.toStringRdbl
| Route.ActivityLog ->
createElem [ Html.i [prop.className "fa-solid fa-timeline" ]] p.toStringRdbl
| Route.Info ->
Expand Down
7 changes: 7 additions & 0 deletions src/Client/SidebarComponents/Navbar.fs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ let NavbarComponent (model : Model) (dispatch : Msg -> unit) (sidebarsize: Model
Html.i [prop.className "fa-brands fa-twitter"; prop.style [style.color "#1DA1F2"; style.marginLeft 2]]
]
]
Bulma.navbarItem.a [
prop.onClick (fun e ->
setState {state with BurgerActive = not state.BurgerActive}
UpdatePageState (Some Routing.Route.Info) |> dispatch
)
prop.text Routing.Route.Info.toStringRdbl
]
Bulma.navbarItem.a [
prop.href Shared.URLs.SwateWiki ;
prop.target "_Blank";
Expand Down
5 changes: 2 additions & 3 deletions src/Client/Views/SidebarView.fs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ let private tabs (model:Model) dispatch (sidebarsize: Model.WindowSize) =
//if not isIEBrowser then
// docsrc attribute not supported in iframe in IE
//createNavigationTab Routing.Route.Dag model dispatch sidebarsize
createNavigationTab Routing.Route.Info model dispatch sidebarsize
else
createNavigationTab Routing.Route.JsonExport model dispatch sidebarsize
else
createNavigationTab Routing.Route.TemplateMetadata model dispatch sidebarsize
//createNavigationTab Routing.Route.Validation model dispatch sidebarsize
createNavigationTab Routing.Route.Info model dispatch sidebarsize
Expand Down Expand Up @@ -163,7 +162,7 @@ module private Content =
Protocol.Core.fileUploadViewComponent model dispatch

| Routing.Route.JsonExport ->
JsonExporter.Core.jsonExporterMainElement model dispatch
JsonExporter.Core.FileExporter.Main(model, dispatch)

| Routing.Route.TemplateMetadata ->
TemplateMetadata.Core.newNameMainElement model dispatch
Expand Down

0 comments on commit b799f29

Please sign in to comment.