Import jstz.min.js from jstimezonedetect 1.0.7

In Nextcloud 22 jstimezonedetect was removed from the server bundle
(https://github.com/nextcloud/server/pull/25850), so now each app that
uses it needs to ship its own copy. For simplicity, as the app does not
currently use webpack or NPM, the minified file was just added to
"js/vendor".

"jstz.min.js" was copied from
ddc9e04034/dist/jstz.min.js
(which is the same as the one included in
https://registry.npmjs.org/jstimezonedetect/-/jstimezonedetect-1.0.7.tgz).

jstimezonedetect is licenced under the MIT licence.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2021-12-30 11:38:32 +01:00 committed by blizzz (Rebase PR Action)
parent 18fa8a11f2
commit 7e2bcefac5
2 changed files with 3 additions and 0 deletions

2
js/vendor/jstz.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -84,6 +84,7 @@ class Application extends App {
$timezoneDB = $config->getUserValue($user->getUID(), 'core', 'timezone', '');
if ($timezoneDB === '' || !$session->exists('timezone')) {
\OCP\Util::addScript('user_saml', 'vendor/jstz.min');
\OCP\Util::addScript('user_saml', 'timezone');
}
});