Skip to content

Commit fde7760

Browse files
authored
Merge pull request #4 from kalayciburak/feature/admin-features
feat(ui): add sound feedback and improve modal accessibility
2 parents 0810338 + 1c751ba commit fde7760

18 files changed

Lines changed: 643 additions & 352 deletions

README-TR.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ Coolify kullanırken, her bir uygulama ve servisin URL'lerini ve temel bilgileri
335335
- **Sessiz Arka Plan Senkronizasyonu**: Kullanıcı deneyimini bozmadan veri güncelleme
336336
- **İşleme Özel Yükleme**: Kaynak başına, işlem başına yükleme durumları
337337
- **Otomatik Temizleme**: Uygun interval temizliği ile bellek sızıntılarını önler
338+
- **Ses Efektleri Sistemi**: Sağ alt köşede açma/kapama kontrolü ile buton etkileşimleri için hafif ses geri bildirimi
338339
- **Çok Dilli Destek**: İngilizce ve Türkçe arasında sorunsuz geçiş
339340
- **Responsive Tasarım**: Masaüstü ve mobil cihazlar için optimize edilmiş modern arayüz
340341
- **Gerçek Zamanlı İzleme**: Kaynak durumu ve sağlığını gerçek zamanlı takip

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ While using Coolify, I found myself constantly clicking through each application
335335
- **Silent Background Sync**: Updates data without disrupting user experience
336336
- **Action-Specific Loading**: Per-resource, per-action loading states
337337
- **Auto-Cleanup**: Prevents memory leaks with proper interval cleanup
338+
- **Sound Effects System**: Subtle audio feedback for button interactions with toggle control in bottom-right corner
338339
- **Multi-language Support**: Seamless switching between English and Turkish
339340
- **Responsive Design**: Modern UI optimized for desktop and mobile devices
340341
- **Real-time Monitoring**: Track resource status and health in real-time

client/public/sounds/click.wav

35.1 KB
Binary file not shown.

client/src/App.jsx

Lines changed: 68 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Suspense, lazy } from "react";
33
import { Tooltip } from "react-tooltip";
44
import { Toaster } from "react-hot-toast";
55
import { isAuthenticated } from "./api/auth";
6+
import { SoundProvider } from "./hooks/useSoundEffects";
7+
import SoundToggle from "./components/SoundToggle";
68

79
const Login = lazy(() => import("./pages/Login"));
810
const Dashboard = lazy(() => import("./pages/Dashboard"));
@@ -19,74 +21,77 @@ const LoadingSpinner = () => (
1921

2022
const App = () => {
2123
return (
22-
<BrowserRouter>
23-
<Suspense fallback={<LoadingSpinner />}>
24-
<Routes>
25-
<Route path="/login" element={<Login />} />
26-
<Route
27-
path="/dashboard"
28-
element={
29-
<PrivateRoute>
30-
<Dashboard />
31-
</PrivateRoute>
32-
}
33-
/>
34-
<Route path="/" element={<Navigate to="/dashboard" replace />} />
35-
<Route path="*" element={<Navigate to="/dashboard" replace />} />
36-
</Routes>
37-
</Suspense>
38-
<Tooltip id="backup-tooltip" />
39-
<Tooltip id="internal-url-tooltip" />
40-
<Tooltip id="external-url-tooltip" />
41-
<Toaster
42-
position="top-right"
43-
reverseOrder={false}
44-
gutter={12}
45-
toastOptions={{
46-
duration: 4000,
47-
style: {
48-
borderRadius: "0.5rem",
49-
padding: "1rem 1.25rem",
50-
fontSize: "0.95rem",
51-
fontWeight: "500",
52-
boxShadow:
53-
"0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08)",
54-
minWidth: "320px",
55-
maxWidth: "420px",
56-
},
57-
success: {
24+
<SoundProvider>
25+
<BrowserRouter>
26+
<Suspense fallback={<LoadingSpinner />}>
27+
<Routes>
28+
<Route path="/login" element={<Login />} />
29+
<Route
30+
path="/dashboard"
31+
element={
32+
<PrivateRoute>
33+
<Dashboard />
34+
</PrivateRoute>
35+
}
36+
/>
37+
<Route path="/" element={<Navigate to="/dashboard" replace />} />
38+
<Route path="*" element={<Navigate to="/dashboard" replace />} />
39+
</Routes>
40+
</Suspense>
41+
<Tooltip id="backup-tooltip" />
42+
<Tooltip id="internal-url-tooltip" />
43+
<Tooltip id="external-url-tooltip" />
44+
<Toaster
45+
position="top-right"
46+
reverseOrder={false}
47+
gutter={12}
48+
toastOptions={{
49+
duration: 4000,
5850
style: {
59-
background: "linear-gradient(135deg, #10b981 0%, #059669 100%)",
60-
color: "#ffffff",
51+
borderRadius: "0.5rem",
52+
padding: "1rem 1.25rem",
53+
fontSize: "0.95rem",
54+
fontWeight: "500",
55+
boxShadow:
56+
"0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08)",
57+
minWidth: "320px",
58+
maxWidth: "420px",
6159
},
62-
iconTheme: {
63-
primary: "#ffffff",
64-
secondary: "#10b981",
60+
success: {
61+
style: {
62+
background: "linear-gradient(135deg, #10b981 0%, #059669 100%)",
63+
color: "#ffffff",
64+
},
65+
iconTheme: {
66+
primary: "#ffffff",
67+
secondary: "#10b981",
68+
},
6569
},
66-
},
67-
error: {
68-
style: {
69-
background: "linear-gradient(135deg, #ef4444 0%, #dc2626 100%)",
70-
color: "#ffffff",
71-
},
72-
iconTheme: {
73-
primary: "#ffffff",
74-
secondary: "#ef4444",
75-
},
76-
},
77-
loading: {
78-
style: {
79-
background: "linear-gradient(135deg, #a855f7 0%, #9333ea 100%)",
80-
color: "#ffffff",
70+
error: {
71+
style: {
72+
background: "linear-gradient(135deg, #ef4444 0%, #dc2626 100%)",
73+
color: "#ffffff",
74+
},
75+
iconTheme: {
76+
primary: "#ffffff",
77+
secondary: "#ef4444",
78+
},
8179
},
82-
iconTheme: {
83-
primary: "#ffffff",
84-
secondary: "#a855f7",
80+
loading: {
81+
style: {
82+
background: "linear-gradient(135deg, #a855f7 0%, #9333ea 100%)",
83+
color: "#ffffff",
84+
},
85+
iconTheme: {
86+
primary: "#ffffff",
87+
secondary: "#a855f7",
88+
},
8589
},
86-
},
87-
}}
88-
/>
89-
</BrowserRouter>
90+
}}
91+
/>
92+
<SoundToggle />
93+
</BrowserRouter>
94+
</SoundProvider>
9095
);
9196
};
9297

client/src/components/LanguageSelector.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import { useTranslation } from "react-i18next";
2+
import { useSoundEffects } from "../hooks/useSoundEffects";
3+
import { SOUND_TYPES } from "../utils/soundUtils";
24

35
const LanguageSelector = () => {
46
const { i18n } = useTranslation();
7+
const { playSound } = useSoundEffects();
58

69
const changeLanguage = () => {
10+
playSound(SOUND_TYPES.CLICK);
711
const nextLanguage = i18n.language === "tr" ? "en" : "tr";
812
i18n.changeLanguage(nextLanguage);
913
localStorage.setItem("language", nextLanguage);

0 commit comments

Comments
 (0)