this.me 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/atom/src/scripts.js +19 -0
- package/atom/src/style.css +73 -0
- package/atom/view.html +42 -0
- package/main.js +14 -1
- package/package.json +7 -5
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//scripts.js
|
|
2
|
+
const { ipcRenderer } = require('electron')
|
|
3
|
+
|
|
4
|
+
document.getElementById("min-btn").addEventListener("click", function (e) {
|
|
5
|
+
ipcRenderer.send('minimize-window');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
document.getElementById("close-btn").addEventListener("click", function (e) {
|
|
9
|
+
ipcRenderer.send('close-window');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
document.getElementById("this.me").addEventListener("click", function (e) {
|
|
13
|
+
const menu = document.getElementById("menu");
|
|
14
|
+
if (menu.style.display === "none") {
|
|
15
|
+
menu.style.display = "block";
|
|
16
|
+
} else {
|
|
17
|
+
menu.style.display = "none";
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
background-color: rgba(0,0,255,0.1); /* You can change this color */
|
|
5
|
+
border: 2px solid blue; /* You can change this color */
|
|
6
|
+
height: 100vh;
|
|
7
|
+
width: 100vw;
|
|
8
|
+
display: flex;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
#top-bar {
|
|
14
|
+
background-color: #444;
|
|
15
|
+
color: white;
|
|
16
|
+
position: fixed;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 30px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
padding: 0 10px;
|
|
25
|
+
-webkit-app-region: drag; /* Make the top bar draggable */
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#app-region-drag {
|
|
29
|
+
-webkit-app-region: drag;
|
|
30
|
+
height: 30px;
|
|
31
|
+
background: rgba(255, 255, 255, 0.7); /* semi-transparent white */
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#main-content {
|
|
35
|
+
background: rgba(255, 255, 255, 0.035); /* less transparent white */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Define the style for the buttons */
|
|
39
|
+
/* Define the style for the buttons */
|
|
40
|
+
.window-button {
|
|
41
|
+
-webkit-app-region: no-drag; /* Exclude the buttons from the draggable area */
|
|
42
|
+
background-color: rgba(255, 0, 0, 0);
|
|
43
|
+
color: white;
|
|
44
|
+
width: 20px;
|
|
45
|
+
height: 20px;
|
|
46
|
+
text-align: center;
|
|
47
|
+
line-height: 20px;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
}
|
|
50
|
+
#myCanvas {
|
|
51
|
+
border: 1px solid #d3d3d3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#header {
|
|
55
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
padding: 10px;
|
|
59
|
+
-webkit-app-region: drag;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
button {
|
|
63
|
+
-webkit-app-region: no-drag;
|
|
64
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
65
|
+
border: none;
|
|
66
|
+
border-radius: 5px;
|
|
67
|
+
padding: 5px 10px;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
button:hover {
|
|
72
|
+
background-color: rgba(255, 255, 255, 1);
|
|
73
|
+
}
|
package/atom/view.html
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<link rel="stylesheet" type="text/css" href="./src/style.css">
|
|
5
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
|
|
6
|
+
<script src="https://drive.google.com/uc?export=view&id=1YvgTnelWLsPZW2xun0SiWayrtgEZamgM"></script>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app-region-drag">
|
|
10
|
+
<div id="top-bar">
|
|
11
|
+
<!-- Add your app title here -->
|
|
12
|
+
<div>Viewer tab 1</div>
|
|
13
|
+
<!-- Add window control buttons -->
|
|
14
|
+
<div id="header">
|
|
15
|
+
<button class="" id="this.me"> this.me </button>
|
|
16
|
+
<div id="menu" style="display: none;">
|
|
17
|
+
<ul>
|
|
18
|
+
<li><a href="#">Menu Item 1</a></li>
|
|
19
|
+
<li><a href="#">Menu Item 2</a></li>
|
|
20
|
+
<!-- Add more items as necessary -->
|
|
21
|
+
</ul>
|
|
22
|
+
</div>
|
|
23
|
+
<button class="window-button" id="min-btn"> - </button>
|
|
24
|
+
<button class="window-button" id="close-btn"> x </button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div id="main-content">
|
|
28
|
+
<!---
|
|
29
|
+
<canvas id="myCanvas" width="400" height="300">
|
|
30
|
+
Your browser does not support the HTML5 canvas tag.
|
|
31
|
+
</canvas>
|
|
32
|
+
-->
|
|
33
|
+
<pixel-grid width="100" height="100"></pixel-grid>
|
|
34
|
+
<!--
|
|
35
|
+
<button id="convert">Convert to Matrix</button>
|
|
36
|
+
-->
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<script src="./this.me/node_modules/this.pixels/PixelGrid.js"></script>
|
|
40
|
+
<script src="./src/scripts.js"></script>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
package/main.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
const { exec } = require("child_process");
|
|
3
|
+
const PixelGrid = require('this.pixels');
|
|
2
4
|
console.log(`
|
|
3
5
|
___________
|
|
4
6
|
[------------]
|
|
@@ -14,4 +16,15 @@ console.log(`
|
|
|
14
16
|
[---------------------------------.me-----------]
|
|
15
17
|
-^^^^^^^^zzzz...
|
|
16
18
|
Welcome to .me - Your AI Playground
|
|
17
|
-
`);
|
|
19
|
+
`);
|
|
20
|
+
|
|
21
|
+
const command = "electron atom.js";
|
|
22
|
+
|
|
23
|
+
exec(command, (error, stdout, stderr) => {
|
|
24
|
+
if (error) {
|
|
25
|
+
console.error(`Could not start Electron: ${error}`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
console.log(`stdout: ${stdout}`);
|
|
29
|
+
console.error(`stderr: ${stderr}`);
|
|
30
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "this.me",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "CLI for managing the .me suite.",
|
|
5
5
|
"bin": {
|
|
6
6
|
".me": "./main.js"
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
"author": "suiGn",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"neurons.me": "^2.5.7",
|
|
22
21
|
"cleaker": "^2.2.9",
|
|
22
|
+
"electron": "^25.4.0",
|
|
23
23
|
"monadlisa": "^2.1.1",
|
|
24
24
|
"netget": "^2.1.6",
|
|
25
|
-
"
|
|
25
|
+
"neurons.me": "^2.5.7",
|
|
26
26
|
"this.haiku": "1.2.2",
|
|
27
|
-
"this.mlearning": "2.1.6"
|
|
27
|
+
"this.mlearning": "2.1.6",
|
|
28
|
+
"this.pixels": "3.2.6",
|
|
29
|
+
"v.path": "^2.1.7"
|
|
28
30
|
}
|
|
29
|
-
}
|
|
31
|
+
}
|