mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-28 01:56:00 -05:00
Merge pull request #5706 from LLK/release/2021-07-07
Master release/2021-07-07
This commit is contained in:
commit
ce3313a05d
11 changed files with 60 additions and 62 deletions
40
package-lock.json
generated
40
package-lock.json
generated
|
@ -504,9 +504,9 @@
|
|||
}
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.762",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.762.tgz",
|
||||
"integrity": "sha512-LehWjRpfPcK8F1Lf/NZoAwWLWnjJVo0SZeQ9j/tvnBWYcT99qDqgo4raAfS2oTKZjPrR/jxruh85DGgDUmywEA==",
|
||||
"version": "1.3.766",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.766.tgz",
|
||||
"integrity": "sha512-u2quJ862q9reRKh/je3GXis3w38+RoXH1J9N3XjtsS6NzmUAosNsyZgUVFZPN/ZlJ3v6T0rTyZR3q/J5c6Sy5w==",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
|
@ -20853,9 +20853,9 @@
|
|||
}
|
||||
},
|
||||
"scratch-blocks": {
|
||||
"version": "0.1.0-prerelease.20210629072645",
|
||||
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210629072645.tgz",
|
||||
"integrity": "sha512-FpP4YIUQg3dgAKvn5QQ26DeBJyt4XsuJffXoFR5S5SLLuUgfWlh2+YYPx4otLj89neywvt7wqu/3pepYGyASOw==",
|
||||
"version": "0.1.0-prerelease.20210701042432",
|
||||
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210701042432.tgz",
|
||||
"integrity": "sha512-cJMwFz32YFlCq8fVBFLTqHjWYU9/TIOLVOi77aXD93TtZIhzhq80AgFmB6607XlBsWavd65bZ1pZ2FC32q0Sog==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"exports-loader": "0.6.3",
|
||||
|
@ -20863,9 +20863,9 @@
|
|||
}
|
||||
},
|
||||
"scratch-gui": {
|
||||
"version": "0.1.0-prerelease.20210629084355",
|
||||
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210629084355.tgz",
|
||||
"integrity": "sha512-bFEx92eZkC/gPpWulvktGEUvX5u/ncIJy4r44YIMs1B+R5xbnu2yauOSVbrc+D18iMLzdB9LvL7HPpcDE4zw2Q==",
|
||||
"version": "0.1.0-prerelease.20210707095345",
|
||||
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210707095345.tgz",
|
||||
"integrity": "sha512-m8lCy3p1UxPBBFngZpYiWhEomTTAFhid4NTtoughFl/MQQ8kpqy8phVTuK51ieD/DMXRuJdISP1jKRgzd7UQ+Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arraybuffer-loader": "^1.0.6",
|
||||
|
@ -20916,8 +20916,8 @@
|
|||
"redux": "3.7.2",
|
||||
"redux-throttle": "0.1.1",
|
||||
"scratch-audio": "0.1.0-prerelease.20200528195344",
|
||||
"scratch-blocks": "0.1.0-prerelease.20210629072645",
|
||||
"scratch-l10n": "3.13.20210629031507",
|
||||
"scratch-blocks": "0.1.0-prerelease.20210701042432",
|
||||
"scratch-l10n": "3.13.20210703031554",
|
||||
"scratch-paint": "0.2.0-prerelease.20210615011117",
|
||||
"scratch-render": "0.1.0-prerelease.20210325231800",
|
||||
"scratch-render-fonts": "1.0.0-prerelease.20210401210003",
|
||||
|
@ -21086,9 +21086,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.761",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.761.tgz",
|
||||
"integrity": "sha512-7a/wV/plM/b95XjTdA2Q4zAxxExTDKkNQpTiaU/nVT8tGCQVtX9NsnTjhALBFICpOB58hU6xg5fFC3CT2Bybpg==",
|
||||
"version": "1.3.769",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.769.tgz",
|
||||
"integrity": "sha512-B+3hW8D76/uoTPSobWI3D/CFn2S4jPn88dVJ+BkD88Lz6LijQpL+hfdzIFJGTQK4KdE0XwmNbjUQFH1OQVwKdQ==",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
|
@ -21309,9 +21309,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"scratch-l10n": {
|
||||
"version": "3.13.20210629031507",
|
||||
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.13.20210629031507.tgz",
|
||||
"integrity": "sha512-IxBJKogspgEe6879EpLFkrU524tFMN5avsFNVeAKJn1rO1RODOEfpGl4U27gq6WlhiYSGaqtoB8ObXvRHMWhmg==",
|
||||
"version": "3.13.20210703031554",
|
||||
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.13.20210703031554.tgz",
|
||||
"integrity": "sha512-SY6+VqsJ4/Ft49KnqWLsr0hP1cZuZ1itkSHv+nsEj3Q3zePadVa1eoC4+gL/lEBeg3iEtGjWU4JhiSuDkMsETQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/cli": "^7.1.2",
|
||||
|
@ -21386,9 +21386,9 @@
|
|||
}
|
||||
},
|
||||
"scratch-l10n": {
|
||||
"version": "3.13.20210630031503",
|
||||
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.13.20210630031503.tgz",
|
||||
"integrity": "sha512-2LIumtLBd8KVg2YpmJlToMHH24CPlV+4crcyPbI4gScHnFKGKHTQK0eZNCMO7tZEMi47hfl8xXVbIcryhi3iNQ==",
|
||||
"version": "3.13.20210704031505",
|
||||
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.13.20210704031505.tgz",
|
||||
"integrity": "sha512-tWBnK5yh4e39fV8EBErbBS9E1ofKskqM6b5NGRy3PtE00yttcsefzdtvi+DtNo+4ZpOPBjQtegm+KNyhZLpdxA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/cli": "^7.1.2",
|
||||
|
|
|
@ -127,8 +127,8 @@
|
|||
"redux-mock-store": "^1.2.3",
|
||||
"redux-thunk": "2.0.1",
|
||||
"sass-loader": "6.0.6",
|
||||
"scratch-gui": "0.1.0-prerelease.20210629084355",
|
||||
"scratch-l10n": "3.13.20210630031503",
|
||||
"scratch-gui": "0.1.0-prerelease.20210707095345",
|
||||
"scratch-l10n": "3.13.20210704031505",
|
||||
"selenium-webdriver": "3.6.0",
|
||||
"slick-carousel": "1.6.0",
|
||||
"style-loader": "0.12.3",
|
||||
|
|
|
@ -17,6 +17,8 @@ const Errors = keyMirror({
|
|||
MANAGER_LIMIT: null
|
||||
});
|
||||
|
||||
const PER_PAGE_LIMIT = 24;
|
||||
|
||||
const normalizeError = (err, body, res) => {
|
||||
if (err) return Errors.NETWORK;
|
||||
if (res.statusCode === 400 && body.message === 'too many owners') {
|
||||
|
@ -40,15 +42,14 @@ const loadManagers = () => ((dispatch, getState) => {
|
|||
const state = getState();
|
||||
const studioId = selectStudioId(state);
|
||||
const managerCount = managers.selector(state).items.length;
|
||||
const managersPerPage = 20;
|
||||
const opts = {
|
||||
uri: `/studios/${studioId}/managers/`,
|
||||
params: {limit: managersPerPage, offset: managerCount}
|
||||
params: {limit: PER_PAGE_LIMIT, offset: managerCount}
|
||||
};
|
||||
api(withAdmin(opts, state), (err, body, res) => {
|
||||
const error = normalizeError(err, body, res);
|
||||
if (error) return dispatch(managers.actions.error(error));
|
||||
dispatch(managers.actions.append(body, body.length === managersPerPage));
|
||||
dispatch(managers.actions.append(body, body.length === PER_PAGE_LIMIT));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -56,15 +57,14 @@ const loadCurators = () => ((dispatch, getState) => {
|
|||
const state = getState();
|
||||
const studioId = selectStudioId(state);
|
||||
const curatorCount = curators.selector(state).items.length;
|
||||
const curatorsPerPage = 20;
|
||||
const opts = {
|
||||
uri: `/studios/${studioId}/curators/`,
|
||||
params: {limit: curatorsPerPage, offset: curatorCount}
|
||||
params: {limit: PER_PAGE_LIMIT, offset: curatorCount}
|
||||
};
|
||||
api(withAdmin(opts, state), (err, body, res) => {
|
||||
const error = normalizeError(err, body, res);
|
||||
if (error) return dispatch(curators.actions.error(error));
|
||||
dispatch(curators.actions.append(body, body.length === curatorsPerPage));
|
||||
dispatch(curators.actions.append(body, body.length === PER_PAGE_LIMIT));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ const Errors = keyMirror({
|
|||
USER_MUTED: null
|
||||
});
|
||||
|
||||
const PER_PAGE_LIMIT = 24;
|
||||
|
||||
const normalizeError = (err, body, res) => {
|
||||
if (err) return Errors.NETWORK;
|
||||
if (res.statusCode === 403 && body.mute_status) return Errors.USER_MUTED;
|
||||
|
@ -32,15 +34,14 @@ const loadProjects = () => ((dispatch, getState) => {
|
|||
const state = getState();
|
||||
const studioId = selectStudioId(state);
|
||||
const projectCount = projects.selector(state).items.length;
|
||||
const projectsPerPage = 20;
|
||||
const opts = {
|
||||
uri: `/studios/${studioId}/projects/`,
|
||||
params: {limit: projectsPerPage, offset: projectCount}
|
||||
params: {limit: PER_PAGE_LIMIT, offset: projectCount}
|
||||
};
|
||||
api(withAdmin(opts, state), (err, body, res) => {
|
||||
const error = normalizeError(err, body, res);
|
||||
if (error) return dispatch(projects.actions.error(error));
|
||||
dispatch(projects.actions.append(body, body.length === projectsPerPage));
|
||||
dispatch(projects.actions.append(body, body.length === PER_PAGE_LIMIT));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -92,19 +92,20 @@ const UserProjectsModal = ({
|
|||
onRemove={onRemove}
|
||||
/>
|
||||
))}
|
||||
{moreToLoad &&
|
||||
<div className="studio-grid-load-more">
|
||||
<button
|
||||
className={classNames('button', {
|
||||
'mod-mutating': loading
|
||||
})}
|
||||
onClick={() => onLoadMore(filter)}
|
||||
>
|
||||
<FormattedMessage id="general.loadMore" />
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
{moreToLoad &&
|
||||
<div className="studio-projects-load-more">
|
||||
<button
|
||||
className={classNames('button', {
|
||||
'mod-mutating': loading
|
||||
})}
|
||||
onClick={() => onLoadMore(filter)}
|
||||
>
|
||||
<FormattedMessage id="general.loadMore" />
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
</React.Fragment>
|
||||
}
|
||||
{!loading && items.length === 0 &&
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.studio-projects-load-more {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.studio-projects-done-row {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
|
|
@ -196,8 +196,8 @@ const StudioActivity = ({items, loading, error, moreToLoad, onLoadMore}) => {
|
|||
getComponentForItem(item)
|
||||
)}
|
||||
</ul>
|
||||
<div>
|
||||
{moreToLoad &&
|
||||
{moreToLoad &&
|
||||
<div className="studio-grid-load-more">
|
||||
<button
|
||||
className={classNames('button', {
|
||||
'mod-mutating': loading
|
||||
|
@ -206,8 +206,8 @@ const StudioActivity = ({items, loading, error, moreToLoad, onLoadMore}) => {
|
|||
>
|
||||
<FormattedMessage id="general.loadMore" />
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ const StudioCurators = ({
|
|||
/>)
|
||||
)}
|
||||
{moreToLoad &&
|
||||
<div className="studio-members-load-more">
|
||||
<div className="studio-grid-load-more">
|
||||
<button
|
||||
className={classNames('button', {
|
||||
'mod-mutating': loading
|
||||
|
|
|
@ -103,7 +103,7 @@ const StudioManagers = ({
|
|||
/>)
|
||||
)}
|
||||
{moreToLoad &&
|
||||
<div className="studio-members-load-more">
|
||||
<div className="studio-grid-load-more">
|
||||
<button
|
||||
className={classNames('button', {
|
||||
'mod-mutating': loading
|
||||
|
|
|
@ -105,7 +105,7 @@ const StudioProjects = ({
|
|||
/>)
|
||||
)}
|
||||
{moreToLoad &&
|
||||
<div className="studio-projects-load-more">
|
||||
<div className="studio-grid-load-more">
|
||||
<button
|
||||
className={classNames('button', {
|
||||
'mod-mutating': loading
|
||||
|
|
|
@ -147,7 +147,7 @@ $radius: 8px;
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Overrides for when title and description are editable textareas. These override inplace-input */
|
||||
textarea.studio-title, textarea.studio-description {
|
||||
padding: 5px 8px;
|
||||
|
@ -241,14 +241,14 @@ $radius: 8px;
|
|||
|
||||
border: 1px solid $ui-blue;
|
||||
border-radius: 1rem;
|
||||
|
||||
|
||||
font-weight: bold;
|
||||
color: $ui-blue;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.manager-threshold-message {
|
||||
|
@ -270,9 +270,12 @@ $radius: 8px;
|
|||
}
|
||||
column-gap: 20px;
|
||||
row-gap: 20px;
|
||||
}
|
||||
|
||||
.studio-projects-load-more {
|
||||
grid-column: 1 / -1;
|
||||
.studio-grid-load-more {
|
||||
grid-column: 1 / -1;
|
||||
button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,9 +348,6 @@ $radius: 8px;
|
|||
}
|
||||
column-gap: 20px;
|
||||
row-gap: 20px;
|
||||
.studio-members-load-more {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
}
|
||||
|
||||
.studio-tabs {
|
||||
|
|
Loading…
Reference in a new issue