Skip to content

Commit be808e5

Browse files
committed
feat: support saving the entire bitrate graph #2
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
1 parent b1c8378 commit be808e5

File tree

5 files changed

+322
-17
lines changed

5 files changed

+322
-17
lines changed

src-tauri/Cargo.lock

+179-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bitrate-visualizer"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "Visualize the bitrate distribution of a VBR audio file in realtime."
55
authors = ["charlie0129"]
66
license = "MIT"
@@ -15,7 +15,7 @@ tauri-build = { version = "1.2", features = [] }
1515
[dependencies]
1616
serde_json = "1.0"
1717
serde = { version = "1.0", features = ["derive"] }
18-
tauri = { version = "1.2", features = ["devtools", "protocol-asset", "shell-open", "shell-sidecar"] }
18+
tauri = { version = "1.2", features = ["devtools", "dialog-all", "fs-write-file", "protocol-asset", "shell-open", "shell-sidecar"] }
1919

2020
[features]
2121
# by default Tauri runs in production mode

src-tauri/tauri.conf.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
},
99
"package": {
1010
"productName": "Bitrate Visualizer",
11-
"version": "0.1.0"
11+
"version": "0.2.0"
1212
},
1313
"tauri": {
1414
"allowlist": {
1515
"all": false,
16+
"dialog": {
17+
"all": true
18+
},
1619
"shell": {
1720
"all": false,
1821
"open": true,
@@ -25,6 +28,9 @@
2528
}
2629
]
2730
},
31+
"fs": {
32+
"writeFile": true
33+
},
2834
"protocol": {
2935
"asset": true
3036
}
@@ -73,7 +79,7 @@
7379
"windows": [
7480
{
7581
"fullscreen": false,
76-
"height": 600,
82+
"height": 620,
7783
"resizable": false,
7884
"title": "Bitrate Visualizer",
7985
"width": 800

src/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<canvas id="bitrate_visual" class="graph"></canvas>
1414
<p id="audio_title">Drop an audio file here to get started!</p>
1515
<audio controls id="player"></audio>
16-
<p id="extra"></p>
16+
<p id="extra" style="font-size: small;">Tip: Ctrl+S or CMD+S to save the entire graph.</p>
17+
<canvas id="whole_song_visual" style="visibility: hidden;" width="0" height="0"></canvas>
1718
</body>
1819

1920
</html>

0 commit comments

Comments
 (0)