Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ const initialSong: SongFormData = {
key: '',
language: '',
publisher: '',
publicDomain: false,
subtitle: '',
tags: [],
title: '',
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"email": "E-Mail",
"key": "Tonart",
"language": "Sprache",
"licenseType": "Lizenztyp",
"newPassword": "Neues Passwort",
"note": "Notiz",
"password": "Passwort",
Expand Down Expand Up @@ -147,7 +148,9 @@
"dark": "Dunkel",
"light": "Hell",
"private": "Privat",
"public": "Öffentlich"
"protected": "Geschützt",
"public": "Öffentlich",
"publicDomain": "Gemeinfrei"
},
"page": {
"account": "Mein Benutzerkonto",
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"email": "Email",
"key": "Key",
"language": "Language",
"licenseType": "License type",
"newPassword": "New Password",
"note": "Note",
"password": "Password",
Expand Down Expand Up @@ -147,7 +148,9 @@
"dark": "Dark",
"light": "Light",
"private": "Private",
"public": "Public"
"protected": "Protected",
"public": "Public",
"publicDomain": "Public domain"
},
"page": {
"account": "My user account",
Expand Down
31 changes: 21 additions & 10 deletions frontend/src/modals/SongSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,26 @@
>
</label>
</div>
<!-- publisher -->
<label class="flex flex-col gap-1">
<div>{{ t('field.publisher') }}</div>
<textarea
v-model="song.publisher"
class="text-sm"
:placeholder="t('placeholder.exampleSongPublisher')"
rows="2"
></textarea>
</label>
<div class="grid grid-cols-2/1 gap-4">
<!-- publisher -->
<label class="flex flex-col gap-1">
<div>{{ t('field.publisher') }}</div>
<textarea
v-model="song.publisher"
class="text-sm"
:placeholder="t('placeholder.exampleSongPublisher')"
rows="2"
></textarea>
</label>
<!-- license type -->
<label class="flex flex-col gap-1">
<div>{{ t('field.licenseType') }}</div>
<select v-model="song.publicDomain">
<option :value="false">{{ t('option.protected') }}</option>
<option :value="true">{{ t('option.publicDomain') }}</option>
</select>
</label>
</div>
<!-- song translations -->
<label class="flex flex-col gap-2">
<div>{{ t('field.translations') }}</div>
Expand Down Expand Up @@ -351,6 +361,7 @@ const buildEntity = (slug: string): SongEntity => ({
createdBy: (props.existing ? props.initialSong.createdBy : user.value.id) ?? '',
key: song.value.key || undefined,
language: song.value.language,
publicDomain: song.value.publicDomain ?? false,
publisher: song.value.publisher,
slug,
subtitle: song.value.subtitle || undefined,
Expand Down
Loading