From 8ddba2502c7a93ae559ddd4a57979926f706e651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 20 Sep 2026 21:57:55 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9E=95=EF=B8=8F=20Add=20publicDomain=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/models.ts | 1 + frontend/src/App.vue | 3 ++- frontend/src/locales/de.json | 5 ++++- frontend/src/locales/en.json | 5 ++++- frontend/src/modals/SongSet.vue | 31 +++++++++++++++++++++---------- 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/backend/models.ts b/backend/models.ts index 9d1ebda..780ec79 100644 --- a/backend/models.ts +++ b/backend/models.ts @@ -5,6 +5,7 @@ export type SongEntity = { createdBy: string; // User id of the creator (new) key?: string; // Base key of the song (previously named 'tuning') language: string; // Language code, two letter iso + publicDomain?: boolean; // True if the song is public domain publisher: string; // Song publisher information slug: string; // Unique song url slug (previously named 'id') subtitle?: string; // Displayed song subtitle diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7b3d62f..a70ae3c 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -318,6 +318,7 @@ const initialSong: SongFormData = { key: '', language: '', publisher: '', + publicDomain: false, subtitle: '', tags: [], title: '', @@ -352,7 +353,7 @@ const createNewSong = () => { showModal.songset = true; }; const editExistingSong = ({data, id, exists}: { data: SongEntity, id: string, exists: boolean }) => { - songSetModalData.song = data; + songSetModalData.song = {...initialSong, ...data}; songSetModalData.existing = exists; songSetModalData.id = id; showModal.songset = true; diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index c3addf0..0ff1f27 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -90,6 +90,7 @@ "email": "E-Mail", "key": "Tonart", "language": "Sprache", + "licenseType": "Lizenztyp", "newPassword": "Neues Passwort", "note": "Notiz", "password": "Passwort", @@ -147,7 +148,9 @@ "dark": "Dunkel", "light": "Hell", "private": "Privat", - "public": "Öffentlich" + "protected": "Geschützt", + "public": "Öffentlich", + "publicDomain": "Gemeinfrei" }, "page": { "account": "Mein Benutzerkonto", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 0911d47..b104578 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -90,6 +90,7 @@ "email": "Email", "key": "Key", "language": "Language", + "licenseType": "License type", "newPassword": "New Password", "note": "Note", "password": "Password", @@ -147,7 +148,9 @@ "dark": "Dark", "light": "Light", "private": "Private", - "public": "Public" + "protected": "Protected", + "public": "Public", + "publicDomain": "Public domain" }, "page": { "account": "My user account", diff --git a/frontend/src/modals/SongSet.vue b/frontend/src/modals/SongSet.vue index 3558ac5..7f5f999 100644 --- a/frontend/src/modals/SongSet.vue +++ b/frontend/src/modals/SongSet.vue @@ -120,16 +120,26 @@ > - - +
+ + + + +