Revert "use cdn.scratch.ly in staging"

This commit is contained in:
Ray Schamp 2018-11-21 10:07:57 -05:00 committed by GitHub
parent 95fb947c08
commit 45415944c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 12 deletions

View file

@ -44,7 +44,7 @@ env:
- PROJECT_HOST=${!PROJECT_HOST_VAR}
- PROJECT_HOST=${PROJECT_HOST:-$PROJECT_HOST_STAGING}
- STATIC_HOST_master=https://cdn2.scratch.mit.edu
- STATIC_HOST_STAGING=https://cdn.scratch.ly
- STATIC_HOST_STAGING=https://scratch.ly
- STATIC_HOST_VAR=STATIC_HOST_$TRAVIS_BRANCH
- STATIC_HOST=${!STATIC_HOST_VAR}
- STATIC_HOST=${STATIC_HOST:-$STATIC_HOST_STAGING}

View file

@ -4,7 +4,6 @@ const React = require('react');
const Thumbnail = require('../thumbnail/thumbnail.jsx');
const FlexRow = require('../flex-row/flex-row.jsx');
const thumbnailUrl = require('../../lib/user-thumbnail');
require('./grid.scss');
@ -16,7 +15,7 @@ const Grid = props => (
if (props.itemType === 'projects') {
return (
<Thumbnail
avatar={thumbnailUrl(item.author.id)}
avatar={`https://cdn2.scratch.mit.edu/get_image/user/${item.author.id}_32x32.png`}
creator={item.author.username}
favorites={item.stats.favorites}
href={href}

View file

@ -4,7 +4,6 @@ const React = require('react');
const Thumbnail = require('../thumbnail/thumbnail.jsx');
const FlexRow = require('../flex-row/flex-row.jsx');
const thumbnailUrl = require('../../lib/user-thumbnail');
require('./thumbnailcolumn.scss');
@ -15,7 +14,7 @@ const ThumbnailColumn = props => (
if (props.itemType === 'preview') {
return (
<Thumbnail
avatar={thumbnailUrl(item.author.id)}
avatar={`https://cdn2.scratch.mit.edu/get_image/user/${item.author.id}_32x32.png`}
creator={item.author.username}
favorites={item.stats.favorites}
href={href}

View file

@ -11,7 +11,7 @@
* @returns {string} thumbnail url string
*/
const thumbnailUrl = (userId, width, height) => (
`${process.env.STATIC_HOST}/get_image/user/${userId || 'default'}_` +
`${process.env.STATIC_HOST}/get_image/user/${userId}_` +
`${width ? width : 32}x${height ? height : (width ? width : 32)}.png`
);

View file

@ -10,7 +10,6 @@ const React = require('react');
const Comment = require('../../../components/comment/comment.jsx');
const FlexRow = require('../../../components/flex-row/flex-row.jsx');
const SocialMessage = require('../../../components/social-message/social-message.jsx');
const thumbnailUrl = require('../../../lib/user-thumbnail');
class CommentMessage extends React.Component {
constructor (props) {
@ -165,7 +164,7 @@ class CommentMessage extends React.Component {
<img
alt={`${this.props.actorUsername}'s avatar`}
className="comment-message-info-img"
src={thumbnailUrl(this.props.actorId)}
src={`https://cdn2.scratch.mit.edu/get_image/user/${this.props.actorId}_32x32.png`}
/>
</a>
<Comment

View file

@ -25,7 +25,6 @@ const InplaceInput = require('../../components/forms/inplace-input.jsx');
const TopLevelComment = require('./comment/top-level-comment.jsx');
const ComposeComment = require('./comment/compose-comment.jsx');
const ExtensionChip = require('./extension-chip.jsx');
const thumbnailUrl = require('../../lib/user-thumbnail');
const projectShape = require('./projectshape.jsx').projectShape;
require('./preview.scss');
@ -113,7 +112,7 @@ const PreviewPresentation = ({
<a href={`/users/${projectInfo.author.username}`}>
<Avatar
alt={projectInfo.author.username}
src={thumbnailUrl(projectInfo.author.id, 48)}
src={`https://cdn2.scratch.mit.edu/get_image/user/${projectInfo.author.id}_48x48.png`}
/>
</a>
<div className="title">

View file

@ -3,7 +3,6 @@ const FormattedMessage = require('react-intl').FormattedMessage;
const FlexRow = require('../../components/flex-row/flex-row.jsx');
const Avatar = require('../../components/avatar/avatar.jsx');
const projectShape = require('./projectshape.jsx').projectShape;
const thumbnailUrl = require('../../lib/user-thumbnail');
const RemixCredit = props => {
const projectInfo = props.projectInfo;
@ -12,7 +11,7 @@ const RemixCredit = props => {
<FlexRow className="remix-credit">
<Avatar
className="remix"
src={thumbnailUrl(projectInfo.author.id, 48)}
src={`https://cdn2.scratch.mit.edu/get_image/user/${projectInfo.author.id}_48x48.png`}
/>
<div className="credit-text">
<FormattedMessage