@@ -27,6 +27,12 @@ async function checkForUpdate() {
2727 const storedModified = localStorage.getItem('lastModified');
2828 const popupShown = localStorage.getItem('popupShown');
2929
30+ // Force show popup for debugging if enabled
31+ if ({{ force_show|lower }}) {
32+ showUpdatePopup(latestModified);
33+ return;
34+ }
35+
3036 if (storedModified &&
3137 new Date(storedModified).getTime() !==
3238 new Date(latestModified).getTime() &&
@@ -49,28 +55,49 @@ function showUpdatePopup(latestModified) {
4955 const popup = document.createElement('div');
5056 popup.id = 'update-popup';
5157 popup.style.position = 'fixed';
52- popup.style.bottom = '10px';
53- popup.style.left = '10px';
54- popup.style.backgroundColor = 'rgba(0,0,0,0.9)';
55- popup.style.fontSize = '16px';
58+ popup.style.top = '20px';
59+ popup.style.left = '50%';
60+ popup.style.transform = 'translateX(-50%)';
61+ popup.style.backgroundColor = 'rgba(0,0,0,0.95)';
62+ popup.style.fontSize = '18px';
5663 popup.style.color = 'white';
57- popup.style.padding = '10px';
58- popup.style.borderRadius = '5px';
59- popup.style.zIndex = '1000';
64+ popup.style.padding = '20px 30px';
65+ popup.style.borderRadius = '10px';
66+ popup.style.zIndex = '10000';
67+ popup.style.boxShadow = '0 4px 20px rgba(0,0,0,0.5)';
68+ popup.style.border = '2px solid #007acc';
69+ popup.style.minWidth = '300px';
70+ popup.style.textAlign = 'center';
6071 popup.textContent = '{{ update_message }}';
6172
6273 const yesButton = document.createElement('button');
6374 yesButton.textContent = '{{ yes_button_text }}';
6475 yesButton.style.marginLeft = '10px';
76+ yesButton.style.marginTop = '15px';
77+ yesButton.style.padding = '8px 16px';
78+ yesButton.style.backgroundColor = '#007acc';
6579 yesButton.style.color = 'white';
80+ yesButton.style.border = 'none';
81+ yesButton.style.borderRadius = '5px';
82+ yesButton.style.cursor = 'pointer';
83+ yesButton.style.fontSize = '14px';
84+ yesButton.style.fontWeight = 'bold';
6685 yesButton.onclick = () => {
6786 window.location.reload();
6887 };
6988
7089 const noButton = document.createElement('button');
7190 noButton.textContent = '{{ no_button_text }}';
7291 noButton.style.marginLeft = '10px';
92+ noButton.style.marginTop = '15px';
93+ noButton.style.padding = '8px 16px';
94+ noButton.style.backgroundColor = '#666';
7395 noButton.style.color = 'white';
96+ noButton.style.border = 'none';
97+ noButton.style.borderRadius = '5px';
98+ noButton.style.cursor = 'pointer';
99+ noButton.style.fontSize = '14px';
100+ noButton.style.fontWeight = 'bold';
74101 noButton.onclick = () => {
75102 document.body.removeChild(popup);
76103 };
0 commit comments