Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
railsjack committed Oct 25, 2019
1 parent df194fc commit dcb67c5
Show file tree
Hide file tree
Showing 28 changed files with 424 additions and 680 deletions.
12 changes: 7 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
<html>

<head>
<title>React Native Tutorial</title>
<title>Tutorial Player</title>
<link rel="stylesheet" type="text/css" href="player/custom.css?v1" />
<link rel="stylesheet" href="player/media-element/build/mediaelementplayer.css">


</head>

<body>
<body odndrop="drop(event)" odndragover="allowDrop(event)">

<div id="custom-seekbar">
<span></span>
Expand All @@ -31,9 +32,10 @@
</div>
</div>



</body>

<script src="player/media-element/build/mediaelement-and-player.js"></script>
<script src="player/custom.js?v3"></script>
<script src="player/index.js?v5"></script>

</html>
5 changes: 0 additions & 5 deletions main-process/communication/async-msg.js

This file was deleted.

5 changes: 0 additions & 5 deletions main-process/communication/sync-msg.js

This file was deleted.

37 changes: 37 additions & 0 deletions main-process/drop_dir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const { ipcMain } = require("electron");
const fs = require("fs");
const path = require("path");

const createTutorialList = require("../utils/create_tutorial_list");

ipcMain.on("Request", (event, dirPath) => {
if (!fs.existsSync(dirPath)) {
event.sender.send("Response", {
code: 400,
reason: "NOEXITS",
content: "The file/directory does not exist"
});
} else if (!fs.lstatSync(dirPath).isDirectory()) {
event.sender.send("Response", {
code: 401,
reason: "NOTDIR",
content: "The file is not a directory"
});
} else if( path.basename(dirPath).match(/[^a-zA-Z0-9_\-\.\'\"\& ]+/g) !== null ) {
event.sender.send("Response", {
code: 300,
reason: "INVALID_DIRNAME",
content: "The directory name is invalid",
data: path.basename(dirPath)
});
} else {
createTutorialList(dirPath, (data) => {
event.sender.send("Response", {
code: 201,
reason: "CREATED",
content: "The list is created successfully!",
data: data
});
});
}
});
Binary file added main-process/main-process.rar
Binary file not shown.
240 changes: 0 additions & 240 deletions main-process/menus/application-menu.js

This file was deleted.

23 changes: 0 additions & 23 deletions main-process/menus/context-menu.js

This file was deleted.

16 changes: 0 additions & 16 deletions main-process/menus/shortcuts.js

This file was deleted.

5 changes: 0 additions & 5 deletions main-process/native-ui/dialogs/error.js

This file was deleted.

13 changes: 0 additions & 13 deletions main-process/native-ui/dialogs/information.js

This file was deleted.

11 changes: 0 additions & 11 deletions main-process/native-ui/dialogs/open-file.js

This file was deleted.

Loading

0 comments on commit dcb67c5

Please sign in to comment.