diff --git a/app/locales/en_GB/LC_MESSAGES/messages.mo b/app/locales/en_GB/LC_MESSAGES/messages.mo index 995903bd..c92866cb 100644 Binary files a/app/locales/en_GB/LC_MESSAGES/messages.mo and b/app/locales/en_GB/LC_MESSAGES/messages.mo differ diff --git a/app/locales/en_GB/LC_MESSAGES/messages.po b/app/locales/en_GB/LC_MESSAGES/messages.po index d4a57c47..cfecd04f 100644 --- a/app/locales/en_GB/LC_MESSAGES/messages.po +++ b/app/locales/en_GB/LC_MESSAGES/messages.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: sysPass\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-15 02:52+0200\n" -"PO-Revision-Date: 2018-10-15 02:55+0200\n" +"POT-Creation-Date: 2018-10-16 01:09+0200\n" +"PO-Revision-Date: 2018-10-16 01:09+0200\n" "Last-Translator: nuxsmin \n" "Language-Team: nuxsmin@syspass.org\n" "Language: en_GB\n" @@ -192,14 +192,14 @@ msgstr "Action not found" #: ../../../modules/web/Controllers/ItemPresetController.php:256 #: ../../../modules/web/Controllers/ItemPresetController.php:295 #: ../../../modules/web/Controllers/ItemPresetController.php:334 -#: ../../../modules/web/Controllers/NotificationController.php:100 -#: ../../../modules/web/Controllers/NotificationController.php:160 -#: ../../../modules/web/Controllers/NotificationController.php:175 -#: ../../../modules/web/Controllers/NotificationController.php:206 -#: ../../../modules/web/Controllers/NotificationController.php:237 -#: ../../../modules/web/Controllers/NotificationController.php:288 -#: ../../../modules/web/Controllers/NotificationController.php:315 -#: ../../../modules/web/Controllers/NotificationController.php:348 +#: ../../../modules/web/Controllers/NotificationController.php:102 +#: ../../../modules/web/Controllers/NotificationController.php:164 +#: ../../../modules/web/Controllers/NotificationController.php:179 +#: ../../../modules/web/Controllers/NotificationController.php:210 +#: ../../../modules/web/Controllers/NotificationController.php:241 +#: ../../../modules/web/Controllers/NotificationController.php:292 +#: ../../../modules/web/Controllers/NotificationController.php:319 +#: ../../../modules/web/Controllers/NotificationController.php:352 #: ../../../modules/web/Controllers/PluginController.php:103 #: ../../../modules/web/Controllers/PluginController.php:122 #: ../../../modules/web/Controllers/PublicLinkController.php:71 @@ -320,12 +320,12 @@ msgstr "Invalid icons class" #: ../../../../lib/SP/DataModel/PublicLinkListData.php:88 #: ../../../../lib/SP/Providers/Auth/Ldap/LdapConnection.php:190 -#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:228 msgid "ON" msgstr "ON" #: ../../../../lib/SP/DataModel/PublicLinkListData.php:88 -#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:228 msgid "OFF" msgstr "OFF" @@ -356,7 +356,8 @@ msgstr "Invalid XML-RPC response" msgid "La sesión no se ha iniciado o ha caducado" msgstr "Session not started or timed out" -#: ../../../../lib/SP/Mvc/Controller/ControllerTrait.php:124 +#: ../../../../lib/SP/Mvc/Controller/ControllerTrait.php:119 +#: ../../../../lib/SP/Mvc/Controller/ControllerTrait.php:128 msgid "Acción Inválida" msgstr "Invalid Action" @@ -532,7 +533,7 @@ msgstr "Error while searching the group RDN" #: ../../../modules/web/Controllers/Helpers/Grid/ItemPresetGrid.php:108 #: ../../../modules/web/Controllers/Helpers/Grid/UserGrid.php:118 #: ../../../modules/web/Controllers/UserGroupController.php:231 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:137 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:127 #: ../../../modules/web/themes/material-blue/views/_partials/footer.inc:15 #: ../../../modules/web/themes/material-blue/views/config/encryption.inc:269 #: ../../../modules/web/themes/material-blue/views/config/encryption.inc:272 @@ -622,7 +623,7 @@ msgid "No es posible inicializar" msgstr "Unable to initialize" #: ../../../../lib/SP/Providers/Notification/NotificationHandler.php:124 -#: ../../../modules/web/Controllers/AccountController.php:925 +#: ../../../modules/web/Controllers/AccountController.php:927 msgid "Solicitud" msgstr "Request" @@ -640,8 +641,8 @@ msgid "Cuentas" msgstr "Accounts" #: ../../../../lib/SP/Providers/Notification/NotificationHandler.php:155 -#: ../../../modules/web/Controllers/NotificationController.php:267 -#: ../../../modules/web/Controllers/NotificationController.php:298 +#: ../../../modules/web/Controllers/NotificationController.php:271 +#: ../../../modules/web/Controllers/NotificationController.php:302 msgid "Notificación" msgstr "Notification" @@ -1534,13 +1535,13 @@ msgstr "Account imported" #: ../../../modules/api/Controllers/AccountController.php:190 #: ../../../modules/api/Controllers/AccountController.php:241 #: ../../../modules/api/Controllers/AccountController.php:316 -#: ../../../modules/web/Controllers/AccountController.php:224 -#: ../../../modules/web/Controllers/AccountController.php:719 -#: ../../../modules/web/Controllers/AccountController.php:764 -#: ../../../modules/web/Controllers/AccountController.php:805 -#: ../../../modules/web/Controllers/AccountController.php:844 -#: ../../../modules/web/Controllers/AccountController.php:894 -#: ../../../modules/web/Controllers/AccountController.php:928 +#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:721 +#: ../../../modules/web/Controllers/AccountController.php:766 +#: ../../../modules/web/Controllers/AccountController.php:807 +#: ../../../modules/web/Controllers/AccountController.php:846 +#: ../../../modules/web/Controllers/AccountController.php:896 +#: ../../../modules/web/Controllers/AccountController.php:930 #: ../../../modules/web/Controllers/AccountFileController.php:234 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:112 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:147 @@ -2332,15 +2333,15 @@ msgid "Cuenta visualizada" msgstr "Account displayed" #: ../../../modules/api/Controllers/AccountController.php:102 -#: ../../../modules/web/Controllers/AccountController.php:553 -#: ../../../modules/web/Controllers/AccountController.php:609 +#: ../../../modules/web/Controllers/AccountController.php:555 +#: ../../../modules/web/Controllers/AccountController.php:611 msgid "Clave visualizada" msgstr "Password viewed" #: ../../../modules/api/Controllers/AccountController.php:138 #: ../../../modules/api/Controllers/AccountController.php:144 -#: ../../../modules/web/Controllers/AccountController.php:803 -#: ../../../modules/web/Controllers/AccountController.php:814 +#: ../../../modules/web/Controllers/AccountController.php:805 +#: ../../../modules/web/Controllers/AccountController.php:816 #: ../../../modules/web/Controllers/UserController.php:411 #: ../../../modules/web/Controllers/UserController.php:415 #: ../../../modules/web/Controllers/UserPassResetController.php:189 @@ -2350,22 +2351,22 @@ msgstr "Password updated" #: ../../../modules/api/Controllers/AccountController.php:188 #: ../../../modules/api/Controllers/AccountController.php:194 -#: ../../../modules/web/Controllers/AccountController.php:717 -#: ../../../modules/web/Controllers/AccountController.php:728 +#: ../../../modules/web/Controllers/AccountController.php:719 +#: ../../../modules/web/Controllers/AccountController.php:730 msgid "Cuenta creada" msgstr "Account added" #: ../../../modules/api/Controllers/AccountController.php:239 #: ../../../modules/api/Controllers/AccountController.php:245 -#: ../../../modules/web/Controllers/AccountController.php:762 -#: ../../../modules/web/Controllers/AccountController.php:773 +#: ../../../modules/web/Controllers/AccountController.php:764 +#: ../../../modules/web/Controllers/AccountController.php:775 msgid "Cuenta actualizada" msgstr "Account updated" #: ../../../modules/api/Controllers/AccountController.php:314 #: ../../../modules/api/Controllers/AccountController.php:320 -#: ../../../modules/web/Controllers/AccountController.php:892 -#: ../../../modules/web/Controllers/AccountController.php:897 +#: ../../../modules/web/Controllers/AccountController.php:894 +#: ../../../modules/web/Controllers/AccountController.php:899 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:110 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:115 #: ../../../modules/web/Controllers/AccountManagerController.php:145 @@ -2737,9 +2738,9 @@ msgstr "Group deleted" msgid "Es necesario actualizar" msgstr "Updating needed" -#: ../../../modules/web/Controllers/AccountController.php:148 -#: ../../../modules/web/Controllers/AccountController.php:203 -#: ../../../modules/web/Controllers/AccountController.php:473 +#: ../../../modules/web/Controllers/AccountController.php:150 +#: ../../../modules/web/Controllers/AccountController.php:205 +#: ../../../modules/web/Controllers/AccountController.php:475 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:60 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:61 #: ../../../modules/web/Controllers/Helpers/Grid/AccountGrid.php:159 @@ -2749,21 +2750,21 @@ msgstr "Updating needed" msgid "Detalles de Cuenta" msgstr "Account Details" -#: ../../../modules/web/Controllers/AccountController.php:222 +#: ../../../modules/web/Controllers/AccountController.php:224 msgid "Enlace visualizado" msgstr "Link viewed" -#: ../../../modules/web/Controllers/AccountController.php:223 -#: ../../../modules/web/Controllers/AccountController.php:554 -#: ../../../modules/web/Controllers/AccountController.php:610 -#: ../../../modules/web/Controllers/AccountController.php:649 -#: ../../../modules/web/Controllers/AccountController.php:683 -#: ../../../modules/web/Controllers/AccountController.php:718 -#: ../../../modules/web/Controllers/AccountController.php:763 -#: ../../../modules/web/Controllers/AccountController.php:804 -#: ../../../modules/web/Controllers/AccountController.php:843 -#: ../../../modules/web/Controllers/AccountController.php:893 -#: ../../../modules/web/Controllers/AccountController.php:927 +#: ../../../modules/web/Controllers/AccountController.php:225 +#: ../../../modules/web/Controllers/AccountController.php:556 +#: ../../../modules/web/Controllers/AccountController.php:612 +#: ../../../modules/web/Controllers/AccountController.php:651 +#: ../../../modules/web/Controllers/AccountController.php:685 +#: ../../../modules/web/Controllers/AccountController.php:720 +#: ../../../modules/web/Controllers/AccountController.php:765 +#: ../../../modules/web/Controllers/AccountController.php:806 +#: ../../../modules/web/Controllers/AccountController.php:845 +#: ../../../modules/web/Controllers/AccountController.php:895 +#: ../../../modules/web/Controllers/AccountController.php:929 #: ../../../modules/web/Controllers/AccountFileController.php:233 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:111 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:146 @@ -2777,24 +2778,24 @@ msgstr "Link viewed" msgid "Cuenta" msgstr "Account" -#: ../../../modules/web/Controllers/AccountController.php:225 +#: ../../../modules/web/Controllers/AccountController.php:227 msgid "Agente" msgstr "Agent" -#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:228 msgid "HTTPS" msgstr "HTTPS" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/AccountController.php:255 -#: ../../../modules/web/Controllers/AccountController.php:299 -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:280 +#: ../../../modules/web/Controllers/AccountController.php:257 +#: ../../../modules/web/Controllers/AccountController.php:301 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:279 #: ../../../config/actions.xml:157 msgid "Nueva Cuenta" msgstr "New Account" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/AccountController.php:343 +#: ../../../modules/web/Controllers/AccountController.php:345 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:176 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:177 #: ../../../modules/web/themes/material-blue/views/account/linkedAccounts.inc:18 @@ -2803,7 +2804,7 @@ msgid "Editar Cuenta" msgstr "Edit Account" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/AccountController.php:388 +#: ../../../modules/web/Controllers/AccountController.php:390 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:334 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:335 #: ../../../modules/web/Controllers/Helpers/Grid/AccountGrid.php:176 @@ -2815,26 +2816,26 @@ msgstr "Edit Account" msgid "Eliminar Cuenta" msgstr "Remove Account" -#: ../../../modules/web/Controllers/AccountController.php:431 +#: ../../../modules/web/Controllers/AccountController.php:433 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:155 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:156 msgid "Modificar Clave de Cuenta" msgstr "Edit Account Password" -#: ../../../modules/web/Controllers/AccountController.php:648 -#: ../../../modules/web/Controllers/AccountController.php:682 +#: ../../../modules/web/Controllers/AccountController.php:650 +#: ../../../modules/web/Controllers/AccountController.php:684 msgid "Clave copiada" msgstr "Password copied" -#: ../../../modules/web/Controllers/AccountController.php:842 -#: ../../../modules/web/Controllers/AccountController.php:853 +#: ../../../modules/web/Controllers/AccountController.php:844 +#: ../../../modules/web/Controllers/AccountController.php:855 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:145 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:150 msgid "Cuenta restaurada" msgstr "Account restored" -#: ../../../modules/web/Controllers/AccountController.php:878 -#: ../../../modules/web/Controllers/AccountController.php:881 +#: ../../../modules/web/Controllers/AccountController.php:880 +#: ../../../modules/web/Controllers/AccountController.php:883 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:99 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:102 #: ../../../modules/web/Controllers/AccountManagerController.php:131 @@ -2842,16 +2843,16 @@ msgstr "Account restored" msgid "Cuentas eliminadas" msgstr "Accounts removed" -#: ../../../modules/web/Controllers/AccountController.php:918 -#: ../../../modules/web/Forms/NotificationForm.php:100 +#: ../../../modules/web/Controllers/AccountController.php:920 +#: ../../../modules/web/Forms/NotificationForm.php:106 msgid "Es necesaria una descripción" msgstr "A description is needed" -#: ../../../modules/web/Controllers/AccountController.php:926 +#: ../../../modules/web/Controllers/AccountController.php:928 msgid "Solicitante" msgstr "Requester" -#: ../../../modules/web/Controllers/AccountController.php:929 +#: ../../../modules/web/Controllers/AccountController.php:931 #: ../../../modules/web/Controllers/Helpers/Grid/CategoryGrid.php:106 #: ../../../modules/web/Controllers/Helpers/Grid/ClientGrid.php:105 #: ../../../modules/web/Controllers/Helpers/Grid/EventlogGrid.php:105 @@ -2865,7 +2866,7 @@ msgstr "Requester" msgid "Descripción" msgstr "Description" -#: ../../../modules/web/Controllers/AccountController.php:942 +#: ../../../modules/web/Controllers/AccountController.php:944 msgid "Solicitud realizada" msgstr "Request done" @@ -3453,7 +3454,7 @@ msgstr "View Current" #: ../../../modules/web/themes/material-blue/views/config/ldap.inc:437 #: ../../../modules/web/themes/material-blue/views/config/mail.inc:206 #: ../../../modules/web/themes/material-blue/views/config/wiki.inc:291 -#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:167 +#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:184 msgid "Atrás" msgstr "Back" @@ -3914,7 +3915,7 @@ msgstr "Delete Value" #. (itstool) path: action/text #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:108 #: ../../../modules/web/themes/material-blue/inc/Icons.php:65 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:105 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:100 #: ../../../modules/web/themes/material-blue/views/notification/index.inc:1 #: ../../../config/actions.xml:679 msgid "Notificaciones" @@ -3944,14 +3945,14 @@ msgstr "Search for Notification" #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:178 #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:179 -#: ../../../modules/web/Controllers/NotificationController.php:179 +#: ../../../modules/web/Controllers/NotificationController.php:183 msgid "Nueva Notificación" msgstr "New Notification" #. (itstool) path: action/text #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:196 #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:197 -#: ../../../modules/web/Controllers/NotificationController.php:103 +#: ../../../modules/web/Controllers/NotificationController.php:105 #: ../../../config/actions.xml:811 msgid "Ver Notificación" msgstr "View Notification" @@ -3966,7 +3967,7 @@ msgstr "Checkout Notification" #. (itstool) path: action/text #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:244 #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:245 -#: ../../../modules/web/Controllers/NotificationController.php:210 +#: ../../../modules/web/Controllers/NotificationController.php:214 #: ../../../config/actions.xml:823 msgid "Editar Notificación" msgstr "Edit Notification" @@ -3979,7 +3980,7 @@ msgid "Eliminar Notificación" msgstr "Delete Notification" #: ../../../modules/web/Controllers/Helpers/Grid/PluginGrid.php:89 -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:336 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:335 #: ../../../modules/web/themes/material-blue/views/plugin/index.inc:1 msgid "Plugins" msgstr "Plugins" @@ -4166,9 +4167,9 @@ msgstr "View User Details" #: ../../../modules/web/Controllers/Helpers/Grid/UserGrid.php:257 #: ../../../modules/web/Controllers/Helpers/Grid/UserGrid.php:258 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:62 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:120 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:126 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:57 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:110 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:116 msgid "Cambiar Clave de Usuario" msgstr "Change User's Password" @@ -4248,13 +4249,13 @@ msgstr "Edit Profile" msgid "Eliminar Perfil" msgstr "Delete Profile" -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:267 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:266 #: ../../../modules/web/themes/material-blue/inc/Icons.php:58 msgid "Buscar" msgstr "Search" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:350 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:349 #: ../../../modules/web/themes/material-blue/inc/Icons.php:61 #: ../../../modules/web/themes/material-blue/views/config/ldap.inc:21 #: ../../../modules/web/themes/material-blue/views/itemshow/user_profile.inc:22 @@ -4306,6 +4307,15 @@ msgstr "Value created" msgid "Valor actualizado" msgstr "Value updated" +#: ../../../modules/web/Controllers/ItemsController.php:130 +msgid "No hay no hay notificaciones pendientes" +msgstr "There aren't any pending notifications" + +#: ../../../modules/web/Controllers/ItemsController.php:131 +#, php-format +msgid "Hay notificaciones pendientes: %d" +msgstr "There are pending notifications: %d" + #: ../../../modules/web/Controllers/LoginController.php:119 msgid "Finalizar sesión" msgstr "Logout session" @@ -4318,28 +4328,28 @@ msgstr "Inactive time" msgid "Tiempo total" msgstr "Total time" -#: ../../../modules/web/Controllers/NotificationController.php:251 -#: ../../../modules/web/Controllers/NotificationController.php:254 +#: ../../../modules/web/Controllers/NotificationController.php:255 +#: ../../../modules/web/Controllers/NotificationController.php:258 msgid "Notificaciones eliminadas" msgstr "Notifications deleted" -#: ../../../modules/web/Controllers/NotificationController.php:266 #: ../../../modules/web/Controllers/NotificationController.php:270 +#: ../../../modules/web/Controllers/NotificationController.php:274 msgid "Notificación eliminada" msgstr "Notification deleted" -#: ../../../modules/web/Controllers/NotificationController.php:297 #: ../../../modules/web/Controllers/NotificationController.php:301 +#: ../../../modules/web/Controllers/NotificationController.php:305 msgid "Notificación leída" msgstr "Notification read" -#: ../../../modules/web/Controllers/NotificationController.php:327 -#: ../../../modules/web/Controllers/NotificationController.php:330 +#: ../../../modules/web/Controllers/NotificationController.php:331 +#: ../../../modules/web/Controllers/NotificationController.php:334 msgid "Notificación creada" msgstr "Notification created" -#: ../../../modules/web/Controllers/NotificationController.php:360 -#: ../../../modules/web/Controllers/NotificationController.php:363 +#: ../../../modules/web/Controllers/NotificationController.php:364 +#: ../../../modules/web/Controllers/NotificationController.php:367 msgid "Notificación actualizada" msgstr "Notification updated" @@ -4516,11 +4526,11 @@ msgstr "Profile updated" msgid "Ver Perfil" msgstr "View Profile" -#: ../../../modules/web/Controllers/UserSettingsGeneralController.php:70 +#: ../../../modules/web/Controllers/UserSettingsGeneralController.php:71 msgid "Preferencias actualizadas" msgstr "Preferences updated" -#: ../../../modules/web/Controllers/UserSettingsManagerController.php:92 +#: ../../../modules/web/Controllers/UserSettingsManagerController.php:93 msgid "Preferencias" msgstr "Preferences" @@ -4581,15 +4591,15 @@ msgstr "Invalid regular expression" msgid "Es necesario asignar un elemento del tipo usuario, grupo o perfil" msgstr "An element of type user, group or profile need to be set" -#: ../../../modules/web/Forms/NotificationForm.php:92 +#: ../../../modules/web/Forms/NotificationForm.php:98 msgid "Es necesario un componente" msgstr "A component is needed" -#: ../../../modules/web/Forms/NotificationForm.php:96 +#: ../../../modules/web/Forms/NotificationForm.php:102 msgid "Es necesario un tipo" msgstr "A type is needed" -#: ../../../modules/web/Forms/NotificationForm.php:106 +#: ../../../modules/web/Forms/NotificationForm.php:112 msgid "Es necesario un destinatario" msgstr "A target is needed" @@ -5068,30 +5078,19 @@ msgstr "Clear tracks out?" msgid "Javascript es necesario para el correcto funcionamiento" msgstr "Javascript is needed in order to run correctly" -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:40 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:110 -#, php-format -msgid "Hay %d notificaciones pendientes" -msgstr "There are %d unread notifications" - -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:42 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:112 -msgid "No hay no hay notificaciones pendientes" -msgstr "There aren't any pending notifications" - -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:69 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:131 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:64 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:121 msgid "Preferencias de usuario" msgstr "User preferences" -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:73 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:76 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:149 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:152 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:68 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:71 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:139 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:142 msgid "Salir" msgstr "Sign Out" -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:165 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:155 #: ../../../modules/web/themes/material-blue/views/_partials/footer.inc:43 msgid "Demo" msgstr "Demo" @@ -7171,6 +7170,14 @@ msgid "" "Mostrar las acciones ocultas para los elementos de la búsqueda de cuentas." msgstr "Always show the hidden actions on the accounts search page." +#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:165 +msgid "Notificaciones In-App" +msgstr "In-App Notifications" + +#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:167 +msgid "Habilita la consulta de notificaciones activas In-App." +msgstr "Enables the active In-App notifications polling" + #. (itstool) path: action/text #: ../../../modules/web/themes/material-blue/views/wiki/wikipage.inc:2 #: ../../../config/actions.xml:277 @@ -7552,6 +7559,9 @@ msgstr "Text" msgid "Link" msgstr "Link" +#~ msgid "Hay %d notificaciones pendientes" +#~ msgstr "There are %d unread notifications" + #~ msgid "Id de grupo de usuario" #~ msgstr "User group Id" diff --git a/app/locales/en_US/LC_MESSAGES/messages.mo b/app/locales/en_US/LC_MESSAGES/messages.mo index 9b1e1e80..2b914bb4 100644 Binary files a/app/locales/en_US/LC_MESSAGES/messages.mo and b/app/locales/en_US/LC_MESSAGES/messages.mo differ diff --git a/app/locales/en_US/LC_MESSAGES/messages.po b/app/locales/en_US/LC_MESSAGES/messages.po index 7006c1dc..70718182 100644 --- a/app/locales/en_US/LC_MESSAGES/messages.po +++ b/app/locales/en_US/LC_MESSAGES/messages.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: sysPass\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-10-15 02:52+0200\n" -"PO-Revision-Date: 2018-10-15 02:53+0200\n" +"POT-Creation-Date: 2018-10-16 01:07+0200\n" +"PO-Revision-Date: 2018-10-16 01:09+0200\n" "Last-Translator: nuxsmin \n" "Language-Team: nuxsmin@syspass.org\n" "Language: en_US\n" @@ -192,14 +192,14 @@ msgstr "Action not found" #: ../../../modules/web/Controllers/ItemPresetController.php:256 #: ../../../modules/web/Controllers/ItemPresetController.php:295 #: ../../../modules/web/Controllers/ItemPresetController.php:334 -#: ../../../modules/web/Controllers/NotificationController.php:100 -#: ../../../modules/web/Controllers/NotificationController.php:160 -#: ../../../modules/web/Controllers/NotificationController.php:175 -#: ../../../modules/web/Controllers/NotificationController.php:206 -#: ../../../modules/web/Controllers/NotificationController.php:237 -#: ../../../modules/web/Controllers/NotificationController.php:288 -#: ../../../modules/web/Controllers/NotificationController.php:315 -#: ../../../modules/web/Controllers/NotificationController.php:348 +#: ../../../modules/web/Controllers/NotificationController.php:102 +#: ../../../modules/web/Controllers/NotificationController.php:164 +#: ../../../modules/web/Controllers/NotificationController.php:179 +#: ../../../modules/web/Controllers/NotificationController.php:210 +#: ../../../modules/web/Controllers/NotificationController.php:241 +#: ../../../modules/web/Controllers/NotificationController.php:292 +#: ../../../modules/web/Controllers/NotificationController.php:319 +#: ../../../modules/web/Controllers/NotificationController.php:352 #: ../../../modules/web/Controllers/PluginController.php:103 #: ../../../modules/web/Controllers/PluginController.php:122 #: ../../../modules/web/Controllers/PublicLinkController.php:71 @@ -320,12 +320,12 @@ msgstr "Invalid icons class" #: ../../../../lib/SP/DataModel/PublicLinkListData.php:88 #: ../../../../lib/SP/Providers/Auth/Ldap/LdapConnection.php:190 -#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:228 msgid "ON" msgstr "ON" #: ../../../../lib/SP/DataModel/PublicLinkListData.php:88 -#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:228 msgid "OFF" msgstr "OFF" @@ -356,7 +356,8 @@ msgstr "Invalid XML-RPC response" msgid "La sesión no se ha iniciado o ha caducado" msgstr "Session not started or timed out" -#: ../../../../lib/SP/Mvc/Controller/ControllerTrait.php:124 +#: ../../../../lib/SP/Mvc/Controller/ControllerTrait.php:119 +#: ../../../../lib/SP/Mvc/Controller/ControllerTrait.php:128 msgid "Acción Inválida" msgstr "Invalid Action" @@ -532,7 +533,7 @@ msgstr "Error while searching the group RDN" #: ../../../modules/web/Controllers/Helpers/Grid/ItemPresetGrid.php:108 #: ../../../modules/web/Controllers/Helpers/Grid/UserGrid.php:118 #: ../../../modules/web/Controllers/UserGroupController.php:231 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:137 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:127 #: ../../../modules/web/themes/material-blue/views/_partials/footer.inc:15 #: ../../../modules/web/themes/material-blue/views/config/encryption.inc:269 #: ../../../modules/web/themes/material-blue/views/config/encryption.inc:272 @@ -622,7 +623,7 @@ msgid "No es posible inicializar" msgstr "Unable to initialize" #: ../../../../lib/SP/Providers/Notification/NotificationHandler.php:124 -#: ../../../modules/web/Controllers/AccountController.php:925 +#: ../../../modules/web/Controllers/AccountController.php:927 msgid "Solicitud" msgstr "Request" @@ -640,8 +641,8 @@ msgid "Cuentas" msgstr "Accounts" #: ../../../../lib/SP/Providers/Notification/NotificationHandler.php:155 -#: ../../../modules/web/Controllers/NotificationController.php:267 -#: ../../../modules/web/Controllers/NotificationController.php:298 +#: ../../../modules/web/Controllers/NotificationController.php:271 +#: ../../../modules/web/Controllers/NotificationController.php:302 msgid "Notificación" msgstr "Notification" @@ -1534,13 +1535,13 @@ msgstr "Account imported" #: ../../../modules/api/Controllers/AccountController.php:190 #: ../../../modules/api/Controllers/AccountController.php:241 #: ../../../modules/api/Controllers/AccountController.php:316 -#: ../../../modules/web/Controllers/AccountController.php:224 -#: ../../../modules/web/Controllers/AccountController.php:719 -#: ../../../modules/web/Controllers/AccountController.php:764 -#: ../../../modules/web/Controllers/AccountController.php:805 -#: ../../../modules/web/Controllers/AccountController.php:844 -#: ../../../modules/web/Controllers/AccountController.php:894 -#: ../../../modules/web/Controllers/AccountController.php:928 +#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:721 +#: ../../../modules/web/Controllers/AccountController.php:766 +#: ../../../modules/web/Controllers/AccountController.php:807 +#: ../../../modules/web/Controllers/AccountController.php:846 +#: ../../../modules/web/Controllers/AccountController.php:896 +#: ../../../modules/web/Controllers/AccountController.php:930 #: ../../../modules/web/Controllers/AccountFileController.php:234 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:112 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:147 @@ -2332,15 +2333,15 @@ msgid "Cuenta visualizada" msgstr "Account displayed" #: ../../../modules/api/Controllers/AccountController.php:102 -#: ../../../modules/web/Controllers/AccountController.php:553 -#: ../../../modules/web/Controllers/AccountController.php:609 +#: ../../../modules/web/Controllers/AccountController.php:555 +#: ../../../modules/web/Controllers/AccountController.php:611 msgid "Clave visualizada" msgstr "Password viewed" #: ../../../modules/api/Controllers/AccountController.php:138 #: ../../../modules/api/Controllers/AccountController.php:144 -#: ../../../modules/web/Controllers/AccountController.php:803 -#: ../../../modules/web/Controllers/AccountController.php:814 +#: ../../../modules/web/Controllers/AccountController.php:805 +#: ../../../modules/web/Controllers/AccountController.php:816 #: ../../../modules/web/Controllers/UserController.php:411 #: ../../../modules/web/Controllers/UserController.php:415 #: ../../../modules/web/Controllers/UserPassResetController.php:189 @@ -2350,22 +2351,22 @@ msgstr "Password updated" #: ../../../modules/api/Controllers/AccountController.php:188 #: ../../../modules/api/Controllers/AccountController.php:194 -#: ../../../modules/web/Controllers/AccountController.php:717 -#: ../../../modules/web/Controllers/AccountController.php:728 +#: ../../../modules/web/Controllers/AccountController.php:719 +#: ../../../modules/web/Controllers/AccountController.php:730 msgid "Cuenta creada" msgstr "Account added" #: ../../../modules/api/Controllers/AccountController.php:239 #: ../../../modules/api/Controllers/AccountController.php:245 -#: ../../../modules/web/Controllers/AccountController.php:762 -#: ../../../modules/web/Controllers/AccountController.php:773 +#: ../../../modules/web/Controllers/AccountController.php:764 +#: ../../../modules/web/Controllers/AccountController.php:775 msgid "Cuenta actualizada" msgstr "Account updated" #: ../../../modules/api/Controllers/AccountController.php:314 #: ../../../modules/api/Controllers/AccountController.php:320 -#: ../../../modules/web/Controllers/AccountController.php:892 -#: ../../../modules/web/Controllers/AccountController.php:897 +#: ../../../modules/web/Controllers/AccountController.php:894 +#: ../../../modules/web/Controllers/AccountController.php:899 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:110 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:115 #: ../../../modules/web/Controllers/AccountManagerController.php:145 @@ -2737,9 +2738,9 @@ msgstr "Group deleted" msgid "Es necesario actualizar" msgstr "Updating needed" -#: ../../../modules/web/Controllers/AccountController.php:148 -#: ../../../modules/web/Controllers/AccountController.php:203 -#: ../../../modules/web/Controllers/AccountController.php:473 +#: ../../../modules/web/Controllers/AccountController.php:150 +#: ../../../modules/web/Controllers/AccountController.php:205 +#: ../../../modules/web/Controllers/AccountController.php:475 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:60 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:61 #: ../../../modules/web/Controllers/Helpers/Grid/AccountGrid.php:159 @@ -2749,21 +2750,21 @@ msgstr "Updating needed" msgid "Detalles de Cuenta" msgstr "Account Details" -#: ../../../modules/web/Controllers/AccountController.php:222 +#: ../../../modules/web/Controllers/AccountController.php:224 msgid "Enlace visualizado" msgstr "Link viewed" -#: ../../../modules/web/Controllers/AccountController.php:223 -#: ../../../modules/web/Controllers/AccountController.php:554 -#: ../../../modules/web/Controllers/AccountController.php:610 -#: ../../../modules/web/Controllers/AccountController.php:649 -#: ../../../modules/web/Controllers/AccountController.php:683 -#: ../../../modules/web/Controllers/AccountController.php:718 -#: ../../../modules/web/Controllers/AccountController.php:763 -#: ../../../modules/web/Controllers/AccountController.php:804 -#: ../../../modules/web/Controllers/AccountController.php:843 -#: ../../../modules/web/Controllers/AccountController.php:893 -#: ../../../modules/web/Controllers/AccountController.php:927 +#: ../../../modules/web/Controllers/AccountController.php:225 +#: ../../../modules/web/Controllers/AccountController.php:556 +#: ../../../modules/web/Controllers/AccountController.php:612 +#: ../../../modules/web/Controllers/AccountController.php:651 +#: ../../../modules/web/Controllers/AccountController.php:685 +#: ../../../modules/web/Controllers/AccountController.php:720 +#: ../../../modules/web/Controllers/AccountController.php:765 +#: ../../../modules/web/Controllers/AccountController.php:806 +#: ../../../modules/web/Controllers/AccountController.php:845 +#: ../../../modules/web/Controllers/AccountController.php:895 +#: ../../../modules/web/Controllers/AccountController.php:929 #: ../../../modules/web/Controllers/AccountFileController.php:233 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:111 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:146 @@ -2777,24 +2778,24 @@ msgstr "Link viewed" msgid "Cuenta" msgstr "Account" -#: ../../../modules/web/Controllers/AccountController.php:225 +#: ../../../modules/web/Controllers/AccountController.php:227 msgid "Agente" msgstr "Agent" -#: ../../../modules/web/Controllers/AccountController.php:226 +#: ../../../modules/web/Controllers/AccountController.php:228 msgid "HTTPS" msgstr "HTTPS" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/AccountController.php:255 -#: ../../../modules/web/Controllers/AccountController.php:299 -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:280 +#: ../../../modules/web/Controllers/AccountController.php:257 +#: ../../../modules/web/Controllers/AccountController.php:301 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:279 #: ../../../config/actions.xml:157 msgid "Nueva Cuenta" msgstr "New Account" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/AccountController.php:343 +#: ../../../modules/web/Controllers/AccountController.php:345 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:176 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:177 #: ../../../modules/web/themes/material-blue/views/account/linkedAccounts.inc:18 @@ -2803,7 +2804,7 @@ msgid "Editar Cuenta" msgstr "Edit Account" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/AccountController.php:388 +#: ../../../modules/web/Controllers/AccountController.php:390 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:334 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:335 #: ../../../modules/web/Controllers/Helpers/Grid/AccountGrid.php:176 @@ -2815,26 +2816,26 @@ msgstr "Edit Account" msgid "Eliminar Cuenta" msgstr "Remove Account" -#: ../../../modules/web/Controllers/AccountController.php:431 +#: ../../../modules/web/Controllers/AccountController.php:433 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:155 #: ../../../modules/web/Controllers/Helpers/Account/AccountActionsHelper.php:156 msgid "Modificar Clave de Cuenta" msgstr "Edit Account Password" -#: ../../../modules/web/Controllers/AccountController.php:648 -#: ../../../modules/web/Controllers/AccountController.php:682 +#: ../../../modules/web/Controllers/AccountController.php:650 +#: ../../../modules/web/Controllers/AccountController.php:684 msgid "Clave copiada" msgstr "Password copied" -#: ../../../modules/web/Controllers/AccountController.php:842 -#: ../../../modules/web/Controllers/AccountController.php:853 +#: ../../../modules/web/Controllers/AccountController.php:844 +#: ../../../modules/web/Controllers/AccountController.php:855 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:145 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:150 msgid "Cuenta restaurada" msgstr "Account restored" -#: ../../../modules/web/Controllers/AccountController.php:878 -#: ../../../modules/web/Controllers/AccountController.php:881 +#: ../../../modules/web/Controllers/AccountController.php:880 +#: ../../../modules/web/Controllers/AccountController.php:883 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:99 #: ../../../modules/web/Controllers/AccountHistoryManagerController.php:102 #: ../../../modules/web/Controllers/AccountManagerController.php:131 @@ -2842,16 +2843,16 @@ msgstr "Account restored" msgid "Cuentas eliminadas" msgstr "Accounts removed" -#: ../../../modules/web/Controllers/AccountController.php:918 -#: ../../../modules/web/Forms/NotificationForm.php:100 +#: ../../../modules/web/Controllers/AccountController.php:920 +#: ../../../modules/web/Forms/NotificationForm.php:106 msgid "Es necesaria una descripción" msgstr "A description is needed" -#: ../../../modules/web/Controllers/AccountController.php:926 +#: ../../../modules/web/Controllers/AccountController.php:928 msgid "Solicitante" msgstr "Requester" -#: ../../../modules/web/Controllers/AccountController.php:929 +#: ../../../modules/web/Controllers/AccountController.php:931 #: ../../../modules/web/Controllers/Helpers/Grid/CategoryGrid.php:106 #: ../../../modules/web/Controllers/Helpers/Grid/ClientGrid.php:105 #: ../../../modules/web/Controllers/Helpers/Grid/EventlogGrid.php:105 @@ -2865,7 +2866,7 @@ msgstr "Requester" msgid "Descripción" msgstr "Description" -#: ../../../modules/web/Controllers/AccountController.php:942 +#: ../../../modules/web/Controllers/AccountController.php:944 msgid "Solicitud realizada" msgstr "Request done" @@ -3453,7 +3454,7 @@ msgstr "View Current" #: ../../../modules/web/themes/material-blue/views/config/ldap.inc:437 #: ../../../modules/web/themes/material-blue/views/config/mail.inc:206 #: ../../../modules/web/themes/material-blue/views/config/wiki.inc:291 -#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:167 +#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:184 msgid "Atrás" msgstr "Back" @@ -3914,7 +3915,7 @@ msgstr "Delete Value" #. (itstool) path: action/text #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:108 #: ../../../modules/web/themes/material-blue/inc/Icons.php:65 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:105 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:100 #: ../../../modules/web/themes/material-blue/views/notification/index.inc:1 #: ../../../config/actions.xml:679 msgid "Notificaciones" @@ -3944,14 +3945,14 @@ msgstr "Search for Notification" #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:178 #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:179 -#: ../../../modules/web/Controllers/NotificationController.php:179 +#: ../../../modules/web/Controllers/NotificationController.php:183 msgid "Nueva Notificación" msgstr "New Notification" #. (itstool) path: action/text #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:196 #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:197 -#: ../../../modules/web/Controllers/NotificationController.php:103 +#: ../../../modules/web/Controllers/NotificationController.php:105 #: ../../../config/actions.xml:811 msgid "Ver Notificación" msgstr "View Notification" @@ -3966,7 +3967,7 @@ msgstr "Checkout Notification" #. (itstool) path: action/text #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:244 #: ../../../modules/web/Controllers/Helpers/Grid/NotificationGrid.php:245 -#: ../../../modules/web/Controllers/NotificationController.php:210 +#: ../../../modules/web/Controllers/NotificationController.php:214 #: ../../../config/actions.xml:823 msgid "Editar Notificación" msgstr "Edit Notification" @@ -3979,7 +3980,7 @@ msgid "Eliminar Notificación" msgstr "Delete Notification" #: ../../../modules/web/Controllers/Helpers/Grid/PluginGrid.php:89 -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:336 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:335 #: ../../../modules/web/themes/material-blue/views/plugin/index.inc:1 msgid "Plugins" msgstr "Plugins" @@ -4166,9 +4167,9 @@ msgstr "View User Details" #: ../../../modules/web/Controllers/Helpers/Grid/UserGrid.php:257 #: ../../../modules/web/Controllers/Helpers/Grid/UserGrid.php:258 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:62 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:120 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:126 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:57 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:110 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:116 msgid "Cambiar Clave de Usuario" msgstr "Change User's Password" @@ -4248,13 +4249,13 @@ msgstr "Edit Profile" msgid "Eliminar Perfil" msgstr "Delete Profile" -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:267 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:266 #: ../../../modules/web/themes/material-blue/inc/Icons.php:58 msgid "Buscar" msgstr "Search" #. (itstool) path: action/text -#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:350 +#: ../../../modules/web/Controllers/Helpers/LayoutHelper.php:349 #: ../../../modules/web/themes/material-blue/inc/Icons.php:61 #: ../../../modules/web/themes/material-blue/views/config/ldap.inc:21 #: ../../../modules/web/themes/material-blue/views/itemshow/user_profile.inc:22 @@ -4306,6 +4307,15 @@ msgstr "Value created" msgid "Valor actualizado" msgstr "Value updated" +#: ../../../modules/web/Controllers/ItemsController.php:130 +msgid "No hay no hay notificaciones pendientes" +msgstr "There aren't any pending notifications" + +#: ../../../modules/web/Controllers/ItemsController.php:131 +#, php-format +msgid "Hay notificaciones pendientes: %d" +msgstr "There are pending notifications: %d" + #: ../../../modules/web/Controllers/LoginController.php:119 msgid "Finalizar sesión" msgstr "Logout session" @@ -4318,28 +4328,28 @@ msgstr "Inactive time" msgid "Tiempo total" msgstr "Total time" -#: ../../../modules/web/Controllers/NotificationController.php:251 -#: ../../../modules/web/Controllers/NotificationController.php:254 +#: ../../../modules/web/Controllers/NotificationController.php:255 +#: ../../../modules/web/Controllers/NotificationController.php:258 msgid "Notificaciones eliminadas" msgstr "Notifications deleted" -#: ../../../modules/web/Controllers/NotificationController.php:266 #: ../../../modules/web/Controllers/NotificationController.php:270 +#: ../../../modules/web/Controllers/NotificationController.php:274 msgid "Notificación eliminada" msgstr "Notification deleted" -#: ../../../modules/web/Controllers/NotificationController.php:297 #: ../../../modules/web/Controllers/NotificationController.php:301 +#: ../../../modules/web/Controllers/NotificationController.php:305 msgid "Notificación leída" msgstr "Notification read" -#: ../../../modules/web/Controllers/NotificationController.php:327 -#: ../../../modules/web/Controllers/NotificationController.php:330 +#: ../../../modules/web/Controllers/NotificationController.php:331 +#: ../../../modules/web/Controllers/NotificationController.php:334 msgid "Notificación creada" msgstr "Notification created" -#: ../../../modules/web/Controllers/NotificationController.php:360 -#: ../../../modules/web/Controllers/NotificationController.php:363 +#: ../../../modules/web/Controllers/NotificationController.php:364 +#: ../../../modules/web/Controllers/NotificationController.php:367 msgid "Notificación actualizada" msgstr "Notification updated" @@ -4516,11 +4526,11 @@ msgstr "Profile updated" msgid "Ver Perfil" msgstr "View Profile" -#: ../../../modules/web/Controllers/UserSettingsGeneralController.php:70 +#: ../../../modules/web/Controllers/UserSettingsGeneralController.php:71 msgid "Preferencias actualizadas" msgstr "Preferences updated" -#: ../../../modules/web/Controllers/UserSettingsManagerController.php:92 +#: ../../../modules/web/Controllers/UserSettingsManagerController.php:93 msgid "Preferencias" msgstr "Preferences" @@ -4581,15 +4591,15 @@ msgstr "Invalid regular expression" msgid "Es necesario asignar un elemento del tipo usuario, grupo o perfil" msgstr "An element of type user, group or profile need to be set" -#: ../../../modules/web/Forms/NotificationForm.php:92 +#: ../../../modules/web/Forms/NotificationForm.php:98 msgid "Es necesario un componente" msgstr "A component is needed" -#: ../../../modules/web/Forms/NotificationForm.php:96 +#: ../../../modules/web/Forms/NotificationForm.php:102 msgid "Es necesario un tipo" msgstr "A type is needed" -#: ../../../modules/web/Forms/NotificationForm.php:106 +#: ../../../modules/web/Forms/NotificationForm.php:112 msgid "Es necesario un destinatario" msgstr "A target is needed" @@ -5068,30 +5078,19 @@ msgstr "Clear tracks out?" msgid "Javascript es necesario para el correcto funcionamiento" msgstr "Javascript is needed in order to run correctly" -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:40 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:110 -#, php-format -msgid "Hay %d notificaciones pendientes" -msgstr "There are %d unread notifications" - -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:42 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:112 -msgid "No hay no hay notificaciones pendientes" -msgstr "There aren't any pending notifications" - -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:69 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:131 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:64 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:121 msgid "Preferencias de usuario" msgstr "User preferences" -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:73 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:76 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:149 -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:152 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:68 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:71 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:139 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:142 msgid "Salir" msgstr "Sign Out" -#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:165 +#: ../../../modules/web/themes/material-blue/views/_partials/fixed-header.inc:155 #: ../../../modules/web/themes/material-blue/views/_partials/footer.inc:43 msgid "Demo" msgstr "Demo" @@ -7171,6 +7170,14 @@ msgid "" "Mostrar las acciones ocultas para los elementos de la búsqueda de cuentas." msgstr "Always show the hidden actions on the accounts search page." +#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:165 +msgid "Notificaciones In-App" +msgstr "In-App Notifications" + +#: ../../../modules/web/themes/material-blue/views/usersettings/general.inc:167 +msgid "Habilita la consulta de notificaciones activas In-App." +msgstr "Enables the active In-App notifications polling" + #. (itstool) path: action/text #: ../../../modules/web/themes/material-blue/views/wiki/wikipage.inc:2 #: ../../../config/actions.xml:277 @@ -7552,6 +7559,9 @@ msgstr "Text" msgid "Link" msgstr "Link" +#~ msgid "Hay %d notificaciones pendientes" +#~ msgstr "There are %d unread notifications" + #~ msgid "Id de grupo de usuario" #~ msgstr "User group Id" diff --git a/app/modules/web/Controllers/AccountController.php b/app/modules/web/Controllers/AccountController.php index c1d3a751..79352c19 100644 --- a/app/modules/web/Controllers/AccountController.php +++ b/app/modules/web/Controllers/AccountController.php @@ -102,8 +102,10 @@ final class AccountController extends ControllerBase implements CrudControllerIn public function searchAction() { try { - $AccountSearchHelper = $this->dic->get(AccountSearchHelper::class); - $AccountSearchHelper->getAccountSearch(); + $this->checkSecurityToken($this->session, $this->request); + + $accountSearchHelper = $this->dic->get(AccountSearchHelper::class); + $accountSearchHelper->getAccountSearch(); $this->eventDispatcher->notifyEvent('show.account.search', new Event($this)); diff --git a/app/modules/web/Controllers/BootstrapController.php b/app/modules/web/Controllers/BootstrapController.php index 4764f4ad..74deb497 100644 --- a/app/modules/web/Controllers/BootstrapController.php +++ b/app/modules/web/Controllers/BootstrapController.php @@ -60,6 +60,7 @@ final class BootstrapController extends SimpleControllerBase 'max_file_size' => $this->configData->getFilesAllowedSize(), 'check_updates' => $checkStatus && $this->configData->isCheckUpdates(), 'check_notices' => $checkStatus && $this->configData->isChecknotices(), + 'check_notifications' => $this->getNotificationsEnabled(), 'timezone' => date_default_timezone_get(), 'debug' => DEBUG || $this->configData->isDebug(), 'cookies_enabled' => $this->getCookiesEnabled(), @@ -69,7 +70,8 @@ final class BootstrapController extends SimpleControllerBase 'pki_key' => $this->getPublicKey(), 'pki_max_size' => CryptPKI::getMaxDataSize(), 'import_allowed_exts' => ImportService::ALLOWED_EXTS, - 'files_allowed_exts' => $this->configData->getFilesAllowedExts() + 'files_allowed_exts' => $this->configData->getFilesAllowedExts(), + 'session_timeout' => $this->configData->getSessionTimeout() ]; return $this->returnJsonResponseData($data); @@ -83,6 +85,18 @@ final class BootstrapController extends SimpleControllerBase return require CONFIG_PATH . DIRECTORY_SEPARATOR . 'strings.js.inc'; } + /** + * @return bool + */ + private function getNotificationsEnabled() + { + if ($this->session->isLoggedIn()) { + return $this->session->getUserData()->getPreferences()->isCheckNotifications(); + } + + return false; + } + /** * @return bool */ diff --git a/app/modules/web/Controllers/Helpers/LayoutHelper.php b/app/modules/web/Controllers/Helpers/LayoutHelper.php index 340a89cb..e377e3ca 100644 --- a/app/modules/web/Controllers/Helpers/LayoutHelper.php +++ b/app/modules/web/Controllers/Helpers/LayoutHelper.php @@ -249,7 +249,6 @@ final class LayoutHelper extends HelperBase $this->view->assign('ctx_userName', $userData->getName() ?: mb_strtoupper($userData->getLogin())); $this->view->assign('ctx_userGroup', $userData->getUserGroupName()); $this->view->assign('showPassIcon', !($this->configData->isLdapEnabled() && $userData->getIsLdap())); - $this->view->assign('notifications', 0); } /** diff --git a/app/modules/web/Controllers/ItemsController.php b/app/modules/web/Controllers/ItemsController.php index e8608952..1ed2b1ec 100644 --- a/app/modules/web/Controllers/ItemsController.php +++ b/app/modules/web/Controllers/ItemsController.php @@ -25,6 +25,8 @@ namespace SP\Modules\Web\Controllers; use SP\DataModel\DataModelInterface; +use SP\DataModel\NotificationData; +use SP\Html\Html; use SP\Http\Json; use SP\Http\JsonResponse; use SP\Mvc\View\Components\SelectItemAdapter; @@ -81,7 +83,10 @@ final class ItemsController extends SimpleControllerBase public function clientsAction() { Json::factory($this->router->response()) - ->returnRawJson(SelectItemAdapter::factory($this->dic->get(ClientService::class)->getAllForUser())->getJsonItemsFromModel()); + ->returnRawJson( + SelectItemAdapter::factory( + $this->dic->get(ClientService::class) + ->getAllForUser())->getJsonItemsFromModel()); } /** @@ -94,7 +99,10 @@ final class ItemsController extends SimpleControllerBase public function categoriesAction() { Json::factory($this->router->response()) - ->returnRawJson(SelectItemAdapter::factory($this->dic->get(CategoryService::class)->getAllBasic())->getJsonItemsFromModel()); + ->returnRawJson( + SelectItemAdapter::factory( + $this->dic->get(CategoryService::class) + ->getAllBasic())->getJsonItemsFromModel()); } /** @@ -106,8 +114,29 @@ final class ItemsController extends SimpleControllerBase */ public function notificationsAction() { + $notifications = array_map( + function ($notification) { + /** @@var $notification NotificationData */ + return sprintf('(%s) - %s', $notification->getComponent(), Html::truncate($notification->getDescription(), 30)); + }, $this->dic + ->get(NotificationService::class) + ->getAllActiveForUserId($this->session->getUserData()->getId())); + + $count = count($notifications); + + $jsonResponse = new JsonResponse(); + $jsonResponse->setStatus(0); + $jsonResponse->setData([ + 'message' => __('No hay no hay notificaciones pendientes'), + 'message_has' => sprintf(__('Hay notificaciones pendientes: %d'), $count), + 'count' => $count, + 'notifications' => $notifications, + 'hash' => sha1(implode('', $notifications)) + ]); + $jsonResponse->setCsrf($this->session->getSecurityKey()); + Json::factory($this->router->response()) - ->returnRawJson(Json::getJson($this->dic->get(NotificationService::class)->getAllActiveForUserId($this->session->getUserData()->getId()))); + ->returnJson($jsonResponse); } /** @@ -120,7 +149,10 @@ final class ItemsController extends SimpleControllerBase public function tagsAction() { Json::factory($this->router->response()) - ->returnRawJson(SelectItemAdapter::factory($this->dic->get(TagService::class)->getAllBasic())->getJsonItemsFromModel()); + ->returnRawJson( + SelectItemAdapter::factory( + $this->dic->get(TagService::class) + ->getAllBasic())->getJsonItemsFromModel()); } /** diff --git a/app/modules/web/Controllers/NotificationController.php b/app/modules/web/Controllers/NotificationController.php index d87f133d..2a79527a 100644 --- a/app/modules/web/Controllers/NotificationController.php +++ b/app/modules/web/Controllers/NotificationController.php @@ -75,6 +75,8 @@ final class NotificationController extends ControllerBase implements CrudControl * getSearchGrid * * @return $this + * @throws \DI\DependencyException + * @throws \DI\NotFoundException * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ @@ -151,6 +153,8 @@ final class NotificationController extends ControllerBase implements CrudControl /** * @return bool + * @throws \DI\DependencyException + * @throws \DI\NotFoundException * @throws \SP\Core\Exceptions\ConstraintException * @throws \SP\Core\Exceptions\QueryException */ @@ -369,6 +373,8 @@ final class NotificationController extends ControllerBase implements CrudControl } /** + * @throws \DI\DependencyException + * @throws \DI\NotFoundException * @throws \SP\Services\Auth\AuthException */ protected function initialize() diff --git a/app/modules/web/Controllers/SimpleControllerBase.php b/app/modules/web/Controllers/SimpleControllerBase.php index d714dae8..29dffddb 100644 --- a/app/modules/web/Controllers/SimpleControllerBase.php +++ b/app/modules/web/Controllers/SimpleControllerBase.php @@ -69,12 +69,16 @@ abstract class SimpleControllerBase */ protected function checks() { - $this->checkLoggedInSession($this->session, $this->request, function ($redirect) { - $this->router->response() - ->redirect($redirect) - ->send(true); - }); - $this->checkSecurityToken($this->session, $this->request); + $this->checkLoggedInSession( + $this->session, + $this->request, + function ($redirect) { + $this->router->response() + ->redirect($redirect) + ->send(true); + } + ); +// $this->checkSecurityToken($this->session, $this->request); } /** diff --git a/app/modules/web/Controllers/Traits/JsonTrait.php b/app/modules/web/Controllers/Traits/JsonTrait.php index 2dbb5038..ced1a8d7 100644 --- a/app/modules/web/Controllers/Traits/JsonTrait.php +++ b/app/modules/web/Controllers/Traits/JsonTrait.php @@ -24,6 +24,7 @@ namespace SP\Modules\Web\Controllers\Traits; +use SP\Core\Context\SessionContext; use SP\Core\Exceptions\SPException; use SP\Http\Json; use SP\Http\JsonResponse; @@ -32,6 +33,7 @@ use SP\Http\JsonResponse; * Trait JsonTrait * * @package SP\Modules\Web\Controllers\Traits + * @property SessionContext $session */ trait JsonTrait { @@ -50,6 +52,10 @@ trait JsonTrait $jsonResponse->setStatus($status); $jsonResponse->setDescription($description); + if (property_exists($this, 'session')) { + $jsonResponse->setCsrf($this->session->getSecurityKey()); + } + if (null !== $messages) { $jsonResponse->setMessages($messages); } @@ -73,6 +79,10 @@ trait JsonTrait $jsonResponse->setStatus($status); $jsonResponse->setData($data); + if (property_exists($this, 'session')) { + $jsonResponse->setCsrf($this->session->getSecurityKey()); + } + if (null !== $description) { $jsonResponse->setDescription($description); } diff --git a/app/modules/web/Controllers/UserSettingsGeneralController.php b/app/modules/web/Controllers/UserSettingsGeneralController.php index 6c09f453..c3804734 100644 --- a/app/modules/web/Controllers/UserSettingsGeneralController.php +++ b/app/modules/web/Controllers/UserSettingsGeneralController.php @@ -60,6 +60,7 @@ final class UserSettingsGeneralController extends SimpleControllerBase $userPreferencesData->setTopNavbar($this->request->analyzeBool('top_navbar', false)); $userPreferencesData->setOptionalActions($this->request->analyzeBool('optional_actions', false)); $userPreferencesData->setResultsAsCards($this->request->analyzeBool('resultsascards', false)); + $userPreferencesData->setCheckNotifications($this->request->analyzeBool('check_notifications', false)); try { $this->userService->updatePreferencesById($userData->getId(), $userPreferencesData); diff --git a/app/modules/web/Controllers/UserSettingsManagerController.php b/app/modules/web/Controllers/UserSettingsManagerController.php index e3e62bbc..fcab6593 100644 --- a/app/modules/web/Controllers/UserSettingsManagerController.php +++ b/app/modules/web/Controllers/UserSettingsManagerController.php @@ -87,6 +87,7 @@ final class UserSettingsManagerController extends ControllerBase implements Exte $template->assign('chkTopNavbar', $userPreferences->isTopNavbar() ? 'checked="checked"' : ''); $template->assign('chkOptionalActions', $userPreferences->isOptionalActions() ? 'checked="checked"' : ''); $template->assign('chkResultsAsCards', $userPreferences->isResultsAsCards() ? 'checked="checked"' : ''); + $template->assign('chkNotifications', $userPreferences->isCheckNotifications() ? 'checked="checked"' : ''); $template->assign('route', 'userSettingsGeneral/save'); return new DataTab(__('Preferencias'), $template); diff --git a/app/modules/web/Forms/NotificationForm.php b/app/modules/web/Forms/NotificationForm.php index 8b014fe4..e82d361b 100644 --- a/app/modules/web/Forms/NotificationForm.php +++ b/app/modules/web/Forms/NotificationForm.php @@ -73,11 +73,17 @@ final class NotificationForm extends FormBase implements FormInterface $this->notificationData->setId($this->itemId); $this->notificationData->setType($this->request->analyzeString('notification_type')); $this->notificationData->setComponent($this->request->analyzeString('notification_component')); - $this->notificationData->setDescription(NotificationMessage::factory()->addDescription($this->request->analyzeString('notification_description'))); + + $description = NotificationMessage::factory() + ->addDescription($this->request->analyzeString('notification_description')); + + $this->notificationData->setDescription($description); $this->notificationData->setUserId($this->request->analyzeInt('notification_user')); $this->notificationData->setChecked($this->request->analyzeBool('notification_checkout', false)); - if ($this->context->getUserData()->getIsAdminApp() && $this->notificationData->getUserId() === 0) { + if ($this->context->getUserData()->getIsAdminApp() + && $this->notificationData->getUserId() === 0 + ) { $this->notificationData->setOnlyAdmin($this->request->analyzeBool('notification_onlyadmin', false)); $this->notificationData->setSticky($this->request->analyzeBool('notification_sticky', false)); } diff --git a/app/modules/web/Init.php b/app/modules/web/Init.php index f958d6d2..7f3da76a 100644 --- a/app/modules/web/Init.php +++ b/app/modules/web/Init.php @@ -62,6 +62,10 @@ final class Init extends ModuleBase * like: install/database checks, session/event handlers initialization */ const PARTIAL_INIT = ['resource', 'install', 'bootstrap', 'status', 'upgrade', 'error']; + /** + * List of controllers that don't need to update the user's session activity + */ + const NO_SESSION_ACTIVITY = ['items']; /** * @var SessionContext @@ -195,16 +199,23 @@ final class Init extends ModuleBase // Initialize event handlers $this->initEventHandlers(); - // Initialize user session context - $this->initUserSession(); + if (!in_array($controller, self::NO_SESSION_ACTIVITY)) { + // Initialize user session context + $this->initUserSession(); + } // Load plugins $this->pluginManager->loadPlugins(); - if ($this->context->isLoggedIn() && $this->context->getAppStatus() === SessionContext::APP_STATUS_RELOADED) { + if ($this->context->isLoggedIn() + && $this->context->getAppStatus() === SessionContext::APP_STATUS_RELOADED + ) { logger('Reload user profile'); // Recargar los permisos del perfil de usuario - $this->context->setUserProfile($this->container->get(UserProfileService::class)->getById($this->context->getUserData()->getUserProfileId())->getProfile()); + $this->context->setUserProfile( + $this->container->get(UserProfileService::class) + ->getById($this->context->getUserData() + ->getUserProfileId())->getProfile()); } return; diff --git a/app/modules/web/themes/material-blue/js/app-theme.js b/app/modules/web/themes/material-blue/js/app-theme.js index 510faf98..dd1a60bc 100644 --- a/app/modules/web/themes/material-blue/js/app-theme.js +++ b/app/modules/web/themes/material-blue/js/app-theme.js @@ -33,8 +33,7 @@ sysPass.Theme = function (log) { complete: function () { log.info("ajax:complete"); - // Actualizar componentes de MDL cargados con AJAX - componentHandler.upgradeDom(); + update(); } }; @@ -500,7 +499,17 @@ sysPass.Theme = function (log) { }; /** - * Inicialización + * Triggers an update of the theme components + */ + const update = function () { + log.info("theme:update"); + + // Actualizar componentes de MDL cargados con AJAX + componentHandler.upgradeDom(); + }; + + /** + * Initialization */ const init = function () { }; @@ -510,6 +519,7 @@ sysPass.Theme = function (log) { return { passwordDetect: passwordDetect, password: randomPassword, + update: update, viewsTriggers: viewsTriggers, loading: loading, ajax: ajax, diff --git a/app/modules/web/themes/material-blue/js/app-theme.min.js b/app/modules/web/themes/material-blue/js/app-theme.min.js index 7269a542..d5928ebc 100644 --- a/app/modules/web/themes/material-blue/js/app-theme.min.js +++ b/app/modules/web/themes/material-blue/js/app-theme.min.js @@ -13,9 +13,9 @@ b.attr("id")+"-"+a;var l=c.find("#"+b.attr("id")+"_repeat");l.attr("id",a+"_repe sysPassApp.config.LANG[32]+'">remove_red_eye').prepend(c);b.on("keyup",function(){sysPassApp.util.password.checkLevel(b);this.dataset.pass=b.val()});d=b.parent().next();d.find(".passGen").on("click",function(){e(b);b.blur()});d.find(".passComplexity").on("click",function(){g()});d.find(".showpass").on("mouseover",function(){""!==this.dataset.levelMsg?$(this).attr("title",this.dataset.levelMsg+"\n\n"+b[0].dataset.pass):$(this).attr("title",b[0].dataset.pass)});d.find(".reset").on("click",function(){b.val(""); b[0].dataset.pass="";0remove_red_eye');if(1===a.data("clipboard")){var c=$('content_paste');a.parent().after(c).after(d)}else a.parent().after(d); d.on("mouseover",function(){d.attr("title",a.val())})})},k=function(d){a.info("setupDatePicker");var b={format:"YYYY-MM-DD",lang:sysPassApp.config.BROWSER.LOCALE.substr(0,2),time:!1,cancelText:sysPassApp.config.LANG[44],okText:sysPassApp.config.LANG[43],clearText:sysPassApp.config.LANG[30],nowText:sysPassApp.config.LANG[56],minDate:new Date,triggerEvent:"dateIconClick"};d.find(".password-datefield__input").each(function(){var a=$(this),d=a.parent();a.bootstrapMaterialDatePicker(b);var c=d.find("input[name="+ -a.data("dst-unix")+"]");0'),d=$('
  • '),e=$(''),f=''+(void 0===b||""===b?"description":b)+"";a.forEach(function(a){var b=e.clone();b.append(f);b.append(a);a=d.clone().append(b);c.append(a)});return c},tabs:{add:function(a,b,c,e){a=$(a);if(1===e){a.parent().find("#tabs-"+b).addClass("is-active");var d="is-active"}a.append(''),d=$('
  • '),e=$(''),f=''+(void 0===b||""===b?"description":b)+"";a.forEach(function(a){var b=e.clone();b.append(f);b.append(a);a=d.clone().append(b);c.append(a)});return c},tabs:{add:function(a,b,c,e){a=$(a);if(1===e){a.parent().find("#tabs-"+b).addClass("is-active");var d="is-active"}a.append('
    '+c+"")}}}}}; diff --git a/app/modules/web/themes/material-blue/views/_partials/fixed-header.inc b/app/modules/web/themes/material-blue/views/_partials/fixed-header.inc index 825815f9..e6af50f7 100644 --- a/app/modules/web/themes/material-blue/views/_partials/fixed-header.inc +++ b/app/modules/web/themes/material-blue/views/_partials/fixed-header.inc @@ -31,17 +31,12 @@ data-route="notification/index" data-historyreset="1" data-view="notifications"> - notifications + notifications - - 0): ?> - - - - - + + @@ -100,17 +95,12 @@ data-route="notification/index" data-historyreset="1" data-view="notifications"> - notifications + notifications - - 0): ?> - - - - + diff --git a/app/modules/web/themes/material-blue/views/usersettings/general.inc b/app/modules/web/themes/material-blue/views/usersettings/general.inc index fd610b76..030f9e6b 100644 --- a/app/modules/web/themes/material-blue/views/usersettings/general.inc +++ b/app/modules/web/themes/material-blue/views/usersettings/general.inc @@ -151,6 +151,23 @@ + +
  • +
    + +
    + + + + + + + +
  • diff --git a/lib/SP/Core/Messages/NotificationMessage.php b/lib/SP/Core/Messages/NotificationMessage.php index 269c6377..d1ea97c7 100644 --- a/lib/SP/Core/Messages/NotificationMessage.php +++ b/lib/SP/Core/Messages/NotificationMessage.php @@ -38,13 +38,23 @@ final class NotificationMessage extends MessageBase */ public function composeHtml() { - $message[] = '
    '; - $message[] = '

    ' . $this->title . '

    '; - $message[] = '
    ' . implode('
    ', $this->description) . '
    '; - $message[] = '
    ' . implode('
    ', $this->footer) . '
    '; - $message[] = '
    '; + $message = '
    '; - return implode('', $message); + if ($this->title) { + $message .= '

    ' . $this->title . '

    '; + } + + if (!empty($this->description)) { + $message .= '
    ' . implode('
    ', $this->description) . '
    '; + } + + if (!empty($this->footer)) { + $message .= '
    ' . implode('
    ', $this->footer) . '
    '; + } + + $message .= '
    '; + + return $message; } /** @@ -56,6 +66,20 @@ final class NotificationMessage extends MessageBase */ public function composeText($delimiter = PHP_EOL) { - return $this->title . $delimiter . implode($delimiter, $this->description) . $delimiter . implode($delimiter, $this->footer); + $parts = []; + + if ($this->title) { + $parts[] = $this->title; + } + + if (!empty($this->description)) { + $parts[] = implode($delimiter, $this->description); + } + + if (!empty($this->footer)) { + $parts[] = implode($delimiter, $this->footer); + } + + return implode($delimiter, $parts); } } \ No newline at end of file diff --git a/lib/SP/DataModel/UserPreferencesData.php b/lib/SP/DataModel/UserPreferencesData.php index d2ff3690..1ba12526 100644 --- a/lib/SP/DataModel/UserPreferencesData.php +++ b/lib/SP/DataModel/UserPreferencesData.php @@ -35,12 +35,6 @@ class UserPreferencesData * @var int */ public $user_id = 0; - /** - * Usar autentificación en 2 pasos - * - * @var bool - */ - public $use2Fa = false; /** * Lenguaje del usuario * @@ -77,22 +71,10 @@ class UserPreferencesData * @var bool */ public $resultsAsCards = false; - /** - * @return boolean + * @var bool */ - public function isUse2Fa() - { - return $this->use2Fa; - } - - /** - * @param boolean $use2Fa - */ - public function setUse2Fa($use2Fa) - { - $this->use2Fa = $use2Fa; - } + public $checkNotifications = true; /** * @return string @@ -260,4 +242,20 @@ class UserPreferencesData { $this->resultsAsCards = $resultsAsCards; } + + /** + * @return bool + */ + public function isCheckNotifications(): bool + { + return $this->checkNotifications; + } + + /** + * @param bool $checkNotifications + */ + public function setCheckNotifications(bool $checkNotifications) + { + $this->checkNotifications = $checkNotifications; + } } \ No newline at end of file diff --git a/lib/SP/Mvc/Controller/ControllerTrait.php b/lib/SP/Mvc/Controller/ControllerTrait.php index a3b8a608..27ea2345 100644 --- a/lib/SP/Mvc/Controller/ControllerTrait.php +++ b/lib/SP/Mvc/Controller/ControllerTrait.php @@ -105,14 +105,18 @@ trait ControllerTrait /** * @param ContextInterface $context * @param Request $request + * + * @throws SPException */ protected function checkSecurityToken(ContextInterface $context, Request $request) { $sk = $request->analyzeString('sk'); $sessionKey = $context->getSecurityKey(); - if (!$sk || (null !== $sessionKey && $sessionKey !== $sk)) { - $this->invalidAction(); + if (!$sk + || (null !== $sessionKey && $sessionKey !== $sk) + ) { + throw new SPException(__u('Acción Inválida')); } } diff --git a/lib/SP/Plugin/PluginManager.php b/lib/SP/Plugin/PluginManager.php index 9a4f8a22..10a3708b 100644 --- a/lib/SP/Plugin/PluginManager.php +++ b/lib/SP/Plugin/PluginManager.php @@ -179,11 +179,11 @@ final class PluginManager if ($pluginData->getEnabled() === 1) { $plugin->onLoadData($pluginData); - - return $plugin; } else { $this->disabledPlugins[] = $name; } + + return $plugin; } catch (\Exception $e) { processException($e); diff --git a/lib/SP/Services/Install/Installer.php b/lib/SP/Services/Install/Installer.php index 5b15d51a..c802bfc0 100644 --- a/lib/SP/Services/Install/Installer.php +++ b/lib/SP/Services/Install/Installer.php @@ -57,7 +57,7 @@ final class Installer extends Service */ const VERSION = [3, 0, 0]; const VERSION_TEXT = '3.0-beta'; - const BUILD = 18101501; + const BUILD = 18101601; /** * @var DatabaseSetupInterface diff --git a/public/js/app-actions.js b/public/js/app-actions.js index bf28c0c5..61f11ff5 100644 --- a/public/js/app-actions.js +++ b/public/js/app-actions.js @@ -86,7 +86,7 @@ sysPass.Actions = function (log) { opts.addHistory = true; opts.data = data; - sysPassApp.requests.getActionCall(opts, function (response) { + return sysPassApp.requests.getActionCall(opts, function (response) { const $content = $("#content"); $content.empty().html(response); @@ -722,27 +722,26 @@ sysPass.Actions = function (log) { if (json.status === 0) { if (json.data.length > 0) { $updates.html( - '' + json.data.title + - '
    cloud_download
    ' + - '
    ' + json.data.description + ''); + `${json.data.title} +
    cloud_download
    +
    + ${json.data.description}`); } else { $updates.html( - '
    check_circle
    ' + - '' + sysPassApp.config.LANG[68] + ''); + `
    check_circle
    + ${sysPassApp.config.LANG[68]}`); } } else { $updates.html( - '
    warning
    ' + - '' + sysPassApp.config.LANG[69] + ''); + `
    warning
    + ${sysPassApp.config.LANG[69]}`); } - if (componentHandler !== undefined) { - componentHandler.upgradeDom(); - } + sysPassApp.theme.update(); }, function () { $updates.html( - '
    warning
    ' + - '' + sysPassApp.config.LANG[69] + ''); + `
    warning
    + ${sysPassApp.config.LANG[69]}`); }); }, getNotices: function () { @@ -761,19 +760,18 @@ sysPass.Actions = function (log) { if (json.status === 0) { if (json.data.length > 0) { $notices.html( - '' + - '
    feedback
    ' + - '' + - '
    ' + sysPassApp.config.LANG[70] + '
    ' + - json.data.map(x => x.title).join('
    ') + - '
    '); + ` +
    feedback
    +
    + +
    ${sysPassApp.config.LANG[70]}
    ${json.data.map(x => x.title).join('
    ')} +
    `); } } - if (componentHandler !== undefined) { - componentHandler.upgradeDom(); - } + sysPassApp.theme.update(); }); } }; @@ -1451,13 +1449,13 @@ sysPass.Actions = function (log) { }; sysPassApp.requests.getActionCall(opts, function (json) { - sysPassApp.msg.out(json); - if (json.status === 0) { getContent({r: $obj.data("action-next")}); } sysPassApp.sk.set(json.csrf); + + notification.getActive(); }); }, search: function ($obj) { @@ -1481,9 +1479,11 @@ sysPass.Actions = function (log) { sysPassApp.msg.out(json); if (json.status === 0) { - getContent({r: $obj.data("action-next")}); - $.magnificPopup.close(); + + getContent({r: $obj.data("action-next")}).then(function () { + notification.getActive(); + }); } }); }, @@ -1521,7 +1521,29 @@ sysPass.Actions = function (log) { }; sysPassApp.requests.getActionCall(opts, function (json) { - return json; + const $badge = $(".notifications-badge"); + const $tooltip = $(".notifications-tooltip"); + + $badge.each(function () { + const $this = $(this); + $this.attr("data-badge", json.data.count); + + if (json.data.count === 0) { + $this.removeClass($this.data("color-class")); + $tooltip.empty().html(json.data.message); + } else { + $this.addClass($this.data("color-class")); + $tooltip.empty().html(json.data.message_has); + } + }); + + if (json.data.count > 0) { + sysPassApp.util.sendNotification( + json.data.message_has, + json.data.notifications.join('\n'), + json.data.hash + ); + } }); }, nav: function ($obj) { diff --git a/public/js/app-actions.min.js b/public/js/app-actions.min.js index 09deaefa..1e6028a2 100644 --- a/public/js/app-actions.min.js +++ b/public/js/app-actions.min.js @@ -1,8 +1,8 @@ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(d,l,e){d instanceof String&&(d=String(d));for(var f=d.length,h=0;h'+b+""),k=c.find("img");if(0===k.length)return h(b);k.hide();$.magnificPopup.open({items:{src:c,type:"inline"}, +sysPass.Actions=function(d){var l=0,e={entrypoint:"/index.php"};Object.freeze(e);var f=function(a,b){d.info("getContent");a.isAjax=1;var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint;c.method="get";c.type="html";c.addHistory=!0;c.data=a;return sysPassApp.requests.getActionCall(c,function(a){var c=$("#content");c.empty().html(a);a=sysPassApp.triggers.views;a.common(c);if(void 0!==b&&"function"===typeof a[b])a[b]();c=$(".mdl-layout__content");0'+b+""),k=c.find("img");if(0===k.length)return h(b);k.hide();$.magnificPopup.open({items:{src:c,type:"inline"}, callbacks:{open:function(){var a=this;k.on("click",function(){a.close()});setTimeout(function(){var a=sysPassApp.util.resizeImage(k);c.css({backgroundColor:"#fff",width:a.width,height:"auto"});k.show("slow")},500)}}})},q=function(){$.magnificPopup.close()},n={view:function(a){d.info("account:show");f(sysPassApp.requests.getRouteForQuery(a.data("action-route"),a.data("item-id")),"account")},viewHistory:function(a){d.info("account:showHistory");f(sysPassApp.requests.getRouteForQuery(a.data("action-route"), a.val()),"account")},edit:function(a){d.info("account:edit");f(sysPassApp.requests.getRouteForQuery(a.data("action-route"),a.data("item-id")),"account")},delete:function(a){d.info("account:delete");var b='

    '+sysPassApp.config.LANG[3]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(c){c= sysPassApp.requests.getRequestOpts();c.url=e.entrypoint;c.data={r:"account/saveDelete/"+a.data("item-id"),sk:sysPassApp.sk.get()};sysPassApp.requests.getActionCall(c,function(c){sysPassApp.msg.out(c);n.search(a)})}}})},viewPass:function(a){d.info("account:viewPass");var b=a.data("parent-id")||0,c=0===b?a.data("item-id"):b,k=sysPassApp.requests.getRequestOpts();k.url=e.entrypoint;k.method="get";k.data={r:a.data("action-route")+"/"+c+"/"+b,sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(k, @@ -13,44 +13,45 @@ a.data.nextAction&&f({r:a.data.nextAction.nextAction},"account")})},menu:functio b),"account")},saveEditRestore:function(a){d.info("account:restore");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route")+"/"+a.data("history-id")+"/"+a.data("item-id");b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);void 0!==a.data.itemId&&void 0!==a.data.nextAction&&f(sysPassApp.requests.getRouteForQuery(a.data.nextAction,a.data.itemId),"account")})},listFiles:function(a){d.info("account:getfiles");var b=sysPassApp.requests.getRequestOpts(); b.method="get";b.type="html";b.url=e.entrypoint;b.data={r:a.data("action-route")+"/"+a.data("item-id"),del:a.data("delete"),sk:sysPassApp.sk.get()};sysPassApp.requests.getActionCall(b,function(c){a.html(c)})},search:function(a){d.info("account:search");var b=$("#frmSearch");b.find("input[name='sk']").val(sysPassApp.sk.get());b.find("input[name='skey']").val();b.find("input[name='sorder']").val();void 0!==a&&b.find("input[name='start']").val(0);a=sysPassApp.requests.getRequestOpts();a.url=e.entrypoint+ "?r="+b.data("action-route");a.method="get";a.data=b.serialize();sysPassApp.requests.getActionCall(a,function(a){10===a.status&&sysPassApp.msg.out(a);sysPassApp.sk.set(a.data.sk);$("#res-content").empty().html(a.data.html)})},save:function(a){d.info("account:save");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route")+"/"+a.data("item-id");b.data=a.serialize();$("select.select-box-tags[data-hash][data-updated=true]").each(function(a,k){b.data+="&"+k.getAttribute("id")+ -"_update=1"});sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);void 0!==a.data.itemId&&void 0!==a.data.nextAction&&f(sysPassApp.requests.getRouteForQuery(a.data.nextAction,a.data.itemId),"account")})}},v={logout:function(){sysPassApp.util.redirect("index.php?r=login/logout")},login:function(a){d.info("main:login");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("route");b.method="get";b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(b){var c= +"_update=1"});sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);void 0!==a.data.itemId&&void 0!==a.data.nextAction&&f(sysPassApp.requests.getRouteForQuery(a.data.nextAction,a.data.itemId),"account")})}},w={logout:function(){sysPassApp.util.redirect("index.php?r=login/logout")},login:function(a){d.info("main:login");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("route");b.method="get";b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(b){var c= $(".extra-hidden");switch(b.status){case 0:sysPassApp.util.redirect(b.data.url);break;case 2:sysPassApp.msg.out(b);a.find("input[type='text'],input[type='password']").val("");a.find("input:visible:first").focus();0

    '+sysPassApp.config.LANG[59]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){var c;(b=a.find("input[name='taskId']").val())&&(c=u(b));var d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint+"?r="+a.data("action-route");d.method="get";d.useFullLoading=!!b;d.data=a.serialize(); +'

    '+sysPassApp.config.LANG[59]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){var c;(b=a.find("input[name='taskId']").val())&&(c=v(b));var d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint+"?r="+a.data("action-route");d.method="get";d.useFullLoading=!!b;d.data=a.serialize(); sysPassApp.requests.getActionCall(d,function(b){sysPassApp.msg.out(b);0!==b.status?a.find(":input[name=key]").val(""):(void 0!==c&&c.close(),setTimeout(function(){sysPassApp.util.redirect("index.php")},5E3))})}}})},getUpdates:function(){d.info("main:getUpdates");var a=sysPassApp.requests.getRequestOpts();a.url=e.entrypoint+"?r=status/checkRelease";a.method="get";a.timeout=1E4;a.useLoading=!1;a.data={isAjax:1};var b=$("#updates");sysPassApp.requests.getActionCall(a,function(a){0===a.status?0'+a.data.title+'
    cloud_download
    '+a.data.description+""):b.html('
    check_circle
    '+sysPassApp.config.LANG[68]+ -""):b.html('
    warning
    '+sysPassApp.config.LANG[69]+"");void 0!==componentHandler&&componentHandler.upgradeDom()},function(){b.html('
    warning
    '+sysPassApp.config.LANG[69]+ -"")})},getNotices:function(){d.info("main:getNotices");var a=sysPassApp.requests.getRequestOpts();a.url=e.entrypoint+"?r=status/checkNotices";a.method="get";a.timeout=1E4;a.useLoading=!1;a.data={isAjax:1};var b=$("#notices");sysPassApp.requests.getActionCall(a,function(a){0===a.status&&0
    feedback
    '+sysPassApp.config.LANG[70]+"
    "+a.data.map(function(a){return a.title}).join("
    ")+"
    ");void 0!==componentHandler&&componentHandler.upgradeDom()})}},g={state:{tab:{index:0,refresh:!0,route:""},itemId:0,update:function(a){var b=$("#content").find("[id^='tabs-'].is-active");0",d=m.getSelection(a);!1!==d&&mdlDialog().show({text:c,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(a){a.preventDefault();"function"===typeof b&&b(d)}}})},getSelection:function(a){a=a.data("selection");var b=[];return a&&($(a).find(".is-selected").each(function(){b.push($(this).data("item-id"))}), -0===b.length)?!1:b}},u=function(a){var b=$("#taskStatus");b.empty().html(sysPassApp.config.LANG[62]);var c=sysPassApp.requests.getRequestOpts();c.method="get";c.url=e.entrypoint+"?r=task/runTask/"+a;return sysPassApp.requests.getActionEvent(c,function(a){a=a.task+" - "+a.message+" - "+a.time+" - "+a.progress+"%";a+="
    "+sysPassApp.config.LANG[62];b.empty().html(a)})};return{doAction:function(a,b){a={r:a.r+(void 0!==a.itemId?"/"+a.itemId:""),isAjax:1};var c=sysPassApp.requests.getRequestOpts();c.url= -e.entrypoint;c.method="get";c.type="html";c.addHistory=!0;c.data=a;sysPassApp.requests.getActionCall(c,function(a){var c=$("#content");c.empty().html(a);a=sysPassApp.triggers.views;a.common(c);if(void 0!==b&&"function"===typeof a[b])a[b]();c=$(".mdl-layout__content");0'+a.data.title+'\n
    cloud_download
    \n \n '+a.data.description+""):b.html('
    check_circle
    \n '+ +sysPassApp.config.LANG[68]+""):b.html('
    warning
    \n '+sysPassApp.config.LANG[69]+"");sysPassApp.theme.update()},function(){b.html('
    warning
    \n '+ +sysPassApp.config.LANG[69]+"")})},getNotices:function(){d.info("main:getNotices");var a=sysPassApp.requests.getRequestOpts();a.url=e.entrypoint+"?r=status/checkNotices";a.method="get";a.timeout=1E4;a.useLoading=!1;a.data={isAjax:1};var b=$("#notices");sysPassApp.requests.getActionCall(a,function(a){0===a.status&&0\n
    feedback
    \n \n \n
    '+sysPassApp.config.LANG[70]+"
    "+a.data.map(function(a){return a.title}).join("
    ")+"\n
    ");sysPassApp.theme.update()})}},g={state:{tab:{index:0,refresh:!0,route:""},itemId:0,update:function(a){var b=$("#content").find("[id^='tabs-'].is-active"); +0",d=m.getSelection(a);!1!==d&&mdlDialog().show({text:c,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(a){a.preventDefault();"function"===typeof b&&b(d)}}})},getSelection:function(a){a=a.data("selection");var b=[];return a&&($(a).find(".is-selected").each(function(){b.push($(this).data("item-id"))}),0===b.length)?!1: +b}},v=function(a){var b=$("#taskStatus");b.empty().html(sysPassApp.config.LANG[62]);var c=sysPassApp.requests.getRequestOpts();c.method="get";c.url=e.entrypoint+"?r=task/runTask/"+a;return sysPassApp.requests.getActionEvent(c,function(a){a=a.task+" - "+a.message+" - "+a.time+" - "+a.progress+"%";a+="
    "+sysPassApp.config.LANG[62];b.empty().html(a)})};return{doAction:function(a,b){a={r:a.r+(void 0!==a.itemId?"/"+a.itemId:""),isAjax:1};var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint; +c.method="get";c.type="html";c.addHistory=!0;c.data=a;sysPassApp.requests.getActionCall(c,function(a){var c=$("#content");c.empty().html(a);a=sysPassApp.triggers.views;a.common(c);if(void 0!==b&&"function"===typeof a[b])a[b]();c=$(".mdl-layout__content");0";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}}, positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.method="get";b.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:sysPassApp.sk.get()};sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);0===a.status&&n.listFiles($("#list-account-files"))})}}})}},checks:{wiki:function(a){d.info("checks:wiki");a=$(a.data("src"));a.find("[name='sk']").val(sysPassApp.sk.get());var b=sysPassApp.requests.getRequestOpts(); b.url=e.entrypoint;b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);0===a.status&&$("#dokuWikiResCheck").html(a.data)})}},config:{save:function(a){d.info("config:save");g.save(a)},masterpass:function(a){var b='

    '+sysPassApp.config.LANG[59]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(b){b.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44]);a.find(":input[type=password]").val("")}}, -positive:{title:sysPassApp.config.LANG[43],onClick:function(b){var c;(b=a.find("input[name='taskId']").val())&&(c=u(b));var d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint;d.useFullLoading=!!b;d.data=a.serialize();sysPassApp.requests.getActionCall(d,function(b){sysPassApp.msg.out(b);a.find(":input[type=password]").val("");void 0!==c&&c.close()})}}})},backup:function(a){d.info("config:backup");g.state.update(a);var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route"); +positive:{title:sysPassApp.config.LANG[43],onClick:function(b){var c;(b=a.find("input[name='taskId']").val())&&(c=v(b));var d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint;d.useFullLoading=!!b;d.data=a.serialize();sysPassApp.requests.getActionCall(d,function(b){sysPassApp.msg.out(b);a.find(":input[type=password]").val("");void 0!==c&&c.close()})}}})},backup:function(a){d.info("config:backup");g.state.update(a);var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route"); b.useFullLoading=!0;b.data=a.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);0===a.status&&f({r:g.state.tab.route,tabIndex:g.state.tab.index})})},export:function(a){d.info("config:export");g.save(a)},import:function(a){d.info("config:import");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route");b.data=a.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a)})}, refreshMpass:function(a){d.info("config:import");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("action-route");b.data={sk:a.data("sk"),isAjax:1};sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a)})},mailCheck:function(a){d.info("config:mailCheck");var b=$(a.data("src")),c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint+"?r="+a.data("action-route");c.data=b.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a)})}}, -main:v,user:{showSettings:function(a){d.info("user:showSettings");f({r:a.data("action-route")},"userSettings")},saveSettings:function(a){d.info("user:saveSettings");g.save(a)},password:function(a){d.info("user:password");var b=sysPassApp.requests.getRequestOpts();b.type="html";b.method="get";b.url=e.entrypoint;b.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(a){0===a.length?v.logout():h(a)})},passreset:function(a){d.info("user:passreset"); +main:w,user:{showSettings:function(a){d.info("user:showSettings");f({r:a.data("action-route")},"userSettings")},saveSettings:function(a){d.info("user:saveSettings");g.save(a)},password:function(a){d.info("user:password");var b=sysPassApp.requests.getRequestOpts();b.type="html";b.method="get";b.url=e.entrypoint;b.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(a){0===a.length?w.logout():h(a)})},passreset:function(a){d.info("user:passreset"); var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"/?r="+a.data("action-route");b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(a){sysPassApp.msg.out(a);0===a.status&&setTimeout(function(){sysPassApp.util.redirect("index.php")},2E3)})}},link:{save:function(a){d.info("link:save");var b=function(b){var c=a.data("account-id"),d=sysPassApp.requests.getRequestOpts();c?d.url=e.entrypoint+"?r="+a.data("action-route")+"/"+c+"/"+b:(d.url=e.entrypoint+"?r="+a.data("action-route"), d.data=a.serialize());sysPassApp.requests.getActionCall(d,function(b){sysPassApp.msg.out(b);0===b.status&&f({r:a.data("action-next")+"/"+c})})},c='

    '+sysPassApp.config.LANG[48]+"

    ";mdlDialog().show({text:c,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();b(0)}},positive:{title:sysPassApp.config.LANG[43],onClick:function(a){a.preventDefault();b(1)}}})},delete:function(a){d.info("link:delete");var b='

    '+ sysPassApp.config.LANG[12]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b.preventDefault();b=a.data("item-id");var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint+"?r="+a.data("action-route")+"/"+b;sysPassApp.requests.getActionCall(c,function(b){sysPassApp.msg.out(b);0===b.status&&f({r:a.data("action-next")+ "/"+a.data("account-id")})})}}})},refresh:function(a){d.info("link:refresh");g.state.update(a);var b=a.data("item-id"),c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint;c.method="get";c.data={r:a.data("action-route")+"/"+b,sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(c,function(b){sysPassApp.msg.out(b);0===b.status&&((b=a.data("action-next"))?f({r:b+"/"+a.data("account-id")}):f({r:g.state.tab.route,tabIndex:g.state.tab.index}))})}},eventlog:{clear:function(a){var b='

    '+ sysPassApp.config.LANG[20]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b.preventDefault();g.save(a)}}})}},ajaxUrl:e,plugin:{toggle:function(a){d.info("plugin:enable");g.state.update(a);var b=a.data("item-id"),c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint;c.method="get";c.data={r:a.data("action-route")+ "/"+b,sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a);0===a.status&&setTimeout(function(){sysPassApp.util.redirect("index.php")},2E3)})},reset:function(a){d.info("plugin:reset");var b='

    '+sysPassApp.config.LANG[58]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43], -onClick:function(b){b.preventDefault();g.save(a)}}})},search:function(a){d.info("plugin:search");m.search(a)},show:function(a){d.info("plugin:show");t.show(a)},save:function(a){d.info("plugin:save");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("route");b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);0===b.status&&(f({r:a.data("action-next")}),$.magnificPopup.close())})},nav:function(a){d.info("plugin:nav");m.nav(a)}},notification:{check:function(a){d.info("notification:check"); -var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.method="get";b.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);0===b.status&&f({r:a.data("action-next")});sysPassApp.sk.set(b.csrf)})},search:function(a){d.info("notification:search");m.search(a)},show:function(a){d.info("notification:show");t.show(a)},save:function(a){d.info("notification:save");var b=sysPassApp.requests.getRequestOpts(); -b.url=e.entrypoint+"?r="+a.data("route");b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);0===b.status&&(f({r:a.data("action-next")}),$.magnificPopup.close())})},delete:function(a){d.info("notification:delete");m.delete(a,function(b){var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint;c.method="get";c.data={r:a.data("action-route")+(0===b.length?"/"+a.data("item-id"):""),items:b,sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(c, -function(b){sysPassApp.msg.out(b);f({r:a.data("action-next")})})})},getActive:function(){d.info("notification:getActive");var a=sysPassApp.requests.getRequestOpts();a.url=e.entrypoint;a.method="get";a.data={r:"items/notifications",sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(a,function(a){return a})},nav:function(a){d.info("eventlog:nav");m.nav(a)}},wiki:{show:function(a){d.info("wiki:show");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.method="get";b.data= -{pageName:a.data("pagename"),actionId:a.data("action-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(a){0!==a.status?sysPassApp.msg.out(a):h(a.data.html)})}},items:{get:function(a){d.info("items:get");var b=a[0].selectize;b.clearOptions();b.load(function(c){var d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint;d.method="get";d.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:a.data("sk")};sysPassApp.requests.getActionCall(d,function(d){c(d.data);b.setValue(a.data("selected-id"), -!0);sysPassApp.triggers.updateFormHash()})})},update:function(a){d.info("items:update");var b=$("#"+a.data("item-dst"))[0].selectize,c=b.getValue();b.clearOptions();b.load(function(d){var f=sysPassApp.requests.getRequestOpts();f.url=e.entrypoint;f.method="get";f.data={r:a.data("item-route"),sk:sysPassApp.sk.get()};sysPassApp.requests.getActionCall(f,function(a){d(a);b.setValue(c,!0)})})}},ldap:{check:function(a){d.info("ldap:check");var b=$(a.data("src")),c=sysPassApp.requests.getRequestOpts();c.url= -e.entrypoint+"?r="+a.data("action-route");c.data=b.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a);0===a.status&&void 0!==a.data.template&&void 0!==a.data.items&&h(a.data.template,{open:function(){var b=$("#ldap-results").find(".list-wrap").empty();a.data.items.forEach(function(a){b.append(sysPassApp.theme.html.getList(a.items,a.icon))})}})})},import:function(a){d.info("ldap:import");var b='

    '+sysPassApp.config.LANG[57]+ -"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b=$(a.data("src"));var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint+"?r="+a.data("action-route");c.data=b.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a)})}}})}},track:{unlock:function(a){d.info("track:unlock"); -var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.method="get";b.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);g.refresh(a)})},clear:function(a){d.info("track:clear");var b='

    '+sysPassApp.config.LANG[71]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}}, -positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b.preventDefault();g.save(a)}}})}}}}; +onClick:function(b){b.preventDefault();g.save(a)}}})},search:function(a){d.info("plugin:search");m.search(a)},show:function(a){d.info("plugin:show");t.show(a)},save:function(a){d.info("plugin:save");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint+"?r="+a.data("route");b.data=a.serialize();sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);0===b.status&&(f({r:a.data("action-next")}),$.magnificPopup.close())})},nav:function(a){d.info("plugin:nav");m.nav(a)}},notification:u, +wiki:{show:function(a){d.info("wiki:show");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.method="get";b.data={pageName:a.data("pagename"),actionId:a.data("action-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(a){0!==a.status?sysPassApp.msg.out(a):h(a.data.html)})}},items:{get:function(a){d.info("items:get");var b=a[0].selectize;b.clearOptions();b.load(function(c){var d=sysPassApp.requests.getRequestOpts();d.url=e.entrypoint;d.method="get";d.data= +{r:a.data("action-route")+"/"+a.data("item-id"),sk:a.data("sk")};sysPassApp.requests.getActionCall(d,function(d){c(d.data);b.setValue(a.data("selected-id"),!0);sysPassApp.triggers.updateFormHash()})})},update:function(a){d.info("items:update");var b=$("#"+a.data("item-dst"))[0].selectize,c=b.getValue();b.clearOptions();b.load(function(d){var f=sysPassApp.requests.getRequestOpts();f.url=e.entrypoint;f.method="get";f.data={r:a.data("item-route"),sk:sysPassApp.sk.get()};sysPassApp.requests.getActionCall(f, +function(a){d(a);b.setValue(c,!0)})})}},ldap:{check:function(a){d.info("ldap:check");var b=$(a.data("src")),c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint+"?r="+a.data("action-route");c.data=b.serialize()+"&sk="+sysPassApp.sk.get();sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a);0===a.status&&void 0!==a.data.template&&void 0!==a.data.items&&h(a.data.template,{open:function(){var b=$("#ldap-results").find(".list-wrap").empty();a.data.items.forEach(function(a){b.append(sysPassApp.theme.html.getList(a.items, +a.icon))})}})})},import:function(a){d.info("ldap:import");var b='

    '+sysPassApp.config.LANG[57]+"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b=$(a.data("src"));var c=sysPassApp.requests.getRequestOpts();c.url=e.entrypoint+"?r="+a.data("action-route");c.data=b.serialize()+"&sk="+ +sysPassApp.sk.get();sysPassApp.requests.getActionCall(c,function(a){sysPassApp.msg.out(a)})}}})}},track:{unlock:function(a){d.info("track:unlock");var b=sysPassApp.requests.getRequestOpts();b.url=e.entrypoint;b.method="get";b.data={r:a.data("action-route")+"/"+a.data("item-id"),sk:sysPassApp.sk.get(),isAjax:1};sysPassApp.requests.getActionCall(b,function(b){sysPassApp.msg.out(b);g.refresh(a)})},clear:function(a){d.info("track:clear");var b='

    '+sysPassApp.config.LANG[71]+ +"

    ";mdlDialog().show({text:b,negative:{title:sysPassApp.config.LANG[44],onClick:function(a){a.preventDefault();sysPassApp.msg.error(sysPassApp.config.LANG[44])}},positive:{title:sysPassApp.config.LANG[43],onClick:function(b){b.preventDefault();g.save(a)}}})}}}}; diff --git a/public/js/app-config.js b/public/js/app-config.js index b1e66659..845c78cd 100644 --- a/public/js/app-config.js +++ b/public/js/app-config.js @@ -55,7 +55,8 @@ sysPass.Config = function () { AUTH: { LOGGEDIN: false, AUTHBASIC_AUTOLOGIN: false - } + }, + SESSION_TIMEOUT: 0 }; return { @@ -65,6 +66,9 @@ sysPass.Config = function () { setLang: function (lang) { config.LANG = lang; }, + setSessionTimeout: function (timeout) { + config.SESSION_TIMEOUT = parseInt(timeout); + }, setPkiKey: function (key) { if (key.length > 0) { config.PKI.KEY = key; diff --git a/public/js/app-config.min.js b/public/js/app-config.min.js index 76b312d9..afa1bba6 100644 --- a/public/js/app-config.min.js +++ b/public/js/app-config.min.js @@ -1,3 +1,3 @@ -sysPass.Config=function(){var b={APP_ROOT:"",LANG:[],PKI:{AVAILABLE:!1,KEY:"",MAX_SIZE:0,CRYPTO:null},FILES:{MAX_SIZE:1024,ACCOUNT_ALLOWED_EXTS:[],IMPORT_ALLOWED_EXTS:[]},STATUS:{CHECK_UPDATES:!1,CHECK_NOTICES:!1,CHECK_NOTIFICATIONS:!1},BROWSER:{TIMEZONE:"UTC",LOCALE:"en_US",COOKIES_ENABLED:!1},DEBUG:!0,PLUGINS:[],AUTH:{LOGGEDIN:!1,AUTHBASIC_AUTOLOGIN:!1}};return{setAppRoot:function(a){b.APP_ROOT=a},setLang:function(a){b.LANG=a},setPkiKey:function(a){0"+a.messages.join("
    "));switch(c){case 0:this.ok(b);break;case 1:this.error(b);break;case 2:this.warn(b);break;case 10:sysPassApp.actions.main.logout();break; case 100:this.ok(b);this.sticky(b);break;case 101:this.error(b);this.sticky(b);break;case 102:this.warn(b);this.sticky(b);break;default:this.error(b)}}},html:{error:function(a){return'

    Oops...
    '+b.config.LANG[1]+"
    "+a+"

    "}}};Object.freeze(e);String.format||(String.format=function(a){var b=Array.prototype.slice.call(arguments,1);return a.replace(/{(\d+)}/g,function(a,c){return"undefined"!==typeof b[c]?b[c]:a})});var r=function(){d.info("getEnvironment");var a=window.location.pathname.split("/"), -c=sysPass.Config();c.setAppRoot(window.location.protocol+"//"+window.location.host+function(){for(var b="",c=1;c<=a.length-2;c++)b+="/"+a[c];return b}());var f=b.requests.getRequestOpts();f.url="/index.php?r=bootstrap/getEnvironment";f.method="get";f.useLoading=!1;f.data={isAjax:1};return b.requests.getActionCall(f,function(a){void 0!==a.data&&(c.setLang(a.data.lang),c.setPkiKey(a.data.pki_key),c.setPkiSize(a.data.pki_max_size),c.setCheckUpdates(a.data.check_updates),c.setCheckNotices(a.data.check_notices), -c.setTimezone(a.data.timezone),c.setLocale(a.data.locale),c.setDebugEnabled(a.data.debug),c.setFileMaxSize(a.data.max_file_size),c.setFileAccountAllowedExts(a.data.files_allowed_exts),c.setFileImportAllowedExts(a.data.import_allowed_exts),c.setCookiesEnabled(a.data.cookies_enabled),c.setPlugins(a.data.plugins),c.setLoggedIn(a.data.loggedin),c.setAuthBasicAutologinEnabled(a.data.authbasic_autologin),c.initialize(),b.config=c.getConfig())}).fail(function(){e.error("Error while getting sysPass config
    Please try again or check web server logs")})}, -b={config:sysPass.Config().getConfig(),actions:sysPass.Actions(d),triggers:sysPass.Triggers(d),util:sysPass.Util(d),theme:{},plugins:{},sk:h,msg:e,log:d,encryptFormValue:g},n=function(a){for(var b=[],d,e=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),g=0;gPlease try again or check web server logs")})},b={config:sysPass.Config().getConfig(),actions:sysPass.Actions(d),triggers:sysPass.Triggers(d),util:sysPass.Util(d),theme:{},plugins:{},sk:h,msg:e,log:d,encryptFormValue:g},n=function(a){for(var b=[],d,e=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),g=0;g" + errorThrown + textStatus + "

    "; + txt = sysPassApp.config.LANG[1]; } else { - txt = "An error occurred

    " + errorThrown + " (" + textStatus + ")

    "; + txt = "An error occurred"; } + txt += `

    ${errorThrown}

    ${jqXHR.responseText}

    `; + log.error(txt); if (opts.type === "html") { - $("#content").html(sysPassApp.msg.html.error(errorThrown)); + $("#content").html(sysPassApp.msg.html.error(txt)); } sysPassApp.msg.error(txt); diff --git a/public/js/app-requests.min.js b/public/js/app-requests.min.js index 525fa8e0..f782c35e 100644 --- a/public/js/app-requests.min.js +++ b/public/js/app-requests.min.js @@ -1,5 +1,5 @@ -sysPass.Requests=function(c){var e=c.log,b=[],h={type:"json",url:"",method:"post",callback:"",async:!0,data:"",cache:!1,processData:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",timeout:0,addHistory:!1,hash:"",useLoading:!0,useFullLoading:!1};Object.seal(h);var k={get:function(){return b},add:function(a){var d=""===a.hash?c.util.hash.md5(JSON.stringify(a)):a.hash;if(0"+g+d+"

    ":"An error occurred

    "+g+" ("+d+")

    ",e.error(b),"html"===a.type&&$("#content").html(c.msg.html.error(g)),c.msg.error(b)):m()},complete:function(b){!0===a.useLoading&& -c.theme.loading.hide();"json"===a.type&&void 0!==b.responseJSON&&void 0!==b.responseJSON.csrf&&""!==b.responseJSON.csrf&&c.sk.set(b.responseJSON.csrf);void 0!==c.theme&&c.theme.ajax.complete()}})},getActionEvent:function(a,b,c){var d=l(a.url),d=d+("?"+$.param(a.data)),f=new EventSource(d);f.addEventListener("message",function(a){a=JSON.parse(a.data);e.debug(a);1===a.end?(e.info("getActionEvent:Ending"),f.close(),"function"===typeof c&&c(a)):"function"===typeof b&&b(a)});f.addEventListener("error", -function(a){e.error("getActionEvent:Error occured");f.close()});return f},getRouteForQuery:function(a,b){return"object"===typeof b?{r:a+"/"+b.join("/")}:{r:a+"/"+b}},history:k}}; +sysPass.Requests=function(c){var e=c.log,b=[],g={type:"json",url:"",method:"post",callback:"",async:!0,data:"",cache:!1,processData:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",timeout:0,addHistory:!1,hash:"",useLoading:!0,useFullLoading:!1};Object.seal(g);var h={get:function(){return b},add:function(a){var f=""===a.hash?c.util.hash.md5(JSON.stringify(a)):a.hash;if(0

    "+b.responseText+"

    ",e.error(d),"html"===a.type&&$("#content").html(c.msg.html.error(d)),c.msg.error(d)):l()},complete:function(b){!0===a.useLoading&& +c.theme.loading.hide();"json"===a.type&&void 0!==b.responseJSON&&void 0!==b.responseJSON.csrf&&""!==b.responseJSON.csrf&&c.sk.set(b.responseJSON.csrf);void 0!==c.theme&&c.theme.ajax.complete()}})},getActionEvent:function(a,b,c){var f=k(a.url);f+="?"+$.param(a.data);var d=new EventSource(f);d.addEventListener("message",function(a){a=JSON.parse(a.data);e.debug(a);1===a.end?(e.info("getActionEvent:Ending"),d.close(),"function"===typeof c&&c(a)):"function"===typeof b&&b(a)});d.addEventListener("error", +function(a){e.error("getActionEvent:Error occured");d.close()});return d},getRouteForQuery:function(a,b){return"object"===typeof b?{r:a+"/"+b.join("/")}:{r:a+"/"+b}},history:h}}; diff --git a/public/js/app-triggers.js b/public/js/app-triggers.js index 1af5056e..914d144b 100644 --- a/public/js/app-triggers.js +++ b/public/js/app-triggers.js @@ -241,9 +241,13 @@ sysPass.Triggers = function (log) { sysPassApp.actions.doAction({r: $this.data("route")}, $this.data("view")); }); - // setInterval(function () { - // sysPassApp.actions.notification.getActive(); - // }, 60000); + if (sysPassApp.config.STATUS.CHECK_NOTIFICATIONS) { + sysPassApp.actions.notification.getActive(); + + setInterval(function () { + sysPassApp.actions.notification.getActive(); + }, 120000); + } if ($obj.data("upgraded") === 0) { sysPassApp.actions.doAction({r: "account/index"}, "search"); diff --git a/public/js/app-triggers.min.js b/public/js/app-triggers.min.js index 0cb3e61c..36d25299 100644 --- a/public/js/app-triggers.min.js +++ b/public/js/app-triggers.min.js @@ -3,17 +3,17 @@ $jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"un $jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,e){return $jscomp.findInternal(this,c,e).v}},"es6","es3"); sysPass.Triggers=function(c){var f=function(a){var b={valueField:"id",labelField:"name",searchField:["name"],onInitialize:function(){var a=$(this.$wrapper[0]),b=$(this.$input[0]).siblings(".btn-add-select");1===b.length&&a.append(b)}};a.find(".select-box").each(function(a){var c=$(this);a={};!0===c.data("create")&&(a.create=!0);b.plugins=c.hasClass("select-box-deselect")?{clear_selection:{title:sysPassApp.config.LANG[51]}}:{};if(c.data("onchange")){var d=c.data("onchange").split("/");b.onChange=function(a){if(0< a)if(2===d.length)sysPassApp.actions[d[0]][d[1]](c);else sysPassApp.actions[d[0]](c)}}c.selectize($.extend(a,b))});a.find("#allowed_exts").selectize({create:function(a){return{value:a.toUpperCase(),text:a.toUpperCase()}},createFilter:/^[a-z0-9]{1,4}$/i,plugins:["remove_button"]});a.find("#wikifilter").selectize({create:!0,createFilter:/^[a-z0-9:._-]+$/i,plugins:["remove_button"]});a.find(".select-items-tag").selectize({create:function(a){return{value:a.toLowerCase(),text:a.toLowerCase()}},createFilter:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/, -plugins:["remove_button"]})},e={main:function(a){c.info("views:main");clipboard.isSupported()||sysPassApp.msg.info(sysPassApp.config.LANG[65]);$(".btn-menu").click(function(){var a=$(this);"1"===a.attr("data-history-reset")&&sysPassApp.requests.history.reset();sysPassApp.actions.doAction({r:a.data("route")},a.data("view"))});if(0===a.data("upgraded"))sysPassApp.actions.doAction({r:"account/index"},"search");else{a=$("#content");var b=a.data("page");e.common(a);if(""!==b&&"function"===typeof e[b])e[b]()}!0=== -sysPassApp.config.STATUS.CHECK_UPDATES&&sysPassApp.actions.main.getUpdates();!0===sysPassApp.config.STATUS.CHECK_NOTICES&&sysPassApp.actions.main.getNotices();"function"===typeof sysPassApp.theme.viewsTriggers.main&&sysPassApp.theme.viewsTriggers.main()},search:function(){c.info("views:search");var a=$("#frmSearch");0!==a.length&&(a.find("input[name='search']").on("keyup",function(b){b.preventDefault();13!==b.which&&13!==b.keyCode||a.submit()}),a.find("select, #rpp").on("change",function(){a.submit()}), -a.find("button.btn-clear").on("click",function(b){b.preventDefault();a.find('input[name="searchfav"]').val(0);a[0].reset()}),a.find("input:text:visible:first").focus(),$("#globalSearch").click(function(){var b=1==$(this).prop("checked")?1:0;a.find("input[name='gsearch']").val(b);a.submit()}),"function"===typeof sysPassApp.theme.viewsTriggers.search&&sysPassApp.theme.viewsTriggers.search())},login:function(){c.info("views:login");var a=$("#frmLogin");sysPassApp.config.AUTH.AUTHBASIC_AUTOLOGIN&&"0"=== -a.find("input[name='loggedOut']").val()&&(c.info("views:login:autologin"),sysPassApp.msg.info(sysPassApp.config.LANG[66]),sysPassApp.actions.main.login(a));a.find("input:visible:first").focus()},userpassreset:function(){c.info("views:userpassreset");var a=$("#frmUserPassReset");sysPassApp.theme.passwordDetect(a)},footer:function(){c.info("views:footer")},common:function(a){c.info("views:common");f(a);var b=a.find(":input [name='sk']");0form").each(function(){var a=$(this);a.find("button.btn-clear").on("click",function(b){b.preventDefault();a.trigger("reset")})})},config:function(){c.info("views:config");var a=$("#drop-import-files");if(0form").each(function(){var a=$(this);a.find("button.btn-clear").on("click",function(b){b.preventDefault();a.trigger("reset")})})},config:function(){c.info("views:config");var a=$("#drop-import-files");if(0