update pb collection and versioning setting is now in don in package.json
This commit is contained in:
+15
-2
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
|
||||
<div id="results" aria-live="polite" class="flex flex-col gap-3 flex-1 overflow-auto p-0"></div>
|
||||
<div class="text-right text-xs text-gray-500 mt-5 pt-3 border-t border-gray-200"><v1 class="0 0-beta3"></v1></div>
|
||||
<div class="text-right text-xs text-gray-500 mt-5 pt-3 border-t border-gray-200"><span id="versionLabel">v1.0.0-beta2</span></div>
|
||||
</div>
|
||||
|
||||
<!-- Detail Modal -->
|
||||
@@ -120,7 +120,7 @@
|
||||
const headers = { ...(options.headers||{}), ...authHeaders() };
|
||||
return fetch(url + `&_ts=${Date.now()}`, { ...options, headers });
|
||||
};
|
||||
const PB_COLLECTION_URL = "https://pocketbase.ccllc.pro/api/collections/pbc_1431294567/records";
|
||||
const PB_COLLECTION_URL = "https://pocketbase.ccllc.pro/api/collections/pbc_1407612689/records";
|
||||
const NOTES_COLLECTION_URL = "https://pocketbase.ccllc.pro/api/collections/notes/records";
|
||||
const perPage = 50;
|
||||
|
||||
@@ -137,12 +137,25 @@
|
||||
const jobFolderBtn = document.getElementById('jobFolderBtn');
|
||||
const jobNotes = document.getElementById('jobNotes');
|
||||
const newNote = document.getElementById('newNote');
|
||||
const versionLabel = document.getElementById('versionLabel');
|
||||
|
||||
const toolbar = document.getElementById('toolbar');
|
||||
const tbButtons = Array.from(toolbar.querySelectorAll('button'));
|
||||
|
||||
const safeLower = v => (v||'').toString().trim().toLowerCase();
|
||||
|
||||
// Load version from backend /version endpoint so UI matches package.json
|
||||
async function loadVersion(){
|
||||
if(!versionLabel) return;
|
||||
try{
|
||||
const res = await fetch('/version');
|
||||
if(!res.ok) return;
|
||||
const data = await res.json().catch(()=>null);
|
||||
if(data?.version) versionLabel.textContent = `v${data.version}`;
|
||||
}catch(err){ /* silent */ }
|
||||
}
|
||||
loadVersion();
|
||||
|
||||
let progTimer=null;
|
||||
function startProgress(){
|
||||
progressBar.style.width='0%';
|
||||
|
||||
Reference in New Issue
Block a user