fixing wallpaper
This commit is contained in:
@@ -11,6 +11,7 @@ interface ThemeTabProps {
|
||||
onAddWallpaper: (name: string, url: string) => Promise<void>;
|
||||
onAddWallpaperFile: (file: File) => Promise<void>;
|
||||
onDeleteWallpaper: (wallpaper: Wallpaper) => Promise<void>;
|
||||
onNextWallpaper: () => void;
|
||||
}
|
||||
|
||||
const ThemeTab: React.FC<ThemeTabProps> = ({
|
||||
@@ -22,6 +23,7 @@ const ThemeTab: React.FC<ThemeTabProps> = ({
|
||||
onAddWallpaper,
|
||||
onAddWallpaperFile,
|
||||
onDeleteWallpaper,
|
||||
onNextWallpaper,
|
||||
}) => {
|
||||
const [newWallpaperName, setNewWallpaperName] = useState('');
|
||||
const [newWallpaperUrl, setNewWallpaperUrl] = useState('');
|
||||
@@ -177,7 +179,7 @@ const ThemeTab: React.FC<ThemeTabProps> = ({
|
||||
/>
|
||||
<button
|
||||
onClick={handleAddWallpaper}
|
||||
className="bg-cyan-500 hover:bg-cyan-400 text-white font-bold py-2 px-4 rounded-lg"
|
||||
className="bg-cyan-500 hover:bg-cyan-400 active:scale-95 text-white font-bold py-2 px-4 rounded-lg transition-all duration-150 ease-ios"
|
||||
>
|
||||
Add
|
||||
</button>
|
||||
@@ -221,6 +223,24 @@ const ThemeTab: React.FC<ThemeTabProps> = ({
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<div className="flex justify-center pt-2">
|
||||
<button
|
||||
onClick={onNextWallpaper}
|
||||
disabled={config.currentWallpapers.length === 0}
|
||||
className="flex items-center gap-2 bg-black/25 backdrop-blur-md border border-white/10 hover:bg-white/25 active:scale-95 disabled:opacity-40 disabled:cursor-not-allowed text-white text-sm font-semibold py-2 px-4 rounded-xl transition-all duration-150 ease-ios"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zM4.5 7.5a.5.5 0 0 1 .5-.5h5.379L8.646 5.354a.5.5 0 1 1 .708-.708l2.5 2.5a.5.5 0 0 1 0 .708l-2.5 2.5a.5.5 0 0 1-.708-.708L10.379 8H5a.5.5 0 0 1-.5-.5z" />
|
||||
</svg>
|
||||
Next Wallpaper
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user