diff --git a/public/builtin/apps/about.html b/public/builtin/apps/about.html
index 802f8b8e..1065b519 100644
--- a/public/builtin/apps/about.html
+++ b/public/builtin/apps/about.html
@@ -20,9 +20,9 @@
About FlowOS
- Version:
- Designed By: thinliquid
- Developed By: thinliquid, 1nspird, proudparrot2
+
+
+ Created by thinliquid, 1nspird, proudparrot2
diff --git a/public/builtin/apps/scripts/about.js b/public/builtin/apps/scripts/about.js
index 73e7d230..31028884 100644
--- a/public/builtin/apps/scripts/about.js
+++ b/public/builtin/apps/scripts/about.js
@@ -1,5 +1,5 @@
/* eslint-env browser */
window.onload = () => {
- document.querySelector('v').innerText = parent.Flow.version;
+ document.querySelector('v').innerHTML = `${parent.Flow.version.substring(0, 8)} (${parent.Flow.branch})`;
};
\ No newline at end of file
diff --git a/public/flow.js b/public/flow.js
index 7e673fa1..b597636d 100644
--- a/public/flow.js
+++ b/public/flow.js
@@ -9,7 +9,7 @@ import apps from './constants/apps.js';
import { WindowManager, WindowInstance } from './wm.js';
export default class FlowInstance {
- version = 'v1.0.8-beta';
+ version; branch; url;
wm = new WindowManager();
#init = false;
@@ -17,8 +17,17 @@ export default class FlowInstance {
constructor() {
registerSW();
+ this.setVersion();
}
+ setVersion = async () => {
+ const res = await fetch('/ver');
+ const data = await res.json();
+ this.version = data.hash;
+ this.branch = data.branch;
+ this.url = data.url;
+ };
+
boot = async () => {
document.querySelector('.boot').style.opacity = 0;
setTimeout(() => {
@@ -37,8 +46,7 @@ export default class FlowInstance {
this.apps.register();
this.hotkeys.register();
- for (let i = 0; i < config.settings.get('modules').urls.length; i++) {
- const url = config.settings.get('modules').urls[i];
+ for (const url of config.settings.get('modules').urls) {
const module = await import(url);
await this.bar.add(module.default);
}
diff --git a/public/index.js b/public/index.js
index 1069983e..2feb5e03 100644
--- a/public/index.js
+++ b/public/index.js
@@ -25,10 +25,8 @@ self.logger = new Logger();
window.onload = () => {
registerSettings();
- switch (config.settings.get('search').proxy) {
- case 'Ultraviolet':
- self.currentProxy = __uv$config;
- break;
+ if (config.settings.get('search').proxy === 'Ultraviolet') {
+ self.currentProxy = __uv$config;
}
useCustomCSS();
@@ -36,15 +34,14 @@ window.onload = () => {
window.Flow.boot();
};
-document.querySelector('.searchbar').onkeyup = () => {
- const input = document.querySelector('.searchbar').value.toLowerCase();
- let x = Array.from(document.querySelector('ul.apps').children);
+const searchBar = document.querySelector('.searchbar');
+const appsList = document.querySelector('ul.apps');
- x.forEach((item) => {
- if (!item.innerText.toLowerCase().includes(input)) {
- item.style.display = 'none';
- } else {
- item.style.display = 'flex';
- }
+searchBar.addEventListener('keyup', () => {
+ const input = searchBar.value.toLowerCase();
+ const apps = Array.from(appsList.children);
+
+ apps.forEach((item) => {
+ item.style.display = item.innerText.toLowerCase().includes(input) ? 'flex' : 'none';
});
-};
+});
\ No newline at end of file
diff --git a/public/styles/style.css b/public/styles/style.css
index eb952296..f8e7f2e6 100644
--- a/public/styles/style.css
+++ b/public/styles/style.css
@@ -196,7 +196,7 @@ body {
background: transparent;
border-radius: 10px;
outline: 2px solid transparent;
- transition: outline 1s cubic-bezier(0, 0, 0, 1);
+ transition: width .3s, height .3s, left .3s, top .3s, outline 1s cubic-bezier(0, 0, 0, 1);
}
.winbox.focus {
@@ -209,12 +209,18 @@ body {
.wb-header {
border-radius: 10px 10px 0 0;
+ transition: border-radius .3s;
+}
+
+.max .wb-header, .max .wb-body {
+ border-radius: 0;
}
.wb-body {
backdrop-filter: blur(20px);
border-radius: 0 0 10px 10px;
background: transparent;
+ transition: border-radius .3s;
}
.winbox iframe {
@@ -233,6 +239,7 @@ body {
padding: 10px;
flex-direction: row;
align-items: center;
+ z-index: 1000;
}
.taskbar-item {
@@ -240,6 +247,7 @@ body {
display: flex;
align-items: center;
flex: 1;
+ height: 30px;
padding: 10px;
background: var(--surface-bg);
transition: all .4s cubic-bezier(1, 0, 1, 0);
diff --git a/src/index.js b/src/index.js
index 08ce4551..c5cad35a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,6 +9,9 @@ import { uvPath } from '@proudparrot2/uv';
import { createServer } from 'http';
import fs from 'fs';
+import Module from 'node:module';
+const require = Module.createRequire(import.meta.url);
+
import ai from './ai.js';
const port = process.env.PORT || 3000;
@@ -72,6 +75,16 @@ app.get('/uv/uv.config.js', (req, res) => {
res.type('text/javascript').send(fs.readFileSync(`${publicPath}/uv/uv.config.js`));
});
+app.get('/ver', (req, res) => {
+ require('child_process').exec('git rev-parse HEAD', (err1, hash) => {
+ require('child_process').exec('git branch --show-current', (err2, branch) => {
+ require('child_process').exec('git ls-remote --get-url', (err3, url) => {
+ res.type('application/json').send({ hash: hash.replace(/\n/g, ''), branch: branch.replace(/\n/g, ''), url: url.replace(/\n/g, '') });
+ });
+ });
+ });
+});
+
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);