diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index f1e3c257c..bf0b1c3ec 100755 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -49,6 +49,7 @@ class ProfileController extends Controller $user->gravatar = $request->input('gravatar'); $user->skin = $request->input('skin'); $user->phone = $request->input('phone'); + $user->enable_sounds = $request->input('enable_sounds', false); if (! config('app.lock_passwords')) { $user->locale = $request->input('locale', 'en-US'); diff --git a/database/migrations/2024_08_07_204014_add_play_sounds_to_profile.php b/database/migrations/2024_08_07_204014_add_play_sounds_to_profile.php new file mode 100644 index 000000000..a6e03fd69 --- /dev/null +++ b/database/migrations/2024_08_07_204014_add_play_sounds_to_profile.php @@ -0,0 +1,28 @@ +boolean('enable_sounds')->default(false); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('enable_sounds'); + }); + } +}; diff --git a/public/sounds/error.mp3 b/public/sounds/error.mp3 new file mode 100644 index 000000000..6a86ef02e Binary files /dev/null and b/public/sounds/error.mp3 differ diff --git a/public/sounds/success.mp3 b/public/sounds/success.mp3 new file mode 100644 index 000000000..de51d68b3 Binary files /dev/null and b/public/sounds/success.mp3 differ diff --git a/resources/lang/en-US/account/general.php b/resources/lang/en-US/account/general.php index d99e36df8..967a9de57 100644 --- a/resources/lang/en-US/account/general.php +++ b/resources/lang/en-US/account/general.php @@ -12,4 +12,5 @@ return array( 'api_reference' => 'Please check the API reference to find specific API endpoints and additional API documentation.', 'profile_updated' => 'Account successfully updated', 'no_tokens' => 'You have not created any personal access tokens.', + 'enable_sounds' => 'Enable sound effects', ); diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 96ea7cc43..4f2c7aa55 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -89,6 +89,15 @@ +