瀏覽代碼

Fix auto-complete username when creating new cards (addCardForm)

Ben0it-T 3 年之前
父節點
當前提交
e176410b54
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      client/components/lists/listBody.js

+ 4 - 1
client/components/lists/listBody.js

@@ -336,7 +336,7 @@ BlazeComponent.extendComponent({
       [
         // User mentions
         {
-          match: /\B@([\w.]*)$/,
+          match: /\B@([\w.-]*)$/,
           search(term, callback) {
             const currentBoard = Boards.findOne(Session.get('currentBoard'));
             callback(
@@ -347,6 +347,9 @@ BlazeComponent.extendComponent({
             );
           },
           template(user) {
+            if (user.profile && user.profile.fullname) {
+              return (user.username + " (" + user.profile.fullname + ")");
+            }
             return user.username;
           },
           replace(user) {