pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #99 from Pasithea0/scraping-interrupt-buttons

Make scraping buttons stay on top

authored by

Cooper and committed by
GitHub
482dafe9 7495d514

+31 -19
+6 -1
src/pages/parts/player/PlayerPart.tsx
··· 7 7 import { PlayerMeta, playerStatus } from "@/stores/player/slices/source"; 8 8 import { usePlayerStore } from "@/stores/player/store"; 9 9 10 + import { ScrapingPartInterruptButton } from "./ScrapingPart"; 11 + 10 12 export interface PlayerPartProps { 11 13 children?: ReactNode; 12 14 backUrl: string; ··· 80 82 </Player.TopControls> 81 83 82 84 <Player.BottomControls show={showTargets}> 83 - <div className="flex items-center space-x-3"> 85 + <div className="flex items-center justify-center space-x-3 h-full"> 86 + {status === playerStatus.SCRAPING ? ( 87 + <ScrapingPartInterruptButton /> 88 + ) : null} 84 89 {status === playerStatus.PLAYING ? ( 85 90 <> 86 91 {isMobile ? <Player.Time short /> : null}
+25 -18
src/pages/parts/player/ScrapingPart.tsx
··· 151 151 </div> 152 152 ); 153 153 })} 154 - <div className="flex gap-3 pb-3"> 155 - <Button 156 - href="/" 157 - theme="secondary" 158 - padding="md:px-17 p-3" 159 - className="mt-6" 160 - > 161 - {t("notFound.goHome")} 162 - </Button> 163 - <Button 164 - onClick={() => window.location.reload()} 165 - theme="purple" 166 - padding="md:px-17 p-3" 167 - className="mt-6" 168 - > 169 - {t("notFound.reloadButton")} 170 - </Button> 171 - </div> 172 154 </div> 173 155 </div> 174 156 ); 175 157 } 158 + 159 + export function ScrapingPartInterruptButton() { 160 + const { t } = useTranslation(); 161 + 162 + return ( 163 + <div className="flex gap-3 pb-3"> 164 + <Button 165 + href="/" 166 + theme="secondary" 167 + padding="md:px-17 p-3" 168 + className="mt-6" 169 + > 170 + {t("notFound.goHome")} 171 + </Button> 172 + <Button 173 + onClick={() => window.location.reload()} 174 + theme="purple" 175 + padding="md:px-17 p-3" 176 + className="mt-6" 177 + > 178 + {t("notFound.reloadButton")} 179 + </Button> 180 + </div> 181 + ); 182 + }