@@ -27,6 +27,12 @@ async function checkForUpdate() {
27
27
const storedModified = localStorage.getItem('lastModified');
28
28
const popupShown = localStorage.getItem('popupShown');
29
29
30
+ // Force show popup for debugging if enabled
31
+ if ({{ force_show|lower }}) {
32
+ showUpdatePopup(latestModified);
33
+ return;
34
+ }
35
+
30
36
if (storedModified &&
31
37
new Date(storedModified).getTime() !==
32
38
new Date(latestModified).getTime() &&
@@ -49,28 +55,49 @@ function showUpdatePopup(latestModified) {
49
55
const popup = document.createElement('div');
50
56
popup.id = 'update-popup';
51
57
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';
56
63
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';
60
71
popup.textContent = '{{ update_message }}';
61
72
62
73
const yesButton = document.createElement('button');
63
74
yesButton.textContent = '{{ yes_button_text }}';
64
75
yesButton.style.marginLeft = '10px';
76
+ yesButton.style.marginTop = '15px';
77
+ yesButton.style.padding = '8px 16px';
78
+ yesButton.style.backgroundColor = '#007acc';
65
79
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';
66
85
yesButton.onclick = () => {
67
86
window.location.reload();
68
87
};
69
88
70
89
const noButton = document.createElement('button');
71
90
noButton.textContent = '{{ no_button_text }}';
72
91
noButton.style.marginLeft = '10px';
92
+ noButton.style.marginTop = '15px';
93
+ noButton.style.padding = '8px 16px';
94
+ noButton.style.backgroundColor = '#666';
73
95
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';
74
101
noButton.onclick = () => {
75
102
document.body.removeChild(popup);
76
103
};
0 commit comments