1- import { AudioWaveform , Plus , UserCircle , UserCircle2 , X } from 'lucide'
1+ import { AudioWaveform , HelpCircle , LogIn , Plus , UserCircle , UserCircle2 , X } from 'lucide'
22import { Sigui } from 'sigui'
33import { Button , DropDown } from 'ui'
44import { dom } from 'utils'
55import type { z } from 'zod'
66import type { Profiles } from '~/api/models.ts'
77import { cn } from '~/lib/cn.ts'
88import { icon } from '~/lib/icon.ts'
9+ import { wrapActionAuth } from '~/src/comp/AuthModal.tsx'
910import { dspEditorUi } from '~/src/comp/DspEditorUi.tsx'
11+ import { showHelpModal } from '~/src/comp/HelpModal.tsx'
1012import { Toast } from '~/src/comp/Toast.tsx'
1113import { ICON_24 , ICON_32 , ICON_48 } from '~/src/constants.ts'
1214import { CreateProfile } from '~/src/pages/CreateProfile.tsx'
@@ -230,8 +232,9 @@ export function App() {
230232 const Home = ( ) => < div class = "flex flex-row" >
231233 < div class = "flex flex-col" >
232234 < div class = "h-12 border-b border-b-neutral-500 text-xl flex items-center p-2 gap-1" >
233- < Link href = "/" > { icon ( AudioWaveform , ICON_32 ) } </ Link >
234- < div class = "leading-none" > ravescript</ div >
235+ < Link href = "/" class = "flex flex-row flex-nowrap items-center gap-1 hover:no-underline" >
236+ { icon ( AudioWaveform , ICON_32 ) } < div class = "leading-none text-neutral-400" > ravescript</ div >
237+ </ Link >
235238 </ div >
236239 < div class = " h-[calc(100vh-80px)] overflow-y-scroll" >
237240 < div class = "flex flex-col" > { ( ) => info . profile ? [
@@ -253,12 +256,21 @@ export function App() {
253256 < div class = "flex items-center" > { ( ) => getDspControls ( ) . el } </ div >
254257 </ div >
255258 < div class = "flex items-center gap-2" > { ( ) => [
256- < Link class = "flex flex-row items-center text-lg mr-1" onclick = { createSound } >
257- { icon ( Plus , ICON_32 ) } < span > New sound</ span >
259+ < Link class = "flex flex-row items-center mr-16 gap-1" onclick = { showHelpModal } >
260+ < span > help</ span >
261+ { icon ( HelpCircle , { ...ICON_24 , class : 'mb-0.5 text-neutral-400' } ) }
262+ </ Link > ,
263+ < Link class = "flex flex-row items-center mr-16" onclick = { createSound } >
264+ < span > new sound</ span >
265+ { icon ( Plus , { ...ICON_32 , class : 'mb-0.5 text-neutral-400' } ) }
266+ </ Link > ,
267+ ! state . user && < Link class = "flex flex-row items-center gap-1" onclick = { wrapActionAuth ( ( ) => { } ) } >
268+ < span > Login</ span >
269+ { icon ( LogIn , { ...ICON_24 , class : 'mb-0.5 text-neutral-400' } ) }
258270 </ Link > ,
259271 ...( ( ) => ! state . user ? [ ] : [
260- < Link class = "ml-16" href = { ( ) => `/${ state . user ?. defaultProfile } ` } > { ( ) => state . profile ?. displayName } </ Link > ,
261- < DropDown right handle = { icon ( UserCircle , ICON_24 ) } items = { ( ) => [
272+ < Link href = { ( ) => `/${ state . user ?. defaultProfile } ` } > { ( ) => state . profile ?. displayName } </ Link > ,
273+ < DropDown right handle = { icon ( UserCircle , { ... ICON_24 , class : 'mb-0.5' } ) } items = { ( ) => [
262274 // [<Link class="px-2 py-1 hover:no-underline flex items-center justify-end" href="/settings">Settings</Link>, () => { }],
263275 [ state . user ? < Link class = "px-2 py-1 hover:no-underline flex items-center justify-end" onclick = { logoutUser } > Logout</ Link > : < div /> , ( ) => { } ] ,
264276 [ < Link class = "px-2 py-1 hover:no-underline flex items-center justify-end" href = "/new-profile" > New profile</ Link > , ( ) => { } ] ,
@@ -282,7 +294,7 @@ export function App() {
282294 </ div >
283295 </ div >
284296
285- const Modal = ( ) => state . modalIsOpen && < div class = "fixed w-full h-full flex items-center justify-center bg-[#111a] z-30" onpointermove = { dom . prevent . stop } >
297+ const AuthModal = ( ) => state . modalIsOpen && < div class = "fixed w-full h-full flex items-center justify-center bg-[#111a] z-30" onpointermove = { dom . prevent . stop } >
286298 < div class = "bg-neutral-700 p-6 border-4 border-[#000] relative" >
287299 < Button bare class = "absolute top-0 right-0 m-1" onclick = { ( ) => {
288300 state . modalIsOpen = false
@@ -294,7 +306,7 @@ export function App() {
294306
295307 return < main class = "flex flex-col relative" > { ( ) => [
296308 < Toast /> ,
297- Modal ( ) ,
309+ AuthModal ( ) ,
298310 ( ( ) => {
299311 const { pathname } = state
300312 $ ( )
0 commit comments