Bug fixes and improvements.
';
+ const buttons = update.mandatory ? 'Bug fixes and improvements.
';
diff --git a/android-app/www/js/views/about.js b/android-app/www/js/views/about.js
index b5c29b2..b9b7318 100644
--- a/android-app/www/js/views/about.js
+++ b/android-app/www/js/views/about.js
@@ -9,17 +9,17 @@
import { SITE_ORIGIN } from '../api.js';
import * as ui from '../ui.js';
-const APP_VERSION = '1.4.1';
export default async function renderAbout(root, ctx) {
ctx.setHeader({ title: 'About', brand: false });
+ const { versionName } = await ctx.native.getAppVersion();
root.innerHTML = `
DSMNRU PYQ
- Dedicated Android app · v${APP_VERSION}
+
Dedicated Android app · v${versionName || 'Unknown'}
Dr. Shakuntala Misra National Rehabilitation University
previous-year question-paper archive
diff --git a/android-app/www/js/views/profile.js b/android-app/www/js/views/profile.js
index 2cbb5a9..a4ccd12 100644
--- a/android-app/www/js/views/profile.js
+++ b/android-app/www/js/views/profile.js
@@ -11,7 +11,6 @@
* rendered — everything user-facing is human text.
*/
-const APP_VERSION = '1.4.0';
function esc(s) { return String(s == null ? '' : s); }
@@ -28,6 +27,8 @@ function dateLabel(iso) {
export default async function renderProfile(root, ctx) {
const { ui, auth, store, api, native, router } = ctx;
+ const { versionName } = await native.getAppVersion();
+ const appVersion = versionName || 'Unknown';
ctx.setHeader({ title: 'Profile', brand: false });
const user = auth.current();
@@ -174,7 +175,7 @@ export default async function renderProfile(root, ctx) {
if (user && user.admin) {
items.push({ act: 'admin', icon: 'tools', label: 'Open admin panel', sub: 'Administration stays on the website — there is no second panel' });
}
- items.push({ act: 'about', icon: 'info', label: 'About this app', sub: `Version ${APP_VERSION}` });
+ items.push({ act: 'about', icon: 'info', label: 'About this app', sub: `Version ${appVersion}` });
more.innerHTML = `
${items.map((it) => `
`).join('')}
`;
more.addEventListener('click', (e) => {
@@ -204,7 +205,7 @@ export default async function renderProfile(root, ctx) {
break;
case 'about':
ui.sheet({
- title: `DSMNRU PYQ · Version ${APP_VERSION}`,
+ title: `DSMNRU PYQ · Version ${appVersion}`,
content: `
A dedicated Android app for the DSMNRU previous-year
question-paper archive — same data and accounts as the website, in a
native interface.