Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mycard Mobile
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
MyCard
Mycard Mobile
Commits
1b220f87
Commit
1b220f87
authored
Aug 12, 2019
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log
parent
ae361d5a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
package.json
package.json
+1
-1
src/app/storage.service.ts
src/app/storage.service.ts
+4
-2
No files found.
package.json
View file @
1b220f87
{
"name"
:
"mycard-mobile"
,
"version"
:
"1.0.3
6
"
,
"version"
:
"1.0.3
7
"
,
"license"
:
"UNLISENCED"
,
"scripts"
:
{
"ng"
:
"ng"
,
...
...
src/app/storage.service.ts
View file @
1b220f87
...
...
@@ -117,7 +117,7 @@ export class StorageService {
async
download
(
local_path
:
string
,
remote_path
:
string
,
index_path
:
string
,
time
:
number
)
{
this
.
working
.
next
(
true
);
//
console.log('download', local_path, remote_path, index_path, time);
console
.
log
(
'
download
'
,
local_path
,
remote_path
,
index_path
,
time
);
const
data
:
ArrayBuffer
=
await
this
.
client
.
getFileContents
(
remote_path
);
window
.
ygopro
.
writeFile
(
local_path
,
Buffer
.
from
(
data
).
toString
(
'
base64
'
));
window
.
ygopro
.
setFileLastModified
(
local_path
,
time
);
...
...
@@ -127,7 +127,7 @@ export class StorageService {
async
upload
(
local_path
:
string
,
remote_path
:
string
,
index_path
:
string
)
{
this
.
working
.
next
(
true
);
//
console.log('upload', local_path, remote_path, index_path);
console
.
log
(
'
upload
'
,
local_path
,
remote_path
,
index_path
);
const
data
=
this
.
read_local
(
local_path
);
await
this
.
client
.
putFileContents
(
remote_path
,
data
);
const
item
:
FileStats
=
await
this
.
client
.
stat
(
remote_path
);
...
...
@@ -143,12 +143,14 @@ export class StorageService {
remove_local
(
local_path
:
string
,
remote_path
:
string
,
index_path
:
string
)
{
this
.
working
.
next
(
true
);
console
.
log
(
'
remove_local
'
,
local_path
,
remote_path
,
index_path
);
window
.
ygopro
.
unlink
(
local_path
);
localStorage
.
removeItem
(
index_path
);
}
async
remove_remote
(
local_path
:
string
,
remote_path
:
string
,
index_path
:
string
)
{
this
.
working
.
next
(
true
);
console
.
log
(
'
remove_remote
'
,
local_path
,
remote_path
,
index_path
);
await
this
.
client
.
deleteFile
(
remote_path
);
localStorage
.
removeItem
(
index_path
);
}
...
...
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