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
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Ignore Visual Studio temporary files, build results, and
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
Expand Down Expand Up @@ -245,4 +245,7 @@ settings.json
src/Analysim.Web/Logs

#
.DS_Store




75 changes: 50 additions & 25 deletions src/Analysim.Web/ClientApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
import { Injectable } from '@angular/core';
import * as localforage from 'localforage';

@Injectable({
providedIn: 'root',
})
export class JupyterLiteStorageService {
private filesStore: LocalForage;
private checkpointsStore: LocalForage;

constructor() {
this.filesStore = localforage.createInstance({
name: 'JupyterLite Storage',
storeName: 'files', // Object store name
description: 'Storage for JupyterLite files',
});
this.checkpointsStore = localforage.createInstance({
name: 'JupyterLite Storage',
storeName: 'checkpoints', // Object store name
description: 'Storage for JupyterLite checkpoints',
});
}

// Add a file to the IndexedDB
addFile(fileName: string, fileData: any): Promise<any> {
return this.filesStore.setItem(fileName, fileData);
}

// Get a file by its name
getFile(fileName: string): Promise<any> {
return this.filesStore.getItem(fileName);
}

getCheckpoints(fileName: string): Promise<any> {
return this.checkpointsStore.getItem(fileName);
}

removeFile(fileName: string): Promise<any> {
return this.filesStore.removeItem(fileName);
}

// Get all files
getAllFiles(): Promise<any[]> {
const files: any[] = [];
return this.filesStore.iterate((value, key) => {
files.push({ key, value });
}).then(() => files);
}
}
// JupyterLiteStorageService has been consolidated into a shared service.
// This file re-exports from the new location for backwards compatibility.
export { JupyterLiteStorageService } from '../../../../../shared/services/jupyter-lite-storage.service';

This file was deleted.

Loading