forked from pdsls.dev/pdsls
atproto explorer

move validate button

juli.ee 1c165f01 58e82dd2

verified
Changed files
+46 -50
src
components
+46 -50
src/components/create.tsx
··· 339 339 </button> 340 340 </div> 341 341 <form ref={formRef} class="flex flex-col gap-y-2"> 342 - <div class="flex w-fit flex-col gap-y-1 text-sm"> 343 - <div class="flex flex-wrap items-center gap-1"> 344 - <Show when={props.create}> 345 - <span>at://</span> 346 - <select 347 - class="dark:bg-dark-100 dark:shadow-dark-700 max-w-[10rem] truncate rounded-lg border-[0.5px] border-neutral-300 bg-white px-1 py-1 shadow-xs select-none focus:outline-[1px] focus:outline-neutral-600 dark:border-neutral-600 dark:focus:outline-neutral-400" 348 - name="repo" 349 - id="repo" 350 - > 351 - <For each={Object.keys(sessions)}> 352 - {(session) => ( 353 - <option value={session} selected={session === agent()?.sub}> 354 - {sessions[session].handle ?? session} 355 - </option> 356 - )} 357 - </For> 358 - </select> 359 - <span>/</span> 360 - <TextInput 361 - id="collection" 362 - name="collection" 363 - placeholder="Optional (default: $type)" 364 - class="w-[10rem] placeholder:text-xs lg:w-[13rem]" 365 - /> 366 - <span>/</span> 367 - <TextInput 368 - id="rkey" 369 - name="rkey" 370 - placeholder="Optional (default: TID)" 371 - class="w-[10rem] placeholder:text-xs lg:w-[13rem]" 372 - /> 373 - </Show> 374 - </div> 375 - <div class="flex items-center gap-1"> 376 - <button 377 - type="button" 378 - class="flex items-center gap-1 rounded-sm p-1 hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600" 379 - onClick={() => 380 - setValidate( 381 - validate() === true ? false 382 - : validate() === false ? undefined 383 - : true, 384 - ) 385 - } 342 + <Show when={props.create}> 343 + <div class="flex flex-wrap items-center gap-1 text-sm"> 344 + <span>at://</span> 345 + <select 346 + class="dark:bg-dark-100 dark:shadow-dark-700 max-w-[10rem] truncate rounded-lg border-[0.5px] border-neutral-300 bg-white px-1 py-1 shadow-xs select-none focus:outline-[1px] focus:outline-neutral-600 dark:border-neutral-600 dark:focus:outline-neutral-400" 347 + name="repo" 348 + id="repo" 386 349 > 387 - <Tooltip text={getValidateLabel()}> 388 - <span class={`iconify text-base ${getValidateIcon()}`}></span> 389 - </Tooltip> 390 - <span>Validate</span> 391 - </button> 350 + <For each={Object.keys(sessions)}> 351 + {(session) => ( 352 + <option value={session} selected={session === agent()?.sub}> 353 + {sessions[session].handle ?? session} 354 + </option> 355 + )} 356 + </For> 357 + </select> 358 + <span>/</span> 359 + <TextInput 360 + id="collection" 361 + name="collection" 362 + placeholder="Optional (default: $type)" 363 + class="w-[10rem] placeholder:text-xs lg:w-[13rem]" 364 + /> 365 + <span>/</span> 366 + <TextInput 367 + id="rkey" 368 + name="rkey" 369 + placeholder="Optional (default: TID)" 370 + class="w-[10rem] placeholder:text-xs lg:w-[13rem]" 371 + /> 392 372 </div> 393 - </div> 373 + </Show> 394 374 <Editor 395 375 content={JSON.stringify( 396 376 !props.create ? props.record ··· 431 411 <FileUpload file={blobInput.files![0]} /> 432 412 </Modal> 433 413 <div class="flex items-center justify-end gap-2"> 414 + <button 415 + type="button" 416 + class="flex items-center gap-1 rounded-sm p-1 text-sm hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600" 417 + onClick={() => 418 + setValidate( 419 + validate() === true ? false 420 + : validate() === false ? undefined 421 + : true, 422 + ) 423 + } 424 + > 425 + <Tooltip text={getValidateLabel()}> 426 + <span class={`iconify ${getValidateIcon()}`}></span> 427 + </Tooltip> 428 + <span>Validate</span> 429 + </button> 434 430 <Show when={!props.create}> 435 431 <Button onClick={() => editRecord(true)}>Recreate</Button> 436 432 </Show>