Skip to content

Commit

Permalink
percent
Browse files Browse the repository at this point in the history
  • Loading branch information
SuQiang2007 committed Nov 27, 2023
1 parent 0b326d6 commit 006827f
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
14 changes: 10 additions & 4 deletions packages/client/assets/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,11 @@ System.register("chunks:///_virtual/loading.ts", ['./rollupPluginModLoBabelHelpe
this.progressBar.progress = 0;
}

ponzi_controller.instance.on(ccc_msg.update_loading_percentage, this.setProgress.bind(this));
var self = this;
ponzi_controller.instance.on(ccc_msg.update_loading_percentage, function (_ref) {
var percent = _ref.percent;
self.setProgress(percent);
});
} // 外界传入百分比,并更新进度条
;

Expand Down Expand Up @@ -6289,9 +6293,11 @@ System.register("chunks:///_virtual/ponzi-controller.ts", ['./rollupPluginModLoB
};

_proto.onSyncProgressUpdate = function onSyncProgressUpdate(values) {
console.error("onSyncProgressUpdate:", values);
var percentage = values.percentage;
ponzi_controller.instance.sendCCCMsg(ccc_msg.update_loading_percentage, percentage); // if(percentage >= 1){
console.log("onSyncProgressUpdate:", values);
var percent = values.percentage;
ponzi_controller.instance.sendCCCMsg(ccc_msg.update_loading_percentage, {
percent: percent
}); // if(percentage >= 1){
// }
};

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/client/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


<link rel="icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApZiTOaCWjpytpqDVt7Kq77ayrfCwpKLWoZePnqWZlDwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAppyUmbu0r//k4eD/+Pj5//T09P/z8/T/9fX1/+Tj4f+8trH/ppyWngAAAAAAAAAAAAAAAAAAAAAAAAAAqqKewdLPzP///////f///5SNhv+Xjoj/n5aP/6aemf/4+fr//////9XSz/+tpJ7IAAAAAAAAAAAAAAAAsKijmdnW1f///////Pv8/4uBev+Lgnv/0s/M/8vGw/+EeHH/k4iD//X19f//////3NnY/7CnoqMAAAAAt7GrK87Kxv//////9vb2/4l/eP+gmpT/////////////////8fDw/5SKhP+cko7/8/Ly///////Qy8j/ua+qM7+5tJ3t7Ov//////7awrP9lWVD/8PDv///////09PT/9fX1//////+/u7f/a15W/6ihnf/+/v7/8/Ly/8C6tafPzcjc+vr7//////+noJv/pZ6Y///////4+Pj/9vb2//b29v//////1dLQ/25iWf+up6L/+/v8//7////Rz8ng2tbU9v7/////////qKCb/7Cqpf//////+Pj4//f39//39/f///////Py8v+FenP/y8bE///////8/f7/29jY9d7b2vX//////////7iyrv9+cmr/8fDv///////4+Pj/+Pj4///////d2tn/g3dw/9nW1P///////v///+Dd2/Xf393a/v7+//r6+v/19PT/qaGc/7Krpv//////+vr6//7+/v/9/f3/joV9/4F1bf/u7e3///////7+/v/j4Nvf39zXmvn4+P/8/Pz///////38/P+qopz/5uTj////////////vri0/3xwZ//Iw8D/+/v7///////6+fn/3tvbpN7e1yfx7+////////r6+v//////5uTi/8nEwP//////6Obk/4d8c//b2NX///////v7+///////8fDw/97Z2S8AAAAA6Obkkvz8+////////Pz8///////p5+b/8fDv/62knv/NyMX//////////////////Pz8/+jm5Z0AAAAAAAAAAAAAAADu7uq6/v7+/////////////////8jCvv/JxMD//////////////////v7+/+/s7MAAAAAAAAAAAAAAAAAAAAAAAAAAAPLy8pD7+/v///////z8/P/m5OL//////////////////Pv7//Pz8ZYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9PT0Mfn5+JP6+vrQ/Pz87/z8/O/7+/vS+Pj4lvX19TUAAAAAAAAAAAAAAAAAAAAA8A8AAOAHAADAAwAAgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAMADAADgBwAA8A8AAA=="/>
<script type="module" crossorigin src="/assets/index-7b9cb951.js"></script>
<script type="module" crossorigin src="/assets/index-58a95187.js"></script>
<link rel="stylesheet" href="/assets/index-922bc049.css">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ components.GameState.update$.subscribe((update) => {
// Update initial sync status in the UI
components.SyncProgress.update$.subscribe((obj) => {
console.log("onSyncProgressUpdate:",obj);
globalThis.ponzi.percentage = obj.value[0].percentage/100;
globalThis.ponzi.percentage = obj.value[0].percentage;
globalThis.ponzi.syncprogress_update?.(globalThis.ponzi.percentage);
});

Expand Down

0 comments on commit 006827f

Please sign in to comment.