Skip to content

Commit ccee760

Browse files
authored
v1.3.0 - General fixes and stability improvements (#37)
* Fixes issue #30 * Adds code for right-click menu for TextEdit Does not work because TextEdit lacks Sense(click) Thought for issue #32 * Add tooltip for issue #31 * Fix wasm I/O (#36) * Fix loading a file * Fixes loading in wasm, adds downloading files (fixes issue #6) * Final touches for config. Closes #34 * Add survey, closes #35 * Add reset config if incompatible * Update changelog
1 parent 9f94ecc commit ccee760

File tree

15 files changed

+867
-305
lines changed

15 files changed

+867
-305
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
**/dist/*
44
.vscode/
55
**/*.wb
6+
.cargo/config.toml

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## [v1.3.0]
4+
5+
### Added
6+
- Feature Request #34: Save preferences
7+
- Feature Request #35: Add a survey pop-up
8+
9+
### Fixed
10+
- Issue #6: Uploading and downloading files in WASM
11+
- Issue #30: Letters cut-off by scrollbar
12+
- Issue #31: Composition help unclear
13+
- Issue #33: Explain that you cannot compose more than one library at a time
14+
315
## [v1.2.2]
416
### Added
517
- Help for the composition window
@@ -104,4 +116,4 @@
104116
- Fixed final state's instruction needing to be explicitly defined (#2)
105117

106118
## [v0.2.0] - 2022-11-21
107-
- Initial version
119+
- Initial version

Cargo.lock

Lines changed: 82 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "turing-machine"
3-
version = "1.2.2"
3+
version = "1.3.0"
44
edition = "2021"
55
authors = ["Marcos Gutiérrez Alonso <margual56@gmail.com>"]
66
description = "Turing Machine Simulator"
@@ -10,7 +10,6 @@ license = "GPL-2.0"
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
clap = { version = "^4.3", features = ["derive"] }
1413
pest = "^2.7"
1514
pest_derive = "^2.4"
1615
eframe = {version = "^0.22", features = ["wayland"]}
@@ -23,16 +22,22 @@ turing-lib = "^2.1"
2322
serde = {version = "^1.0", features = ["derive"]}
2423
serde_bytes = "0.11"
2524
bincode = "1.3"
26-
log = "^0.4"
27-
env_logger = "^0.10"
2825
sys-locale = "^0.3"
2926

3027
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
28+
toml = "0.7.6"
29+
directories = "^5.0"
30+
log = "^0.4"
31+
env_logger = "^0.10"
3132
tracing-subscriber = "0.3"
33+
clap = { version = "^4.3", features = ["derive"] }
3234
clap-verbosity-flag = "2.0.0"
35+
version = {git = "https://github.com/turing-marcos/rs-version.git", tag = "v0.1.2"}
3336

3437
# web:
3538
[target.'cfg(target_arch = "wasm32")'.dependencies]
39+
poll-promise = { version = "0.2.0", features = ["web"] }
40+
pollster = "0.3.0"
3641
console_error_panic_hook = "^0.1"
3742
tracing-wasm = "^0.2"
3843
wasm-bindgen = "^0.2"

assets/save_file.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

assets/utils.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export function downloadToFile(content, filename) {
2+
const a = document.createElement('a');
3+
const file = new Blob([content], { type: 'text/plain'});
4+
5+
a.href = URL.createObjectURL(file);
6+
a.download = filename;
7+
a.click();
8+
9+
URL.revokeObjectURL(a.href);
10+
};

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<link data-trunk rel="copy-file" href="assets/sw.js" />
2121
<link data-trunk rel="copy-file" href="assets/manifest.json" />
2222
<link data-trunk rel="copy-file" href="assets/icon.png" />
23-
<link data-trunk rel="copy-file" href="assets/save_file.js" />
2423

2524

2625
<link rel="manifest" href="manifest.json">

locales/main_window.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,22 @@
134134
"btn.close": {
135135
"en": "Close",
136136
"es": "Cerrar"
137+
},
138+
"window.title.survey": {
139+
"en": "Survey",
140+
"es": "Encuesta"
141+
},
142+
"window.link.survey": {
143+
"en": "Click here to open the survey",
144+
"es": "Haz clic aquí para abrir la encuesta"
145+
},
146+
"lbl.window.survey":{
147+
"en": "Please take a moment to fill out this survey to help us improve the app.",
148+
"es": "Por favor, tómate un momento para completar esta encuesta y ayudarnos a mejorar la aplicación."
149+
},
150+
"lbl.window.survey2": {
151+
"en": "It will only take a few minutes, I promise!",
152+
"es": "¡Sólo te llevará unos minutos, lo prometo!"
137153
}
138154
}
139-
155+

locales/windows/composition_window.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
"lbl.composition.help.txt": {
1919
"en": "Type `compose = { <library name> };` before the state definitions to use a library",
2020
"es": "Escribe `compose = { <nombre de la librería> };` antes de definir los estados para usar una librería"
21+
},
22+
"lbl.composition.warning": {
23+
"en": "WARNING: Composing more than one library will break all compositions.",
24+
"es": "ATENCIÓN: Componer más de una librería romperá todas las composiciones."
2125
}
22-
}
26+
}

0 commit comments

Comments
 (0)