Skip to content

Commit 33880d2

Browse files
committed
Icons and Beta V1
1 parent 51a2f0a commit 33880d2

File tree

14 files changed

+578
-34
lines changed

14 files changed

+578
-34
lines changed

assets/code/apps.js

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ var app = {
22
settings: {
33
runs: true,
44
name: 'Settings',
5+
icon: './assets/img/systemIcons/settings.svg',
56
init: async function () {
6-
const main = tk.mbw('Settings', '300px', 'auto', true, undefined, undefined);
7+
const main = tk.mbw('Settings', '300px', 'auto', true, undefined, undefined, undefined, './assets/img/systemIcons/settings.svg');
78
const generalPane = tk.c('div', main.main, 'hide');
89
const appearPane = tk.c('div', main.main, 'hide');
910
const mainPane = tk.c('div', main.main);
@@ -76,7 +77,7 @@ var app = {
7677
tk.cb('b4 time', 'what', undefined, title);
7778
// first menu
7879
const first = tk.c('div', main, 'setb');
79-
tk.img('./assets/img/setup/first.svg', 'setupi', first);
80+
tk.img('./assets/img/systemIcons/os.svg', 'setupi', first);
8081
tk.p('Welcome to NovaOS Deskop Next-Gen!', 'h2', first);
8182
tk.p('NovaOS is proudly powered by WebDesk!', 'h3', first);
8283
tk.cb('b1', `Login as Guest`, () => wd.desktop('Guest', gen(8)), first);
@@ -99,7 +100,7 @@ var app = {
99100
copy.id = "quickstartwdgoing";
100101
// warn menu
101102
const warn = tk.c('div', main, 'setb hide');
102-
tk.img('./assets/img/noround.png', 'setupi', warn);
103+
tk.img('./assets/img/systemIcons/os.svg', 'setupi', warn);
103104
tk.p(`Online services`, 'h2', warn);
104105
tk.p('NovaOS makes an ID called a DeskID for you. Others using WebDesk, NovaOS-NG or compatible tools can use this ID to send you files or call you.', undefined, warn);
105106
tk.p('To recieve calls and files from others, NovaOS needs to be open. When not in use, NovaOS uses less resources', undefined, warn);
@@ -134,8 +135,9 @@ var app = {
134135
files: {
135136
runs: true,
136137
name: 'Files',
138+
icon: './assets/img/systemIcons/files.svg',
137139
init: async function () {
138-
const win = tk.mbw(`Files`, '340px', 'auto', true, undefined, undefined);
140+
const win = tk.mbw(`Files`, '340px', 'auto', true, undefined, undefined, undefined, './assets/img/systemIcons/files.svg');
139141
const breadcrumbs = tk.c('div', win.main);
140142
const items = tk.c('div', win.main);
141143
async function navto(path) {
@@ -176,10 +178,12 @@ var app = {
176178
about: {
177179
runs: true,
178180
name: 'About',
181+
icon: './assets/img/systemIcons/os.svg',
179182
init: async function () {
180-
const win = tk.mbw('About', '300px', 'auto', true, undefined, undefined);
183+
const win = tk.mbw('About', '300px', 'auto', true, undefined, undefined, undefined, './assets/img/systemIcons/os.svg');
181184
var aboutTxt = tk.c('div', win.main);
182185
aboutTxt.innerHTML = `
186+
<img height="100px" src="./assets/img/systemIcons/os.svg">
183187
<h2>NovaOS</h1>
184188
<p>NovaOS is a free, open-source operating system designed for the web. It is built on WebDesk, a web-based desktop environment.</p>
185189
<p>Version: ${abt.ver}</p>
@@ -190,8 +194,9 @@ var app = {
190194
browser: {
191195
runs: true,
192196
name: 'Browser',
197+
icon: './assets/img/systemIcons/networking.svg',
193198
init: async function () {
194-
const win = tk.mbw('Browser', '80vw', '82vh', true, undefined, undefined);
199+
const win = tk.mbw('Browser', '80vw', '82vh', true, undefined, undefined, undefined, './assets/img/systemIcons/networking.svg');
195200
ui.dest(win.title, 0);
196201
const tabs = tk.c('div', win.main, 'tabbar d');
197202
let currenttab = tk.c('div', win.main, 'hide');
@@ -201,10 +206,10 @@ var app = {
201206
const btnnest = tk.c('div', tabs, 'tnav');
202207
const addbtn = tk.cb('b4 browserbutton', '+', function () {
203208
const tab = tk.c('embed', win.main, 'browsertab');
204-
tab.src = "https://meower.xyz";
209+
tab.src = "https://corsproxy.io/?https%3A%2F%2Fnovafurry.win";
205210
ui.sw2(currenttab, tab);
206211
currenttab = tab;
207-
const tabbtn = tk.cb('b4', 'meower.xyz', function () {
212+
const tabbtn = tk.cb('b4', 'novafurry.win', function () {
208213
ui.sw2(currenttab, tab);
209214
currenttab = tab;
210215
currentbtn = tabtitle;
@@ -232,8 +237,9 @@ var app = {
232237
const search = tk.c('input', okiedokie, 'i1 browserbutton');
233238
search.placeholder = "Enter URL";
234239
const go = tk.cb('b4 browserbutton', 'Go!', function () {
235-
currenttab.src = search.value;
236-
currentbtn.innerText = search.value;
240+
currenttab.src = `https://corsproxy.io/?${search.value.startsWith('http') ? encodeURIComponent(search.value) : 'https://' + encodeURIComponent(search.value)}`;
241+
console.log(`https://corsproxy.io/?${search.value.startsWith('http') ? encodeURIComponent(search.value) : 'https://' + encodeURIComponent(search.value)}`);
242+
currentbtn.innerHTML = search.value;
237243
}, okiedokie);
238244
wd.win();
239245
}
@@ -252,23 +258,10 @@ var app = {
252258
}
253259
},
254260
},
255-
// sysAi: {
256-
// runs: false,
257-
// name: 'NovaOS System AI Models',
258-
// onstartup: async function() {
259-
// try {
260-
// const model = await use.load();
261-
// console.log("Model loaded");
262-
// window.novaAImodel= model;
263-
// } catch (error) {
264-
// app.sysAi.onstartup();
265-
// console.error("Failed to load model", error);
266-
// }
267-
// },
268-
// },
269261
txter:{
270262
runs: true,
271263
name: 'txter editor',
264+
icon: './assets/img/systemIcons/noicon.svg',
272265
init: async function () {
273266
const win = tk.mbw('txter', 'fit-content', 'fit-content', true, undefined, undefined);
274267
const txtarea = tk.c('textarea', win.main, 'i1');
@@ -287,8 +280,9 @@ var app = {
287280
docai: {
288281
runs: true,
289282
name: 'DocAI',
283+
icon: './assets/img/systemIcons/noicon.svg',
290284
init: async function (query = "") {
291-
const win = tk.mbw('DocAI', '500px', 'auto', true, undefined, undefined, "docai");
285+
const win = tk.mbw('DocAI', '500px', 'auto', true, undefined, undefined, undefined, "docai");
292286
var div = tk.c('div', win.main);
293287
// div.innerText = "DocAI is not yet available in this version of NovaOS.";
294288
div.innerHTML = `
@@ -427,7 +421,7 @@ var app = {
427421
} else {
428422
document.querySelector("#docai").remove();
429423
document.querySelector("#docaitbn").remove();
430-
const load = tk.mbw('DocAI Model Loader', '500px', 'auto', true, undefined, undefined, "docaiml");
424+
const load = tk.mbw('DocAI Model Loader', '500px', 'auto', true, undefined, undefined, undefined, "docaiml");
431425
wm.wal("You skipped loading the DocAI model on boot. Please wait.")
432426
var div = tk.c('p', load.main);
433427
div.innerHTML = `DocAI is loading the models...<br><progress></progress>`;

assets/code/core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ var wd = {
9292
if (apps[key].hasOwnProperty("runs") && apps[key].runs === true) {
9393
console.log(`<i> ${apps[key].name} is launchable!`);
9494
const btn = tk.cb('b1', apps[key].name, apps[key].init.bind(apps[key]), el.sm);
95+
btn.innerHTML = `
96+
<img src='${apps[key].icon}' class='appIcon'/>
97+
<span class='appName'>${apps[key].name}</span>`
9598
btn.classList.add("appItem");
9699
btn.addEventListener('click', function () {
97100
ui.dest(el.sm, 150);

assets/code/ui.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ var tk = {
216216
button.className = classn;
217217
button.innerText = name;
218218
if (func) {
219-
button.addEventListener('click', func);
219+
button.addEventListener('click', function(){
220+
func()
221+
});
220222
}
221223
if (ele) {
222224
ele.appendChild(button);
@@ -226,7 +228,7 @@ var tk = {
226228
a: function (ele1, ele2) {
227229
ele1.appendChild(ele2);
228230
},
229-
mbw: function (title, wid, hei, full, min, quit, id) {
231+
mbw: function (title, wid, hei, full, min, quit, id, icon = './assets/img/systemIcons/noicon.svg') {
230232
var windowDiv = document.createElement('div');
231233
windowDiv.classList.add('window');
232234
windowDiv.classList.add('winf');
@@ -243,6 +245,7 @@ var tk = {
243245
var closeButton = document.createElement('div');
244246
closeButton.classList.add('winb');
245247
const tbn = tk.cb('b1', title, () => ui.show(windowDiv, 100), el.tr);
248+
tbn.innerHTML = `<img src="${icon}" height=24 class="icon"/> <span class="label">${title}</span>`;
246249
if(id){
247250
tbn.id = id + "tbn";
248251
}
@@ -277,7 +280,7 @@ var tk = {
277280
titlebarDiv.appendChild(winbtns);
278281
var titleDiv = document.createElement('div');
279282
titleDiv.classList.add('title');
280-
titleDiv.innerHTML = title;
283+
titleDiv.innerHTML = `<img src="${icon}" height=24 class="icon"/> <span class="label">${title}</span>`;
281284
titlebarDiv.appendChild(titleDiv);
282285
windowDiv.appendChild(titlebarDiv);
283286
var contentDiv = document.createElement('div');

assets/img/systemIcons/appdrawer.svg

Lines changed: 54 additions & 0 deletions
Loading

assets/img/systemIcons/cast.svg

Lines changed: 54 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)