Skip to content

Commit

Permalink
✨ Tweaks
Browse files Browse the repository at this point in the history
- Text history changes
  • Loading branch information
vassbo committed Jul 18, 2024
1 parent a3ce289 commit 3309835
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 36 deletions.
Binary file modified public/import-logos/songbeamer.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion public/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"check_updates": "Look for updates",
"made": "Made in Norway by",
"more": "Please check out more of our applications at",
"report": "To report an issue or request a feature? Go to",
"report": "To report an issue or request a feature, go to",
"translate": "Want to help translate? Please head over to",
"mail": "Contact via email",
"support": "If you are grateful for this project, please consider supporting it",
Expand Down
44 changes: 36 additions & 8 deletions public/lang/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"search": "Søk",
"none": "Ingen",
"finished": "Fullført",
"open": "Åpne",
"system_open": "Vis i systemet"
},
"titlebar": {
Expand All @@ -29,9 +30,11 @@
"about": {
"check_updates": "Se etter oppdateringer",
"made": "Laget i Norge av",
"report": "Vil du rapportere en feil? Opprett en \"issue\" på GitHub",
"help": "Vil du hjelpe med å oversette eller foreslå en funksjon? Send en e-post til",
"support": "Støtt prosjektet?",
"more": "Sjekk ut flere av våre apper på",
"report": "For å rapportere en feil eller foreslå en funksjon, gå til",
"translate": "Vil du hjelpe med å oversette? Gå til",
"mail": "Kontakt via e-post",
"support": "Hvis du er takknemlig for dette prosjektet, vurder å støtte det",
"assets": "Ressurser brukt",
"libraries": "Biblioteker brukt",
"thanks": "Takk til",
Expand Down Expand Up @@ -117,7 +120,8 @@
"slide": "Fjern lysbilde",
"overlays": "Fjern overlegg",
"audio": "Fjern lyd",
"nextTimer": "Fjern tid til neste lysbilde"
"nextTimer": "Fjern tid til neste lysbilde",
"drawing": "Fjern tegning"
},
"remove": {
"background": "Fjern bakgrunn",
Expand Down Expand Up @@ -160,6 +164,8 @@
"recommended": "Anbefalt"
},
"audio": {
"settings": "Lydinnstillinger",
"mute_when_video_plays": "Demp når video spilles",
"metronome": "Metronom",
"toggle_metronome": "Veksle metronom",
"tempo": "Tempo",
Expand Down Expand Up @@ -227,7 +233,8 @@
"display": "Kunne ikke vise utgangsvindu på nåværende skjerm",
"keep_one_layout": "Du må ha minst ett oppsett",
"video_unavailable": "Er videoen utilgjengelig? Skaperen har slått av innebygging av videoen.",
"folder_exists": "Denne mappen eksisterer allerede"
"folder_exists": "Denne mappen eksisterer allerede",
"uri": "Kunne ikke lese navnet til lydfilen. Prøv å endre navnet"
},
"meta": {
"title": "Tittel",
Expand Down Expand Up @@ -277,6 +284,9 @@
"inputs": {
"name": "Navn",
"url": "URL",
"method": "Metode",
"contentType": "Innholdstype",
"payload": "Datalast",
"video_id": "Video ID/URL",
"close_ad": "Lukk annonse på utgangsskjermen",
"start": "Start",
Expand Down Expand Up @@ -388,7 +398,7 @@
"verse_undefined": "Verset {} eksisterer ikke i dette kapittelet.",
"recording_started": "Opptak startet!",
"recording_stopped": "Opptak stoppet!",
"starting_show": "Starter show",
"starting_action": "Starter handling",
"less_than_minute": "om mindre enn ett minutt.",
"less_than_seconds": "om mindre enn {} sekunder.",
"now": "nå!",
Expand Down Expand Up @@ -537,6 +547,7 @@
"delete_shows_not_indexed": "Slett show i 'Shows'-mappen som ikke er indeksert",
"delete_thumbnail_cache": "Slett hurtigbuffer med miniatyrbilder",
"open_log_file": "Åpne logg-fil",
"open_cache_folder": "Åpne mappe for hurtigbuffer",
"refresh_all_shows": "Finn alle show i 'Shows'-mappen",
"start_timer": "Start tidtaker",
"stop_timers": "Stopp pågående tidtakere",
Expand All @@ -562,6 +573,7 @@
"change_volume": "Endre volum",
"start_audio_stream": "Start lydstrøm",
"start_playlist": "Start lysbilde",
"playlist_next": "Neste låt i spilleliste",
"start_metronome": "Start metronom",
"start_slide_timers": "Start tidtakere på aktivt lysbilde",
"id_select_output_style": "Velg utgangsstil fra ID",
Expand All @@ -570,10 +582,15 @@
"change_variable": "Endre variabel",
"start_trigger": "Start utløser",
"run_action": "Kjør handling",
"toggle_action": "Veksle handling",
"send_rest_command": "Send HTTP-forespørsel",
"custom_activation": "Egendefinert aktivering",
"activate_on_startup": "Aktiver ved oppstart",
"activate_save": "Aktiver ved lagring",
"activate_slide_clicked": "Aktiver ved klikk på lysbilde",
"activate_video_starting": "Aktiver når video starter",
"activate_video_ending": "Aktiver når video slutter",
"activate_timer_ending": "Aktiver når tidtaker slutter",
"activate_scripture_start": "Aktiver når bibeltekst vises",
"activate_show_created": "Aktiver når show blir laget"
},
Expand Down Expand Up @@ -747,7 +764,8 @@
"max_events": "Maks hendelser",
"start_days_from_today": "Start på antall dager fra i dag",
"just_one_day": "Bare en dag",
"enable_start_date": "Aktiver startdato"
"enable_start_date": "Aktiver startdato",
"disable_navigation": "Deaktiver navigeringsknapper"
},
"items": {
"text": "Tekstboks",
Expand All @@ -765,6 +783,7 @@
"variable": "Variabel",
"web": "Nettside",
"visualizer": "Visualisering",
"captions": "Teksting",
"icon": "Ikon"
},
"borders": {
Expand Down Expand Up @@ -817,6 +836,13 @@
"analog": "Analog",
"seconds": "Sekunder"
},
"captions": {
"info": "Klikk på URL-en for å åpne i nettleseren din hvis du ikke allerede har gjort det, eller åpne den på en annen enhet! Sørg for å gi tilgang til mikrofonen din, og bruk Google Chrome for best ytelse.",
"language": "Språk for transkripsjon",
"translate": "Oversett til",
"showtime": "Varighet for visning",
"powered_by": "Drevet av"
},
"midi": {
"midi": "MIDI",
"activate": "Aktiver ved MIDI signal",
Expand Down Expand Up @@ -925,9 +951,11 @@
"full_colors": "Full farge på lysbildegruppe",
"auto_output": "Aktiver utgangsskjerm ved oppstart",
"hide_cursor_in_output": "Skjul peker i utgangsskjerm",
"clear_media_when_finished": "Fjern media ved slutt",
"disable_presenter_controller_keys": "Deaktiver knapper fra presentasjons-kontroller",
"default_project_name": "Standard prosjektnavn",
"audio_fade_duration": "Varighet for fjerning av lyd",
"audio_crossfade": "Krysstoning",
"max_auto_font_size": "Maks automatisk tekststørrelse",
"resolution": "Oppløsning",
"cropping": "Beskjæring",
Expand Down Expand Up @@ -986,7 +1014,7 @@
"calendar": {
"type": "Type",
"event": "Arrangement",
"show": "Planlegg show",
"schedule_action": "Planlegg handling",
"name": "Navn",
"color": "Farge",
"time": "Tid",
Expand Down
1 change: 1 addition & 0 deletions src/electron/data/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export const defaultSyncedSettings: { [key in SaveListSyncedSettings]: any } = {
verseNumbers: false,
showVersion: false,
showVerse: true,
referenceDivider: ":",
},
groups: defaultGroups,
midiIn: {},
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/components/drawer/bible/scripture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ export function getSlides({ bibles, sorted }) {
}

function addMeta({ showVersion, showVerse, customText }, range: string, { slideIndex, itemIndex }) {
const scriptureDivider = ":"
if (!bibles[0]) return

let lines: any[] = []
Expand All @@ -282,10 +281,11 @@ export function getSlides({ bibles, sorted }) {
let versions = bibles.map((a) => (a?.version || "").replace(/\([^)]*\)/g, "").trim()).join(" + ")
let books = removeDuplicates(bibles.map((a) => a.book)).join(" / ")

const referenceDivider = get(scriptureSettings).referenceDivider || ":"
let text = customText
if (!showVersion && !showVerse) return
if (showVersion) text = text.replaceAll(textKeys.showVersion, versions)
if (showVerse) text = text.replaceAll(textKeys.showVerse, books + " " + bibles[0].chapter + scriptureDivider + range)
if (showVerse) text = text.replaceAll(textKeys.showVerse, books + " " + bibles[0].chapter + referenceDivider + range)

text.split("\n").forEach((line) => {
lines.push({ text: [{ value: line, style: verseStyle }], align: alignStyle })
Expand Down
8 changes: 4 additions & 4 deletions src/frontend/components/drawer/info/ScriptureInfo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import type { Item, Show } from "../../../../types/Show"
import { ShowObj } from "../../../classes/Show"
import { activeProject, categories, drawerTabsData, outLocked, outputs, playScripture, scriptureSettings, templates } from "../../../stores"
import { customActionActivation } from "../../actions/actions"
import Icon from "../../helpers/Icon.svelte"
import T from "../../helpers/T.svelte"
import { removeDuplicates } from "../../helpers/array"
import { history } from "../../helpers/history"
import { getActiveOutputs, setOutput } from "../../helpers/output"
import { checkName } from "../../helpers/show"
Expand All @@ -19,8 +21,6 @@
import Textbox from "../../slide/Textbox.svelte"
import Zoomed from "../../slide/Zoomed.svelte"
import { getShortBibleName, getSlides, joinRange, textKeys } from "../bible/scripture"
import { customActionActivation } from "../../actions/actions"
import { removeDuplicates } from "../../helpers/array"
export let bibles: Bible[]
$: sorted = bibles[0]?.activeVerses?.sort((a, b) => Number(a) - Number(b)) || []
Expand Down Expand Up @@ -57,21 +57,21 @@
}
}
const scriptureDivider = ":"
function createSlides() {
if (!bibles[0]) return { show: null }
let books = removeDuplicates(bibles.map((a) => a.book)).join(" / ")
let slides2: any = {}
let layouts: any[] = []
const referenceDivider = $scriptureSettings.referenceDivider || ":"
slides.forEach((items: any, i: number) => {
let id = uid()
// get verse reference
let v = $scriptureSettings.versesPerSlide
let range: any[] = sorted.slice((i + 1) * v - v, (i + 1) * v)
let scriptureRef = books + " " + bibles[0].chapter + scriptureDivider + joinRange(range)
let scriptureRef = books + " " + bibles[0].chapter + referenceDivider + joinRange(range)
slides2[id] = { group: scriptureRef || "", color: null, settings: {}, notes: "", items }
let l: any = { id }
Expand Down
5 changes: 4 additions & 1 deletion src/frontend/components/drawer/live/Cameras.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import T from "../../helpers/T.svelte"
import Center from "../../system/Center.svelte"
import Cam from "./Cam.svelte"
import { sortByName } from "../../helpers/array"
let cams: any[] = []
navigator.mediaDevices?.enumerateDevices()?.then((devices) => {
if (!devices) return
cams = devices.filter((a) => a.kind === "videoinput").map((a) => ({ name: a.label, id: a.deviceId, group: a.groupId }))
let cameraList = devices.filter((a) => a.kind === "videoinput").map((a) => ({ name: a.label, id: a.deviceId, group: a.groupId }))
cams = sortByName(cameraList)
})
let dispatch = createEventDispatcher()
Expand Down
55 changes: 37 additions & 18 deletions src/frontend/components/drawer/media/Media.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -265,26 +265,32 @@
<div class="scroll" style="flex: 1;overflow-y: auto;" bind:this={scrollElem} on:wheel|passive={wheel}>
<div class="grid" class:list={$mediaOptions.mode === "list"} style="height: 100%;">
{#if active === "online" && (onlineTab === "youtube" || onlineTab === "vimeo")}
<PlayerVideos active={onlineTab} {searchValue} />
<div class="gridgap">
<PlayerVideos active={onlineTab} {searchValue} />
</div>
{:else if active === "screens"}
{#if screenTab === "screens"}
<Screens bind:streams />
{:else if screenTab === "ndi"}
<NDIStreams />
{:else}
<Windows bind:streams {searchValue} />
{/if}
<div class="gridgap">
{#if screenTab === "screens"}
<Screens bind:streams />
{:else if screenTab === "ndi"}
<NDIStreams />
{:else}
<Windows bind:streams {searchValue} />
{/if}
</div>
{:else if active === "cameras"}
<Cameras
on:click={({ detail }) => {
let e = detail.event
let cam = detail.cam

if ($outLocked || e.ctrlKey || e.metaKey) return
if (currentOutput.out?.background?.id === cam.id) clearBackground()
else setOutput("background", { name: cam.name, id: cam.id, cameraGroup: cam.cameraGroup, type: "camera" })
}}
/>
<div class="gridgap">
<Cameras
on:click={({ detail }) => {
let e = detail.event
let cam = detail.cam

if ($outLocked || e.ctrlKey || e.metaKey) return
if (currentOutput.out?.background?.id === cam.id) clearBackground()
else setOutput("background", { name: cam.name, id: cam.id, cameraGroup: cam.cameraGroup, type: "camera" })
}}
/>
</div>
{:else if fullFilteredFiles.length}
{#key fullFilteredFiles}
{#if $mediaOptions.mode === "grid"}
Expand Down Expand Up @@ -478,6 +484,19 @@
place-content: flex-start;
} */
.gridgap {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
padding: 5px;
width: 100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
}
.text {
opacity: 0.8;
text-align: center;
Expand Down
14 changes: 13 additions & 1 deletion src/frontend/components/edit/editbox/EditboxLines.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
else getStyle()
}
let HISTORY_UPDATE_KEY = 0
let updates: number = 0
function updateLines(newLines: Line[]) {
// updateItem = true
if (!newLines) newLines = getNewLines()
Expand All @@ -184,7 +186,17 @@
let lastChangedLine = EditboxHelper.determineCaretLine(item?.lines || [], newLines)
if (lastChangedLine > -1) setCaretDelayed(lastChangedLine, 0)
history({ id: "SHOW_ITEMS", newData: { key: "lines", data: clone([newLines]), slides: [ref.id], items: [index] }, location: { page: "none", override: ref.showId + ref.id + index } })
// create new history store, when passing 15 steps
updates++
if (updates >= 15) {
HISTORY_UPDATE_KEY++
updates = 0
}
let itemRef = ref.showId + ref.id + "_" + index + "_" + HISTORY_UPDATE_KEY
// WIP I guess this (undo/redo) is also controlled by the default text input method..
history({ id: "SHOW_ITEMS", newData: { key: "lines", data: clone([newLines]), slides: [ref.id], items: [index] }, location: { page: "none", override: itemRef } })
// refresh list view boxes
if (plain) refreshListBoxes.set(editIndex)
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const stageShows: Writable<StageShows> = writable({}) // {default}
// SCRIPTURE
export const scriptures: Writable<{ [key: string]: BibleCategories }> = writable({}) // {default}
export const scripturesCache: Writable<{ [key: string]: Bible }> = writable({}) // {}
export const scriptureSettings: Writable<any> = writable({ template: "scripture", versesPerSlide: 3, verseNumbers: false, showVersion: false, showVerse: true }) // {default}
export const scriptureSettings: Writable<any> = writable({ template: "scripture", versesPerSlide: 3, verseNumbers: false, showVersion: false, showVerse: true, referenceDivider: ":" }) // {default}
export const bibleApiKey: Writable<string> = writable("320b5b593fa790ced135a98861de51a9") // WIP ""

// DRAWER
Expand Down

0 comments on commit 3309835

Please sign in to comment.