diff --git a/js/index.js b/js/index.js
index 42a3ff0..8d33cb2 100644
--- a/js/index.js
+++ b/js/index.js
@@ -330,7 +330,15 @@ function showAppInfo(appid, installedVersion) {
const infoPart = infoTxt.length>0 ? marked(infoTxt.join("
")) : "";
const changelogPart = changelogText ? changelogText.replace(/\n/g, "
") : "";
const changeLogHeading = changelogPart ? "
ChangeLog:
" : "";
- showPrompt(app.name + " App Information", infoPart + changeLogHeading + changelogPart, {ok: true,}, false).catch(() => {});
+ showPrompt(app.name + " App Information", infoPart + changeLogHeading + changelogPart, {ok: true, githubIssue: true}, false).catch(() => {}).then((c)=>{
+ if(c=="githubIssue"){
+ const encodedTitle = encodeURIComponent(`[${app.name}] Describe the issue...`);
+ const authorText = app.author ? encodeURIComponent(`@${app.author}`):"";
+ window.open(`https://github.com/espruino/BangleApps/issues/new?template=bangle-bug-report-custom-form.yaml&title=${encodedTitle}&fwversion=${device.version?device.version:""}&author=${authorText}`,'_blank');
+ }
+ }
+
+ );
});
}
function getAppDescription(app) {
@@ -1045,6 +1053,12 @@ function uploadApp(app, options) {
}
return startOperation({name:"App Upload"}, () => getInstalledApps().then(()=>{
+ if (app.requiredFw!==undefined){
+ if(Utils.versionLess(device.version,app.requiredFw)) {
+ showToast(`App "${app.name}" requires firmware version ${app.requiredFw} or higher. You have version ${device.version}. To install this app, please update your firmware.`,"warning");
+ return;
+ }
+ }
if (device.appsInstalled.some(i => i.id === app.id)) {
return updateApp(app, {noNewOperation:true /*in 'App Upload'*/});
}
diff --git a/js/ui.js b/js/ui.js
index e3c1e5e..b941e8c 100644
--- a/js/ui.js
+++ b/js/ui.js
@@ -115,6 +115,7 @@ function showPrompt(title, text, buttons, shouldEscapeHtml) {
${buttons.yes?'':''}
${buttons.no?'':''}
${buttons.ok?'':''}
+ ${buttons.githubIssue?``:''}
${buttons.footer?`${buttons.footer}`:""}
`:``}
@@ -131,6 +132,7 @@ function showPrompt(title, text, buttons, shouldEscapeHtml) {
event.preventDefault();
let isYes = event.target.getAttribute("isyes")=="1";
if (isYes) resolve();
+ else if (event.target.id=="githubIssue") resolve("githubIssue");
else reject("User cancelled");
modal.remove();
});