diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/index.html b/index.html index 584e85a4..4c1eff2c 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - FlowOS + FlowOS Neo @@ -20,5 +20,6 @@ + diff --git a/src/assets/background.png b/src/assets/background.png new file mode 100644 index 00000000..4ccc44c1 Binary files /dev/null and b/src/assets/background.png differ diff --git a/src/assets/style.less b/src/assets/style.less index 0d1243ca..ff2c870a 100644 --- a/src/assets/style.less +++ b/src/assets/style.less @@ -121,7 +121,7 @@ window-area { height: 100%; overflow: hidden; margin: 10px; - + window { resize: both; max-width: 100%; diff --git a/src/bootloader.ts b/src/bootloader.ts index 201612cf..7e6d2f78 100644 --- a/src/bootloader.ts +++ b/src/bootloader.ts @@ -43,7 +43,7 @@ boot.appendMany( src: logo, height: '40px' }), - new HTML('h1').text('FlowOS').styleJs({ + new HTML('h1').text('FlowOS Neo').styleJs({ color: 'white' }) ), @@ -116,16 +116,16 @@ window.console.group = (...args: any) => { try { const args = new URLSearchParams(window.location.search) const kernel = new Kernel() - writeln('/-----------------------------------------------\\') - writeln('| FlowOS is now discontinued. Starting in 10s...|') - writeln('\\-----------------------------------------------/') + writeln('/-----------------------------------------------------------------------------------\\') + writeln('| FlowOS Neo is a planned project by Neptune6866 to continue what FlowOS meant to do|') + writeln('\\-----------------------------------------------------------------------------------/') setTimeout(() => { kernel.boot(boot, progress, args).catch(e => console.error(e)) - }, 10000) + }, 5000) } catch (e) { writeln() writeln('An error occured while booting FlowOS.') - writeln('Please report this error to Flow Works.') + writeln('Please report this error to Neptune6866.') writeln() console.error(e.stack) writeln() diff --git a/src/system/Desktop.ts b/src/system/Desktop.ts index 32a41816..57e167f9 100644 --- a/src/system/Desktop.ts +++ b/src/system/Desktop.ts @@ -1,7 +1,9 @@ import HTML from '../HTML' import { Process } from '../types' import nullIcon from '../assets/icons/application-default-icon.svg' - +import VirtualFS from '../system/VirtualFS' +import { config } from 'process' +import { parse } from 'js-ini' const BootLoader: Process = { config: { name: 'Desktop', @@ -17,7 +19,7 @@ const BootLoader: Process = { const wm = await process.loadLibrary('lib/WindowManager') const launcher = await process.loadLibrary('lib/Launcher') const { Input } = await process.loadLibrary('lib/Components') - + const windowArea = document.querySelector('window-area') const input = Input.new().attr({ type: 'text', placeholder: 'Search' @@ -93,7 +95,12 @@ const BootLoader: Process = { }) document.body.style.flexDirection = 'column-reverse' - + + await fs.readFile('/etc/flow').then(async (data: Uint8Array) => { + const dataString = Buffer.from(data).toString() + const config = parse(dataString) + document.body.style.backgroundImage = "url(" + config.BACKGROUND.toString() + ")"}) + document.body.style.backgroundSize = "cover" await statusBar.element.appendTo(document.body) await launcher.element.appendTo(document.body) await wm.windowArea.appendTo(document.body) diff --git a/src/system/VirtualFS.ts b/src/system/VirtualFS.ts index 2344b204..061a1658 100644 --- a/src/system/VirtualFS.ts +++ b/src/system/VirtualFS.ts @@ -374,10 +374,11 @@ export const defaultFS: { root: Directory } = { deleteable: false, permission: Permission.ELEVATED, content: Buffer.from([ - 'SERVER=https://server.flow-works.me', + 'SERVER=http://localhost:3000/', '24_HOUR=false', 'THEME=Mocha', - 'THEME_PRIMARY=blue' + 'THEME_PRIMARY=blue', + 'BACKGROUND=/src/assets/background.png' ].join('\n')) }, hostname: { @@ -434,7 +435,7 @@ class VirtualFS { const config = parse(dataString) if (config.SERVER == null) { - config.SERVER = 'https://server.flow-works.me' + config.SERVER = 'http://localhost:3000/' await this.writeFile('/etc/flow', stringify(config)) } if (config['24_HOUR'] == null) { @@ -449,6 +450,10 @@ class VirtualFS { config.THEME_PRIMARY = 'blue' await this.writeFile('/etc/flow', stringify(config)) } + if (config.BACKGROUND == null) { + config.BACKGROUND = '/src/assets/background.png' + await this.writeFile('/etc/flow', stringify(config)) + } }) } diff --git a/src/system/apps/Settings.ts b/src/system/apps/Settings.ts index 17c54d36..2bdef806 100644 --- a/src/system/apps/Settings.ts +++ b/src/system/apps/Settings.ts @@ -1,7 +1,6 @@ import { Process } from '../../types' import icon from '../../assets/icons/preferences-system.svg' import { stringify } from 'js-ini' - const Settings: Process = { config: { name: 'Settings',