Skip to content

Commit b91f000

Browse files
Copilotsensslen
andcommitted
Merge latest main branch changes with WebSocket implementation
Co-authored-by: sensslen <3428860+sensslen@users.noreply.github.com>
1 parent 72e2930 commit b91f000

File tree

21 files changed

+1102
-683
lines changed

21 files changed

+1102
-683
lines changed

.github/workflows/release.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+' # Trigger on semantic version tags like v1.0.0, v2.1.3, etc.
7+
- 'v[0-9]+.[0-9]+.[0-9]+-*' # Also support pre-release tags like v1.0.0-beta.1
8+
9+
jobs:
10+
build-and-release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # Required for creating releases and uploading assets
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v5
18+
19+
- name: Check version format
20+
uses: nowsprinting/check-version-format-action@v3
21+
id: version
22+
with:
23+
prefix: 'v'
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: '24'
29+
cache: 'npm'
30+
31+
- name: Update package.json version
32+
run: |
33+
npm version ${{ steps.version.outputs.full_without_prefix }} --no-git-tag-version
34+
echo "Updated package.json to version ${{ steps.version.outputs.full_without_prefix }}"
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Build project
40+
run: npm run build
41+
42+
- name: Verify build output
43+
run: |
44+
if [ ! -d "dist" ]; then
45+
echo "Error: dist directory not found after build"
46+
exit 1
47+
fi
48+
echo "Build output verified successfully"
49+
50+
- name: Create release archive
51+
run: |
52+
cd dist
53+
zip -r ../cgf-propresenter-nurserymessages-${{ steps.version.outputs.full_without_prefix }}.zip .
54+
cd ..
55+
56+
- name: Create GitHub Release
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
name: Release ${{ steps.version.outputs.full_without_prefix }}
60+
body: |
61+
## Release ${{ steps.version.outputs.full_without_prefix }}
62+
63+
### Download
64+
Download the attached `cgf-propresenter-nurserymessages-${{ steps.version.outputs.full_without_prefix }}.zip` file and extract it to your web server.
65+
66+
### Installation
67+
1. Download the zip file below
68+
2. Extract the contents to your web server directory
69+
3. Configure your web server to serve the files
70+
4. Access the application in your browser
71+
72+
See the [README](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/README.md) for more details.
73+
generate_release_notes: true
74+
draft: false
75+
prerelease: ${{ steps.version.outputs.is_stable != 'true' }}
76+
files: |
77+
cgf-propresenter-nurserymessages-${{ steps.version.outputs.full_without_prefix }}.zip
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update License Year
2+
3+
on:
4+
schedule:
5+
# Run on January 1st at 00:00 UTC every year
6+
- cron: '0 0 1 1 *'
7+
workflow_dispatch: # Allow manual trigger
8+
9+
jobs:
10+
update-license-year:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v5
19+
20+
- name: Get current year
21+
id: year
22+
run: echo "current=$(date +%Y)" >> $GITHUB_OUTPUT
23+
24+
- name: Update LICENSE file
25+
run: |
26+
CURRENT_YEAR=${{ steps.year.outputs.current }}
27+
PREVIOUS_YEAR=$((CURRENT_YEAR - 1))
28+
29+
# Update the copyright year in LICENSE file
30+
sed -i "s/Copyright (c) $PREVIOUS_YEAR/Copyright (c) $CURRENT_YEAR/g" LICENSE
31+
32+
- name: Check for changes
33+
id: changes
34+
run: |
35+
if git diff --quiet LICENSE; then
36+
echo "changed=false" >> $GITHUB_OUTPUT
37+
else
38+
echo "changed=true" >> $GITHUB_OUTPUT
39+
fi
40+
41+
- name: Create Pull Request
42+
if: steps.changes.outputs.changed == 'true'
43+
uses: peter-evans/create-pull-request@v7
44+
with:
45+
commit-message: Update license year to ${{ steps.year.outputs.current }}
46+
title: Update license year to ${{ steps.year.outputs.current }}
47+
body: |
48+
This automated PR updates the copyright year in the LICENSE file to ${{ steps.year.outputs.current }}.
49+
50+
This PR was automatically created by the Update License Year workflow.
51+
branch: automated/update-license-year-${{ steps.year.outputs.current }}
52+
delete-branch: true

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Simon Ensslen
3+
Copyright (c) 2025 Simon Ensslen
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This application provides a simple and effective way to display nursery messages
99
* **Fill in Message Tokens**: If a message contains tokens (e.g., for a child's name or number), you can easily fill them in before displaying the message.
1010
* **Real-time Updates via WebSocket**: The application automatically attempts to connect using WebSocket for instant, real-time message updates with minimal latency.
1111
* **Automatic Fallback to Polling**: If WebSocket connection is unavailable or fails, the application seamlessly falls back to polling mode, refreshing the message list every second.
12-
* **Localized Interface**: The user interface is available in both English and German.
12+
* **Localized Interface**: The user interface is available in multiple languages including English, German, Mandarin Chinese, Hindi, Spanish, French, Arabic, and Bengali. The application automatically detects your browser's language.
1313

1414
## How to Use
1515

@@ -22,25 +22,6 @@ This section is for end-users who will be operating the application.
2222
5. For any message, **fill in the required token values** in the provided input fields.
2323
6. Click the **"Show"** button to trigger the message in ProPresenter.
2424

25-
## Technical Details
26-
27-
### Connection Modes
28-
29-
The application uses two connection modes to ensure reliable communication with ProPresenter:
30-
31-
1. **WebSocket Mode (Primary)**:
32-
- Provides real-time, bi-directional communication with ProPresenter
33-
- Low latency updates when messages change
34-
- Automatically reconnects on disconnection (up to 3 attempts)
35-
- More efficient than polling, reducing network overhead
36-
37-
2. **Polling Mode (Fallback)**:
38-
- Used when WebSocket connection is unavailable or fails
39-
- Fetches message list every second via HTTP GET requests
40-
- Ensures the application remains functional even if WebSocket is not supported
41-
42-
The application automatically detects the best connection method and switches between them as needed, ensuring a seamless user experience.
43-
4425
## How to Run and Deploy for Developers
4526

4627
This section is for developers who want to run the application locally or deploy it to a web server.
@@ -75,6 +56,50 @@ To deploy this application, you first need to build the static assets.
7556
7657
Once you have your web server set up, configure it to serve the files from the `dist` directory.
7758
59+
## Technical Details
60+
61+
### Connection Modes
62+
63+
The application uses two connection modes to ensure reliable communication with ProPresenter:
64+
65+
1. **WebSocket Mode (Primary)**:
66+
- Provides real-time, bi-directional communication with ProPresenter
67+
- Low latency updates when messages change
68+
- Automatically reconnects on disconnection (up to 3 attempts)
69+
- More efficient than polling, reducing network overhead
70+
71+
2. **Polling Mode (Fallback)**:
72+
- Used when WebSocket connection is unavailable or fails
73+
- Fetches message list every second via HTTP GET requests
74+
- Ensures the application remains functional even if WebSocket is not supported
75+
76+
The application automatically detects the best connection method and switches between them as needed, ensuring a seamless user experience.
77+
78+
## Releases
79+
80+
This project uses automated releases via GitHub Actions. When a new version tag is pushed to the repository, the build pipeline automatically:
81+
82+
1. Builds the application
83+
2. Creates a release archive containing all static files
84+
3. Creates a GitHub Release with the version number
85+
4. Uploads the build artifacts to the release
86+
87+
### Creating a New Release
88+
89+
To create a new release, maintainers should:
90+
91+
1. Update the version number in `package.json` if needed
92+
2. Create and push a version tag:
93+
```bash
94+
git tag v1.0.0
95+
git push origin v1.0.0
96+
```
97+
3. The GitHub Actions workflow will automatically build and create the release
98+
99+
### Downloading Releases
100+
101+
Users can download pre-built releases from the [Releases page](https://github.com/sensslen/Cgf.ProPresenter.NurseryMessages/releases). Each release includes a ZIP file with all necessary files to deploy the application.
102+
78103
## License
79104
80105
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

locales/ar.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"app": {
3+
"loading": "جاري التحميل...",
4+
"enterProPresenterUrl": "أدخل الاتصال بـ ProPresenter"
5+
},
6+
"message-list": {
7+
"errors": {
8+
"failed-to-connect": "فشل الاتصال بـ ProPresenter. يرجى التحقق من معلومات الاتصال.",
9+
"unknown-error": "حدث خطأ غير متوقع: {{error}}.",
10+
"failed-to-show": "فشل في عرض الرسالة. يرجى المحاولة مرة أخرى.",
11+
"failed-to-hide": "فشل في إخفاء الرسالة. يرجى المحاولة مرة أخرى."
12+
},
13+
"success": {
14+
"message-shown": "تم عرض الرسالة بنجاح.",
15+
"message-shown-with-details": "الرسالة \"{{message}}\" معروضة الآن.",
16+
"message-hidden": "تم إخفاء الرسالة بنجاح."
17+
}
18+
},
19+
"message-item": {
20+
"formatted-message": "<description_format>رسالة منسقة:</description_format> <message_format>{{message}}</message_format>",
21+
"show": "عرض",
22+
"show-again": "عرض مرة أخرى",
23+
"hide": "إخفاء"
24+
},
25+
"footer": {
26+
"version": "الإصدار {{version}}"
27+
}
28+
}

locales/bn.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"app": {
3+
"loading": "লোড হচ্ছে...",
4+
"enterProPresenterUrl": "ProPresenter এর সাথে সংযোগ লিখুন"
5+
},
6+
"message-list": {
7+
"errors": {
8+
"failed-to-connect": "ProPresenter এর সাথে সংযোগ করতে ব্যর্থ হয়েছে। অনুগ্রহ করে সংযোগের তথ্য পরীক্ষা করুন।",
9+
"unknown-error": "একটি অপ্রত্যাশিত ত্রুটি ঘটেছে: {{error}}।",
10+
"failed-to-show": "বার্তা প্রদর্শন করতে ব্যর্থ হয়েছে। অনুগ্রহ করে আবার চেষ্টা করুন।",
11+
"failed-to-hide": "বার্তা লুকাতে ব্যর্থ হয়েছে। অনুগ্রহ করে আবার চেষ্টা করুন।"
12+
},
13+
"success": {
14+
"message-shown": "বার্তা সফলভাবে প্রদর্শিত হয়েছে।",
15+
"message-shown-with-details": "বার্তা \"{{message}}\" এখন প্রদর্শিত হয়েছে।",
16+
"message-hidden": "বার্তা সফলভাবে লুকানো হয়েছে।"
17+
}
18+
},
19+
"message-item": {
20+
"formatted-message": "<description_format>বিন্যাসিত বার্তা:</description_format> <message_format>{{message}}</message_format>",
21+
"show": "প্রদর্শন করুন",
22+
"show-again": "আবার প্রদর্শন করুন",
23+
"hide": "লুকান"
24+
},
25+
"footer": {
26+
"version": "সংস্করণ {{version}}"
27+
}
28+
}

locales/de.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@
77
"errors": {
88
"failed-to-connect": "Verbindung zu ProPresenter fehlgeschlagen. Bitte überprüfen Sie die Verbindungsinformation.",
99
"unknown-error": "Ein unerwarteter Fehler ist aufgetreten: {{error}}.",
10-
"failed-to-show": "Nachricht konnte nicht angezeigt werden. Bitte versuchen Sie es erneut."
10+
"failed-to-show": "Nachricht konnte nicht angezeigt werden. Bitte versuchen Sie es erneut.",
11+
"failed-to-hide": "Nachricht konnte nicht ausgeblendet werden. Bitte versuchen Sie es erneut."
1112
},
1213
"success": {
1314
"message-shown": "Nachricht erfolgreich angezeigt.",
14-
"message-shown-with-details": "Nachricht \"{{message}}\" wird jetzt angezeigt."
15+
"message-shown-with-details": "Nachricht \"{{message}}\" wird jetzt angezeigt.",
16+
"message-hidden": "Nachricht erfolgreich ausgeblendet."
1517
}
1618
},
1719
"message-item": {
1820
"formatted-message": "<description_format>Formatierte Nachricht:</description_format> <message_format>{{message}}</message_format>",
19-
"show": "Anzeigen"
21+
"show": "Anzeigen",
22+
"show-again": "Erneut anzeigen",
23+
"hide": "Ausblenden"
24+
},
25+
"footer": {
26+
"version": "Version {{version}}"
2027
}
2128
}

locales/en.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@
77
"errors": {
88
"failed-to-connect": "Failed to connect to ProPresenter. Please check the connection information.",
99
"unknown-error": "An unexpected error occurred: {{error}}.",
10-
"failed-to-show": "Failed to show message. Please try again."
10+
"failed-to-show": "Failed to show message. Please try again.",
11+
"failed-to-hide": "Failed to hide message. Please try again."
1112
},
1213
"success": {
1314
"message-shown": "Message successfully shown.",
14-
"message-shown-with-details": "Message \"{{message}}\" is now shown."
15+
"message-shown-with-details": "Message \"{{message}}\" is now shown.",
16+
"message-hidden": "Message successfully hidden."
1517
}
1618
},
1719
"message-item": {
1820
"formatted-message": "<description_format>Formatted message:</description_format> <message_format>{{message}}</message_format>",
19-
"show": "Show"
21+
"show": "Show",
22+
"show-again": "Show again",
23+
"hide": "Hide"
24+
},
25+
"footer": {
26+
"version": "Version {{version}}"
2027
}
2128
}

locales/es.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"app": {
3+
"loading": "Cargando...",
4+
"enterProPresenterUrl": "Ingrese la conexión a ProPresenter"
5+
},
6+
"message-list": {
7+
"errors": {
8+
"failed-to-connect": "Error al conectar con ProPresenter. Por favor, verifique la información de conexión.",
9+
"unknown-error": "Ocurrió un error inesperado: {{error}}.",
10+
"failed-to-show": "Error al mostrar el mensaje. Por favor, inténtelo de nuevo.",
11+
"failed-to-hide": "Error al ocultar el mensaje. Por favor, inténtelo de nuevo."
12+
},
13+
"success": {
14+
"message-shown": "Mensaje mostrado exitosamente.",
15+
"message-shown-with-details": "El mensaje \"{{message}}\" se muestra ahora.",
16+
"message-hidden": "Mensaje ocultado exitosamente."
17+
}
18+
},
19+
"message-item": {
20+
"formatted-message": "<description_format>Mensaje formateado:</description_format> <message_format>{{message}}</message_format>",
21+
"show": "Mostrar",
22+
"show-again": "Mostrar de nuevo",
23+
"hide": "Ocultar"
24+
},
25+
"footer": {
26+
"version": "Versión {{version}}"
27+
}
28+
}

locales/fr.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"app": {
3+
"loading": "Chargement...",
4+
"enterProPresenterUrl": "Entrer la connexion à ProPresenter"
5+
},
6+
"message-list": {
7+
"errors": {
8+
"failed-to-connect": "Échec de la connexion à ProPresenter. Veuillez vérifier les informations de connexion.",
9+
"unknown-error": "Une erreur inattendue s'est produite : {{error}}.",
10+
"failed-to-show": "Échec de l'affichage du message. Veuillez réessayer.",
11+
"failed-to-hide": "Échec du masquage du message. Veuillez réessayer."
12+
},
13+
"success": {
14+
"message-shown": "Message affiché avec succès.",
15+
"message-shown-with-details": "Le message \"{{message}}\" est maintenant affiché.",
16+
"message-hidden": "Message masqué avec succès."
17+
}
18+
},
19+
"message-item": {
20+
"formatted-message": "<description_format>Message formaté :</description_format> <message_format>{{message}}</message_format>",
21+
"show": "Afficher",
22+
"show-again": "Afficher à nouveau",
23+
"hide": "Masquer"
24+
},
25+
"footer": {
26+
"version": "Version {{version}}"
27+
}
28+
}

0 commit comments

Comments
 (0)