use notification system for OS updates (#2670)

* use notification system for OS updates

* feat: Include the version update notification in the update in rs

* chore: Change the location of the comment

* progress on release notes

* fill out missing sections

* fix build

* fix build

---------

Co-authored-by: J H <dragondef@gmail.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Matt Hill
2024-12-02 13:58:09 -07:00
committed by GitHub
parent dd423f2e7b
commit 22a32af750
18 changed files with 167 additions and 137 deletions

View File

@@ -9,6 +9,8 @@ import { configBuilderToSpec } from 'src/app/util/configBuilderToSpec'
import { T, ISB, IST } from '@start9labs/start-sdk'
import { GetPackagesRes } from '@start9labs/marketplace'
import markdown from 'raw-loader!../../../../../shared/assets/markdown/md-sample.md'
const mockMerkleArchiveCommitment: T.MerkleArchiveCommitment = {
rootSighash: 'fakehash',
rootMaxsize: 0,
@@ -759,7 +761,7 @@ export module Mock {
id: 2,
packageId: null,
createdAt: '2019-12-26T14:20:30.872Z',
code: 2,
code: 0,
level: NotificationLevel.Warning,
title: 'SSH Key Added',
message: 'A new SSH key was added. If you did not do this, shit is bad.',
@@ -769,7 +771,7 @@ export module Mock {
id: 3,
packageId: null,
createdAt: '2019-12-26T14:20:30.872Z',
code: 3,
code: 0,
level: NotificationLevel.Info,
title: 'SSH Key Removed',
message: 'A SSH key was removed.',
@@ -779,7 +781,7 @@ export module Mock {
id: 4,
packageId: 'bitcoind',
createdAt: '2019-12-26T14:20:30.872Z',
code: 4,
code: 0,
level: NotificationLevel.Error,
title: 'Service Crashed',
message: new Array(40)
@@ -792,6 +794,16 @@ export module Mock {
.join(''),
data: null,
},
{
id: 5,
packageId: null,
createdAt: '2019-12-26T14:20:30.872Z',
code: 2,
level: NotificationLevel.Success,
title: 'Welcome to StartOS 0.3.6!',
message: 'Click "View Details" to learn all about the new version',
data: markdown,
},
]
export function getServerMetrics() {

View File

@@ -442,6 +442,8 @@ export type NotificationData<T> = T extends 0
? null
: T extends 1
? BackupReport
: T extends 2
? string
: any
export interface BackupReport {

View File

@@ -6,7 +6,6 @@ const version = require('../../../../../../package.json').version
export const mockPatchData: DataModel = {
ui: {
name: `Matt's Server`,
ackWelcome: '1.0.0',
theme: 'Dark',
widgets: BUILT_IN_WIDGETS.filter(
({ id }) =>