diff --git a/package.json b/package.json index c2ee1f7..7d70160 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vxfetch", "private": true, - "version": "1.0.0", + "version": "1.1.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 17f05f5..3131435 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4360,7 +4360,7 @@ dependencies = [ [[package]] name = "vxfetch" -version = "0.0.0" +version = "1.1.0" dependencies = [ "open", "reqwest", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 25a083e..ee87a17 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vxfetch" -version = "0.0.0" +version = "1.1.0" description = "a gui for vx-underground.org" authors = ["imyanice"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index b8b7997..6fb80a5 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/tooling/cli/schema.json", "productName": "vxfetch", - "version": "1.0.0", + "version": "1.1.0", "identifier": "me.yanice.vxfetch", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src/App.tsx b/src/App.tsx index e5ab4b5..5a9a820 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,8 +8,6 @@ import fileImage from './assets/fileImage.png' import { family } from '@tauri-apps/plugin-os' import { Menu, MenuItem, PredefinedMenuItem } from '@tauri-apps/api/menu' import libraryImage from './assets/libraryImage.png' -import { getCurrent } from '@tauri-apps/api/webview' -import { register } from '@tauri-apps/plugin-global-shortcut' interface Topic { item: { @@ -31,7 +29,6 @@ function App() { const [currentDir, setCurrentDir] = useState('.vxfetch/') const [tasks, setTasks] = useState([]) const [dummy, setDummy] = useState('') - const [zoom, setZoom] = useState(1) let slash: '/' | '\\' = '/' function onChange(e: ChangeEvent) { @@ -79,7 +76,7 @@ function App() { }, []) useEffect(() => { - console.log(currentDir.replaceAll("vxfetch", "").replaceAll("/", "")) + console.log(currentDir.replaceAll('vxfetch', '').replaceAll('/', '')) try { readDir(currentDir.replaceAll('/', slash), { baseDir: BaseDirectory.Home }).then((dir) => { let newFiles = dir.map((entry) => ({ @@ -100,52 +97,51 @@ function App() {
- { completions.length > 1 ? ( + {completions.length > 1 ? (
- { completions.map((completion, index) => ( -
download(index) }> - { completion.item.topic } + {completions.map((completion, index) => ( +
download(index)}> + {completion.item.topic}
- )) } + ))}
) : ( <> - ) } + )}
- { files.length > 0 && currentDir.replaceAll("vxfetch", "").replaceAll("/", "").replaceAll(".", "") !== "" ? ( + {files.length > 0 && currentDir.replaceAll('vxfetch', '').replaceAll('/', '').replaceAll('.', '') !== '' ? ( currentDir.split('/').map( (path) => path !== '' && ( ), ) ) : ( <> - ) } + )}
-
- { files.length > 0 ? ( +
+ {files.length > 0 ? ( files.map((file) => file.name !== '.DS_Store' && file.name !== 'config.toml' ? (
{ + onContextMenu={async (e: React.MouseEvent) => { e.preventDefault() let filePath = currentDir.replaceAll('.vxfetch', '').replaceAll('/', slash) + slash + file.name const menuItems = await Promise.all([ @@ -186,18 +182,17 @@ function App() { }) await menu.popup() - } } - onClick={ () => { + }} + onClick={() => { if (file.isDir) { setCurrentDir(currentDir + slash + file.name) return } invoke('open_file', { file: currentDir.replace('.vxfetch/', '').replaceAll('/', slash) + slash + file.name }) - } }> - folder icon + }}> + folder icon - { file.name.includes(' ') ? file.name : - file.name.length > 15 ? file.name.substring(0, 15) + '...' : file.name } + {file.name.includes(' ') ? file.name : file.name.length > 15 ? file.name.substring(0, 15) + '...' : file.name}
) : ( @@ -206,17 +201,20 @@ function App() { ) ) : ( <> - ) } + )}
- { files.length <= 0 ? ( -
- - Empty Library -
) : <>} + {files.length <= 0 ? ( +
+ + Empty Library +
+ ) : ( + <> + )}
- { tasks.length > 0 ? ( + {tasks.length > 0 ? (
- {tasks.map((task) => ( + {tasks.map((task) => ( <> Downloading: {task}