Compare commits
44 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
809e7ce6d7 | ||
|
|
576e65dca6 | ||
|
|
e0505755da | ||
|
|
4fe86d33b6 | ||
|
|
3cd93ac7da | ||
|
|
7c4ed1d2b2 | ||
|
|
67395c9ebf | ||
|
|
3ef834e103 | ||
|
|
cf9da4c6a0 | ||
|
|
58f2a53539 | ||
|
|
46e891d429 | ||
|
|
01d9377238 | ||
|
|
7819b461b8 | ||
|
|
f0e2c9ca94 | ||
|
|
ad94658aef | ||
|
|
1b52eaac46 | ||
|
|
e03b58057e | ||
|
|
1ffd08082b | ||
|
|
942ee3805d | ||
|
|
75034e0602 | ||
|
|
5bd335dbd6 | ||
|
|
ffce155154 | ||
|
|
245de43c78 | ||
|
|
bb9ee26bd2 | ||
|
|
158d49d221 | ||
|
|
fcd2f16401 | ||
|
|
f1331157fd | ||
|
|
f021209531 | ||
|
|
d5867c4f0d | ||
|
|
b8c3603cbb | ||
|
|
dbde003fc2 | ||
|
|
239c73fb8e | ||
|
|
9589a21f96 | ||
|
|
c1c6804a63 | ||
|
|
08166dda95 | ||
|
|
2e3af63c72 | ||
|
|
d438bc4b14 | ||
|
|
00f74d4228 | ||
|
|
2d06680bab | ||
|
|
39d8a2034f | ||
|
|
8d63c8fd4e | ||
|
|
63e37061de | ||
|
|
319828b8b1 | ||
|
|
952917d415 |
|
|
@ -1,4 +1,13 @@
|
||||||
# 🚀 Getting started with PomeloNote
|
# 🚀 Getting started with PomeloNote
|
||||||
|
### **THIS REPOSITORY HAS DEPENDENCIES WITH SECURITY VULNERABILITIES. YOU MIGHT WANT TO UPDATE PACKAGES BEFORE USE.**
|
||||||
|
## Setup
|
||||||
|
- run `npm i`
|
||||||
|
- get the .env file and save it to the root directory of the project
|
||||||
|
- set up Strapi
|
||||||
|
- go to `localhost:1337/admin`
|
||||||
|
- register an admin user
|
||||||
|
- go to Settings => Users&Permissions Plugin => Roles => Authenticated => Note => Select all
|
||||||
|
- Save
|
||||||
|
|
||||||
### Starting the container with svelte and strapi:
|
### Starting the container with svelte and strapi:
|
||||||
``docker-compose up --build -d``
|
``docker-compose up --build -d``
|
||||||
|
|
|
||||||
3
docs/_config.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
remote_theme: pages-themes/leap-day@v0.2.0
|
||||||
|
plugins:
|
||||||
|
- jekyll-remote-theme
|
||||||
4
docs/_data/devs.csv
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
name,github,image
|
||||||
|
Jonas Weissengruber,j-weissen,jowei
|
||||||
|
Stefan Prechtler,s-prechtl,stef
|
||||||
|
David Hain,d-hain,dave
|
||||||
|
BIN
docs/images/dave.jpg
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
docs/images/delete.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/images/editor.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
docs/images/jowei.jpg
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
docs/images/listing.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docs/images/login.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
docs/images/register.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
docs/images/stef.jpg
Normal file
|
After Width: | Height: | Size: 134 KiB |
31
docs/index.md
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Pomelo Note
|
||||||
|
|
||||||
|
This is the best open source note app you will ever find.
|
||||||
|
|
||||||
|
## Login
|
||||||
|
When first entering the app, you will need to login. If you haven't got an account you may consider [registering](#register), or just not using the app at all.
|
||||||
|
<br /><img src="images/login.png" width="50%" style="margin: auto; display: block;" />
|
||||||
|
|
||||||
|
## Register
|
||||||
|
A username, an email and a password that's all you need. If you are missing one of those, just don't use the app at all.
|
||||||
|
<br /><img src="images/register.png" width="50%" style="margin: auto; display: block;" />
|
||||||
|
|
||||||
|
## Editor
|
||||||
|
You can edit your notes with our minimalistic editor interface.
|
||||||
|
<br /><img src="images/editor.png" width="50%" style="margin: auto; display: block;" />
|
||||||
|
|
||||||
|
## Listing
|
||||||
|
Here you can see all your notes. Click on them to open the editor or hover and press the red "X" to delete them.
|
||||||
|
<br /><img src="images/listing.png" width="50%" style="margin: auto; display: block;" />
|
||||||
|
|
||||||
|
## Delete
|
||||||
|
Confirm the deletion.
|
||||||
|
<br /><img src="images/delete.png" width="50%" style="margin: auto; display: block;" />
|
||||||
|
|
||||||
|
# The Team
|
||||||
|
{% for dev in site.data.devs %}
|
||||||
|
{{ dev.name }}
|
||||||
|
[GitHub](https://github.com/{{ dev.github }})
|
||||||
|

|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
@ -2,12 +2,9 @@
|
||||||
<html lang="en" data-theme="emerald">
|
<html lang="en" data-theme="emerald">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="theme-color" content="#1e88e5">
|
|
||||||
<link rel="icon" href="../src/resources/images/logo2.svg" />
|
<link rel="icon" href="../src/resources/images/logo2.svg" />
|
||||||
<meta name="color-scheme" content="dark light">
|
<meta name="viewport" content="width=device-width" />
|
||||||
<link rel="manifest" href="%sveltekit.assets%/manifest.json">
|
<link rel="manifest" href="../static/manifest.json">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ export class StrapiNoteRepository implements NoteRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
static getAuthorizationHeader() {
|
static getAuthorizationHeader() {
|
||||||
|
// @ts-ignore
|
||||||
const jwt = parseCookies('/').jwt;
|
const jwt = parseCookies('/').jwt;
|
||||||
return `bearer ${jwt}`
|
return `bearer ${jwt}`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
let noteRepo: StrapiNoteRepository;
|
let noteRepo: StrapiNoteRepository;
|
||||||
let currentNote: Note;
|
let currentNote: Note;
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
noteRepo = StrapiNoteRepository.getInstance();
|
noteRepo = StrapiNoteRepository.getInstance();
|
||||||
try {
|
try {
|
||||||
|
|
@ -16,19 +17,24 @@
|
||||||
content = (<Note>currentNote).content;
|
content = (<Note>currentNote).content;
|
||||||
})
|
})
|
||||||
|
|
||||||
function save() {
|
/**
|
||||||
|
* saves the currently opened Note and returns to listing
|
||||||
|
*/
|
||||||
|
function saveAndQuit() {
|
||||||
noteRepo.updateNote(currentNote.id, {
|
noteRepo.updateNote(currentNote.id, {
|
||||||
"title": title,
|
"title": title,
|
||||||
"content": content
|
"content": content,
|
||||||
})
|
})
|
||||||
returnToListing();
|
returnToListing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* redirects to listing
|
||||||
|
*/
|
||||||
function returnToListing() {
|
function returnToListing() {
|
||||||
window.location = "/";
|
window.location = "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export let title: string, content: string;
|
export let title: string, content: string;
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -43,11 +49,11 @@
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<div class="offset-3 col-6 wrapper">
|
<div class="offset-3 col-6 wrapper">
|
||||||
<h1 class="">{title}</h1>
|
<h1 class="">{title === "" ? "" : title}</h1>
|
||||||
<input bind:value={title} class="input"> <br />
|
<input bind:value={title} class="input"> <br/>
|
||||||
<textarea bind:value={content} class="input textarea"></textarea>
|
<textarea bind:value={content} class="input textarea"></textarea>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button on:click={() => save()} class="btn btn-primary">Save</button>
|
<button on:click={() => saveAndQuit()} class="btn btn-primary">Save</button>
|
||||||
<button on:click={() => returnToListing()} class="btn btn-outline-danger">Cancel</button>
|
<button on:click={() => returnToListing()} class="btn btn-outline-danger">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -55,16 +61,20 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@import "../../customBootstrap.css";
|
@import "../../customBootstrap.css";
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-container {
|
.button-container {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea {
|
.textarea {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||