Skip to content

Commit f5f54b0

Browse files
committed
web fixes and remove timestamp from python generated file
1 parent 2d52388 commit f5f54b0

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

crates/tyx-version/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//! Automatically generated from Tauri configuration
22
33
///The version of TyX
4-
pub const VERSION: &str = "0.2.15";
4+
pub const VERSION: &str = "0.2.16";

python/src/tyx_schema/schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# generated by datamodel-codegen:
22
# filename: tyx.schema.json
3-
# timestamp: 2025-12-08T19:59:50+00:00
43

54
from __future__ import annotations
65

scripts/create-json-schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for (const [path, type, title] of [
3636

3737
const output = `python/src/tyx_schema/schema.py`
3838
execSync(
39-
`python/.venv/bin/datamodel-codegen --input-file-type jsonschema --input schemas/tyx.schema.json --output ${output} --output-model-type pydantic_v2.BaseModel --use-title-as-name --use-schema-description --skip-root-model`,
39+
`python/.venv/bin/datamodel-codegen --input-file-type jsonschema --input schemas/tyx.schema.json --output ${output} --output-model-type pydantic_v2.BaseModel --use-title-as-name --use-schema-description --skip-root-model --disable-timestamp`,
4040
)
4141
let result = readFileSync(output).toString()
4242
// TODO: fixes typing errors

src/backend/web.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ export const onSave = async () => {
107107

108108
export const onOpen = (filename?: string | undefined, content?: string) => {
109109
if (!content) {
110+
if (!filename) {
111+
open()
112+
}
110113
return
111114
}
112115

src/components/WelcomeScreen.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ const WelcomeScreen = () => {
5656
<CommandButton leftSection={<IconPlus />} command="fileNew">
5757
{t("newEmptyDocument")}
5858
</CommandButton>
59-
<CommandButton
60-
leftSection={<IconFileTextSpark />}
61-
command="fileNewFromTemplate"
62-
>
63-
{t("newFromTemplate")}
64-
</CommandButton>
59+
{!isWeb && (
60+
<CommandButton
61+
leftSection={<IconFileTextSpark />}
62+
command="fileNewFromTemplate"
63+
>
64+
{t("newFromTemplate")}
65+
</CommandButton>
66+
)}
6567
<CommandButton leftSection={<IconFolderOpen />} command="fileOpen">
6668
{t("openDocument")}
6769
</CommandButton>

0 commit comments

Comments
 (0)