Commit bbd266ce authored by 神楽坂玲奈's avatar 神楽坂玲奈

ygopro 房间列表显示用户名

parent 87d4a93d
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
<tr *ngFor="let room of rooms" class="room" (click)="join_room(room)"> <tr *ngFor="let room of rooms" class="room" (click)="join_room(room)">
<td class="title">{{room.title}}</td> <td class="title">{{room.title}}</td>
<td class="users"> <td class="users">
<img *ngFor="let user of room.users" class="avatar" [src]="'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'"> <img *ngFor="let user of room.users" class="avatar" [src]="'https://ygobbs.com/user_avatar/ygobbs.com/' + user.username + '/25/1.png'" data-toggle="tooltip" data-placement="bottom" [title]="user.username">
</td> </td>
<td class="mode">{{{'0': '单局模式', '1': '比赛模式', '2': 'TAG'}[room.options.mode]}}</td> <td class="mode">{{{'0': '单局模式', '1': '比赛模式', '2': 'TAG'}[room.options.mode]}}</td>
<td class="extra"> <td class="extra">
......
...@@ -185,6 +185,12 @@ export class YGOProComponent implements OnInit { ...@@ -185,6 +185,12 @@ export class YGOProComponent implements OnInit {
}); });
}); });
modal.on('shown.bs.modal', () => {
$('td.users').tooltip({
selector: '[data-toggle=tooltip]'
});
});
modal.on('hide.bs.modal', () => { modal.on('hide.bs.modal', () => {
for (let connection of this.connections) { for (let connection of this.connections) {
connection.close(); connection.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment