Skip to content

Commit

Permalink
QOL Update (#18)
Browse files Browse the repository at this point in the history
- Icons are the same size
- buttons match each other more
- better card rendering (shows more of the name)
- game type designator (tells you whether a world is java or bedrock)
- updated tauri and tauri build versions
  • Loading branch information
JakePIXL committed Nov 10, 2023
1 parent 87d9f5a commit 7dfbbf1
Show file tree
Hide file tree
Showing 22 changed files with 733 additions and 523 deletions.
1,039 changes: 610 additions & 429 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Teller_Desktop is a Tauri application that serves as the ChunkVault App a user-f

While Teller and Teller_Desktop handle the backup process, [The Vault Backend](https://github.com/Valink-Solutions/vault) ensures secure storage of these world backups in the cloud.

# CommandBlock Library

The [CommandBlock](https://github.com/Valink-Solutions/commandblock) library is a rust library that provides functionality for parsing and executing Minecraft data such as NBT, LevelDB and more. It is used by Teller to parse Minecraft world data and extract the necessary information for backups. It is in development but its functionality is already being used by Teller.

# License

This project is licensed under the [GNU General Public License v3.0](LICENSE.txt).
Expand Down
2 changes: 1 addition & 1 deletion teller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "teller"
version = "0.2.1"
version = "0.2.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
5 changes: 5 additions & 0 deletions teller/src/handlers/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,11 @@ pub async fn parse_world_entry_data(path: PathBuf) -> Result<WorldData, String>
path: path.to_string_lossy().into_owned(),
size: world_size,
last_played: last_played,
game_type: match game_type {
GameType::Java => Some("Java".to_string()),
GameType::Bedrock => Some("Bedrock".to_string()),
GameType::None => Some("Unknown".to_string()),
},
};

Ok(world_data)
Expand Down
1 change: 1 addition & 0 deletions teller/src/types/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub struct WorldData {
pub path: String,
pub size: u64,
pub last_played: Option<NaiveDateTime>,
pub game_type: Option<String>,
}

#[allow(non_snake_case)]
Expand Down
Binary file removed teller_desktop/app-icon.png
Binary file not shown.
6 changes: 3 additions & 3 deletions teller_desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teller-desktop",
"version": "0.0.1",
"version": "0.2.2",
"private": true,
"scripts": {
"dev": "vite dev",
Expand All @@ -18,7 +18,7 @@
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/adapter-static": "1.0.0-next.50",
"@sveltejs/kit": "^1.25.0",
"@tauri-apps/cli": "^1.4.0",
"@tauri-apps/cli": "^1.5.6",
"@zerodevx/svelte-toast": "^0.9.5",
"autoprefixer": "^10.4.15",
"daisyui": "^3.7.5",
Expand All @@ -41,7 +41,7 @@
},
"type": "module",
"dependencies": {
"@tauri-apps/api": "^1.4.0",
"@tauri-apps/api": "^1.5.1",
"dayjs": "^1.11.9",
"sortablejs": "^1.15.0",
"svelte-modals": "^1.3.0"
Expand Down
76 changes: 38 additions & 38 deletions teller_desktop/pnpm-lock.yaml

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

6 changes: 3 additions & 3 deletions teller_desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "teller_desktop"
version = "0.2.1"
version = "0.2.2"
description = "Teller is a Minecraft world backup tool, for use with the ChunkVault ecosystem."
authors = ["Valink Solutions"]
license = ""
Expand All @@ -12,13 +12,13 @@ rust-version = "1.59"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.2.1", features = [] }
tauri-build = { version = "1.5", features = [] }

[dependencies]
serde_json = "1.0"
serde = { version = "1.0.183", features = ["derive"] }

tauri = { version = "1.4", features = [ "updater", "shell-all", "window-all", "dialog-all", "http-all", "fs-all"] }
tauri = { version = "1.5", features = [ "updater", "shell-all", "window-all", "dialog-all", "http-all", "fs-all"] }
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }

Expand Down
Binary file modified teller_desktop/src-tauri/icons/icon.icns
Binary file not shown.
2 changes: 1 addition & 1 deletion teller_desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "ChunkVault",
"version": "0.2.1"
"version": "0.2.2"
},
"tauri": {
"allowlist": {
Expand Down
30 changes: 17 additions & 13 deletions teller_desktop/src/lib/backup_list_item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,29 @@
/>
</figure>
<div class="flex flex-row gap-3 p-3 w-full justify-between items-center">
<div class="flex flex-row items-center justify-between gap-2">
<div class="w-56 xl:w-80 2xl:w-96">
<h2 class="font-bold w-full overflow-hidden overflow-ellipsis whitespace-nowrap">
{world.name}
</h2>
</div>
<div class="grid grid-cols-3 items-center justify-between gap-2 w-full">
<h2 class="font-bold w-full col-span-2 overflow-hidden overflow-ellipsis whitespace-nowrap">
{world.name}
</h2>

<span class="badge badge-primary badge-xs font-semibold whitespace-nowrap w-24"
>{formatBytes(world.size)}</span
>
<div class="flex flex-row gap-2">
{#if world.game_type}
<span class="badge badge-xs badge-ghost">{world.game_type}</span>
{/if}
<span
class="badge badge-primary justify-self-end badge-xs font-semibold whitespace-nowrap w-24"
>{formatBytes(world.size)}</span
>
</div>
</div>
<!-- <h2 class="card-title">world</h2>
<p>no backups</p> -->
<div class="card-actions justify-around items-center">
<div class="dropdown dropdown-end">
<div class="flex flex-row justify-around items-center gap-2">
<div class="dropdown dropdown-end top-0.5">
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-label-has-associated-control -->
<label tabindex="0" class="btn btn-xs text-lg btn-ghost">
<Icon icon="bx:dots-vertical" />
<label tabindex="0" class="btn btn-xs btn-square text-lg btn-ghost">
<Icon icon="mi:options-vertical" />
</label>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<ul
Expand Down
4 changes: 2 additions & 2 deletions teller_desktop/src/lib/directories_list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
<button
style="position: absolute; z-index: 1;"
on:click={() => deleteDirectory(category)}
class="btn btn-sm btn-error hover:bg-red-700 z-auto"
class="btn btn-sm btn-square btn-error hover:bg-red-700 z-auto"
>
<Icon icon="mdi:trash-can-outline" />
<Icon icon="mdi:trash-can-outline" class="h-5 w-5" />
</button>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
Expand Down
4 changes: 2 additions & 2 deletions teller_desktop/src/lib/local_vault_list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<div
class="flex flex-row gap-2 card items-center max-w-full h-fit odd:bg-slate-200 p-2 text-sm"
>
<button on:click={() => deleteDirectory(vault)} class="btn btn-sm btn-ghost">
<Icon icon="mdi:close-thick" />
<button on:click={() => deleteDirectory(vault)} class="btn btn-sm btn-ghost btn-square">
<Icon icon="mdi:close-thick" class="w-4 h-4" />
</button>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
Expand Down
17 changes: 14 additions & 3 deletions teller_desktop/src/lib/modals/settings_modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
class="card bg-slate-100 h-full w-full min-w-[25rem] max-w-[66.666667%] max-h-[85%] overflow-auto"
>
<div class="card-body gap-4">
<h2 class="card-title justify-center">Main Settings</h2>
<div class="grid grid-cols-3 items-center">
<h2 class="col-start-2 card-title justify-center">Main Settings</h2>
<span class="text-xs justify-self-end opacity-50">v0.2.2</span>
</div>
<div class="flex flex-col gap-2">
<h3 class="text-lg font-semibold">Instances</h3>
<p class="text-sm text-gray-500">Edit where the Minecraft saves are located.</p>
Expand Down Expand Up @@ -102,11 +105,19 @@
<Icon icon="simple-icons:kofi" class="h-6 w-6" />
</a>

<a href="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/Valink-Solutions/teller" target="_blank" class="btn btn-ghost btn-square">
<a
href="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/Valink-Solutions/teller"
target="_blank"
class="btn btn-ghost btn-square"
>
<Icon icon="mdi:github" class="h-6 w-6" />
</a>

<a href="https://discord.gg/k3yjVarAtA" target="_blank" class="btn btn-ghost btn-square">
<a
href="https://discord.gg/k3yjVarAtA"
target="_blank"
class="btn btn-ghost btn-square"
>
<Icon icon="mdi:discord" class="h-6 w-6" />
</a>

Expand Down
1 change: 1 addition & 0 deletions teller_desktop/src/lib/types/worlds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface WorldItem {
image: string;
size: number;
last_played: string | null;
game_type: string | null;
}

export interface WorldLevelData {
Expand Down
Loading

0 comments on commit 7dfbbf1

Please sign in to comment.