mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-24 12:56:21 +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.
|
- [ ] 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)
|
- [x] Maintaining statistics on sent notes, the number of notes received, number of deleted notes (#8)
|
||||||
- [ ] Encrypting notes in the database
|
- [ ] 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
|
# AnoPaper v1.0.0
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,11 @@ function Save() {
|
||||||
if (!name || !text) return <Navigate to={`/notes`} replace={true} />;
|
if (!name || !text) return <Navigate to={`/notes`} replace={true} />;
|
||||||
|
|
||||||
let notesObj = localStorage.getObj("Notes");
|
let notesObj = localStorage.getObj("Notes");
|
||||||
let id = Object.keys(notesObj).length;
|
|
||||||
|
|
||||||
let time = Date.now();
|
let time = Date.now();
|
||||||
|
|
||||||
notesObj[id] = {
|
notesObj[time] = {
|
||||||
id,
|
id: time,
|
||||||
name,
|
name,
|
||||||
text,
|
text,
|
||||||
time,
|
time,
|
||||||
|
|
Loading…
Add table
Reference in a new issue