Compare commits
7 Commits
286ac2d28a
...
v0.1.6.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e93d09236 | ||
|
|
a1fe62f132 | ||
|
|
e49c6acc99 | ||
|
|
96cc9db7d6 | ||
|
|
ebc482dc87 | ||
|
|
88dd86c344 | ||
|
|
623e8b9b82 |
1
.cursor/commands/bump.md
Normal file
1
.cursor/commands/bump.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
teste den build (npm run build), anschließend commit, dann bump zum nächsten patchlevel, git tag und sync
|
||||||
@@ -20,11 +20,14 @@ export async function POST(request: NextRequest) {
|
|||||||
return NextResponse.json({ rewrittenMessage: message });
|
return NextResponse.json({ rewrittenMessage: message });
|
||||||
}
|
}
|
||||||
|
|
||||||
const prompt = `Rewrite the following message to express the COMPLETE OPPOSITE meaning and opinion.
|
const prompt = `You are a content moderation assistant. Analyze the following message and determine if it is truly inappropriate, unfriendly, sexist, or offensive.
|
||||||
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.
|
Rules:
|
||||||
Maintain the original language (German or English).
|
- ONLY rewrite the message if it is genuinely unfriendly, sexist, inappropriate, or offensive
|
||||||
Return ONLY the rewritten message text, nothing else.
|
- 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}"`;
|
Message: "${message}"`;
|
||||||
|
|
||||||
@@ -58,8 +61,11 @@ Message: "${message}"`;
|
|||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
let rewrittenMessage = data.choices?.[0]?.message?.content?.trim() || message;
|
let rewrittenMessage = data.choices?.[0]?.message?.content?.trim() || message;
|
||||||
|
|
||||||
// Add suffix
|
// Only add suffix if message was actually changed
|
||||||
rewrittenMessage += " (autocorrected by Polite-Bot)";
|
const originalTrimmed = message.trim();
|
||||||
|
if (rewrittenMessage !== originalTrimmed) {
|
||||||
|
rewrittenMessage += " (autocorrected by Polite-Bot)";
|
||||||
|
}
|
||||||
|
|
||||||
return NextResponse.json({ rewrittenMessage });
|
return NextResponse.json({ rewrittenMessage });
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
|||||||
const t = useTranslations('Game');
|
const t = useTranslations('Game');
|
||||||
const locale = useLocale();
|
const locale = useLocale();
|
||||||
const { gameState, statistics, addGuess, giveUp, addReplay, addYearBonus, skipYearBonus } = useGameState(genre, maxAttempts, isSpecial);
|
const { gameState, statistics, addGuess, giveUp, addReplay, addYearBonus, skipYearBonus } = useGameState(genre, maxAttempts, isSpecial);
|
||||||
const [hasWon, setHasWon] = useState(false);
|
const [hasWon, setHasWon] = useState(gameState?.isSolved ?? false);
|
||||||
const [hasLost, setHasLost] = useState(false);
|
const [hasLost, setHasLost] = useState(gameState?.isFailed ?? false);
|
||||||
const [shareText, setShareText] = useState(`🔗 ${t('share')}`);
|
const [shareText, setShareText] = useState(`🔗 ${t('share')}`);
|
||||||
const [lastAction, setLastAction] = useState<'GUESS' | 'SKIP' | null>(null);
|
const [lastAction, setLastAction] = useState<'GUESS' | 'SKIP' | null>(null);
|
||||||
const [isProcessingGuess, setIsProcessingGuess] = useState(false);
|
const [isProcessingGuess, setIsProcessingGuess] = useState(false);
|
||||||
@@ -87,12 +87,12 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (gameState && dailyPuzzle) {
|
if (gameState) {
|
||||||
setHasWon(gameState.isSolved);
|
setHasWon(gameState.isSolved);
|
||||||
setHasLost(gameState.isFailed);
|
setHasLost(gameState.isFailed);
|
||||||
|
|
||||||
// Show year modal if won but year not guessed yet and release year is available
|
// Show year modal if won but year not guessed yet and release year is available
|
||||||
if (gameState.isSolved && !gameState.yearGuessed && dailyPuzzle.releaseYear) {
|
if (gameState.isSolved && !gameState.yearGuessed && dailyPuzzle?.releaseYear) {
|
||||||
setShowYearModal(true);
|
setShowYearModal(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -416,11 +416,22 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max
|
|||||||
const bonusStar = (hasWon && gameState.yearGuessed && dailyPuzzle.releaseYear && gameState.scoreBreakdown.some(item => item.reason === 'Bonus: Correct Year')) ? '⭐' : '';
|
const bonusStar = (hasWon && gameState.yearGuessed && dailyPuzzle.releaseYear && gameState.scoreBreakdown.some(item => item.reason === 'Bonus: Correct Year')) ? '⭐' : '';
|
||||||
const genreText = genre ? `${isSpecial ? t('special') : t('genre')}: ${genre}\n` : '';
|
const genreText = genre ? `${isSpecial ? t('special') : t('genre')}: ${genre}\n` : '';
|
||||||
|
|
||||||
|
// Use current domain from window.location to support both hoerdle.de and hördle.de
|
||||||
|
const rawHost = typeof window !== 'undefined' ? window.location.hostname : config.domain;
|
||||||
|
const protocol = typeof window !== 'undefined' ? window.location.protocol : 'https:';
|
||||||
|
|
||||||
|
// For users on hördle.de, use Punycode domain (xn--hrdle-jua.de) in share message
|
||||||
|
// to avoid rendering issues with Unicode domains
|
||||||
|
let currentHost = rawHost;
|
||||||
|
if (rawHost === 'hördle.de' || rawHost === 'xn--hrdle-jua.de') {
|
||||||
|
currentHost = 'xn--hrdle-jua.de';
|
||||||
|
}
|
||||||
|
|
||||||
|
// OLD CODE (commented out - may be needed again in the future):
|
||||||
// Use current domain from window.location to support both hoerdle.de and hördle.de,
|
// Use current domain from window.location to support both hoerdle.de and hördle.de,
|
||||||
// but always share the pretty Unicode-Domain "hördle.de" instead of the Punycode variant.
|
// but always share the pretty Unicode-Domain "hördle.de" instead of the Punycode variant.
|
||||||
const rawHost = typeof window !== 'undefined' ? window.location.hostname : config.domain;
|
// const currentHost = rawHost === 'xn--hrdle-jua.de' ? 'hördle.de' : rawHost;
|
||||||
const currentHost = rawHost === 'xn--hrdle-jua.de' ? 'hördle.de' : rawHost;
|
|
||||||
const protocol = typeof window !== 'undefined' ? window.location.protocol : 'https:';
|
|
||||||
let shareUrl = `${protocol}//${currentHost}`;
|
let shareUrl = `${protocol}//${currentHost}`;
|
||||||
// Add locale prefix if not default (en)
|
// Add locale prefix if not default (en)
|
||||||
if (locale !== 'en') {
|
if (locale !== 'en') {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hoerdle",
|
"name": "hoerdle",
|
||||||
"version": "0.1.6.7",
|
"version": "0.1.6.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user