diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7a73a41 --- /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 584e85a..4c1eff2 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - FlowOS + FlowOS Neo @@ -20,5 +20,6 @@ + diff --git a/src/assets/background.jpg b/src/assets/background.jpg new file mode 100644 index 0000000..5e7cd4f Binary files /dev/null and b/src/assets/background.jpg differ diff --git a/src/assets/background.svg b/src/assets/background.svg new file mode 100644 index 0000000..34de11e --- /dev/null +++ b/src/assets/background.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/style.less b/src/assets/style.less index 0d1243c..ff2c870 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 201612c..7e6d2f7 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 32a4181..63c7905 100644 --- a/src/system/Desktop.ts +++ b/src/system/Desktop.ts @@ -17,7 +17,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,6 +93,7 @@ const BootLoader: Process = { }) document.body.style.flexDirection = 'column-reverse' + document.body.style.backgroundImage = 'url(/src/assets/background.jpg)' await statusBar.element.appendTo(document.body) await launcher.element.appendTo(document.body) diff --git a/src/system/VirtualFS.ts b/src/system/VirtualFS.ts index 2344b20..49a85d9 100644 --- a/src/system/VirtualFS.ts +++ b/src/system/VirtualFS.ts @@ -374,7 +374,7 @@ 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' @@ -434,7 +434,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) { diff --git a/src/system/apps/Settings.ts b/src/system/apps/Settings.ts index 17c54d3..e5cdf0c 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', @@ -40,6 +39,12 @@ const Settings: Process = { } else if (item === 'THEME') { input = Dropdown.new((await fs.readdir('/etc/themes')).map((theme: string) => theme.replace('.theme', ''))) } + if (item === 'BACKGROUND') { + const { background } = JSON.parse(Buffer.from(await fs.readFile(`/etc/flow/${config.BACKGROUND as string}.BACKGROUND`)).toString()) + document.cookie = "background=" + background + "; expires=Thu, 18 Dec 9999 12:00:00 UTC; path=/"; + } else if (item === 'THEME') { + input = Dropdown.new((await fs.readdir('/etc/themes')).map((theme: string) => theme.replace('.theme', ''))) + } if (item === 'THEME_PRIMARY' || item === 'THEME') { (input.elm as HTMLSelectElement).value = config[item]