Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Commit

Permalink
uhh fuggin idk what man
Browse files Browse the repository at this point in the history
  • Loading branch information
novafurry committed May 11, 2024
1 parent 0e90210 commit d669450
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 79 deletions.
6 changes: 1 addition & 5 deletions appStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ body {
cursor: none;
}

@font-face {
font-family: "lucide";
src: url("lucide.woff") format("woff");

}

* {
font-family: 'lucide', system-ui;
Expand Down Expand Up @@ -94,7 +90,7 @@ button {
display: inline-block;
width: 100vw;
max-width: 100vw;
overflow-x: scroll;
overflow-x: auto;
white-space: nowrap;
}
::-webkit-scrollbar-corner { background: rgba(0,0,0,0.5); }
Expand Down
7 changes: 2 additions & 5 deletions applications/fm.nvapp.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<appContent>
<link rel="stylesheet" href="../appStyle.css">
<div class="buttonRow"><button><span class="icon-clipboard-paste"></span> Paste</button>
<button><span class="icon-clipboard-copy"></span> Copy</button>
<button><span class="icon-delete"></span> Delete</button>
<button><span class="icon-clipboard-copy" hidden></span> Copy</button>
<button><span class="icon-delete" hidden></span> Delete</button>
<button><span class="icon-send"></span> Send</button></div>
<ul class="fileMan">

Expand All @@ -15,16 +15,13 @@
import '../libraries/foxywincontent.js';
window.fm = {
refresh: async function (dir) {
console.log(dir)
var path = dir.split("/")
path = path.filter(function (el) {
if (el != '') {
return el;
}
});
path[path.length - 1] = ''
console.log(path)
console.log(path)
path = path.join("/")
document.querySelector("ul").innerHTML = `<li class="parentDir clickable" onclick="alert('You cant go up.')">.. (Up one level)</li>`
if (dir.length > 1) {
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://code.jquery.com/ui/1.13.3/jquery-ui.js"></script>
<link rel="stylesheet" href="assets/lucide.css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
</head>

<body>
Expand All @@ -27,6 +28,7 @@
<span class="icon-square clickable" id="wmax"></span>
</div>
</div>
<div class="toast"><b>Example</b><br><span>I am toast bitch</span></div>
<p class="message clickable">NovaOS<br>V.0405</p>

<div class="bg"><img class="background" src="assets/wallp.png" />
Expand Down Expand Up @@ -334,6 +336,7 @@
<script type="module" src="script.js"></script>
<script type="module" src="libraries/foxywm.js"></script>
<div class="cur"></div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
</body>

</html>
75 changes: 75 additions & 0 deletions libraries/foxydrop.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions libraries/foxyfs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const opfsRoot = await navigator.storage.getDirectory();

window.foxyfs = {
getFileHandle: async function (path1) {
var path = path1.split("/")
Expand Down
1 change: 0 additions & 1 deletion libraries/foxywincontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ document.addEventListener("mousemove", function (e) {
else {
window.parent.document.querySelector(".cur").style.background = "#FFFFFF"
}
console.log("hi")
}, 0)
})
2 changes: 1 addition & 1 deletion libraries/foxywm.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"minH": "185px",
"title": "File Manager",
"appContentID": "fm.nvapp.html",
"content": "<iframe frameborder=0 width='100%' height='100%' src='./applications/fm.nvapp.html'></iframe>"
"content": ""
},
"send": {
"title": "Send Files",
Expand Down
17 changes: 9 additions & 8 deletions libraries/foxywm.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ function handleMouseMove(event) {
window.y = event.pageY;
}
export default function fwmInit() {
console.log(defaults);

window.wm = {
windows: {
new: function nw(content, title, id, instant = false, acid = "No") {
if (acid != "no") {
if (acid != "No") {
const win = document.createElement("iframe");
win.src = "applications/"+acid;
win.title = title
Expand All @@ -43,7 +42,6 @@ export default function fwmInit() {
wm.windows.show(win.id);
}
win.parentElement.addEventListener("mouseleave", onLeave)
console.log(fwmStor.memory)
return win;
} else {
if (document.querySelector("#" + id) == null) {
Expand All @@ -63,7 +61,6 @@ export default function fwmInit() {
wm.windows.show(win.id);
}
win.parentElement.addEventListener("mouseleave", onLeave)
console.log(fwmStor.memory)
return win;
}
}
Expand All @@ -79,7 +76,6 @@ export default function fwmInit() {
});
$("#" + id)[0].previousElementSibling.onclick = wm.windows.restore
document.querySelector("#" + id).parentElement.onmouseenter = function (e) {
console.log(e.target.children)
window.lastWin = { "el": e.target, "id": e.target.getAttribute("aria-describedby") }
onEnter()
};
Expand Down Expand Up @@ -113,7 +109,6 @@ export default function fwmInit() {
},
restore: function unmax(e) {

console.log(e.target.id)
if (e.target.id = window.maximisedWin) {
window.maximisedWin = ""
console.log(e)
Expand All @@ -129,8 +124,14 @@ export default function fwmInit() {
},
getName: function getName(id) {
if (id == "fwm.current") {
console.log(lastWin)
return document.querySelector("[aria-describedby='" + lastWin.id + "'] wmcontent").dataset.title
switch (document.querySelector("[aria-describedby='"+lastWin.id+"'] wmcontent")) {
case null:
return document.querySelector("[aria-describedby='"+lastWin.id+"'] iframe").dataset.title
break;

default:
return document.querySelector("[aria-describedby='"+lastWin.id+"'] wmcontent").dataset.title
}
} else {
return document.querySelector("#" + id).dataset.title
}
Expand Down
11 changes: 11 additions & 0 deletions libraries/novaOS.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
window.novaOS = {
notifications: {
toast: function (title = "", content = "") {
Toastify({
text: "<b>"+title+"</b><br><span>"+content+"<span>",
duration: 3000,
escapeMarkup: false
}).showToast();
}
}
}
18 changes: 15 additions & 3 deletions libraries/peertest.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ <h2>Compatible with WebDrop</h2><br>
Log Goes Here: <br>
<textarea readonly id="log" cols="30" rows="10"></textarea>
<script src="peer.js"></script>
<script>
<script src="foxydrop.js" type="module"></script>
<!-- <script>
var els = {
me: {
id: document.querySelector("#myID"),
Expand All @@ -32,7 +33,18 @@ <h2>Compatible with WebDrop</h2><br>
btn: document.querySelector("#send"),
log: document.querySelector("#log")
}
var fucker = gen(4);
function giveMeAnIDorDIEMF() {
switch (localStorage.novaID) {
case undefined:
localStorage.novaID = gen(4)
return localStorage.novaID
default:
return localStorage.novaID
break;
}
}
var fucker = giveMeAnIDorDIEMF();
peer = new Peer(fucker)
async function getId() {
setInterval(function () {
Expand Down Expand Up @@ -92,7 +104,7 @@ <h2>Compatible with WebDrop</h2><br>
conn.send(data);
});
}
</script>
</script> -->
</body>

</html>
2 changes: 2 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
console.log("%c NovaOS Initialised!!", "font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113); margin-bottom: 12px; padding: 5%");
import './libraries/foxywm.js';
import './libraries/foxyfs.js';
import './libraries/novaOS.js'
window.clickSfx = new (Audio)
clickSfx.src = "assets/click.mp3"
var topBar = $(".bar")
Expand Down
Loading

0 comments on commit d669450

Please sign in to comment.