mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-21 19:36:22 +03:00
fix: note ids
This commit is contained in:
parent
cbc1e65fa1
commit
0f25c8173b
2 changed files with 3 additions and 4 deletions
|
@ -29,7 +29,7 @@
|
|||
- [ ] Settings for publish notes, such as: delete after reading, number of reads before deleting, adding your own data (name, picture, status in the settings) to the note.
|
||||
- [x] Maintaining statistics on sent notes, the number of notes received, number of deleted notes (#8)
|
||||
- [ ] Encrypting notes in the database
|
||||
- [x] Local notes id is incremental instead of uuidv4 (238af9ad6957f72439a1a39f32662145dd2bdce8)
|
||||
- [x] Local notes ids is ~~incremental~~ `Date.now()` instead of uuidv4 (238af9ad6957f72439a1a39f32662145dd2bdce8)
|
||||
|
||||
# AnoPaper v1.0.0
|
||||
|
||||
|
|
|
@ -26,12 +26,11 @@ function Save() {
|
|||
if (!name || !text) return <Navigate to={`/notes`} replace={true} />;
|
||||
|
||||
let notesObj = localStorage.getObj("Notes");
|
||||
let id = Object.keys(notesObj).length;
|
||||
|
||||
let time = Date.now();
|
||||
|
||||
notesObj[id] = {
|
||||
id,
|
||||
notesObj[time] = {
|
||||
id: time,
|
||||
name,
|
||||
text,
|
||||
time,
|
||||
|
|
Loading…
Add table
Reference in a new issue