()
| 8 | import { selectedView } from "./state.tsx"; |
| 9 | |
| 10 | function App() { |
| 11 | const [currentSidebarItem, setCurrentSidebarItem] = |
| 12 | createSignal<SidebarItem>(); |
| 13 | return ( |
| 14 | <window |
| 15 | title="Solid Desktop" |
| 16 | subtitle="Develop Desktop with Solid" |
| 17 | style={{ |
| 18 | width: 800, |
| 19 | height: 600, |
| 20 | justifyContent: "center", |
| 21 | alignItems: "center", |
| 22 | }} |
| 23 | styleMask={ |
| 24 | NSWindowStyleMask.Titled | |
| 25 | NSWindowStyleMask.Closable | |
| 26 | NSWindowStyleMask.Miniaturizable | |
| 27 | NSWindowStyleMask.Resizable | |
| 28 | NSWindowStyleMask.FullSizeContentView |
| 29 | } |
| 30 | transparentTitleBar={false} |
| 31 | > |
| 32 | <AppMenus /> |
| 33 | |
| 34 | <split-view |
| 35 | style={{ |
| 36 | flexDirection: "row", |
| 37 | }} |
| 38 | vertical={true} |
| 39 | > |
| 40 | <Sidebar |
| 41 | selectedView={selectedView()} |
| 42 | onSelectedItemChange={(item) => { |
| 43 | setCurrentSidebarItem(item); |
| 44 | }} |
| 45 | selectedItem={currentSidebarItem()} |
| 46 | /> |
| 47 | |
| 48 | <content-list |
| 49 | style={{ |
| 50 | justifyContent: "center", |
| 51 | alignItems: "center", |
| 52 | width: "100%", |
| 53 | height: "100%", |
| 54 | }} |
| 55 | enableSafeAreaPaddings={true} |
| 56 | > |
| 57 | <ContentView component={currentSidebarItem()?.component} /> |
| 58 | </content-list> |
| 59 | </split-view> |
| 60 | </window> |
| 61 | ); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * A function export is required here to launch the app |
nothing calls this directly
no outgoing calls
no test coverage detected