mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 06:01:46 -04:00
SCSS refactor, theme cleanup
This commit is contained in:
@@ -228,9 +228,9 @@
|
||||
|
||||
var userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
var url = type === 'service'
|
||||
? `/services/${currentServiceId}/daily-stats.json?timezone=${encodeURIComponent(userTimezone)}`
|
||||
: `/services/${currentServiceId}/daily-stats-by-user.json?timezone=${encodeURIComponent(userTimezone)}`;
|
||||
var url = (type === 'service' ?
|
||||
`/services/${currentServiceId}/daily-stats.json?timezone=${encodeURIComponent(userTimezone)}` :
|
||||
`/services/${currentServiceId}/daily-stats-by-user.json?timezone=${encodeURIComponent(userTimezone)}`);
|
||||
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
@@ -292,20 +292,20 @@
|
||||
}
|
||||
};
|
||||
|
||||
function startPolling() {
|
||||
var startPolling = function() {
|
||||
fetchData(currentType);
|
||||
|
||||
pollInterval = setInterval(() => {
|
||||
fetchData(currentType);
|
||||
}, POLL_INTERVAL_MS);
|
||||
}
|
||||
};
|
||||
|
||||
function stopPolling() {
|
||||
var stopPolling = function() {
|
||||
if (pollInterval) {
|
||||
clearInterval(pollInterval);
|
||||
pollInterval = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.hidden) {
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
// Determine button label
|
||||
const isMultiple = name !== thing;
|
||||
const buttonLabel = isMultiple
|
||||
? `Copy ${thing}`
|
||||
: `Copy ${thing} to clipboard`;
|
||||
const buttonLabel = (isMultiple ?
|
||||
`Copy ${thing}` :
|
||||
`Copy ${thing} to clipboard`);
|
||||
const srSuffix = isMultiple ? ` for ${name}` : '';
|
||||
|
||||
// Create simple HTML structure
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
var modules = this.find(container);
|
||||
|
||||
for (var i = 0, l = modules.length; i < l; i++) {
|
||||
var type;
|
||||
try {
|
||||
var module;
|
||||
var element = modules[i];
|
||||
var type = this.camelCaseAndCapitalise(element.dataset.module);
|
||||
type = this.camelCaseAndCapitalise(element.dataset.module);
|
||||
var started = element.dataset.moduleStarted;
|
||||
|
||||
if (typeof window.NotifyModules[type] === 'function' && !started) {
|
||||
|
||||
Reference in New Issue
Block a user