Commit 712b199b authored by 神楽坂玲奈's avatar 神楽坂玲奈

修改聊天室最大化最小化图标

parent 94349dd2
...@@ -114,9 +114,11 @@ ...@@ -114,9 +114,11 @@
<div class="panel" id="game_info_2"> <div class="panel" id="game_info_2">
<dl> <dl>
<dt>开发</dt> <dt>开发</dt>
<dd *ngFor="let developer of currentApp.developers"> <dd>
<a *ngIf="developer.url" target="_blank" href="{{developer.url}}">{{developer.name}}</a> <div *ngFor="let developer of currentApp.developers">
<span *ngIf="!developer.url" >{{developer.name}}</span> <a *ngIf="developer.url" target="_blank" [href]="developer.url">{{developer.name}}</a>
<span *ngIf="!developer.url">{{developer.name}}</span>
</div>
</dd> </dd>
<dt>发行日期</dt> <dt>发行日期</dt>
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
</div> </div>
<div style="position:absolute; top:5px; right:10px;"> <div style="position:absolute; top:5px; right:10px;">
<i id="minimized" class="fa fa-minus hover-color" (click)="minimized()" data-size="" title="最小化"></i> <i id="minimize" class="fa fa-minus hover-color" (click)="minimize()" data-size="" title="最小化"></i>
<i id="restore" class="fa fa-clone hover-color" (click)="restore()" data-size="" title="还原" hidden></i> <i id="unminimize" class="fa fa-minus hover-color" (click)="restore()" data-size="" title="取消最小化" hidden></i>
<i id="maximized" class="fa fa-expand hover-color" (click)="maximized()" onclick="" title="最大化"></i> <i id="restore" class="fa fa fa-chevron-down hover-color" (click)="restore()" data-size="" title="还原" hidden></i>
<i id="maximize" class="fa fa fa-chevron-up hover-color" (click)="maximize()" title="最大化"></i>
</div> </div>
...@@ -322,10 +322,10 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -322,10 +322,10 @@ export class CandyComponent implements OnInit, OnChanges {
} }
} }
minimized(): void { minimize(): void {
// let minimized:HTMLElement = $('#minimized')[0]; // let minimize:HTMLElement = $('#minimize')[0];
// let maximized:HTMLElement = $('#maximized')[0]; // let maximized:HTMLElement = $('#maximized')[0];
// let un_minimized:HTMLElement = $('#un_minimized')[0]; // let un_minimize:HTMLElement = $('#un_minimize')[0];
// let un_maximized:HTMLElement = $('#un_maximized')[0]; // let un_maximized:HTMLElement = $('#un_maximized')[0];
$('#candy').attr('data-minormax', 'min'); $('#candy').attr('data-minormax', 'min');
document.getElementById('candy-wrapper')!.style.height = '31px'; document.getElementById('candy-wrapper')!.style.height = '31px';
...@@ -335,9 +335,10 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -335,9 +335,10 @@ export class CandyComponent implements OnInit, OnChanges {
$('#context-menu').css('display', 'none'); $('#context-menu').css('display', 'none');
$('#mobile-roster-icon').css('display', 'none'); $('#mobile-roster-icon').css('display', 'none');
$('#minimized').hide(); $('#minimize').hide();
$('#restore').show(); $('#unminimize').show();
$('#maximized').show(); $('#restore').hide();
$('#maximize').show();
} }
restore(): void { restore(): void {
$('#candy').attr('data-minormax', 'default'); $('#candy').attr('data-minormax', 'default');
...@@ -348,12 +349,13 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -348,12 +349,13 @@ export class CandyComponent implements OnInit, OnChanges {
$('#context-menu').css('display', 'block'); $('#context-menu').css('display', 'block');
$('#mobile-roster-icon').css('display', 'block'); $('#mobile-roster-icon').css('display', 'block');
$('#minimized').show(); $('#minimize').show();
$('#unminimize').hide();
$('#restore').hide(); $('#restore').hide();
$('#maximized').show(); $('#maximize').show();
} }
maximized(): void { maximize(): void {
$('#candy').attr('data-minormax', 'max'); $('#candy').attr('data-minormax', 'max');
document.getElementById('candy-wrapper')!.style!.height = 'calc( 100% - 180px )' ; document.getElementById('candy-wrapper')!.style!.height = 'calc( 100% - 180px )' ;
$('#mobile-roster-icon').css('display', 'block'); $('#mobile-roster-icon').css('display', 'block');
...@@ -362,9 +364,10 @@ export class CandyComponent implements OnInit, OnChanges { ...@@ -362,9 +364,10 @@ export class CandyComponent implements OnInit, OnChanges {
$('#context-menu').css('display', 'block'); $('#context-menu').css('display', 'block');
$('#mobile-roster-icon').css('display', 'block'); $('#mobile-roster-icon').css('display', 'block');
$('#minimized').show(); $('#minimize').show();
$('#unminimize').hide();
$('#restore').show(); $('#restore').show();
$('#maximized').hide(); $('#maximize').hide();
} }
} }
......
...@@ -86,7 +86,7 @@ export class LobbyComponent implements OnInit { ...@@ -86,7 +86,7 @@ export class LobbyComponent implements OnInit {
} else { } else {
let height = this.offset - event.clientY; let height = this.offset - event.clientY;
let main_height = event.clientY - document.getElementById('navbar')!.clientHeight; let main_height = event.clientY - document.getElementById('navbar')!.clientHeight;
console.log(event.clientY); // console.log(event.clientY);
if (height > 150 && main_height > 180) { if (height > 150 && main_height > 180) {
if (height < 230) { if (height < 230) {
height = 230; height = 230;
...@@ -99,9 +99,10 @@ export class LobbyComponent implements OnInit { ...@@ -99,9 +99,10 @@ export class LobbyComponent implements OnInit {
$('#chat-rooms').css('display', 'block'); $('#chat-rooms').css('display', 'block');
$('#context-menu').css('display', 'block'); $('#context-menu').css('display', 'block');
$('#mobile-roster-icon').css('display', 'block'); $('#mobile-roster-icon').css('display', 'block');
$('#minimized').show(); $('#minimize').show();
$('#unminimize').hide();
$('#restore').hide(); $('#restore').hide();
$('#maximized').show(); $('#maximize').show();
} }
}else if ( height <= 150) { }else if ( height <= 150) {
$('#candy').attr('data-minormax', 'min'); $('#candy').attr('data-minormax', 'min');
...@@ -111,15 +112,17 @@ export class LobbyComponent implements OnInit { ...@@ -111,15 +112,17 @@ export class LobbyComponent implements OnInit {
$('#chat-rooms').css('display', 'none'); $('#chat-rooms').css('display', 'none');
$('#context-menu').css('display', 'none'); $('#context-menu').css('display', 'none');
$('#mobile-roster-icon').css('display', 'none'); $('#mobile-roster-icon').css('display', 'none');
$('#minimized').hide(); $('#minimize').hide();
$('#restore').show(); $('#unminimize').show();
$('#maximized').show(); $('#restore').hide();
$('#maximize').show();
}else if ( main_height <= 180) { }else if ( main_height <= 180) {
$('#candy').attr('data-minormax', 'max'); $('#candy').attr('data-minormax', 'max');
this.resizing.style.height = 'calc( 100% - 180px )'; this.resizing.style.height = 'calc( 100% - 180px )';
$('#minimized').show(); $('#minimize').show();
$('#unminimize').hide();
$('#restore').show(); $('#restore').show();
$('#maximized').hide(); $('#maximize').hide();
} }
} }
}); });
......
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