mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-12 15:33:20 -05:00
[BETA] Meshcentral Bootstrap 5 User Interface (#6450)
Co-authored-by: Bruno Kambere <brunokambere@gmail.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io> Co-authored-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
63930c4b33
commit
5193fef888
2
package-lock.json
generated
2
package-lock.json
generated
@ -2056,4 +2056,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -62,4 +62,4 @@
|
||||
"url": "https://github.com/Ylianst/MeshCentral.git"
|
||||
},
|
||||
"readme": "readme.md"
|
||||
}
|
||||
}
|
7
public/scripts/bootstrap.min.js
vendored
Normal file
7
public/scripts/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
public/scripts/fontawesome/all.min.js
vendored
Normal file
6
public/scripts/fontawesome/all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/scripts/jquery.min.js
vendored
Normal file
2
public/scripts/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/scripts/select2.full.min.js
vendored
Normal file
2
public/scripts/select2.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
public/scripts/sweetalert2.all.min.js
vendored
Normal file
6
public/scripts/sweetalert2.all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
29
public/scripts/themes/theme-switcher.js
Normal file
29
public/scripts/themes/theme-switcher.js
Normal file
@ -0,0 +1,29 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
const themeSwitcher = document.getElementById('theme-switcher');
|
||||
const themeStylesheet = document.getElementById('theme-stylesheet');
|
||||
|
||||
// Load saved theme from local storage
|
||||
const savedTheme = localStorage.getItem('theme');
|
||||
if (savedTheme) {
|
||||
const safeTheme = encodeURIComponent(savedTheme);
|
||||
themeStylesheet.href = `styles/themes/${safeTheme}/bootstrap.min.css`;
|
||||
themeSwitcher.value = savedTheme;
|
||||
}
|
||||
|
||||
// Change theme on selection
|
||||
themeSwitcher.addEventListener('change', function () {
|
||||
const selectedTheme = themeSwitcher.value;
|
||||
const safeTheme = encodeURIComponent(selectedTheme);
|
||||
themeStylesheet.href = `styles/themes/${safeTheme}/bootstrap.min.css`;
|
||||
// Save selected theme to local storage
|
||||
localStorage.setItem('theme', selectedTheme);
|
||||
});
|
||||
|
||||
// Initialize Select2 on all select elements with the 'select2' class
|
||||
$('.select2').select2({
|
||||
theme: 'bootstrap-5',
|
||||
width: $( this ).data( 'width' ) ? $( this ).data( 'width' ) : $( this ).hasClass( 'w-100' ) ? '100%' : 'style',
|
||||
placeholder: $( this ).data( 'placeholder' ),
|
||||
});
|
||||
});
|
6
public/styles/bootstrap.min.css
vendored
Normal file
6
public/styles/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
9
public/styles/fontawesome/all.min.css
vendored
Normal file
9
public/styles/fontawesome/all.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
3
public/styles/select2-bootstrap-5-theme.min.css
vendored
Normal file
3
public/styles/select2-bootstrap-5-theme.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/styles/select2.min.css
vendored
Normal file
1
public/styles/select2.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
3406
public/styles/style-bootstrap.css
Normal file
3406
public/styles/style-bootstrap.css
Normal file
File diff suppressed because it is too large
Load Diff
1
public/styles/sweetalert2.min.css
vendored
Normal file
1
public/styles/sweetalert2.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public/styles/themes/cerulean/bootstrap.min.css
vendored
Normal file
12
public/styles/themes/cerulean/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public/styles/themes/cosmo/bootstrap.min.css
vendored
Normal file
12
public/styles/themes/cosmo/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public/styles/themes/cyborg/bootstrap.min.css
vendored
Normal file
12
public/styles/themes/cyborg/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public/styles/themes/darkly/bootstrap.min.css
vendored
Normal file
12
public/styles/themes/darkly/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public/styles/themes/flatly/bootstrap.min.css
vendored
Normal file
12
public/styles/themes/flatly/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
public/styles/themes/journal/bootstrap.min.css
vendored
Normal file
12
public/styles/themes/journal/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -19223,4 +19223,4 @@
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
20814
views/default3.handlebars
Normal file
20814
views/default3.handlebars
Normal file
File diff suppressed because it is too large
Load Diff
@ -3133,7 +3133,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
else if (args.webrtcconfig && (typeof args.webrtcconfig == 'object')) { webRtcConfig = encodeURIComponent(JSON.stringify(args.webrtcconfig)).replace(/'/g, '%27'); }
|
||||
|
||||
// Refresh the session
|
||||
render(dbGetFunc.req, dbGetFunc.res, getRenderPage('default', dbGetFunc.req, domain), getRenderArgs({
|
||||
render(dbGetFunc.req, dbGetFunc.res, getRenderPage((domain.sitestyle == 3 ? 'default3' : 'default'), dbGetFunc.req, domain), getRenderArgs({
|
||||
authCookie: authCookie,
|
||||
authRelayCookie: authRelayCookie,
|
||||
viewmode: viewmode,
|
||||
|
Loading…
Reference in New Issue
Block a user