forked from pdsls.dev/pdsls
atproto explorer

only show buttons in record view

juli.ee 00dffd35 10b1dfce

verified
Changed files
+32 -30
src
components
+32 -30
src/components/json.tsx
··· 147 <VideoPlayer did={repo} cid={blob.ref.$link} /> 148 </ErrorBoundary> 149 </Show> 150 - <span 151 - classList={{ 152 - "flex items-center justify-between gap-1": true, 153 - "flex-col": !hide(), 154 - }} 155 - > 156 - <Show when={blob.mimeType.startsWith("image/") || blob.mimeType === "video/mp4"}> 157 - <Tooltip text={hide() ? "Show" : "Hide"}> 158 - <button 159 - onclick={() => setHide(!hide())} 160 - class={`${!hide() ? "-mt-1 -ml-0.5" : ""} flex items-center rounded-lg p-1 hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600`} 161 - > 162 - <span 163 - class={`iconify text-base ${hide() ? "lucide--eye-off" : "lucide--eye"}`} 164 - ></span> 165 - </button> 166 - </Tooltip> 167 - </Show> 168 - <Show when={pds()}> 169 - <Tooltip text="Blob on PDS"> 170 - <a 171 - href={`https://${pds()}/xrpc/com.atproto.sync.getBlob?did=${repo}&cid=${blob.ref.$link}`} 172 - target="_blank" 173 - class={`${!hide() ? "-mb-1 -ml-0.5" : ""} flex items-center rounded-lg p-1 hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600`} 174 - > 175 - <span class="iconify lucide--external-link text-base"></span> 176 - </a> 177 - </Tooltip> 178 - </Show> 179 - </span> 180 </span> 181 {rawObj} 182 </>
··· 147 <VideoPlayer did={repo} cid={blob.ref.$link} /> 148 </ErrorBoundary> 149 </Show> 150 + <Show when={params.rkey}> 151 + <span 152 + classList={{ 153 + "flex items-center justify-between gap-1": true, 154 + "flex-col": !hide(), 155 + }} 156 + > 157 + <Show when={blob.mimeType.startsWith("image/") || blob.mimeType === "video/mp4"}> 158 + <Tooltip text={hide() ? "Show" : "Hide"}> 159 + <button 160 + onclick={() => setHide(!hide())} 161 + class={`${!hide() ? "-mt-1 -ml-0.5" : ""} flex items-center rounded-lg p-1 hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600`} 162 + > 163 + <span 164 + class={`iconify text-base ${hide() ? "lucide--eye-off" : "lucide--eye"}`} 165 + ></span> 166 + </button> 167 + </Tooltip> 168 + </Show> 169 + <Show when={pds()}> 170 + <Tooltip text="Blob on PDS"> 171 + <a 172 + href={`https://${pds()}/xrpc/com.atproto.sync.getBlob?did=${repo}&cid=${blob.ref.$link}`} 173 + target="_blank" 174 + class={`${!hide() ? "-mb-1 -ml-0.5" : ""} flex items-center rounded-lg p-1 hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600`} 175 + > 176 + <span class="iconify lucide--external-link text-base"></span> 177 + </a> 178 + </Tooltip> 179 + </Show> 180 + </span> 181 + </Show> 182 </span> 183 {rawObj} 184 </>