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

YGOPro 匹配显示时间,优化聊天室性能,去除圆角窗口,3.0.18

parent 5ece2fe2
......@@ -4,15 +4,15 @@
let shadow: ShadowRoot;
const jQueryShadow = require('../jquery-shadow.js');
jQueryShadow.fn.init = new Proxy(jQueryShadow.fn.init, {
const $ = require('../jquery-shadow.js');
$.fn.init = new Proxy($.fn.init, {
construct(target, argumentsList, newTarget) {
let [selector, context, root] = argumentsList;
if (shadow) {
if (selector === 'body') {
selector = shadow;
} else if (selector === document) {
selector = shadow.querySelector('#candy');
selector = $('#candy');
} else if (!context) {
context = shadow;
}
......@@ -21,7 +21,7 @@ jQueryShadow.fn.init = new Proxy(jQueryShadow.fn.init, {
}
});
window['jQuery'] = jQueryShadow;
window['jQuery'] = $;
import {Component, ViewEncapsulation, OnInit, Input, OnChanges, SimpleChanges, ElementRef} from '@angular/core';
import {LoginService} from './login.service';
......@@ -57,6 +57,31 @@ Candy.Util.getPosTopAccordingToWindowBounds = new Proxy(Candy.Util.getPosTopAcco
return target.apply(thisArg, argumentsList);
}
});
Candy.View.Pane.Roster.joinAnimation = function (elementId: string) {
$("#" + elementId).show().css({opacity: 'initial'});
};
declare const Mustache: any;
Candy.View.Pane.Roster._insertUser = function (roomJid: string, roomId: string, user: any, userId: string, currentUser: any) {
let contact = user.getContact();
let html = Mustache.to_html(Candy.View.Template.Roster.user, {
roomId: roomId,
userId: userId,
userJid: user.getJid(),
realJid: user.getRealJid(),
status: user.getStatus(),
contact_status: contact ? contact.getStatus() : "unavailable",
nick: user.getNick(),
displayNick: Candy.Util.crop(user.getNick(), Candy.View.getOptions().crop.roster.nickname),
role: user.getRole(),
affiliation: user.getAffiliation(),
me: currentUser !== undefined && user.getNick() === currentUser.getNick(),
tooltipRole: $.i18n._("tooltipRole"),
tooltipIgnored: $.i18n._("tooltipIgnored")
});
let rosterPane = Candy.View.Pane.Room.getPane(roomJid, ".roster-pane");
rosterPane.append(html);
};
document['__defineGetter__']('cookie', () => 'candy-nostatusmessages');
document['__defineSetter__']('cookie', () => true);
......@@ -75,10 +100,10 @@ export class CandyComponent implements OnInit, OnChanges {
password: string;
nickname: string;
constructor(private loginService: LoginService, private settingsService: SettingsService, private element: ElementRef) {
constructor (private loginService: LoginService, private settingsService: SettingsService, private element: ElementRef) {
}
ngOnInit() {
ngOnInit () {
this.jid = this.loginService.user.username + '@mycard.moe';
this.password = this.loginService.user.external_id.toString();
......@@ -136,7 +161,7 @@ export class CandyComponent implements OnInit, OnChanges {
Candy.Core.connect(this.jid, this.password, this.nickname);
}
ngOnChanges(changes: SimpleChanges): void {
ngOnChanges (changes: SimpleChanges): void {
if (!Candy.Core.getConnection()) {
return;
}
......
......@@ -7,7 +7,7 @@ import {LoginService} from './login.service';
import {App, Category} from './app';
import {shell} from 'electron';
import {SettingsService} from './settings.sevices';
import 'typeahead.js';
// import 'typeahead.js';
// import Options = Twitter.Typeahead.Options;
@Component({
......
:host {
background-color: white;
}
/*:host {*/
/*background-color: white;*/
/*}*/
.page {
flex-grow: 1;
/*margin-bottom: 60px;*/
......@@ -54,9 +54,9 @@ lobby[hidden], webview[hidden] {
/* 不加这个切到有 Webview 的页面,上面的圆角会消失 */
/* 即使加了这个,下面的圆角也会消失 */
webview {
overflow: hidden;
}
/*webview {*/
/*overflow: hidden;*/
/*}*/
#navbar {
background-color: #f7f7f9!important;
......
#game-list-modal tbody {
display: block;
overflow-y: auto;
height: 21.5rem;
}
/*#game-list-modal tbody {*/
/*display: block;*/
/*overflow-y: auto;*/
/*height: 21.5rem;*/
/*}*/
/*#game-list-modal thead {*/
/*position: relative;*/
/*display: block;*/
/*}*/
/*#game-list-modal tr {*/
/*width: 100%;*/
/*display: table;*/
/*}*/
/*#game-list-modal .table {*/
/*margin-bottom: 0;*/
/*}*/
/*#game-list-modal .close {*/
/*position: absolute;*/
/*top: 15px;*/
/*right: 15px;*/
/*}*/
/*#game-list-modal .modal-header {*/
/*padding-left: 0;*/
/*padding-right: 0;*/
/*}*/
/*#game-list-modal .modal-header th {*/
/*line-height: 36px;*/
/*padding-top: 0;*/
/*padding-bottom: 0;*/
/*border: none;*/
/*}*/
/*#game-list-modal .modal-body {*/
/*padding: 0;*/
/*height: 21.4rem;*/
/*}*/
/*#game-list-modal .modal-body tr:first-child td {*/
/*border-top: none;*/
/*}*/
/*#game-list-modal .modal-body tr:last-child td {*/
/*border-bottom: none;*/
/*}*/
/*!*fixme: auto width*!*/
/*#game-list-modal .title {*/
/*width: 25%;*/
/*}*/
/*#game-list-modal .users {*/
/*width: 20%;*/
/*}*/
/*#game-list-modal .mode {*/
/*width: 20%;*/
/*}*/
/*#game-list-modal .extra {*/
/*width: 35%;*/
/*}*/
/*.float-left {*/
/*float: left;*/
/*}*/
/*.actions {*/
/*margin-bottom: 1em;*/
/*}*/
#game-list-modal thead {
position: relative;
display: block;
dl {
margin-bottom: 0;
}
#game-list-modal tr {
width: 100%;
display: table;
}
/*.modal-dialog {*/
/*max-width: 600px;*/
/*}*/
#game-list-modal .table {
margin-bottom: 0;
}
/*label {*/
/*font-size: 15px;*/
/*}*/
#game-list-modal .avatar {
width: 25px;
height: 25px;
border-radius: 50%;
form {
padding-bottom: .75rem;
}
#game-list-modal .close {
position: absolute;
top: 15px;
right: 15px;
.btn-primary {
background-color: #00a4d9;
border-color: #008dbb;
}
#game-list-modal .modal-header {
padding-left: 0;
padding-right: 0;
#action, #match-time {
margin-bottom: .5rem;
}
#game-list-modal .modal-header th {
line-height: 36px;
padding-top: 0;
padding-bottom: 0;
border: none;
#match-time .input-group-addon {
display: block;
}
#game-list-modal .modal-content {
flex-direction: row;
}
#game-list-modal .modal-body {
padding: 0;
height: 21.4rem;
#game-list-modal .table {
font-size: 14px;
}
#game-list-modal .modal-body tr:first-child td {
border-top: none;
#game-list-modal .avatar {
width: 18px;
height: 18px;
}
#game-list-modal .modal-body tr:last-child td {
border-bottom: none;
#game-list-modal form {
position: relative;
background-color: #f7f7f7;
border-left: 1px solid #eee;
width: 200px;
flex-shrink: 0;
}
/*fixme: auto width*/
#game-list-modal .title {
width: 25%;
#game-list-modal .modal-content {
overflow: hidden;
}
#game-list-modal .users {
width: 20%;
#game-list-modal #game-create-actions {
position: absolute;
right: 0;
bottom: .75rem;
}
#game-list-modal .mode {
width: 20%;
#game-list-modal fieldset label:last-child {
margin-bottom: 0;
}
#game-list-modal .extra {
width: 35%;
#game-list {
position: relative;
flex-grow: 1;
}
.float-left {
float: left;
#game-list-modal h3 {
border-bottom: 2px solid #eceeef;
padding: .75rem;
vertical-align: top;
font-size: 15px;
font-weight: bold;
line-height: 1.5;
}
.actions {
margin-bottom: 1em;
#game-list-modal form > div, #game-list-modal form > fieldset {
padding: 0 .75rem;
font-size: 14px;
}
dl {
margin-bottom: 0;
#game-list-close {
position: absolute;
right: .75rem;
top: .5rem;
}
.modal-dialog {
max-width: 600px;
#game-list-modal th {
white-space: nowrap
}
label {
font-size: 15px;
#game-list-modal legend {
font-size: 14px;
}
#game-list-modal fieldset label {
padding-right: 0;
}
form {
margin-bottom: 0;
#game-replay-modal .nav-tabs .nav-item {
font-size: 15px;
}
.btn-primary {
background-color: #00a4d9;
border-color: #008dbb;
#game-replay-bilibili webview {
height: 440px;
}
#action, #match-time {
margin-bottom: .5rem;
#game-replay-watch table {
font-size: 14px;
}
#match-time .input-group-addon {
display: block;
#game-replay-watch .avatar {
width: 18px;
height: 18px;
}
This diff is collapsed.
This diff is collapsed.
......@@ -143,7 +143,7 @@ function createWindow() {
minWidth: 1024,
minHeight: 640,
frame: process.platform == 'darwin',
transparent: process.platform != 'darwin',
// transparent: process.platform != 'darwin',
titleBarStyle: process.platform == 'darwin' ? 'hidden' : null
});
......
......@@ -5,11 +5,6 @@
<source>竞技匹配</source>
<target>Ranked Match</target>
</trans-unit>
<trans-unit datatype="html" id="37869c115276c5df476f1f5aae75c099ffb35b59">
<source>取消等待</source>
<target>Cancel</target>
</trans-unit>
<trans-unit datatype="html" id="0bf938a69dc640aba46428d1cbbd2fef34c88daa">
<source>娱乐匹配</source>
......@@ -25,6 +20,21 @@
<source>单人模式</source>
<target>Single Mode</target>
</trans-unit>
<trans-unit datatype="html" id="4115bf4e35def25bcfa6d4e649f5e006225c691a">
<source>观战和录像</source>
<target>Watch Replay</target>
</trans-unit>
<trans-unit datatype="html" id="157bc28ebe7ecf3f455852f64687ea580dfe23dc">
<source>预计时间</source>
<target>Estimated Wait</target>
</trans-unit>
<trans-unit datatype="html" id="6968a638448b1f36c52a3b306541214acbf9d567">
<source>实际时间</source>
<target>Actual Wait</target>
</trans-unit>
<trans-unit datatype="html" id="def237147323023c1f5ce0579345da19d4707fdb">
<source>卡组</source>
......@@ -45,46 +55,26 @@
<source>取消</source>
<target>Cancel</target>
</trans-unit>
<trans-unit datatype="html" id="19923836b1ae79614782426a7a001d8ccfa27b5c">
<source>创建房间</source>
<target>Custom Game</target>
</trans-unit>
<trans-unit datatype="html" id="e35d1bf7c735e8df55a62046cd2d9f820bf5bffd">
<source>游戏标题</source>
<target>Title</target>
</trans-unit>
<trans-unit datatype="html" id="4b911deaa4defd0803635012281f3dd1112aabd1">
<source>卡片允许</source>
<target>Rule</target>
</trans-unit>
<trans-unit datatype="html" id="93d3b6bb4f3a66efd8c49f9063f6c8d6a9e959bf">
<source>OCG</source>
<target>OCG</target>
</trans-unit>
<trans-unit datatype="html" id="150cb34526cf737163beb63ab76e4809ac1367dd">
<source>TCG</source>
<target>TCG</target>
</trans-unit>
<trans-unit datatype="html" id="be6d109c359b1d11b261280915e6b1706ca3ed9b">
<source>OCG &amp; TCG</source>
<target>TCG/OCG</target>
</trans-unit>
<trans-unit datatype="html" id="2a3f48f9ea5e6aae92e249ac2b279dbc07a6127d">
<source>专有卡禁止</source>
<target>Unspecified</target>
<trans-unit datatype="html" id="3872a823a98042e4730861ab6f9344239d9deeb6">
<source>玩家</source>
<target>Player</target>
</trans-unit>
<trans-unit datatype="html" id="d62a2717a0381d996785271c61177711777ba63c">
<source>决斗模式</source>
<target>Duel mode</target>
</trans-unit>
<trans-unit datatype="html" id="d4038dd5d0e9d5139d425fc7bea40e40d965cc5b">
<source>额外选项</source>
<target>Additional Options</target>
</trans-unit>
<trans-unit datatype="html" id="e436a4a0da03320dc61ba35bfab390ab85a23d0c">
<source>单局模式</source>
......@@ -100,56 +90,6 @@
<source>TAG</source>
<target>TAG</target>
</trans-unit>
<trans-unit datatype="html" id="d4038dd5d0e9d5139d425fc7bea40e40d965cc5b">
<source>额外选项</source>
<target>Additional Options</target>
</trans-unit>
<trans-unit datatype="html" id="01cfbee3f1d69f5adae299b7b8c8d75034aef53b">
<source>初始 LP</source>
<target>Starting LP</target>
</trans-unit>
<trans-unit datatype="html" id="0d72e50857f1d2504e08f7886d4c9d35a46e3ed9">
<source>初始手牌数</source>
<target>Starting Hand</target>
</trans-unit>
<trans-unit datatype="html" id="88cc5676c5322fd55c1df94ab487359100e6f9dd">
<source>每回合抽卡</source>
<target>Draw per Turn</target>
</trans-unit>
<trans-unit datatype="html" id="e405d8c7feb2bed82f3f0667657fa4ab668ae015">
<source>允许启动效果优先权</source>
<target>Ignition Priority</target>
</trans-unit>
<trans-unit datatype="html" id="6e7470ddf4c35f6fab39b6ebeadb1780701a5469">
<source>不检查卡组</source>
<target>Don't check</target>
</trans-unit>
<trans-unit datatype="html" id="0320acff078b039f2220bb385586cd2e24392bbb">
<source>开局不洗卡组</source>
<target>Don't shuffle</target>
</trans-unit>
<trans-unit datatype="html" id="c17e9385db80e1881f37dda25d109b115a2843b3">
<source>查看房间</source>
<target>View rooms</target>
</trans-unit>
<trans-unit datatype="html" id="f8ae23b4314929573cf0e815ccc12d70486dd74f">
<source>创建</source>
<target>Create</target>
</trans-unit>
<trans-unit datatype="html" id="3872a823a98042e4730861ab6f9344239d9deeb6">
<source>玩家</source>
<target>Player</target>
</trans-unit>
<trans-unit datatype="html" id="8514a93609dc67a44e5b198b53e42fe468f8a81a">
<source>
......@@ -184,9 +124,9 @@
</target>
</trans-unit>
<trans-unit datatype="html" id="be32d8fb22f36c3b2c1530e91f2ca07d108c8abe">
<source>优先权</source>
<target>Priority</target>
<trans-unit datatype="html" id="785cc65c8db99887484b3b1067c45b32810c7c2a">
<source>旧规则</source>
<target>Old rules</target>
</trans-unit>
<trans-unit datatype="html" id="b5be173f96718dfa737f1da31d9ffab5b803561e">
......@@ -198,6 +138,95 @@
<source>不洗卡</source>
<target>Don't shuffle</target>
</trans-unit>
<trans-unit datatype="html" id="19923836b1ae79614782426a7a001d8ccfa27b5c">
<source>创建房间</source>
<target>Create</target>
</trans-unit>
<trans-unit datatype="html" id="4b911deaa4defd0803635012281f3dd1112aabd1">
<source>卡片允许</source>
<target>Rule</target>
</trans-unit>
<trans-unit datatype="html" id="93d3b6bb4f3a66efd8c49f9063f6c8d6a9e959bf">
<source>OCG</source>
<target>OCG</target>
</trans-unit>
<trans-unit datatype="html" id="150cb34526cf737163beb63ab76e4809ac1367dd">
<source>TCG</source>
<target>TCG</target>
</trans-unit>
<trans-unit datatype="html" id="be6d109c359b1d11b261280915e6b1706ca3ed9b">
<source>OCG &amp; TCG</source>
<target>TCG/OCG</target>
</trans-unit>
<trans-unit datatype="html" id="2a3f48f9ea5e6aae92e249ac2b279dbc07a6127d">
<source>专有卡禁止</source>
<target>Unspecified</target>
</trans-unit>
<trans-unit datatype="html" id="01cfbee3f1d69f5adae299b7b8c8d75034aef53b">
<source>初始 LP</source>
<target>Starting LP</target>
</trans-unit>
<trans-unit datatype="html" id="0d72e50857f1d2504e08f7886d4c9d35a46e3ed9">
<source>初始手牌数</source>
<target>Starting Hand</target>
</trans-unit>
<trans-unit datatype="html" id="88cc5676c5322fd55c1df94ab487359100e6f9dd">
<source>每回合抽卡</source>
<target>Draw / Turn</target>
</trans-unit>
<trans-unit datatype="html" id="6e7470ddf4c35f6fab39b6ebeadb1780701a5469">
<source>不检查卡组</source>
<target>Don't check</target>
</trans-unit>
<trans-unit datatype="html" id="4f104c680937cb724b069f62ab1ff60651c5bb06">
<source>不洗切卡组</source>
<target>Don't shuffle</target>
</trans-unit>
<trans-unit datatype="html" id="84276d07f694b80bd5ea94d28283b6530248d02e">
<source>观战</source>
<target>Live</target>
</trans-unit>
<trans-unit datatype="html" id="d516b78557483a84288359494abde950d3887518">
<source>本地录像</source>
<target>Local</target>
</trans-unit>
<trans-unit datatype="html" id="7047116f06b2fcb5e7f8e8589d1ef31628aff0fa">
<source>游戏模式</source>
<target>Game Mode</target>
</trans-unit>
<trans-unit datatype="html" id="08afd8197e09842de9d76741588c6c1bcd3e2605">
<source>详情</source>
<target>Detail</target>
</trans-unit>
<trans-unit datatype="html" id="5136f852d874c46bf808987470980a0f2560487e">
<source>
<x id="INTERPOLATION"/>
<x id="INTERPOLATION_1"/>
的决斗
</source>
<target>
<x id="INTERPOLATION"/>
Vs.
<x id="INTERPOLATION_1"/>
</target>
</trans-unit>
<trans-unit datatype="html" id="a8cae935472a05e1c8c9be436bb7b1bdea96a54a">
<source>安装</source>
......@@ -416,7 +445,7 @@
</trans-unit>
<trans-unit datatype="html" id="69f3fab778e92fcec3a8c38d53d771a36e6d5230">
<source>推荐</source>
<target>Recommend</target>
<target>Recommended</target>
</trans-unit>
<trans-unit datatype="html" id="fc570ecca13755cb4a92e7513fbd55c2d412f23c">
......
{
"name": "mycard",
"version": "3.0.17",
"version": "3.0.18",
"description": "mycard",
"keywords": [],
"author": "zh99998 <zh99998@gmail.com>",
......
html, body {
height: 100%;
overflow: hidden;
/*overflow: hidden;*/
}
body {
......@@ -8,12 +8,12 @@ body {
-webkit-user-select: none;
}
body.win32 {
background: transparent;
border-radius: 5px;
border: 1px solid #eee;
padding-right: 0 !important;
}
/*body.win32 {*/
/*background: transparent;*/
/*border-radius: 5px;*/
/*border: 1px solid #eee;*/
/*padding-right: 0 !important;*/
/*}*/
mycard {
height: 100%;
......@@ -94,6 +94,10 @@ body.resizing /deep/ * {
-webkit-user-select: none;
}
mycard {
background-color: white;
}
\ No newline at end of file
/*mycard {*/
/*background-color: white;*/
/*}*/
/*button, input, optgroup, select, textarea {*/
/*font-family: inherit;*/
/*}*/
\ No newline at end of file
......@@ -77,7 +77,7 @@ System.config({
'jquery': 'npm:jquery/dist/jquery.min.js',
'tether': 'npm:tether/dist/js/tether.min.js',
'bootstrap': 'npm:bootstrap/dist/js/bootstrap.min.js',
'typeahead.js': '@node/typeahead.js'
// 'typeahead.js': '@node/typeahead.js'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
......
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