Skip to content

Commit bfc544f

Browse files
committed
1
1 parent a64f7da commit bfc544f

File tree

12 files changed

+20
-20
lines changed

12 files changed

+20
-20
lines changed

.github/workflows/webpack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929

3030
- name: Build
3131
env:
32-
APIHOST: ${{ vars.APIHOST }}
33-
ASSETSHOST: ${{ vars.ASSETSHOST }}
32+
ZCAPIHOST: ${{ vars.ZCAPIHOST }}
33+
ZCASSETHOST: ${{ vars.ZCASSETHOST }}
3434
run: |
3535
npm install
3636
npm run build

src/components/menu-bar/author-info.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const AuthorInfo = ({projectId, ...props}) => (
5656
projectId ? (
5757
<a
5858
className={styles.link}
59-
href={`${process.env.APIHOST}/scratch/play?id=${projectId}`}
59+
href={`${process.env.ZCAPIHOST}/scratch/play?id=${projectId}`}
6060
target="_blank"
6161
rel="noreferrer"
6262
>

src/components/tw-description/description.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const Description = ({
4646
<div className={styles.description}>
4747
<div className={styles.projectLink}>
4848
<a
49-
href={`${ process.env.APIHOST}/scratch/play?id=${projectId}`}
49+
href={`${ process.env.ZCAPIHOST}/scratch/play?id=${projectId}`}
5050
target="_blank"
5151
rel="noreferrer"
5252
>

src/components/tw-featured-projects/featured-projects.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class FeaturedProjects extends React.Component {
7474
<a
7575
target="_blank"
7676
rel="noopener noreferrer"
77-
href={`${ process.env.APIHOST}/scratch/#${this.props.studio}`}
77+
href={`${ process.env.ZCAPIHOST}/scratch/#${this.props.studio}`}
7878
>
7979
<FormattedMessage
8080
defaultMessage="View studio on Scratch."

src/components/tw-project-input/project-input.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {defaultProjectId} from '../../reducers/project-state';
88
import styles from './project-input.css';
99
import {setProjectId} from '../../lib/tw-navigation-utils';
1010

11-
const PROJECT_BASE = process.env.APIHOST+'/scratch/play?id=';
11+
const PROJECT_BASE = process.env.ZCAPIHOST+'/scratch/play?id=';
1212

1313
const messages = defineMessages({
1414
tooltip: {

src/components/tw-studioview/studioview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,19 +298,19 @@ StudioView.prototype.onselect = function (id, el) { };
298298
StudioView.prototype.onpageload = function () { };
299299
StudioView.prototype.onend = function () { };
300300

301-
StudioView.STUDIO_API = process.env.APIHOST+'/scratch/view/getScratchProjects?curr=1&limit=$offset&type=new';
301+
StudioView.STUDIO_API = process.env.ZCAPIHOST+'/scratch/view/getScratchProjects?curr=1&limit=$offset&type=new';
302302

303303
// The URL to download thumbnails from.
304304
// $id is replaced with the project's ID.
305305
StudioView.THUMBNAIL_SRC = 'https://s4-1.wuyuan.1r.ink/scratch_slt/$id';
306306

307307
// The URL for project pages.
308308
// $id is replaced with the project ID.
309-
StudioView.PROJECT_PAGE = process.env.APIHOST+'/scratch/play?id=$id';
309+
StudioView.PROJECT_PAGE = process.env.ZCAPIHOST+'/scratch/play?id=$id';
310310

311311
// The URL for studio pages.
312312
// $id is replaced with the studio ID.
313-
StudioView.STUDIO_PAGE = process.env.APIHOST+'/scratch/$id';
313+
StudioView.STUDIO_PAGE = process.env.ZCAPIHOST+'/scratch/$id';
314314

315315
// The amount of "placeholders" to insert before the next page loads.
316316
StudioView.PLACEHOLDER_COUNT = 9;

src/lib/project-fetcher-hoc.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ const ProjectFetcherHOC = function (WrappedComponent) {
195195
vm: PropTypes.instanceOf(VM)
196196
};
197197
ProjectFetcherComponent.defaultProps = {
198-
assetHost: process.env.ASSETSHOST,
199-
projectHost: process.env.APIHOST
198+
assetHost: process.env.ZCASSETHOST,
199+
projectHost: process.env.ZCAPIHOST
200200
};
201201

202202
const mapStateToProps = state => ({

src/lib/save-project-to-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ export default function (projectId, vmState, params) {
3333
if (creatingProject) {
3434
Object.assign(opts, {
3535
method: 'post',
36-
url: `${process.env.APIHOST}/scratch/projects?&token=${localStorage.getItem('token')}`
36+
url: `${process.env.ZCAPIHOST}/scratch/projects?&token=${localStorage.getItem('token')}`
3737
});
3838
} else {
3939
Object.assign(opts, {
4040
method: 'put',
41-
url: `${process.env.APIHOST}/project/${projectId}/source?&token=${localStorage.getItem('token')}`
41+
url: `${process.env.ZCAPIHOST}/project/${projectId}/source?&token=${localStorage.getItem('token')}`
4242
});
4343
}
4444
return new Promise((resolve, reject) => {

src/lib/tw-project-meta-fetcher-hoc.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {setAuthor, setDescription} from '../reducers/tw';
88

99
export const fetchProjectMeta = async projectId => {
1010
const urls = [
11-
`${process.env.APIHOST}/scratch/projectinfo2?id=${projectId}&token=${localStorage.getItem('token')}`];
11+
`${process.env.ZCAPIHOST}/scratch/projectinfo2?id=${projectId}&token=${localStorage.getItem('token')}`];
1212
let firstError;
1313
for (const url of urls) {
1414
try {
@@ -68,7 +68,7 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
6868
this.props.onSetProjectTitle(title);
6969
}
7070
const authorName = data.author.username;
71-
const authorThumbnail = `${process.env.APIHOST}/api/usertx?id=${data.author.id}`;
71+
const authorThumbnail = `${process.env.ZCAPIHOST}/api/usertx?id=${data.author.id}`;
7272
this.props.onSetAuthor(authorName, authorThumbnail);
7373
const instructions = data.instructions || '';
7474
const credits = data.description || '';

src/playground/credits/users.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const shuffle = list => {
1010

1111
const fromHardcoded = ({userID = '0', username}) => {
1212
const result = {
13-
image: `${process.env.APIHOST}/api/usertx?id=${userID}`,
13+
image: `${process.env.ZCAPIHOST}/api/usertx?id=${userID}`,
1414
text: username
1515
};
1616
if (username && userID !== '0') {
17-
result.href = `${process.env.APIHOST}/user?id=${userID}`;
17+
result.href = `${process.env.ZCAPIHOST}/user?id=${userID}`;
1818
}
1919
return result;
2020
};

0 commit comments

Comments
 (0)