N°7157 - Allow users to unsubscribe from notification channels (#611)

* N°7157 - Allow users to unsubscribe from notification channels

* Fix type hinting

* Add missing dict entries

* Allows to subscribe/unsubscribe from notifications individually

* Refactor NotificationsService to singleton pattern

* Refactor NotificationsRepository to singleton pattern and rename methods to a more functional naming

* Add PHPDoc and type hints

* Dump autoloaders

* Replace modals with toasts

* Add dict entry

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
This commit is contained in:
Stephen Abello
2024-02-19 09:25:47 +01:00
committed by GitHub
parent efe5f004a1
commit ceba1ad1e9
28 changed files with 1305 additions and 24 deletions

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><linearGradient id="AY6Uvh9Cgiro1p2xH7xe2a" x1="25.633" x2="48.431" y1="17.912" y2="52.033" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#28afea"/><stop offset="1" stop-color="#0b88da"/></linearGradient><path fill="url(#AY6Uvh9Cgiro1p2xH7xe2a)" d="M13.714,25.875L48,12.461v24.664C48,38.161,47.148,39,46.095,39H13.714V25.875z"/><linearGradient id="AY6Uvh9Cgiro1p2xH7xe2b" x1="6.557" x2="39.664" y1="24.411" y2="45.033" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#28afea"/><stop offset="1" stop-color="#0b88da"/></linearGradient><path fill="url(#AY6Uvh9Cgiro1p2xH7xe2b)" d="M8,12.461v24.664C8,38.161,8.852,39,9.905,39h36.19c0.468,0,0.89-0.172,1.222-0.448L8,12.461 z"/><path d="M8,11.813h40v1.586L31.505,26.008c-2.062,1.576-4.948,1.576-7.01,0 L8,13.399V11.813z" opacity=".05"/><path d="M8,11.344h40v1.586L30.825,25.222c-1.678,1.223-3.971,1.223-5.65,0 L8,12.93V11.344z" opacity=".07"/><path fill="#50e6ff" d="M9.905,9h36.19C47.148,9,48,9.839,48,10.875v1.586L30.145,24.437c-1.294,0.868-2.996,0.868-4.29,0 L8,12.461v-1.586C8,9.839,8.852,9,9.905,9z"/><path d="M15.5,26H8v5h7.5c0.827,0,1.5-0.673,1.5-1.5v-2C17,26.673,16.327,26,15.5,26z" opacity=".05"/><path d="M15.5,31H8v5h7.5c0.827,0,1.5-0.673,1.5-1.5v-2C17,31.673,16.327,31,15.5,31z" opacity=".05"/><path d="M15.5,31.5H8v4h7.5c0.552,0,1-0.449,1-1v-2C16.5,31.949,16.052,31.5,15.5,31.5z" opacity=".07"/><path d="M15.5,26.5H8v4h7.5c0.552,0,1-0.449,1-1v-2C16.5,26.949,16.052,26.5,15.5,26.5z" opacity=".07"/><path d="M15.5,21H8v5h7.5c0.827,0,1.5-0.673,1.5-1.5v-2C17,21.673,16.327,21,15.5,21z" opacity=".05"/><linearGradient id="AY6Uvh9Cgiro1p2xH7xe2c" x1="0" x2="16" y1="33.5" y2="33.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5961c3"/><stop offset="1" stop-color="#3a41ac"/></linearGradient><path fill="url(#AY6Uvh9Cgiro1p2xH7xe2c)" d="M15.5,35h-15C0.224,35,0,34.776,0,34.5v-2C0,32.224,0.224,32,0.5,32h15 c0.276,0,0.5,0.224,0.5,0.5v2C16,34.776,15.776,35,15.5,35z"/><path d="M15.5,21.5H8v4h7.5c0.552,0,1-0.449,1-1v-2C16.5,21.949,16.052,21.5,15.5,21.5z" opacity=".07"/><linearGradient id="AY6Uvh9Cgiro1p2xH7xe2d" x1="2" x2="16" y1="28.5" y2="28.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5961c3"/><stop offset="1" stop-color="#3a41ac"/></linearGradient><path fill="url(#AY6Uvh9Cgiro1p2xH7xe2d)" d="M15.5,30h-13C2.224,30,2,29.776,2,29.5v-2C2,27.224,2.224,27,2.5,27h13 c0.276,0,0.5,0.224,0.5,0.5v2C16,29.776,15.776,30,15.5,30z"/><linearGradient id="AY6Uvh9Cgiro1p2xH7xe2e" x1="5" x2="16" y1="23.5" y2="23.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5961c3"/><stop offset="1" stop-color="#3a41ac"/></linearGradient><path fill="url(#AY6Uvh9Cgiro1p2xH7xe2e)" d="M15.5,25h-10C5.224,25,5,24.776,5,24.5v-2C5,22.224,5.224,22,5.5,22h10 c0.276,0,0.5,0.224,0.5,0.5v2C16,24.776,15.776,25,15.5,25z"/></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="48px" height="48px"><defs><linearGradient x1="24" y1="1.993" x2="24" y2="7.005" gradientUnits="userSpaceOnUse" id="color-1"><stop offset="0" stop-color="#fede00"></stop><stop offset="1" stop-color="#ffd000"></stop></linearGradient><linearGradient x1="24" y1="33.993" x2="24" y2="39.005" gradientUnits="userSpaceOnUse" id="color-2"><stop offset="0" stop-color="#fede00"></stop><stop offset="1" stop-color="#ffd000"></stop></linearGradient><linearGradient x1="24" y1="42.919" x2="24" y2="38.859" gradientUnits="userSpaceOnUse" id="color-3"><stop offset="0.486" stop-color="#fbc300"></stop><stop offset="1" stop-color="#dbaa00"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(5.33333,5.33333)"><path d="M27,7h-6v-2c0,-1.657 1.343,-3 3,-3v0c1.657,0 3,1.343 3,3z" fill="url(#color-1)"></path><path d="M39,21c0,-8.284 -6.716,-15 -15,-15c-8.284,0 -15,6.716 -15,15c0,0.39 0,13 0,13h30c0,0 0,-12.61 0,-13z" fill="#f5be00"></path><path d="M39,34h-30l-3.875,1.55c-0.68,0.272 -1.125,0.93 -1.125,1.661v0c0,0.988 0.801,1.789 1.789,1.789h36.422c0.988,0 1.789,-0.801 1.789,-1.789v0c0,-0.731 -0.445,-1.389 -1.125,-1.661z" fill="url(#color-2)"></path><path d="M28,39c0,2.209 -1.791,4 -4,4c-2.209,0 -4,-1.791 -4,-4z" fill="url(#color-3)"></path></g></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB