Add/remove library on mobile devices

- Hide from main view; it is available in the context menu
- Prevents horizontal scrolling
- Also reinstate mobile context menu dividers for quicker legibility
This commit is contained in:
James Barnsley
2024-01-05 12:02:56 +13:00
parent 9b74d9b85a
commit 7ac717f2d9
4 changed files with 11 additions and 10 deletions

View File

@ -200,7 +200,7 @@ const Album = () => {
>
<I18n path="actions.play" />
</Button>
{uriSource(uri) === 'spotify' && (
{uriSource(uri) === 'spotify' && !slim_mode && (
<FollowButton
uri={uri}
is_following={album.in_library}

View File

@ -29,6 +29,7 @@ const Artist = () => {
const { uri: encodedUri } = useParams();
const uri = decodeUri(encodedUri);
const { slim_mode } = useSelector((state) => state.ui);
const artistSelector = makeItemSelector(uri);
const artist = useSelector(artistSelector);
const albumSelector = makeItemSelector(artist?.albums_uris || []);
@ -135,7 +136,7 @@ const Artist = () => {
>
<I18n path="actions.play" />
</Button>
{is_spotify && (
{is_spotify && !slim_mode && (
<FollowButton
uri={uri}
is_following={artist.in_library}

View File

@ -30,6 +30,7 @@ const SORT_KEY = 'playlist_tracks';
const Actions = ({
encodedUri,
slim_mode,
playlist: {
uri,
can_edit,
@ -71,10 +72,12 @@ const Actions = ({
>
<I18n path="actions.play" />
</Button>
<FollowButton
uri={uri}
is_following={in_library}
/>
{!slim_mode && (
<FollowButton
uri={uri}
is_following={in_library}
/>
)}
<PinButton item={{ uri, name }} />
<ContextMenuTrigger onTrigger={handleContextMenu} />
</div>
@ -298,6 +301,7 @@ const Playlist = ({
playlist={playlist}
onPlay={onPlay}
handleContextMenu={handleContextMenu}
slim_mode={slim_mode}
/>
<h4 className="no-bottom-margin">

View File

@ -320,10 +320,6 @@
}
}
&__divider {
display: none;
}
&__item {
font-size: 1.2rem;
font-weight: 800;