[] Improve info app

This commit is contained in:
ThinLiquid 2023-10-18 02:19:19 +01:00
parent 41b45aeb32
commit cc91d9e9af
No known key found for this signature in database
GPG key ID: D5085759953E6CAA
3 changed files with 21 additions and 34 deletions

View file

@ -1,5 +1,5 @@
import icon from '../assets/icons/info.png'
import { App } from '../types.ts'
import { App, PackageJSON } from '../types.ts'
import { FlowWindow } from '../wm.ts'
export default class SettingsApp implements App {
@ -10,6 +10,7 @@ export default class SettingsApp implements App {
canResize = true
async open (): Promise<FlowWindow> {
const packageJSON: PackageJSON = await import('../../package.json')
const win = window.wm.createWindow({
title: this.name,
icon,
@ -19,40 +20,21 @@ export default class SettingsApp implements App {
})
win.content.style.padding = '10px'
win.content.style.textAlign = 'center'
win.content.style.display = 'flex'
win.content.style.flexDirection = 'column'
win.content.style.justifyContent = 'center'
win.content.style.alignItems = 'center'
win.content.innerHTML = `
<h1>FlowOS</h1>
<p>v2.0</p>
<p> Created by ThinLiquid, 1nspird_, Proudparot2, Systemless_ </p>
<a class="discord" href="https://discord.gg/flowos"> Discord </a>
<a class="github" href="https://github.com/Flow-Works/FlowOS-2.0"> Github </a>
<style>
#contributers {
font-size:12px;
}
h1 {
text-align: center;
font-size: 48px;
}
p {
text-align: center;
}
.github {
float:right;
position: relative;
top: 125px;
}
.discord {
float:left;
position: relative;
top: 125px;
}
</style>
<div>
<h1 style="margin:0;">FlowOS</h1>
<p style="margin:0;">v${packageJSON.version}</p>
<br/>
<p>Created by ThinLiquid, 1nspird_, proudparot2, systemless_</p>
<a class="discord" href="https://discord.gg/flowos">Discord</a>
-
<a class="github" href="https://github.com/Flow-Works/FlowOS-2.0">Github</a>
</div>
`
return win

1
src/files.d.ts vendored
View file

@ -1 +1,2 @@
declare module '*.png'
declare module '*.json'

View file

@ -9,6 +9,10 @@ export interface StatusItem {
run: Function
}
export interface PackageJSON {
version: string
}
export interface App {
name: string
pkg: string