Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from maotovisk/dev
Browse files Browse the repository at this point in the history
0.0.6
  • Loading branch information
maotovisk authored Jun 30, 2023
2 parents 2f06ef9 + 68bf138 commit 76815b3
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 104 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hitsound-copier",
"private": true,
"version": "0.0.5",
"version": "0.0.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hitsound-copier"
version = "0.0.5"
version = "0.0.6"
description = "A osu! mapping toolbox made in TS with tauri"
authors = ["maotovisk"]
license = ""
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "hitsound-copier",
"version": "0.0.5"
"version": "0.0.6"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -69,7 +69,7 @@
"fullscreen": false,
"resizable": true,
"title": "Hitsound Copier",
"decorations": false,
"decorations": true,
"transparent": true,
"width": 1280,
"height": 720
Expand Down
20 changes: 12 additions & 8 deletions src/view/App.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<script lang="ts">
import { Route, Router } from "svelte-routing";
import HeaderBar from "./lib/HeaderBar.svelte";
import SideBar from "./lib/SideBar.svelte";
import HitsoundCopier from "./tabs/HitsoundCopier.svelte";
import Changelog from "./tabs/Changelog.svelte";
import { onMount, setContext, tick } from "svelte";
onMount(async () => {
await ui("theme", "#c43b80");
});
</script>

<HeaderBar />
<SideBar />
<main class="surface responsive max">
<Router>
<Route path="/">
<Router>
<SideBar />
<main class="surface responsive max">
<Route path="/home">
<Changelog />
</Route>
<Route path="/hs-copier">
<HitsoundCopier />
</Route>
</Router>
</main>
<Route path="/settings" />
</main>
</Router>
62 changes: 24 additions & 38 deletions src/view/lib/FileInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,46 +71,32 @@
export { isUnique, selected, defaultFilePath, textLabel };
</script>

{#if selected.length <= 1}
<div class="row">
<div class="field label max">
<input type="text" bind:value={selected[0]} />
<label>{textLabel}</label>
</div>
<button class="transparent circle" on:click={selectFrom}>
<i>file_open</i>
</button>
</div>
{:else}
<div class="row">
<span>{textLabel}</span>
<div class="row middle-align">
<div class="field label max">
<input type="text" bind:value={selected[0]} />
<label>{textLabel}</label>
</div>
{#if !isUnique}
<strong>Selected {selected.length} file(s)</strong>
{/if}
<button class="transparent circle" on:click={selectFrom}>
<i>file_open</i>
</button>
</div>
{#if selected.length > 1}
{#each selected as selected_file, i}
<div class="row">
<div class="field max">
<input type="text" bind:value={selected[i]} />
{#if i > 0}
<div class="row">
<div class="field max">
<input type="text" bind:value={selected[i]} />
</div>
<button
class="transparent circle"
on:click={() => removeFromList(selected_file)}
>
<i>close</i>
</button>
</div>
<button
class="transparent circle"
on:click={() => removeFromList(selected_file)}
>
<i>close</i>
</button>
</div>
{/each}
{/if}

{#if selected.length > 0 && !isUnique}
<div class="row">
<span>Selected {selected.length} file(s)</span>
{#if selected.length > 1}
<div class="max" />
<button class="circle extra" on:click={appendToSelection}>
<i>add</i>
</button>
{/if}
</div>
{/each}
{/if}

<style>
</style>
25 changes: 1 addition & 24 deletions src/view/lib/HeaderBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
const openNav = () => {
ui("#nav-main");
};
onMount(async () => {
await ui("theme", "#c43b80");
appVersion = await getVersion();
maximized = await appWindow.isMaximized();
});
</script>

<header class="fixed top surface-variant">
Expand All @@ -30,23 +23,7 @@

<div class="max" />
<div class="button-bar">
<button on:click={appWindow.minimize} class="circle transparent">
<img width="10px" alt="minimize" src="/window-icons/minimize.svg" />
</button>
{#if maximized}
<button on:click={appWindow.unmaximize} class="circle transparent">
<img
width="10px"
alt="unmaximize"
src="/window-icons/unmaximize.svg"
/>
</button>
{:else}
<button on:click={appWindow.maximize} class="circle transparent">
<img width="10px" alt="maximize" src="/window-icons/maximize.svg" />
</button>
{/if}
<button on:click={appWindow.close} class="circle transparent">
<button class="circle transparent">
<img width="10px" alt="close" src="/window-icons/close.svg" />
</button>
</div>
Expand Down
48 changes: 27 additions & 21 deletions src/view/lib/SideBar.svelte
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
<script>
import { link } from "svelte-routing";
<script lang="ts">
import { Link } from "svelte-routing";
const closeNav = () => {
ui("#nav-main");
let currentUrl = "";
const updateUrl = (toRoute: string) => {
currentUrl = toRoute;
};
</script>

<dialog class="left surface" id="nav-main">
<header class="fixed">
<nav>
<button class="transparent circle large" on:click={closeNav}>
<i>close</i>
</button>
</nav>
</header>
<a use:link let:active class="row round" href="/" on:click={closeNav}>
<nav class="m l left secondary">
<header class="fixed" />
<Link
class="row round {currentUrl.includes('/home') ? 'active' : ''}"
to="/home"
on:click={() => updateUrl("/home")}
>
<i>home</i>
<span>Start</span>
</a>
<a use:link class="row round" href="/hs-copier" on:click={closeNav}>
</Link>
<Link
class="row round {currentUrl.includes('/hs-copier') ? 'active' : ''}"
to="/hs-copier"
on:click={() => updateUrl("/hs-copier")}
>
<i>file_copy</i>
<span>Hitsound Copier</span>
</a>
<div class="small-divider" />
<div class="row">Settings</div>
<a a use:link class="row round" href="/settings" on:click={closeNav}>
</Link>
<Link
class="row round {currentUrl.includes('/settings') ? 'active' : ''}"
to="/settings"
on:click={() => updateUrl("/settings")}
>
<i>settings</i>
<span>Settings</span>
</a>
</dialog>
</Link>
</nav>
7 changes: 4 additions & 3 deletions src/view/tabs/Changelog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
let request = await fetch(
"https://api.github.com/repos/maotovisk/hitsound-copier/releases"
);
releases = await request.json();
});
</script>

<div class="padding">
<h6>News</h6>
<h6>Latest updates</h6>
<div class="small-divider" />
{#if releases && Array.isArray(releases)}
{#each releases as release}
Expand All @@ -35,11 +34,13 @@
<p class="padding">
<SvelteMarkdown
source={release.body}
renderers={{ heading: Handler }}
renderers={{ heading: Handler, link: Handler }}
/>
</p>
</details>
</article>
{/each}
{:else}
<div class="row center-align middle-align"><a class="loader" /></div>
{/if}
</div>
10 changes: 5 additions & 5 deletions src/view/tabs/HitsoundCopier.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<div class="field middle-align max">
<nav>
<div class="max">
<span>Remove muting</span>
<strong>Remove muting</strong>
<div>Removes the 5% volume greenlines</div>
</div>
<label class="switch">
Expand All @@ -101,7 +101,7 @@
<div class="field middle-align max">
<nav>
<div class="max">
<span>Copy sampleset changes</span>
<strong>Copy sampleset changes</strong>
<div>Copy all the sampleset changes in greenlines</div>
</div>
<label class="switch">
Expand All @@ -115,7 +115,7 @@
<div class="field middle-align max">
<nav>
<div class="max">
<span>Copy volumes changes</span>
<strong>Copy volumes changes</strong>
<div>Copy all the volumes changes in greenlines</div>
</div>
<label class="switch">
Expand All @@ -129,7 +129,7 @@
<div class="field middle-align max">
<nav>
<div class="max">
<span>Ovewrite all hitsounds</span>
<strong>Ovewrite all hitsounds</strong>
<div>
All hitsounds not defined in the origin beatmap will also be not
defined in the target
Expand All @@ -146,7 +146,7 @@
<div class="field middle-align max">
<nav>
<div class="max">
<span>Timing threshould</span>
<strong>Timing threshould</strong>
<div>
Current threshould: {timingThresholdOption}ms
</div>
Expand Down

0 comments on commit 76815b3

Please sign in to comment.