diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx
index 7d0cdb5f921..98d1c22bef9 100644
--- a/src/components/gui/gui.jsx
+++ b/src/components/gui/gui.jsx
@@ -542,13 +542,13 @@ GUIComponent.defaultProps = {
canChangeLanguage: true,
canChangeTheme: true,
canCreateNew: true,
- canEditTitle: true,
+ canEditTitle: false,
canManageFiles: true,
canRemix: false,
canSave: false,
canCreateCopy: false,
canShare: false,
- canUseCloud: false,
+ canUseCloud: true,
enableCommunity: false,
isCreating: false,
isShared: false,
diff --git a/src/components/menu-bar/menu-bar.jsx b/src/components/menu-bar/menu-bar.jsx
index ddedbd2a01c..1de50dc6282 100644
--- a/src/components/menu-bar/menu-bar.jsx
+++ b/src/components/menu-bar/menu-bar.jsx
@@ -973,14 +973,14 @@ class MenuBar extends React.Component {
{
waitForUpdate => (
- {
this.handleClickSeeCommunity(waitForUpdate);
}}
- /* eslint-enable react/jsx-no-bind */
- />
+ />*/
+ []
)
}
@@ -1019,10 +1019,10 @@ class MenuBar extends React.Component {
- ZeroCat
- 登录
+
+
- 加载中
+
diff --git a/src/lib/tw-project-meta-fetcher-hoc.jsx b/src/lib/tw-project-meta-fetcher-hoc.jsx
index 7f482de5b4a..4238cb9c0fe 100644
--- a/src/lib/tw-project-meta-fetcher-hoc.jsx
+++ b/src/lib/tw-project-meta-fetcher-hoc.jsx
@@ -8,7 +8,7 @@ import {setAuthor, setDescription} from '../reducers/tw';
export const fetchProjectMeta = async projectId => {
const urls = [
- `${process.env.APIHOST}/scratch/projectinfo2?id=${projectId}?token=${localStorage.getItem('token')}`];
+ `${process.env.APIHOST}/scratch/projectinfo2?id=${projectId}&token=${localStorage.getItem('token')}`];
let firstError;
for (const url of urls) {
try {
diff --git a/src/playground/index.ejs b/src/playground/index.ejs
index 45d4a9e1e44..0093fbab644 100644
--- a/src/playground/index.ejs
+++ b/src/playground/index.ejs
@@ -1,655 +1,697 @@
-
-
-
-
-
- <%= htmlWebpackPlugin.options.title %>
-
- <% if (htmlWebpackPlugin.options.root==="/" ||
- htmlWebpackPlugin.options.root==="" ) { %>
-
- <% } %>
-
-
-
-
-
-
-
-
-
-
+ .splash-error-list {
+ white-space: pre-wrap;
+ }
-
-
+ .splash-reset {
+ color: inherit;
+ background: none;
+ padding: 0;
+ margin: 0;
+ border: none;
+ text-decoration: underline;
+ cursor: pointer;
+ }
-
- 正在加载作品
- 数据文件从ZeroCat服务器加载,卡住请刷新
-
+ .splash-reset:disabled {
+ opacity: 0.8;
+ }
-
- 出问题了~
-
Please report
- with the information below.
+ .splash-pride-month {
+ max-width: 350px;
+ }
+
+
+
+
+
-
-
-
- 保存媒体库
- 清空log
- 强制保存作品
-
-
-
-
-
-
+
+
+ 保存媒体库
+ 清空log
+ 强制保存作品
+ 推送作品
+
+
+
+
+
+ 推送作品
+
+
+
-
-
+ if ((projectjson = vm.toJSON())) {
+ console.log("作品未修改");
+ snackbar('作品未修改')
+
+ logText.innerText += `[${getTime()}]作品未修改\n`;
+ return "作品未修改";
+ }
+ }
+ function pushproject() {
+ if (_pid != 0 && window.projectinfo.authorid == localStorage.getItem("zc:id")) {
+ topushbutton.disabled = true
+ console.log('开始保存作品')
+ saveproject()
+ console.log('开始推送作品')
+ $.ajax({
+ url:
+ `${window.apiHost}/project/${projectinfo.id}/push?token=${localStorage.getItem("token")}`,
+ type: "post",
+ success: function (result) {
+ console.log(result);
+ mdui.alert({
+ headline: "推送作品成功",
+ description: result.message||result.msg,
+ confirmText: "关闭",
+ });
+ },
+ error: function (err) {
+ console.log(err);
+ mdui.alert({
+ headline: "推送作品出错",
+ description: err,
+ confirmText: "关闭",
+ });
+ },
+ });
+ topushbutton.disabled = false
+
+ }
+
+ }
+ // 分叉作品
+ function forkproject() {
+ getprojectinfo();
+ if (
+ window.projectinfo.authorid == localStorage.getItem("zc:id")
+ ) {
+ console.log("作品作者是当前用户");
+ return "作品作者是当前用户";
+ }
+ if (!localStorage.getItem("zc:id")) {
+ console.log("你登录了吗");
+ return "你登录了吗";
+ }
+ if (
+ window.projectinfo.authorid != localStorage.getItem("zc:id")
+ ) {
+ console.log("处理改编");
+ $.ajax({
+ url:
+ window.apiHost +
+ "/scratch/projects?token=" +
+ localStorage.getItem("token"),
+ type: "POST",
+ data: { work: vm.toJSON() },
+ success: function (result) {
+ console.log("上传作品成功");
+ console.log(result);
+ location.href = "/editor.html#" + result.id;
+ location.reload();
+ },
+ error: function (err) {
+ console.log(err);
+ },
+ });
+ }
+ }
+
+
+
+