From 542aa812f8606dad16ab456c3e5da438cc501644 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 11 May 2016 17:47:17 +0200 Subject: support media endpoint, autosave notes in local storage * looks for a media endpoint in the micropub config * if media endpoint is available, both the note interface and the editor will upload files to it instead of posting the photo directly * the note interface autosaves in-progress notes in localstorage --- views/auth_start.php | 4 +- views/editor.php | 2 +- views/layout.php | 1 + views/new-post.php | 99 +++++++++++++++++++++++++++++++++++++-- views/partials/syndication-js.php | 1 + 5 files changed, 101 insertions(+), 6 deletions(-) (limited to 'views') diff --git a/views/auth_start.php b/views/auth_start.php index 8635f07..93f45e3 100644 --- a/views/auth_start.php +++ b/views/auth_start.php @@ -36,7 +36,9 @@

The Micropub endpoint is the URL this app will use to post new photos.

micropubEndpoint): ?> -
Found your Micropub endpoint: micropubEndpoint ?>
+
+ Found your Micropub endpoint: micropubEndpoint ?> +
Could not find your Micropub endpoint!

You need to set your Micropub endpoint in a <link> tag on your home page.

diff --git a/views/editor.php b/views/editor.php index 6d235c4..44b2987 100644 --- a/views/editor.php +++ b/views/editor.php @@ -30,7 +30,7 @@ - + diff --git a/views/layout.php b/views/layout.php index 03929b1..59025b1 100644 --- a/views/layout.php +++ b/views/layout.php @@ -33,6 +33,7 @@ + diff --git a/views/new-post.php b/views/new-post.php index da3927d..18e81d1 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -108,6 +108,12 @@ micropub endpoint micropub_endpoint ?> (should be a URL) + media_endpoint): ?> + + media endpoint + media_endpoint ?> (should be a URL) + + access token String of length micropub_access_token) ?>micropub_access_token) > 0) ? (', ending in ' . substr($this->micropub_access_token, -7) . '') : '' ?> (should be greater than length 0) @@ -137,14 +143,93 @@