Compare commits

..

No commits in common. "ef009b2d0eab44bdddf93f3a8a08bc690ffd874e" and "880c3207710045160c193d54a3ea4a41c6a9da69" have entirely different histories.

8 changed files with 751 additions and 747 deletions

View File

@ -10,30 +10,31 @@
"serve": "webpack serve" "serve": "webpack serve"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.5", "@babel/core": "^7.19.3",
"@babel/plugin-transform-runtime": "^7.19.6", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.19.3",
"@types/intl": "^1.2.0", "@types/intl": "^1.2.0",
"babel-loader": "^9.1.0", "babel-loader": "^8.2.5",
"css-loader": "^6.7.2", "css-loader": "^6.7.1",
"file-loader": "^6.2.0",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"ts-loader": "^9.4.2", "ts-loader": "^9.4.1",
"typescript": "^4.9.4", "typescript": "^4.8.4",
"webpack": "^5.75.0", "webpack": "^5.74.0",
"webpack-cli": "^5.0.1", "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1" "webpack-dev-server": "^4.11.1"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.20.6", "@babel/runtime": "^7.19.0",
"@fullcalendar/core": "^5.11.3", "@fullcalendar/core": "^5.11.3",
"@fullcalendar/icalendar": "^5.11.3", "@fullcalendar/icalendar": "^5.11.3",
"@fullcalendar/resource-common": "^5.11.3", "@fullcalendar/resource-common": "^5.11.3",
"@fullcalendar/resource-timegrid": "^5.11.3", "@fullcalendar/resource-timegrid": "^5.11.3",
"@fullcalendar/resource-timeline": "^5.11.3", "@fullcalendar/resource-timeline": "^5.11.3",
"@fullcalendar/timegrid": "^5.11.3", "@fullcalendar/timegrid": "^5.11.3",
"core-js": "^3.26.1", "core-js": "^3.25.5",
"intl": "^1.2.5", "intl": "^1.2.5",
"preact": "^10.11.3", "preact": "^10.11.1",
"unique-colors": "^1.0.1" "unique-colors": "^1.0.1"
} }
} }

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,41 +0,0 @@
@font-face {
font-family: 'DejaVu Sans';
src: local('DejaVu Sans'), url(./DejaVuSans.ttf);
}
.modal {
position: fixed;
z-index: 99;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
}
.modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}
.modal-content {
display: inline-block;
vertical-align: middle;
}
#loadingSpinner {
background-image: url(./loading.gif);
background-repeat: no-repeat;
background-position: center;
}
#errorModal {
background-color: rgba(200, 200, 200, 0.6);
}
.modal-icon {
font-size: 10em;
font-family: 'DejaVu Sans';
}

View File

@ -7,13 +7,6 @@
<title>Tool Reservations</title> <title>Tool Reservations</title>
</head> </head>
<body> <body>
<div class="modal" id="loadingSpinner"></div>
<div class="modal" id="errorModal">
<div class="modal-content">
<div class="modal-icon">&#9888;</div>
<div class="modal-message"></div>
</div>
</div>
<div id="calendar"></div> <div id="calendar"></div>
<script src="bundle-wall-display.js"></script> <script src="bundle-wall-display.js"></script>
</body> </body>

View File

@ -10,7 +10,6 @@ import { CalendarOptions } from '@fullcalendar/core';
import { common_calendarOptions, main } from './common'; import { common_calendarOptions, main } from './common';
import './wall-display.html'; import './wall-display.html';
import './modal.css';
import './ios-fixes.css'; import './ios-fixes.css';
document.body.addEventListener('touchmove', (e) => e.preventDefault(), { document.body.addEventListener('touchmove', (e) => e.preventDefault(), {
@ -30,30 +29,6 @@ const calendarOptions: CalendarOptions = {
}; };
}) })
: [], : [],
eventSourceFailure(error: { message: string }) {
console.error('Error fetching events', error);
const errorModal = document.getElementById('errorModal');
if (errorModal) {
errorModal.style.display = '';
const message = errorModal.querySelector('.modal-message');
if (message) {
message.textContent = `Failed to fetch events: ${error.message}. Displayed events may not be accurate.`;
}
}
},
loading(isLoading: boolean) {
if (isLoading) {
const errorModal = document.getElementById('errorModal');
if (errorModal) {
errorModal.style.display = 'none';
}
}
const spinner = document.getElementById('loadingSpinner');
if (spinner) {
spinner.style.display = isLoading ? '' : 'none';
}
},
}; };
const calendar = main(calendarOptions, !toolFilter); const calendar = main(calendarOptions, !toolFilter);

View File

@ -4,19 +4,17 @@ const common = {
mode: 'development', mode: 'development',
module: { module: {
rules: [ rules: [
{
test: /\.(png|jpg|gif|svg|eot|ttf|woff)$/,
type: 'asset/resource',
},
{ {
test: /\.css$/i, test: /\.css$/i,
use: ['style-loader', 'css-loader'], use: ['style-loader', 'css-loader'],
}, },
{ {
test: /\.html$/i, test: /\.html$/i,
type: 'asset/resource', use: {
generator: { loader: 'file-loader',
filename: '[name][ext]', options: {
name: '[name].[ext]',
},
}, },
}, },
], ],