Notes are now displayed in order of the "lastOpened" property

The Note interface was moved to types.ts
This commit is contained in:
dhain 2022-09-25 11:16:36 +02:00
parent 2705fe27ef
commit 395a9dc2e8
3 changed files with 39 additions and 17 deletions

View file

@ -1,17 +1,12 @@
<script lang="ts">
interface Note {
id: number;
title: string;
content: string;
}
import type {Note} from "../../types";
let notes: Note[] = JSON.parse(window.localStorage.getItem("notes"));
const clickedNoteId = window.localStorage.getItem("clickedNoteId");
</script>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{"Pomelonote | Edit " + notes[clickedNoteId].title}</title>
@ -19,6 +14,8 @@
integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
</head>
<html lang="en">
<div class="offset-3 col-6">
samc samg ccocooc {notes[clickedNoteId].content}
</div>
</html>