mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: set target to chrome60
This commit is contained in:
1 parent
b51620d634
commit
0d49c4d399
5 files changed
+17
-12
No files matched your search
+4
-4
@@ -32,12 +32,12 @@
|
||||
"devDependencies": {
|
||||
"@types/autocannon": "^7.9.0",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"@types/node": "^18.11.0",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node": "^18.11.2",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||
"@typescript-eslint/parser": "^5.40.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.1",
|
||||
"@typescript-eslint/parser": "^5.40.1",
|
||||
"autocannon": "^7.10.0",
|
||||
"cac": "^6.7.14",
|
||||
"cross-env": "^7.0.3",
|
||||
|
||||
@@ -73,7 +73,7 @@ export const Types: Types = {
|
||||
},
|
||||
(v) => {
|
||||
const d = v.split('-');
|
||||
assert(d.length === 3);
|
||||
if (d.length !== 3) return false;
|
||||
const st = `${d[0]}-${d[1].length === 1 ? '0' : ''}${d[1]}-${d[2].length === 1 ? '0' : ''}${d[2]}`;
|
||||
return moment(st).isValid();
|
||||
},
|
||||
@@ -86,7 +86,7 @@ export const Types: Types = {
|
||||
},
|
||||
(v) => {
|
||||
const t = v.split(':');
|
||||
assert(t.length === 2);
|
||||
if (t.length !== 2) return false;
|
||||
return moment(`2020-01-01 ${(t[0].length === 1 ? '0' : '') + t[0]}:${t[1].length === 1 ? '0' : ''}${t[1]}`).isValid();
|
||||
},
|
||||
],
|
||||
|
||||
@@ -156,7 +156,12 @@ env.addGlobal('formatSeconds', misc.formatSeconds);
|
||||
env.addGlobal('lib', global.Hydro.lib);
|
||||
env.addGlobal('model', global.Hydro.model);
|
||||
env.addGlobal('ui', global.Hydro.ui);
|
||||
env.addGlobal('isIE', (str) => (str ? (str.includes('MSIE') || str.includes('rv:11.0')) : false));
|
||||
env.addGlobal('isIE', (str) => {
|
||||
if (!str) return false;
|
||||
if (['MSIE', 'rv:11.0'].some((i) => str.includes(i))) return true;
|
||||
if (str.includes('Chrome/') && +str.split('Chrome/')[1].split('.')[0] < 60) return true;
|
||||
return false;
|
||||
});
|
||||
env.addGlobal('set', (obj, key, val) => {
|
||||
if (val !== undefined) obj[key] = val;
|
||||
else Object.assign(obj, key);
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
loader: 'esbuild-loader',
|
||||
options: {
|
||||
loader: 'tsx',
|
||||
target: 'chrome80',
|
||||
target: 'chrome60',
|
||||
sourcemap: true,
|
||||
},
|
||||
};
|
||||
@@ -221,7 +221,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
minifyIdentifiers: true,
|
||||
treeShaking: true,
|
||||
target: [
|
||||
'chrome80',
|
||||
'chrome60',
|
||||
],
|
||||
exclude: [/mathmaps/, /\.min\.js$/],
|
||||
})],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.42.3",
|
||||
"version": "4.42.4",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "index.ts",
|
||||
@@ -10,8 +10,8 @@
|
||||
"lint": "eslint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "4.11.3",
|
||||
"@blueprintjs/select": "4.8.3",
|
||||
"@blueprintjs/core": "4.11.4",
|
||||
"@blueprintjs/select": "4.8.4",
|
||||
"@fontsource/dm-mono": "^4.5.10",
|
||||
"@fontsource/fira-code": "^4.5.12",
|
||||
"@fontsource/inconsolata": "^4.5.9",
|
||||
|
||||
Reference in new issue
Block a user