Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
moecube
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JoyJ
moecube
Commits
4f55aa15
Commit
4f55aa15
authored
Jan 17, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user-select 优化,修复 Candy 出错后无法切换 App。
parent
05db07a4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
12 deletions
+34
-12
app/candy.component.css
app/candy.component.css
+4
-1
app/candy.component.ts
app/candy.component.ts
+9
-5
app/lobby.component.html
app/lobby.component.html
+6
-6
app/lobby.component.ts
app/lobby.component.ts
+2
-0
app/mycard.component.ts
app/mycard.component.ts
+5
-0
styles.css
styles.css
+8
-0
No files found.
app/candy.component.css
View file @
4f55aa15
...
...
@@ -156,4 +156,7 @@
/*#context-menu {*/
/**/
/*}*/
\ No newline at end of file
/*}*/
.message-pane
{
-webkit-user-select
:
auto
;
}
\ No newline at end of file
app/candy.component.ts
View file @
4f55aa15
...
...
@@ -28,7 +28,7 @@ import {LoginService} from './login.service';
import
{
SettingsService
}
from
'
./settings.sevices
'
;
import
{
App
}
from
'
./app
'
;
import
'
node_modules/candy/libs.min.js
'
;
import
'
node_modules/candy/candy.
bundle
.js
'
;
import
'
node_modules/candy/candy.
min
.js
'
;
import
'
node_modules/candy-shop/notifyme/candy.js
'
;
import
'
node_modules/candy-shop/namecomplete/candy.js
'
;
import
'
node_modules/candy-shop/modify-role/candy.js
'
;
...
...
@@ -146,10 +146,14 @@ export class CandyComponent implements OnInit, OnChanges {
}
conference
+=
'
@conference.mycard.moe
'
;
if
(
Candy
.
View
.
Pane
.
Chat
.
rooms
[
conference
])
{
Candy
.
View
.
Pane
.
Room
.
show
(
conference
);
}
else
{
Candy
.
Core
.
Action
.
Jabber
.
Room
.
Join
(
conference
);
try
{
if
(
Candy
.
View
.
Pane
.
Chat
.
rooms
[
conference
])
{
Candy
.
View
.
Pane
.
Room
.
show
(
conference
);
}
else
{
Candy
.
Core
.
Action
.
Jabber
.
Room
.
Join
(
conference
);
}
}
catch
(
error
)
{
}
}
}
app/lobby.component.html
View file @
4f55aa15
...
...
@@ -10,7 +10,7 @@
<span
i18n
*ngIf=
"grouped_apps.installed"
>
已安装
</span>
<ul
*ngIf=
"grouped_apps.installed"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.installed"
class=
"nav-item"
>
<a
(click)=
"
chooseApp(app)"
class=
"nav-link"
[class.active]=
"app===currentApp"
href=
"#
"
>
<a
(click)=
"
$event.preventDefault(); chooseApp(app)"
class=
"nav-link"
[class.active]=
"app===currentApp"
[href]=
"'https://mycard.moe/' + app.id
"
>
<!--<img class="icon" src="https://lh3.googleusercontent.com/-crYEtoQ-4Ho/AAAAAAAAAAI/AAAAAAAAAAA/AKB_U8u0CDmxkVqQgOKesrJIb-6eiXacgA/s32-c-mo/photo.jpg">-->
{{app.name}}
<i
*ngIf=
"!app.isReady() && !app.status.total"
class=
"spin fa fa-circle-o-notch fa-spin fa-fw"
></i>
<div
*ngIf=
"!app.isReady() && app.status.total"
class=
"progress"
>
<div
class=
"pie"
[class.second-half]=
"app.status.progress/app.status.total>0.5"
>
...
...
@@ -25,31 +25,31 @@
<span
i18n
*ngIf=
"grouped_apps.recommend"
>
推荐
</span>
<ul
*ngIf=
"grouped_apps.recommend"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.recommend"
class=
"nav-item"
>
<a
(click)=
"
chooseApp(app)"
href=
"#
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
<a
(click)=
"
$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.mysterious"
>
迷之物体
</span>
<ul
*ngIf=
"grouped_apps.mysterious"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.mysterious"
class=
"nav-item"
>
<a
(click)=
"
chooseApp(app)"
href=
"#
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
<a
(click)=
"
$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.touhou"
>
东方 Project
</span>
<ul
*ngIf=
"grouped_apps.touhou"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.touhou"
class=
"nav-item"
>
<a
(click)=
"
chooseApp(app)"
href=
"#
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
<a
(click)=
"
$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.touhou_pc98"
>
东方旧作
</span>
<ul
*ngIf=
"grouped_apps.touhou_pc98"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.touhou_pc98"
class=
"nav-item"
>
<a
(click)=
"
chooseApp(app)"
href=
"#
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
<a
(click)=
"
$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.runtime_installed"
>
已安装的运行库
</span>
<ul
*ngIf=
"grouped_apps.runtime_installed"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.runtime_installed"
class=
"nav-item"
>
<a
(click)=
"
chooseApp(app)"
href=
"#
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
<a
(click)=
"
$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id
"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
{{app.name}}
</a>
</li>
</ul>
</nav>
...
...
app/lobby.component.ts
View file @
4f55aa15
...
...
@@ -85,12 +85,14 @@ export class LobbyComponent implements OnInit {
}
});
document
.
addEventListener
(
'
mouseup
'
,
(
event
:
MouseEvent
)
=>
{
document
.
body
.
classList
.
remove
(
'
resizing
'
);
this
.
resizing
=
undefined
;
});
}
mousedown
(
event
:
MouseEvent
)
{
// console.log(()
document
.
body
.
classList
.
add
(
'
resizing
'
);
this
.
resizing
=
<
HTMLElement
>
(
<
HTMLElement
>
event
.
target
).
parentNode
;
if
(
this
.
resizing
.
classList
.
contains
(
'
resize-right
'
))
{
this
.
offset
=
this
.
resizing
.
offsetWidth
-
event
.
clientX
;
...
...
app/mycard.component.ts
View file @
4f55aa15
...
...
@@ -41,6 +41,11 @@ export class MyCardComponent implements OnInit {
'
update-available
'
:
this
.
update_available
,
'
update-downloaded
'
:
this
.
update_downloaded
}));
// document.addEventListener('drop', (event)=>{
// console.log('drop', event);
// event.preventDefault();
//
// });
}
constructor
(
private
renderer
:
Renderer
,
private
loginService
:
LoginService
,
private
ref
:
ChangeDetectorRef
,
...
...
styles.css
View file @
4f55aa15
...
...
@@ -80,3 +80,11 @@ mycard {
overflow-y
:
auto
;
}
body
.resizing
/
deep
/
*
{
-webkit-user-select
:
none
;
}
body
{
-webkit-user-select
:
none
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment