mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 23:24:35 +01:00
Better default config
Resources update Try to actually show news on startup
This commit is contained in:
@@ -120,7 +120,8 @@ pub fn unzip(
|
||||
res_hash.insert("file", zipfile.to_string());
|
||||
res_hash.insert("new_folder", new_dir);
|
||||
|
||||
window.emit("extract_end", &res_hash).unwrap();
|
||||
// Testing fix
|
||||
//window.emit("extract_end", &res_hash).unwrap();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -150,6 +151,8 @@ fn extract_rar(rarfile: &str, _f: &File, full_path: &path::Path, _top_level: boo
|
||||
fn extract_zip(_zipfile: &str, f: &File, full_path: &path::Path, top_level: bool) -> bool {
|
||||
match zip_extract::extract(f, full_path, top_level) {
|
||||
Ok(_) => {
|
||||
// Notify extract end when extract is actually complete
|
||||
window.emit("extract_end", &res_hash).unwrap();
|
||||
println!(
|
||||
"Extracted zip file to: {}",
|
||||
full_path.to_str().unwrap_or("Error")
|
||||
|
||||
@@ -17,7 +17,7 @@ const STABLE_REPO_DOWNLOAD = 'https://github.com/Grasscutters/Grasscutter/archiv
|
||||
const DEV_REPO_DOWNLOAD = 'https://github.com/Grasscutters/Grasscutter/archive/refs/heads/development.zip'
|
||||
const STABLE_DOWNLOAD = 'https://nightly.link/Grasscutters/Grasscutter/workflows/build/stable/Grasscutter.zip'
|
||||
const DEV_DOWNLOAD = 'https://nightly.link/Grasscutters/Grasscutter/workflows/build/development/Grasscutter.zip'
|
||||
const RESOURCES_DOWNLOAD = 'https://git.crepe.moe/grasscutters/Grasscutter_Resources/-/blob/main/Grasscutter_Resources-3.3.zip'
|
||||
const RESOURCES_DOWNLOAD = 'https://gitlab.com/YuukiPS/GC-Resources/-/archive/3.4/GC-Resources-3.4.zip' // Use Yuuki res as grasscutter crepe res are broken
|
||||
|
||||
interface IProps {
|
||||
closeFn: () => void
|
||||
|
||||
@@ -60,7 +60,10 @@ export default class NewsSection extends React.Component<IProps, IState> {
|
||||
|
||||
async showLatestCommits() {
|
||||
if (!this.state.commitList) {
|
||||
const response: string = await invoke('req_get', { url: 'https://api.grasscutter.io/cultivation/query' })
|
||||
// Just use official API
|
||||
const response: string = await invoke('req_get', {
|
||||
url: 'https://api.github.com/repos/Grasscutters/Grasscutter/commits',
|
||||
})
|
||||
let grasscutterApiResponse: GrasscutterAPIResponse | null = null
|
||||
|
||||
try {
|
||||
@@ -71,7 +74,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
|
||||
|
||||
let commits: CommitResponse[]
|
||||
if (grasscutterApiResponse?.commits == null) {
|
||||
// If it didn't work, use official API
|
||||
// If it didn't work, try again anyways
|
||||
const response: string = await invoke('req_get', {
|
||||
url: 'https://api.github.com/repos/Grasscutters/Grasscutter/commits',
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ let configFilePath: string
|
||||
let defaultConfig: Configuration
|
||||
;(async () => {
|
||||
defaultConfig = {
|
||||
toggle_grasscutter: false,
|
||||
toggle_grasscutter: true,
|
||||
game_install_path: 'C:\\Program Files\\Genshin Impact\\Genshin Impact game\\GenshinImpact.exe',
|
||||
grasscutter_with_game: false,
|
||||
grasscutter_path: '',
|
||||
@@ -20,7 +20,7 @@ let defaultConfig: Configuration
|
||||
theme: 'default',
|
||||
https_enabled: false,
|
||||
debug_enabled: false,
|
||||
patch_metadata: true,
|
||||
patch_metadata: false,
|
||||
use_internal_proxy: true,
|
||||
wipe_login: false,
|
||||
horny_mode: false,
|
||||
|
||||
Reference in New Issue
Block a user