mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-12 17:26:22 +00:00
feat: section dynamic slide buttons
This commit is contained in:
@@ -52,6 +52,44 @@ All the npm scripts are defined in `package.json` [file](package.json). It is re
|
||||
|
||||
## Most useful commands
|
||||
|
||||
## Editing the Ionic Database from the browser
|
||||
|
||||
Add the following function using the browser console
|
||||
|
||||
```js
|
||||
function addToIonicDB(key, value) {
|
||||
indexedDB.open('_ionicstorage').onsuccess = event => {
|
||||
const db = event.target.result;
|
||||
db.transaction('_ionickv', 'readwrite').objectStore('_ionickv').put(value, key);
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
You can then call the function in the browser to add values to the
|
||||
ionic database in the IndexedDB.
|
||||
|
||||
For example, you can add a stored authorization like this:
|
||||
|
||||
```js
|
||||
addToIonicDB(
|
||||
'token_response',
|
||||
JSON.stringify({
|
||||
access_token: 'AT-123-abcdefghi',
|
||||
refresh_token: 'RT-123-jklmnopqrs',
|
||||
scope: '',
|
||||
token_type: 'bearer',
|
||||
issued_at: 1696852785,
|
||||
expires_in: '28800',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
You'll need to run _Chromium_ using
|
||||
|
||||
```shell
|
||||
pnpm chromium:no-cors
|
||||
```
|
||||
|
||||
### Running the app
|
||||
|
||||
Install the npm packages needed for running the app (as for any other node project which uses npm):
|
||||
|
||||
Reference in New Issue
Block a user