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

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

parent 94349dd2
......@@ -114,9 +114,11 @@
<div class="panel" id="game_info_2">
<dl>
<dt>开发</dt>
<dd *ngFor="let developer of currentApp.developers">
<a *ngIf="developer.url" target="_blank" href="{{developer.url}}">{{developer.name}}</a>
<span *ngIf="!developer.url" >{{developer.name}}</span>
<dd>
<div *ngFor="let developer of currentApp.developers">
<a *ngIf="developer.url" target="_blank" [href]="developer.url">{{developer.name}}</a>
<span *ngIf="!developer.url">{{developer.name}}</span>
</div>
</dd>
<dt>发行日期</dt>
......@@ -304,8 +306,8 @@
<label for="wechat" class="form-check-label">微信</label>
</div>
<!--<div class="form-check">-->
<!--<input id="paypal" type="radio" class="form-check-input" name="optionsRadios" value="alipay" checked>-->
<!--<label for="paypal" class="form-check-label">PayPal</label>-->
<!--<input id="paypal" type="radio" class="form-check-input" name="optionsRadios" value="alipay" checked>-->
<!--<label for="paypal" class="form-check-label">PayPal</label>-->
<!--</div>-->
<!--</fieldset>-->
</form>
......
......@@ -2,7 +2,8 @@
</div>
<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="restore" class="fa fa-clone hover-color" (click)="restore()" data-size="" title="还原" hidden></i>
<i id="maximized" class="fa fa-expand hover-color" (click)="maximized()" onclick="" title="最大化"></i>
</div>
\ No newline at end of file
<i id="minimize" class="fa fa-minus hover-color" (click)="minimize()" data-size="" title="最小化"></i>
<i id="unminimize" class="fa fa-minus hover-color" (click)="restore()" data-size="" title="取消最小化" hidden></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>
......@@ -322,10 +322,10 @@ export class CandyComponent implements OnInit, OnChanges {
}
}
minimized(): void {
// let minimized:HTMLElement = $('#minimized')[0];
minimize(): void {
// let minimize:HTMLElement = $('#minimize')[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];
$('#candy').attr('data-minormax', 'min');
document.getElementById('candy-wrapper')!.style.height = '31px';
......@@ -335,9 +335,10 @@ export class CandyComponent implements OnInit, OnChanges {
$('#context-menu').css('display', 'none');
$('#mobile-roster-icon').css('display', 'none');
$('#minimized').hide();
$('#restore').show();
$('#maximized').show();
$('#minimize').hide();
$('#unminimize').show();
$('#restore').hide();
$('#maximize').show();
}
restore(): void {
$('#candy').attr('data-minormax', 'default');
......@@ -348,12 +349,13 @@ export class CandyComponent implements OnInit, OnChanges {
$('#context-menu').css('display', 'block');
$('#mobile-roster-icon').css('display', 'block');
$('#minimized').show();
$('#minimize').show();
$('#unminimize').hide();
$('#restore').hide();
$('#maximized').show();
$('#maximize').show();
}
maximized(): void {
maximize(): void {
$('#candy').attr('data-minormax', 'max');
document.getElementById('candy-wrapper')!.style!.height = 'calc( 100% - 180px )' ;
$('#mobile-roster-icon').css('display', 'block');
......@@ -362,9 +364,10 @@ export class CandyComponent implements OnInit, OnChanges {
$('#context-menu').css('display', 'block');
$('#mobile-roster-icon').css('display', 'block');
$('#minimized').show();
$('#minimize').show();
$('#unminimize').hide();
$('#restore').show();
$('#maximized').hide();
$('#maximize').hide();
}
}
......
......@@ -86,7 +86,7 @@ export class LobbyComponent implements OnInit {
} else {
let height = this.offset - event.clientY;
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 < 230) {
height = 230;
......@@ -99,9 +99,10 @@ export class LobbyComponent implements OnInit {
$('#chat-rooms').css('display', 'block');
$('#context-menu').css('display', 'block');
$('#mobile-roster-icon').css('display', 'block');
$('#minimized').show();
$('#minimize').show();
$('#unminimize').hide();
$('#restore').hide();
$('#maximized').show();
$('#maximize').show();
}
}else if ( height <= 150) {
$('#candy').attr('data-minormax', 'min');
......@@ -111,15 +112,17 @@ export class LobbyComponent implements OnInit {
$('#chat-rooms').css('display', 'none');
$('#context-menu').css('display', 'none');
$('#mobile-roster-icon').css('display', 'none');
$('#minimized').hide();
$('#restore').show();
$('#maximized').show();
$('#minimize').hide();
$('#unminimize').show();
$('#restore').hide();
$('#maximize').show();
}else if ( main_height <= 180) {
$('#candy').attr('data-minormax', 'max');
this.resizing.style.height = 'calc( 100% - 180px )';
$('#minimized').show();
$('#minimize').show();
$('#unminimize').hide();
$('#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