mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
readd some used code
This commit is contained in:
parent
e9b030c450
commit
9552ae3ef1
@ -88,7 +88,7 @@ describe("tutorial", () => {
|
||||
cy.findByRole("button", { name: "Tutorial" }).click();
|
||||
|
||||
cy.findByText(/a lot of different documentation about the game/i);
|
||||
cy.findByRole("button", { name: "next" }).click();
|
||||
cy.findByRole("button", { name: "FINISH TUTORIAL" }).click();
|
||||
cy.findByText("Got it!").click();
|
||||
|
||||
cy.findByText(/Tutorial \(AKA Links to Documentation\)/i);
|
||||
|
@ -20,6 +20,7 @@ function load(cb: () => void): void {
|
||||
* Object store is called savestring
|
||||
* key for the Object store is called save
|
||||
*/
|
||||
// Version 1 is important
|
||||
const indexedDbRequest: IDBOpenDBRequest = window.indexedDB.open("bitburnerSave", 1);
|
||||
|
||||
indexedDbRequest.onerror = function (this: IDBRequest<IDBDatabase>, ev: Event) {
|
||||
@ -45,6 +46,12 @@ function load(cb: () => void): void {
|
||||
cb();
|
||||
};
|
||||
};
|
||||
|
||||
// This is called when there's no db to begin with. It's important.
|
||||
indexedDbRequest.onupgradeneeded = function (this: IDBRequest<IDBDatabase>) {
|
||||
const db = this.result;
|
||||
db.createObjectStore("savestring");
|
||||
};
|
||||
}
|
||||
|
||||
export function LoadingScreen(): React.ReactElement {
|
||||
|
Loading…
Reference in New Issue
Block a user