Implement new GC API & rename to zipUtils

This commit is contained in:
KingRainbow44
2022-05-22 23:32:31 -04:00
parent 3554c98339
commit 8383fcfd1f
6 changed files with 15 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ import React from 'react'
import Tr from '../../../utils/language'
import './NewsSection.css'
import {base64Decode} from '../../../utils/string'
interface IProps {
selected?: string;
@@ -55,6 +56,9 @@ export default class NewsSection extends React.Component<IProps, IState> {
if (!obj.commits) {
const commits: string = await invoke('req_get', { url: 'https://api.github.com/repos/Grasscutters/Grasscutter/commits' })
obj = JSON.parse(commits)
} else {
const commitData = JSON.parse(base64Decode(obj.commits))
obj = commitData.gc_stable
}
// Probably rate-limited