diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c055c12e..4cfef69ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,3 +4,4 @@ App Loader ChangeLog Changed for individual apps are listed in `apps/appname/ChangeLog` * `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong +* Added optional `README.md` file for apps diff --git a/README.md b/README.md index 877fe5e2c..223eac69c 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,10 @@ and which gives information about the app for the Launcher. "type":"...", // optional(if app) - 'app'/'widget'/'launch'/'bootloader' "tags": "", // comma separated tag list for searching + "readme": "README.md", // if supplied, a link to a markdown-style text file + // that contains more information about this app (usage, etc) + // A 'Read more...' link will be added under the app + "custom": "custom.html", // if supplied, apps/custom.html is loaded in an // iframe, and it must post back an 'app' structure // like this one with 'storage','name' and 'id' set up diff --git a/apps.json b/apps.json index 2bbc7dd33..4f8ad0dba 100644 --- a/apps.json +++ b/apps.json @@ -403,6 +403,7 @@ "description": "Simple stopwatch with Lap Time logging to a JSON file", "tags": "health", "allow_emulator":true, + "readme": "README.md", "storage": [ {"name":"swatch.app.js","url":"stopwatch.js"}, {"name":"swatch.img","url":"stopwatch-icon.js","evaluate":true} diff --git a/apps/marioclock/README.md b/apps/marioclock/README.md index 6055894ee..a74c863f8 100644 --- a/apps/marioclock/README.md +++ b/apps/marioclock/README.md @@ -3,7 +3,7 @@ Let's go back in time with this Gameboy inspired Mario retro clock. Enjoy watching Mario, or one of the other game characters run through a level while showing you the time and date. -![](https://raw.githubusercontent.com/paulcockrell/BangleApps/master/apps/marioclock/mario-clock-screen-shot.png) +![](mario-clock-screen-shot.png) ## Features diff --git a/apps/swatch/README.md b/apps/swatch/README.md new file mode 100644 index 000000000..4e2f2589e --- /dev/null +++ b/apps/swatch/README.md @@ -0,0 +1,20 @@ +# Stopwatch + +This is stopwatch and lap timer that allows you to save the lap times for later use. + +## Usage + +* Use `BTN2` (GO/STOP) to start stop the timer +* When running, use `BTN1` (LAP) to store a lap time +* `BTN3` (RESET) resets the time + +When stopped, pressing `BTN1` (SAVE) will save the lap times to a file called `swatch-DATEandTIME.json` on the watch. + +## Getting lap times + +In the App Loader: + +* Connect to your Bangle.js +* Go to `My Apps` +* Under `Stopwatch` click the `Download data from app` icon +* You should now see a list of your saved lap times diff --git a/js/index.js b/js/index.js index f9b16768a..a3f3a269d 100644 --- a/js/index.js +++ b/js/index.js @@ -25,11 +25,13 @@ function showChangeLog(appid) { } function showReadme(appid) { var app = appNameToApp(appid); + var appPath = `apps/${appid}/`; + var markedOptions = { baseUrl : appPath }; function show(contents) { if (!contents) return; - showPrompt(app.name + " Documentation", marked(contents), {ok: true}, false).catch(() => {}); + showPrompt(app.name + " Documentation", marked(contents, markedOptions), {ok: true}, false).catch(() => {}); } - httpGet(`apps/${appid}/${app.readme}`).then(show).catch(()=>show("Failed to load README.")); + httpGet(appPath+app.readme).then(show).catch(()=>show("Failed to load README.")); } function handleCustomApp(appTemplate) { // Pops up an IFRAME that allows an app to be customised