Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FlowOS</title>
<title>FlowOS Neo</title>
<link rel="shortcut icon" href="./src/assets/flow.png" type="image/png">

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9675905177363247" crossorigin="anonymous"></script>
Expand All @@ -20,5 +20,6 @@
</head>
<body>
<script src="./src/bootloader.ts" type="module"></script>
<script src="./src/background.js" type="module"></script>
</body>
</html>
Binary file added src/assets/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ window-area {
height: 100%;
overflow: hidden;
margin: 10px;

window {
resize: both;
max-width: 100%;
Expand Down
12 changes: 6 additions & 6 deletions src/bootloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})
),
Expand Down Expand Up @@ -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()
Expand Down
13 changes: 10 additions & 3 deletions src/system/Desktop.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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'
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 8 additions & 3 deletions src/system/VirtualFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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) {
Expand All @@ -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))
}
})
}

Expand Down
1 change: 0 additions & 1 deletion src/system/apps/Settings.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down