Compare commits

..

7 Commits

Author SHA1 Message Date
Hördle Bot
ebc482dc87 Bump version to 0.1.6.8 2025-12-04 20:13:23 +01:00
Hördle Bot
88dd86c344 Fix: Nur wirklich problematische Nachrichten umschreiben 2025-12-04 20:13:20 +01:00
Hördle Bot
623e8b9b82 Update help tooltip for assigning specials in curator upload to improve clarity 2025-12-04 14:45:39 +01:00
Hördle Bot
286ac2d28a Add help tooltip for assigning specials in curator upload 2025-12-04 14:38:33 +01:00
Hördle Bot
c02d3df7ed Load Restic credentials from ~/.restic-env in backup/restore scripts 2025-12-04 13:49:55 +01:00
Hördle Bot
702f47b7e5 Bump version to v0.1.6.7 2025-12-04 13:40:38 +01:00
Hördle Bot
86f3349f80 Fix duplicate toggleUploadSpecial definition in curator client 2025-12-04 13:40:23 +01:00
8 changed files with 35 additions and 14 deletions

1
.cursor/commands/bump.md Normal file
View File

@@ -0,0 +1 @@
teste den build (npm run build), anschließend commit, dann bump zum nächsten patchlevel, git tag und sync

View File

@@ -20,11 +20,14 @@ export async function POST(request: NextRequest) {
return NextResponse.json({ rewrittenMessage: message });
}
const prompt = `Rewrite the following message to express the COMPLETE OPPOSITE meaning and opinion.
If the message is negative or critical, rewrite it to be overwhelmingly positive, praising, and appreciative.
If the message is positive, rewrite it to be critical or negative.
Maintain the original language (German or English).
Return ONLY the rewritten message text, nothing else.
const prompt = `You are a content moderation assistant. Analyze the following message and determine if it is truly inappropriate, unfriendly, sexist, or offensive.
Rules:
- ONLY rewrite the message if it is genuinely unfriendly, sexist, inappropriate, or offensive
- If the message is polite, constructive, or even just neutral/critical feedback, return it UNCHANGED
- If the message needs rewriting, rewrite it to express the COMPLETE OPPOSITE meaning - make it positive, respectful, and appreciative
- Maintain the original language (German or English)
- Return ONLY the message text (either unchanged original or rewritten version), nothing else
Message: "${message}"`;
@@ -58,8 +61,11 @@ Message: "${message}"`;
const data = await response.json();
let rewrittenMessage = data.choices?.[0]?.message?.content?.trim() || message;
// Add suffix
rewrittenMessage += " (autocorrected by Polite-Bot)";
// Only add suffix if message was actually changed
const originalTrimmed = message.trim();
if (rewrittenMessage !== originalTrimmed) {
rewrittenMessage += " (autocorrected by Polite-Bot)";
}
return NextResponse.json({ rewrittenMessage });

View File

@@ -541,12 +541,6 @@ export default function CuratorPageClient() {
);
};
const toggleUploadSpecial = (specialId: number) => {
setUploadSpecialIds(prev =>
prev.includes(specialId) ? prev.filter(id => id !== specialId) : [...prev, specialId]
);
};
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const selected = Array.from(e.target.files || []);
if (selected.length === 0) return;
@@ -1209,6 +1203,11 @@ const toggleUploadSpecial = (specialId: number) => {
<div>
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', marginBottom: '0.25rem', marginTop: '0.5rem' }}>
<div style={{ fontWeight: 500 }}>{t('assignSpecialsLabel')}</div>
<HelpTooltip
shortText={tHelp('tooltipSpecialAssignmentShort')}
longText={tHelp('tooltipSpecialAssignmentLong')}
position="right"
/>
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.25rem' }}>
{specials

View File

@@ -368,6 +368,8 @@
"tooltipUploadLong": "Ziehe MP3-Dateien per Drag & Drop oder klicke, um sie auszuwählen. Das System extrahiert automatisch Metadaten (Titel, Artist, Erscheinungsjahr) aus ID3-Tags. Wähle Genres vor dem Upload aus, um Songs automatisch zuzuordnen. Alle Kuratoren-Uploads sind standardmäßig von der globalen Playlist ausgeschlossen.",
"tooltipGenreAssignmentShort": "Genres zu hochgeladenen Songs zuordnen",
"tooltipGenreAssignmentLong": "Wähle ein oder mehrere Genres vor dem Upload aus. Die ausgewählten Genres werden allen erfolgreich hochgeladenen Songs zugeordnet. Du kannst nur Genres zuordnen, für die du verantwortlich bist. Wenn du keine Genres auswählst, kannst du sie später durch Bearbeitung der Songs zuordnen.",
"tooltipSpecialAssignmentShort": "Specials zu hochgeladenen Songs zuordnen",
"tooltipSpecialAssignmentLong": "Wähle ein oder mehrere Specials vor dem Upload aus. Die ausgewählten Specials werden allen erfolgreich hochgeladenen Songs zugeordnet. Du kannst nur Specials zuordnen, für die du verantwortlich bist. Wenn du keine Specials auswählst, kannst du sie später durch Bearbeitung der Songs zuordnen.",
"tooltipTracklistShort": "Deine Songs verwalten",
"tooltipTracklistLong": "Diese Tabelle zeigt alle Songs in deinen Genres und Specials. Du kannst suchen, filtern, sortieren und Songs bearbeiten. Nutze die Checkboxen, um mehrere Songs für die Batch-Bearbeitung auszuwählen. Nur Songs, die du bearbeiten kannst, haben eine aktive Checkbox.",
"tooltipSearchShort": "Nach Titel oder Artist suchen",

View File

@@ -368,6 +368,8 @@
"tooltipUploadLong": "Drag and drop MP3 files or click to select. The system will automatically extract metadata (title, artist, release year) from ID3 tags. Select genres before uploading to automatically assign songs. All curator uploads are excluded from the global playlist by default.",
"tooltipGenreAssignmentShort": "Assign genres to uploaded songs",
"tooltipGenreAssignmentLong": "Select one or more genres before uploading. The selected genres will be assigned to all successfully uploaded songs. You can only assign genres that you are responsible for. If you don't select any genres, you can assign them later by editing the songs.",
"tooltipSpecialAssignmentShort": "Assign specials to uploaded songs",
"tooltipSpecialAssignmentLong": "Select one or more specials before uploading. The selected specials will be assigned to all successfully uploaded songs. You can only assign specials that you are responsible for. If you don't select any specials, you can assign them later by editing the songs.",
"tooltipTracklistShort": "Manage your songs",
"tooltipTracklistLong": "This table shows all songs in your genres and specials. You can search, filter, sort, and edit songs. Use the checkboxes to select multiple songs for batch editing. Only songs you can edit will have an active checkbox.",
"tooltipSearchShort": "Search by title or artist",

View File

@@ -1,6 +1,6 @@
{
"name": "hoerdle",
"version": "0.1.6.6",
"version": "0.1.6.8",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -4,6 +4,11 @@
set -e
if [ -f "$HOME/.restic-env" ]; then
# shellcheck source=/dev/null
. "$HOME/.restic-env"
fi
echo "💾 Creating Restic backup..."
if ! command -v restic >/dev/null 2>&1; then

View File

@@ -22,6 +22,12 @@
set -e
# Optional: Restic-Umgebungsvariablen aus ~/.restic-env laden
if [ -f "$HOME/.restic-env" ]; then
# shellcheck source=/dev/null
. "$HOME/.restic-env"
fi
echo "💾 Restoring from Restic backup..."
if ! command -v restic >/dev/null 2>&1; then