Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
17cf3999
Commit
17cf3999
authored
Feb 06, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix, explore folder, setup gif, watcher, 2.0.6
parent
806e44e0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
15 deletions
+42
-15
Gruntfile.js
Gruntfile.js
+8
-4
apps.js
apps.js
+19
-1
css/style.css
css/style.css
+4
-0
index.html
index.html
+6
-6
js/app.js
js/app.js
+3
-3
main.js
main.js
+1
-0
package.json
package.json
+1
-1
resources/win32/setup.gif
resources/win32/setup.gif
+0
-0
No files found.
Gruntfile.js
View file @
17cf3999
...
@@ -84,7 +84,8 @@ module.exports = (grunt) => {
...
@@ -84,7 +84,8 @@ module.exports = (grunt) => {
authors
:
'
MyCard
'
,
authors
:
'
MyCard
'
,
exe
:
'
mycard.exe
'
,
exe
:
'
mycard.exe
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
noMsi
:
true
noMsi
:
true
,
loadingGif
:
'
resources/win32/setup.gif
'
},
},
x64
:
{
x64
:
{
appDirectory
:
'
build3/mycard-win32-x64
'
,
appDirectory
:
'
build3/mycard-win32-x64
'
,
...
@@ -92,7 +93,8 @@ module.exports = (grunt) => {
...
@@ -92,7 +93,8 @@ module.exports = (grunt) => {
authors
:
'
MyCard
'
,
authors
:
'
MyCard
'
,
exe
:
'
mycard.exe
'
,
exe
:
'
mycard.exe
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
noMsi
:
true
noMsi
:
true
,
loadingGif
:
'
resources/win32/setup.gif
'
},
},
'
bundle-ia32
'
:
{
'
bundle-ia32
'
:
{
appDirectory
:
'
build3/mycard-win32-ia32
'
,
appDirectory
:
'
build3/mycard-win32-ia32
'
,
...
@@ -100,7 +102,8 @@ module.exports = (grunt) => {
...
@@ -100,7 +102,8 @@ module.exports = (grunt) => {
authors
:
'
MyCard
'
,
authors
:
'
MyCard
'
,
exe
:
'
mycard.exe
'
,
exe
:
'
mycard.exe
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
noMsi
:
true
noMsi
:
true
,
loadingGif
:
'
resources/win32/setup.gif
'
},
},
'
bundle-x64
'
:{
'
bundle-x64
'
:{
appDirectory
:
'
build3/mycard-win32-x64
'
,
appDirectory
:
'
build3/mycard-win32-x64
'
,
...
@@ -108,7 +111,8 @@ module.exports = (grunt) => {
...
@@ -108,7 +111,8 @@ module.exports = (grunt) => {
authors
:
'
MyCard
'
,
authors
:
'
MyCard
'
,
exe
:
'
mycard.exe
'
,
exe
:
'
mycard.exe
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
setupIcon
:
'
resources/win32/icon.ico
'
,
noMsi
:
true
noMsi
:
true
,
loadingGif
:
'
resources/win32/setup.gif
'
}
}
},
},
appdmg
:
{
appdmg
:
{
...
...
apps.js
View file @
17cf3999
...
@@ -15,8 +15,11 @@ const autoUpdater = require('auto-updater');
...
@@ -15,8 +15,11 @@ const autoUpdater = require('auto-updater');
const
electron
=
require
(
'
electron
'
);
const
electron
=
require
(
'
electron
'
);
const
ipcMain
=
electron
.
ipcMain
;
const
ipcMain
=
electron
.
ipcMain
;
const
app
=
electron
.
app
;
const
app
=
electron
.
app
;
const
shell
=
electron
.
shell
;
const
BrowserWindow
=
electron
.
BrowserWindow
;
const
BrowserWindow
=
electron
.
BrowserWindow
;
const
watcher
=
{};
const
data_path
=
app
.
getPath
(
'
userData
'
);
const
data_path
=
app
.
getPath
(
'
userData
'
);
const
db_path
=
path
.
join
(
data_path
,
'
db.json
'
);
const
db_path
=
path
.
join
(
data_path
,
'
db.json
'
);
...
@@ -119,6 +122,10 @@ eventemitter.on('delete', (app_id, file) => {
...
@@ -119,6 +122,10 @@ eventemitter.on('delete', (app_id, file) => {
delete
db
.
local
[
app_id
].
files
[
file
];
delete
db
.
local
[
app_id
].
files
[
file
];
});
});
eventemitter
.
on
(
'
explore
'
,
(
app_id
)
=>
{
electron
.
shell
.
showItemInFolder
(
path
.
join
(
db
.
local
[
app_id
].
path
,
'
deck
'
))
});
eventemitter
.
on
(
'
write
'
,
(
app_id
,
file
,
data
,
merge
)
=>
{
eventemitter
.
on
(
'
write
'
,
(
app_id
,
file
,
data
,
merge
)
=>
{
let
local
=
db
.
local
[
app_id
];
let
local
=
db
.
local
[
app_id
];
if
(
file
==
'
system.conf
'
)
{
if
(
file
==
'
system.conf
'
)
{
...
@@ -145,6 +152,7 @@ for (let app_id in db.local) {
...
@@ -145,6 +152,7 @@ for (let app_id in db.local) {
load
(
db
.
apps
[
app_id
],
db
.
local
[
app_id
],
done
);
load
(
db
.
apps
[
app_id
],
db
.
local
[
app_id
],
done
);
}
}
}
}
done
();
done
();
function
done
()
{
function
done
()
{
...
@@ -208,7 +216,7 @@ function start_server() {
...
@@ -208,7 +216,7 @@ function start_server() {
if
(
process
.
argv
[
1
]
==
'
--squirrel-firstrun
'
)
{
if
(
process
.
argv
[
1
]
==
'
--squirrel-firstrun
'
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
autoUpdater
.
checkForUpdates
();
autoUpdater
.
checkForUpdates
();
},
3
000
)
},
10
000
)
}
else
{
}
else
{
autoUpdater
.
checkForUpdates
();
autoUpdater
.
checkForUpdates
();
}
}
...
@@ -301,6 +309,16 @@ function load(app, local, callback) {
...
@@ -301,6 +309,16 @@ function load(app, local, callback) {
})
})
}
}
}
}
if
(
!
watcher
[
app
.
id
])
{
fs
.
watch
(
db
.
local
[
app
.
id
].
path
,
{
recursive
:
true
},
(
event
,
filename
)
=>
{
console
.
log
(
event
,
filename
)
load
(
db
.
apps
[
app
.
id
],
db
.
local
[
app
.
id
],
()
=>
{
eventemitter
.
emit
(
'
update
'
,
app
,
local
,
event
)
});
});
watcher
[
app
.
id
]
=
true
;
}
done
()
done
()
}
}
...
...
css/style.css
View file @
17cf3999
...
@@ -133,4 +133,8 @@ body.maximized #maximize {
...
@@ -133,4 +133,8 @@ body.maximized #maximize {
a
{
a
{
cursor
:
default
;
cursor
:
default
;
}
:not
(
.logged-in
)
>
.require-login
{
display
:
none
;
}
}
\ No newline at end of file
index.html
View file @
17cf3999
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
<nav>
<nav>
<span
id=
"brand"
>
MyCard
</span>
<span
id=
"brand"
>
MyCard
</span>
<ul>
<ul>
<li
id=
"nav-store"
>
<
!--<
li id="nav-store">
<a href="#store">商店</a>
<a href="#store">商店</a>
</li>
</li>
-->
<li
id=
"nav-ygopro"
class=
"active"
>
<li
id=
"nav-ygopro"
class=
"active"
>
<a
href=
"#ygopro"
>
游戏
</a>
<a
href=
"#ygopro"
>
游戏
</a>
</li>
</li>
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
</li>
</li>
</ul>
</ul>
<div
class=
"navbar-right"
>
<div
class=
"navbar-right"
>
<div
id=
"user"
hidden
>
<div
id=
"user"
>
<a
href=
"#forum"
class=
"profile"
><img
id=
"avatar"
></a>
<a
href=
"#forum"
class=
"
require-login
profile"
><img
id=
"avatar"
></a>
<a
href=
"#forum"
class=
"profile item"
id=
"username"
></a>
<a
href=
"#forum"
class=
"
require-login
profile item"
id=
"username"
></a>
<a
href=
"#ygopro"
id=
"logout"
class=
"
item"
>
切换
</a>
<a
href=
"#ygopro"
id=
"logout"
class=
"
require-login item"
>
切换账号
</a>
<a
href=
"#ygopro"
id=
"refresh"
class=
"item"
>
刷新
</a>
<a
href=
"#ygopro"
id=
"refresh"
class=
"item"
>
刷新
</a>
</div>
</div>
<div
id=
"window-buttons"
hidden
>
<div
id=
"window-buttons"
hidden
>
...
...
js/app.js
View file @
17cf3999
...
@@ -62,7 +62,7 @@ document.getElementById("refresh").onclick = ()=> {
...
@@ -62,7 +62,7 @@ document.getElementById("refresh").onclick = ()=> {
})
})
};
};
let
elements
=
document
.
getElementsByClassName
(
'
profile
'
);
/*
let elements = document.getElementsByClassName('profile');
for (let i = 0; i < elements.length; i++) {
for (let i = 0; i < elements.length; i++) {
let element = elements.item(i);
let element = elements.item(i);
element.onclick = function () {
element.onclick = function () {
...
@@ -72,11 +72,11 @@ for (let i = 0; i < elements.length; i++) {
...
@@ -72,11 +72,11 @@ for (let i = 0; i < elements.length; i++) {
user_webview.src = user_url;
user_webview.src = user_url;
}
}
}
}
}
}
*/
ipcRenderer
.
on
(
'
login
'
,
(
event
,
user
)
=>
{
ipcRenderer
.
on
(
'
login
'
,
(
event
,
user
)
=>
{
console
.
log
(
event
,
user
);
console
.
log
(
event
,
user
);
document
.
getElementById
(
'
avatar
'
).
src
=
user
.
avatar_url
;
document
.
getElementById
(
'
avatar
'
).
src
=
user
.
avatar_url
;
document
.
getElementById
(
'
username
'
).
innerHTML
=
user
.
username
;
document
.
getElementById
(
'
username
'
).
innerHTML
=
user
.
username
;
document
.
getElementById
(
'
user
'
).
removeAttribute
(
'
hidden
'
);
document
.
getElementById
(
'
user
'
).
className
=
'
logged-in
'
});
});
\ No newline at end of file
main.js
View file @
17cf3999
...
@@ -36,6 +36,7 @@ let handleStartupEvent = function () {
...
@@ -36,6 +36,7 @@ let handleStartupEvent = function () {
};
};
shortcuts
.
create
(
path
.
join
(
app
.
getPath
(
'
desktop
'
),
'
MyCard.lnk
'
),
process
.
execPath
,
done
);
shortcuts
.
create
(
path
.
join
(
app
.
getPath
(
'
desktop
'
),
'
MyCard.lnk
'
),
process
.
execPath
,
done
);
shortcuts
.
create
(
'
%APPDATA%/Microsoft/Windows/Start Menu/Programs/MyCard.lnk
'
,
process
.
execPath
,
done
);
let
key
=
new
reg
({
hive
:
reg
.
HKCU
,
key
:
'
\\
Software
\\
Classes
\\
mycard
'
});
let
key
=
new
reg
({
hive
:
reg
.
HKCU
,
key
:
'
\\
Software
\\
Classes
\\
mycard
'
});
key
.
set
(
'
URL Protocol
'
,
reg
.
REG_SZ
,
'
"
'
+
process
.
execPath
+
'
"
'
,
done
);
key
.
set
(
'
URL Protocol
'
,
reg
.
REG_SZ
,
'
"
'
+
process
.
execPath
+
'
"
'
,
done
);
key
=
new
reg
({
hive
:
reg
.
HKCU
,
key
:
'
\\
Software
\\
Classes
\\
mycard
\\
shell
\\
open
\\
command
'
});
key
=
new
reg
({
hive
:
reg
.
HKCU
,
key
:
'
\\
Software
\\
Classes
\\
mycard
\\
shell
\\
open
\\
command
'
});
...
...
package.json
View file @
17cf3999
{
{
"name"
:
"mycard"
,
"name"
:
"mycard"
,
"description"
:
"a game platform"
,
"description"
:
"a game platform"
,
"version"
:
"2.0.
5
"
,
"version"
:
"2.0.
6
"
,
"main"
:
"main.js"
,
"main"
:
"main.js"
,
"license"
:
"UNLICENSED"
,
"license"
:
"UNLICENSED"
,
"repository"
:
"github:mycard/mycard"
,
"repository"
:
"github:mycard/mycard"
,
...
...
resources/win32/setup.gif
0 → 100644
View file @
17cf3999
7.28 KB
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