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;*/
/*}*/
/*label {*/
/*font-size: 15px;*/
/*}*/
form {
padding-bottom: .75rem;
}
#game-list-modal .table {
margin-bottom: 0;
.btn-primary {
background-color: #00a4d9;
border-color: #008dbb;
}
#game-list-modal .avatar {
width: 25px;
height: 25px;
border-radius: 50%;
#action, #match-time {
margin-bottom: .5rem;
}
#game-list-modal .close {
position: absolute;
top: 15px;
right: 15px;
#match-time .input-group-addon {
display: block;
}
#game-list-modal .modal-header {
padding-left: 0;
padding-right: 0;
#game-list-modal .modal-content {
flex-direction: row;
}
#game-list-modal .modal-header th {
line-height: 36px;
padding-top: 0;
padding-bottom: 0;
border: none;
#game-list-modal .table {
font-size: 14px;
}
#game-list-modal .avatar {
width: 18px;
height: 18px;
}
#game-list-modal .modal-body {
padding: 0;
height: 21.4rem;
#game-list-modal form {
position: relative;
background-color: #f7f7f7;
border-left: 1px solid #eee;
width: 200px;
flex-shrink: 0;
}
#game-list-modal .modal-body tr:first-child td {
border-top: none;
#game-list-modal .modal-content {
overflow: hidden;
}
#game-list-modal .modal-body tr:last-child td {
border-bottom: none;
#game-list-modal #game-create-actions {
position: absolute;
right: 0;
bottom: .75rem;
}
/*fixme: auto width*/
#game-list-modal .title {
width: 25%;
#game-list-modal fieldset label:last-child {
margin-bottom: 0;
}
#game-list-modal .users {
width: 20%;
#game-list {
position: relative;
flex-grow: 1;
}
#game-list-modal .mode {
width: 20%;
#game-list-modal h3 {
border-bottom: 2px solid #eceeef;
padding: .75rem;
vertical-align: top;
font-size: 15px;
font-weight: bold;
line-height: 1.5;
}
#game-list-modal .extra {
width: 35%;
#game-list-modal form > div, #game-list-modal form > fieldset {
padding: 0 .75rem;
font-size: 14px;
}
.float-left {
float: left;
#game-list-close {
position: absolute;
right: .75rem;
top: .5rem;
}
.actions {
margin-bottom: 1em;
#game-list-modal th {
white-space: nowrap
}
dl {
margin-bottom: 0;
#game-list-modal legend {
font-size: 14px;
}
.modal-dialog {
max-width: 600px;
#game-list-modal fieldset label {
padding-right: 0;
}
label {
#game-replay-modal .nav-tabs .nav-item {
font-size: 15px;
}
form {
margin-bottom: 0;
#game-replay-bilibili webview {
height: 440px;
}
.btn-primary {
background-color: #00a4d9;
border-color: #008dbb;
#game-replay-watch table {
font-size: 14px;
}
#action, #match-time {
margin-bottom: .5rem;
#game-replay-watch .avatar {
width: 18px;
height: 18px;
}
#match-time .input-group-addon {
display: block;
}
\ No newline at end of file
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
});
......
This diff is collapsed.
{
"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