瀏覽代碼

Bugfix. List of messages need to be passed to `api.alert.show`

JC Brand 6 年之前
父節點
當前提交
3dc2b2b695
共有 3 個文件被更改,包括 8 次插入6 次删除
  1. 1 1
      src/converse-modal.js
  2. 4 3
      src/converse-profile.js
  3. 3 2
      src/converse-rosterview.js

+ 1 - 1
src/converse-modal.js

@@ -75,7 +75,7 @@ converse.plugins.add('converse-modal', {
 
         Object.assign(_converse.api, {
             'alert': {
-                'show' (type, title, messages) {
+                show (type, title, messages) {
                     if (_.isString(messages)) {
                         messages = [messages];
                     }

+ 4 - 3
src/converse-profile.js

@@ -107,9 +107,10 @@ converse.plugins.add('converse-profile', {
                     _converse.log(err, Strophe.LogLevel.FATAL);
                     _converse.api.alert.show(
                         Strophe.LogLevel.ERROR,
-                        __('Error'),
-                        [__("Sorry, an error happened while trying to save your profile data."),
-                        __("You can check your browser's developer console for any error output.")]
+                        __('Error'), [
+                            __("Sorry, an error happened while trying to save your profile data."),
+                            __("You can check your browser's developer console for any error output.")
+                        ]
                     )
                 });
                 this.modal.hide();

+ 3 - 2
src/converse-rosterview.js

@@ -509,8 +509,9 @@ converse.plugins.add('converse-rosterview', {
                     _converse.log(e, Strophe.LogLevel.ERROR);
                     _converse.api.alert.show(
                         Strophe.LogLevel.ERROR,
-                        __('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.getDisplayName())
-                    );
+                        __('Error'),
+                        [__('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.getDisplayName())]
+                    )
                 }
             },