Commit 0b9a34ba authored by 神楽坂玲奈's avatar 神楽坂玲奈

1. 游戏列表、聊天室可拖拽 (实际上上一版就发了,忘了说,这一版拖拽大小加上了限制)

2. YGOPro 国际化聊天室
3. 窗口拖拽大小限制 (最小默认1024x640)
4. 修复一个导致在游戏详情页面滚动失效的bug
5. 修复英文排位成绩显示为中文的bug
6. 修复竞技负场数据显示为娱乐负场数据的bug
parent 614288d5
:host {
/*background-color: #c3d9ff;*/
flex-grow: 1;
position: relative;
}
#background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
filter: grayscale(50%) opacity(10%);
background-repeat: no-repeat;
background-size: 100% auto;
}
.scroll {
padding: 1rem 1rem 0 1rem;
height: 100%;
}
.actions {
margin-bottom: 1rem;
background-blend-mode: color;
}
.list-group {
......
This diff is collapsed.
import {Component, OnInit, Input, ChangeDetectorRef, OnChanges, SimpleChanges} from '@angular/core';
import {Component, OnInit, Input, ChangeDetectorRef, OnChanges, SimpleChanges, ElementRef} from '@angular/core';
import {AppsService} from './apps.service';
import {InstallOption} from './install-option';
import {SettingsService} from './settings.sevices';
......@@ -34,21 +34,19 @@ export class AppDetailComponent implements OnInit, OnChanges {
points: Points;
constructor(private appsService: AppsService, private settingsService: SettingsService,
private downloadService: DownloadService, private ref: ChangeDetectorRef) {
private downloadService: DownloadService, private ref: ChangeDetectorRef, private el: ElementRef) {
}
ngOnChanges(changes: SimpleChanges): void {
if (changes['currentApp']) {
if (this.currentApp.background && this.currentApp.background.length > 0) {
let url = this.currentApp.background[Math.floor(Math.random() * this.currentApp.background.length)];
this.background = `url(${url})`;
if (this.currentApp.background) {
this.el.nativeElement.style.background = `url("${this.currentApp.background}") rgba(255,255,255,.8)`;
} else {
this.background = '';
this.el.nativeElement.style.background = 'white';
}
}
}
async ngOnInit(): Promise<void> {
let volume = 'A';
for (let i = 0; i < 26; i++) {
......
......@@ -60,7 +60,7 @@
<div id="right">
<div id="main">
<app-detail *ngIf="currentApp" [currentApp]="currentApp"></app-detail>
<app-detail class="scroll" *ngIf="currentApp" [currentApp]="currentApp"></app-detail>
<roster class="scroll"></roster>
</div>
......
......@@ -48,6 +48,10 @@ export class LobbyComponent implements OnInit {
window.close();
}
}
// 特化个 YGOPRO 国际服聊天室。其他的暂时没需求。
if (!this.settingsService.getLocale().startsWith('zh')) {
this.apps.get('ygopro')!.conference = 'ygopro-international'
}
this.ref.detectChanges();
// $(this.search.nativeElement).typeahead(<any>{
......@@ -75,12 +79,18 @@ export class LobbyComponent implements OnInit {
if (width < 190) {
width = 190;
}
if (width > 400) {
width = 400;
}
this.resizing.style.width = `${width}px`;
} else {
let height = this.offset - event.clientY;
if (height < 236) {
height = 236;
}
if (height > 540) {
height = 540;
}
this.resizing.style.height = `${height}px`;
}
});
......
......@@ -4,8 +4,7 @@
<button i18n [disabled]="!appsService.allReady(app)" (click)="cancel_match()" *ngIf="matching_arena == 'athletic'" type="button" class="btn btn-primary btn-sm">取消等待</button>
<button i18n [disabled]="matching||!appsService.allReady(app)" (click)="request_match('entertain')" *ngIf="matching_arena != 'entertain'" type="button" class="btn btn-secondary btn-sm">娱乐匹配</button>
<button i18n [disabled]="!appsService.allReady(app)" (click)="cancel_match()" *ngIf="matching_arena == 'entertain'" type="button" class="btn btn-secondary btn-sm">取消等待</button>
<!--<button i18n [disabled]="matching||!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-create-modal">创建房间</button>-->
<button i18n [disabled]="matching||!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-list-modal">房间列表</button>
<button i18n [disabled]="matching||!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-list-modal">自定义游戏</button>
<button i18n [disabled]="!appsService.allReady(app)" type="button" class="btn btn-secondary btn-sm" data-toggle="modal" data-target="#game-create-windbot">单人模式</button>
</div>
<div class="input-group input-group-sm">
......@@ -13,7 +12,6 @@
<select class="form-control form-control-sm" id="exampleSelect1" name="deck" [(ngModel)]="current_deck">
<option *ngFor="let deck of decks" [ngValue]="deck">{{deck}}</option>
</select>
<!--<input type="text" class="form-control" aria-label="Text input with checkbox">-->
<span class="input-group-btn">
<button id="edit_deck_button" i18n [disabled]="!appsService.allReady(app)" class="btn btn-secondary btn-sm" (click)="edit_deck(current_deck)">编辑</button>
</span>
......
......@@ -140,8 +140,10 @@ function createWindow() {
mainWindow = new BrowserWindow({
width: 1024,
height: 640,
minWidth: 1024,
minHeight: 640,
frame: process.platform == 'darwin',
transparent: true,
transparent: process.platform != 'darwin',
titleBarStyle: process.platform == 'darwin' ? 'hidden' : null
});
......
This diff is collapsed.
......@@ -6,10 +6,12 @@ html, body {
body {
font-family: -apple-system, Arial, 'Source Sans Pro', "Microsoft YaHei", 'Microsoft JhengHei', "WenQuanYi Micro Hei", sans-serif;
-webkit-user-select: none;
}
body.win32 {
background: transparent;
border-radius: 5px;
border: 1px solid #eee;
padding-right: 0 !important;
}
......@@ -44,7 +46,7 @@ mycard {
border-radius: initial;
}
#navbar a, #navbar i, #navbar img {
#navbar .nav-link, #navbar .profile, #navbar i, #navbar img {
-webkit-app-region: no-drag;
}
......@@ -54,7 +56,7 @@ mycard {
}
/* Turn on custom 8px wide scrollbar */
::-webkit-scrollbar {
.win32 ::-webkit-scrollbar {
width: 8px; /* 1px wider than Lion. */
/* This is more usable for users trying to click it. */
background-color: rgba(0, 0, 0, 0);
......@@ -62,19 +64,19 @@ mycard {
}
/* hover effect for both scrollbar area, and scrollbar 'thumb' */
::-webkit-scrollbar:active {
.win32 ::-webkit-scrollbar:active {
background-color: rgba(0, 0, 0, 0.05);
}
/* The scrollbar 'thumb' ...that marque oval shape in a scrollbar */
::-webkit-scrollbar-thumb:vertical {
.win32 ::-webkit-scrollbar-thumb:vertical {
/* This is the EXACT color of Mac OS scrollbars.
Yes, I pulled out digital color meter */
background: rgba(0, 0, 0, 0.1);
-webkit-border-radius: 100px;
}
::-webkit-scrollbar-thumb:vertical:active {
.win32 ::-webkit-scrollbar-thumb:vertical:active {
background: rgba(0, 0, 0, 0.2); /* Some darker color when you click it */
-webkit-border-radius: 100px;
}
......
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