This commit is contained in:
SpikeHD
2022-05-12 22:16:32 -07:00
parent 9085424eb6
commit 853ab1ea80
5 changed files with 4 additions and 9 deletions

View File

@@ -1,11 +1,7 @@
use lazy_static::lazy_static; use lazy_static::lazy_static;
use tauri::App;
use tauri::Manager;
use std::sync::Mutex; use std::sync::Mutex;
use std::cmp::min; use std::cmp::min;
use std::collections::HashMap;
use std::fs::File; use std::fs::File;
use std::io::Write; use std::io::Write;
@@ -14,7 +10,7 @@ use futures_util::StreamExt;
// This will create a downloads list that will be used to check if we should continue downloading the file // This will create a downloads list that will be used to check if we should continue downloading the file
lazy_static!{ lazy_static!{
static ref DOWNLOADS: Mutex<Vec<String>> = { static ref DOWNLOADS: Mutex<Vec<String>> = {
let mut m = Vec::new(); let m = Vec::new();
Mutex::new(m) Mutex::new(m)
}; };
} }

View File

@@ -9,7 +9,6 @@ import DownloadHandler from '../utils/download'
// Major Components // Major Components
import TopBar from './components/TopBar' import TopBar from './components/TopBar'
import ServerLaunchSection from './components/ServerLaunchSection' import ServerLaunchSection from './components/ServerLaunchSection'
import ProgressBar from './components/common/ProgressBar'
import MainProgressBar from './components/common/MainProgressBar' import MainProgressBar from './components/common/MainProgressBar'
import Options from './components/menu/Options' import Options from './components/menu/Options'
import MiniDialog from './components/MiniDialog' import MiniDialog from './components/MiniDialog'

View File

@@ -2,7 +2,7 @@ import React from 'react'
import Checkbox from './common/Checkbox' import Checkbox from './common/Checkbox'
import BigButton from './common/BigButton' import BigButton from './common/BigButton'
import { getConfig, saveConfig } from '../../utils/configuration' import { getConfig, saveConfig } from '../../utils/configuration'
import Tr, { translate } from '../../utils/language' import { translate } from '../../utils/language'
import { invoke } from '@tauri-apps/api/tauri' import { invoke } from '@tauri-apps/api/tauri'
import './ServerLaunchSection.css' import './ServerLaunchSection.css'

View File

@@ -1,4 +1,4 @@
import React, { RefObject } from 'react' import React from 'react'
import { open } from '@tauri-apps/api/dialog' import { open } from '@tauri-apps/api/dialog'
import TextInput from './TextInput' import TextInput from './TextInput'
import File from '../../../resources/icons/folder.svg' import File from '../../../resources/icons/folder.svg'

View File

@@ -30,7 +30,7 @@ export default class ProgressBar extends React.Component<IProps, IState> {
componentDidMount() { componentDidMount() {
// Periodically check the progress of passed file path // Periodically check the progress of passed file path
const intv = setInterval(() => { setInterval(() => {
const prog = this.props.downloadManager.getTotalAverage() const prog = this.props.downloadManager.getTotalAverage()
this.setState({ this.setState({
average: prog?.average || 0, average: prog?.average || 0,