Compare commits

..

No commits in common. "master" and "popup" have entirely different histories.

15 changed files with 11 additions and 66 deletions

View file

@ -1,13 +1,4 @@
# 🚀 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``

View file

@ -1,3 +0,0 @@
remote_theme: pages-themes/leap-day@v0.2.0
plugins:
- jekyll-remote-theme

View file

@ -1,4 +0,0 @@
name,github,image
Jonas Weissengruber,j-weissen,jowei
Stefan Prechtler,s-prechtl,stef
David Hain,d-hain,dave
1 name github image
2 Jonas Weissengruber j-weissen jowei
3 Stefan Prechtler s-prechtl stef
4 David Hain d-hain dave

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

View file

@ -1,31 +0,0 @@
# 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 }})
![{{ dev.name }}](images/{{ dev.image }}.jpg)
{% endfor %}

View file

@ -2,9 +2,12 @@
<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="viewport" content="width=device-width" /> <meta name="color-scheme" content="dark light">
<link rel="manifest" href="../static/manifest.json"> <link rel="manifest" href="%sveltekit.assets%/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>

View file

@ -79,7 +79,6 @@ 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}`
} }

View file

@ -5,7 +5,6 @@
let noteRepo: StrapiNoteRepository; let noteRepo: StrapiNoteRepository;
let currentNote: Note; let currentNote: Note;
onMount(async () => { onMount(async () => {
noteRepo = StrapiNoteRepository.getInstance(); noteRepo = StrapiNoteRepository.getInstance();
try { try {
@ -17,24 +16,19 @@
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>
@ -49,11 +43,11 @@
<html lang="en"> <html lang="en">
<div class="offset-3 col-6 wrapper"> <div class="offset-3 col-6 wrapper">
<h1 class="">{title === "" ? "" : title}</h1> <h1 class="">{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={() => saveAndQuit()} class="btn btn-primary">Save</button> <button on:click={() => save()} 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>
@ -61,20 +55,16 @@
<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;
} }