Skip to content

Store backup of last 3 runs#125

Open
tionkje wants to merge 2 commits intoenkimute:masterfrom
tionkje:master
Open

Store backup of last 3 runs#125
tionkje wants to merge 2 commits intoenkimute:masterfrom
tionkje:master

Conversation

@tionkje
Copy link
Copy Markdown
Contributor

@tionkje tionkje commented Apr 14, 2021

Create a backup of the last 3 runs of each sample.
So that at least everything is not lost on a crash.

Retrieve last backup by pasting this in the console

copy(JSON.parse(localStorage.ganjaBackup)[document.location.hash.slice(1)][0].data)

@kungfooman
Copy link
Copy Markdown
Contributor

I like the idea, but to remember such a snippet or trying to find this PR again and again to do such a simple action is very user unfriendly.

Maybe integrate it into my stash tab? Or adding a simple function to window for something like copy(lastBackup())

@tionkje
Copy link
Copy Markdown
Contributor Author

tionkje commented Apr 14, 2021

I completely agree.
This was just a first step to already have the data.
Since its 3 backups for each script i was thinking somewhere near the thumbnails? next to the delete button?
Now that i think about it the delete button should also delete the backups.

I also think there should be something of a warning/reminder when opening a script and the last saved version is older than a backup. For that a timestamp will need to be saved on backups and on saves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants