mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-06 07:28:53 -05:00
fix
This commit is contained in:
parent
e0f8e839cf
commit
675b6eb977
@ -1 +1 @@
|
|||||||
VERSION = "7.3.0"
|
VERSION = "7.555.0"
|
||||||
|
|||||||
@ -467,6 +467,9 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
clear: both;
|
clear: both;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.sliding-sidebar & {
|
.sliding-sidebar & {
|
||||||
transition-property: width;
|
transition-property: width;
|
||||||
@ -474,44 +477,54 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.items-list-outer .previous-slide,
|
.previous-slide,
|
||||||
&.items-list-outer .next-slide {
|
.next-slide {
|
||||||
top: 4px;
|
position: relative;
|
||||||
bottom: 4px;
|
display: inline-flex;
|
||||||
padding: 0 !important;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0 4px !important;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: var(--profile-page-header-bg-color);
|
background-color: var(--profile-page-header-bg-color);
|
||||||
|
height: $_authorPage-navHeight;
|
||||||
|
flex-shrink: 0;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
.circle-icon-button {
|
.circle-icon-button {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: var(--profile-page-header-bg-color);
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.items-list-outer .previous-slide {
|
.previous-slide {
|
||||||
left: -0.75em;
|
padding-right: 8px !important;
|
||||||
left: -1px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.items-list-outer .next-slide {
|
.next-slide {
|
||||||
right: -0.75em;
|
padding-left: 8px !important;
|
||||||
right: -1px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
flex: 1;
|
||||||
float: left;
|
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
// Remove whitespace between inline-block elements on mobile
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
font-size: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 0;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
min-width: 0; // Allow flex item to shrink
|
||||||
|
|
||||||
|
// Hide scrollbar but keep functionality
|
||||||
|
scrollbar-width: none; // Firefox
|
||||||
|
-ms-overflow-style: none; // IE/Edge
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none; // Chrome/Safari
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
@ -519,10 +532,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import { LinksContext, MemberContext, SiteContext } from '../../utils/contexts/'
|
|||||||
import { PageStore, ProfilePageStore } from '../../utils/stores/';
|
import { PageStore, ProfilePageStore } from '../../utils/stores/';
|
||||||
import { PageActions, ProfilePageActions } from '../../utils/actions/';
|
import { PageActions, ProfilePageActions } from '../../utils/actions/';
|
||||||
import { CircleIconButton, PopupMain } from '../_shared';
|
import { CircleIconButton, PopupMain } from '../_shared';
|
||||||
import ItemsInlineSlider from '../item-list/includes/itemLists/ItemsInlineSlider';
|
|
||||||
import { translateString } from '../../utils/helpers/';
|
import { translateString } from '../../utils/helpers/';
|
||||||
|
|
||||||
class ProfileSearchBar extends React.PureComponent {
|
class ProfileSearchBar extends React.PureComponent {
|
||||||
@ -244,12 +243,11 @@ class NavMenuInlineTabs extends React.PureComponent {
|
|||||||
displayPrev: false,
|
displayPrev: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.inlineSlider = null;
|
|
||||||
|
|
||||||
this.nextSlide = this.nextSlide.bind(this);
|
this.nextSlide = this.nextSlide.bind(this);
|
||||||
this.prevSlide = this.prevSlide.bind(this);
|
this.prevSlide = this.prevSlide.bind(this);
|
||||||
|
|
||||||
this.updateSlider = this.updateSlider.bind(this, false);
|
this.updateSlider = this.updateSlider.bind(this);
|
||||||
|
this.updateSliderButtonsView = this.updateSliderButtonsView.bind(this);
|
||||||
|
|
||||||
this.onToggleSearchField = this.onToggleSearchField.bind(this);
|
this.onToggleSearchField = this.onToggleSearchField.bind(this);
|
||||||
|
|
||||||
@ -303,44 +301,57 @@ class NavMenuInlineTabs extends React.PureComponent {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.updateSlider();
|
this.updateSlider();
|
||||||
|
if (this.refs.itemsListWrap) {
|
||||||
|
this.refs.itemsListWrap.addEventListener('scroll', this.updateSliderButtonsView.bind(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
if (this.refs.itemsListWrap) {
|
||||||
|
this.refs.itemsListWrap.removeEventListener('scroll', this.updateSliderButtonsView.bind(this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nextSlide() {
|
nextSlide() {
|
||||||
this.inlineSlider.nextSlide();
|
if (!this.refs.itemsListWrap) return;
|
||||||
this.updateSliderButtonsView();
|
const scrollAmount = this.refs.itemsListWrap.offsetWidth * 0.7; // Scroll 70% of visible width
|
||||||
this.inlineSlider.scrollToCurrentSlide();
|
this.refs.itemsListWrap.scrollLeft += scrollAmount;
|
||||||
|
setTimeout(() => this.updateSliderButtonsView(), 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
prevSlide() {
|
prevSlide() {
|
||||||
this.inlineSlider.previousSlide();
|
if (!this.refs.itemsListWrap) return;
|
||||||
this.updateSliderButtonsView();
|
const scrollAmount = this.refs.itemsListWrap.offsetWidth * 0.7; // Scroll 70% of visible width
|
||||||
this.inlineSlider.scrollToCurrentSlide();
|
this.refs.itemsListWrap.scrollLeft -= scrollAmount;
|
||||||
|
setTimeout(() => this.updateSliderButtonsView(), 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSlider(afterItemsUpdate) {
|
updateSlider(afterItemsUpdate) {
|
||||||
if (!this.inlineSlider) {
|
|
||||||
this.inlineSlider = new ItemsInlineSlider(this.refs.itemsListWrap, '.profile-nav ul li');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.inlineSlider.updateDataState(document.querySelectorAll('.profile-nav ul li').length, true, !afterItemsUpdate);
|
|
||||||
|
|
||||||
this.updateSliderButtonsView();
|
this.updateSliderButtonsView();
|
||||||
|
|
||||||
if (this.pendingChangeSlide) {
|
|
||||||
this.pendingChangeSlide = false;
|
|
||||||
this.inlineSlider.scrollToCurrentSlide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSliderButtonsView() {
|
updateSliderButtonsView() {
|
||||||
|
if (!this.refs.itemsListWrap) return;
|
||||||
|
|
||||||
|
const container = this.refs.itemsListWrap;
|
||||||
|
const scrollLeft = container.scrollLeft;
|
||||||
|
const scrollWidth = container.scrollWidth;
|
||||||
|
const clientWidth = container.clientWidth;
|
||||||
|
|
||||||
|
// Show prev arrow if we can scroll left
|
||||||
|
const canScrollLeft = scrollLeft > 1;
|
||||||
|
|
||||||
|
// Show next arrow if we can scroll right
|
||||||
|
const canScrollRight = scrollLeft < scrollWidth - clientWidth - 1;
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
displayPrev: this.inlineSlider.hasPreviousSlide(),
|
displayPrev: canScrollLeft,
|
||||||
displayNext: this.inlineSlider.hasNextSlide(),
|
displayNext: canScrollRight,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onToggleSearchField() {
|
onToggleSearchField() {
|
||||||
this.updateSlider();
|
setTimeout(() => this.updateSlider(), 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -404,9 +415,11 @@ class NavMenuInlineTabs extends React.PureComponent {
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
{!['about', 'playlists'].includes(this.props.type) ? (
|
||||||
<li className="media-search">
|
<li className="media-search">
|
||||||
<ProfileSearchBar onQueryChange={this.props.onQueryChange} toggleSearchField={this.onToggleSearchField} type={this.props.type} />
|
<ProfileSearchBar onQueryChange={this.props.onQueryChange} toggleSearchField={this.onToggleSearchField} type={this.props.type} />
|
||||||
</li>
|
</li>
|
||||||
|
) : null}
|
||||||
{this.props.onToggleFiltersClick && ['media', 'shared_by_me', 'shared_with_me'].includes(this.props.type) ? (
|
{this.props.onToggleFiltersClick && ['media', 'shared_by_me', 'shared_with_me'].includes(this.props.type) ? (
|
||||||
<li className="media-filters-toggle">
|
<li className="media-filters-toggle">
|
||||||
<span style={{ display: 'flex', alignItems: 'center', cursor: 'pointer', position: 'relative' }} onClick={this.props.onToggleFiltersClick} title={translateString('Filters')}>
|
<span style={{ display: 'flex', alignItems: 'center', cursor: 'pointer', position: 'relative' }} onClick={this.props.onToggleFiltersClick} title={translateString('Filters')}>
|
||||||
|
|||||||
1768
frontend/yarn.lock
1768
frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user