mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: remove deprecated util global
This commit is contained in:
23 files changed
+9
-80
No files matched your search
@@ -204,16 +204,3 @@ export async function setTemporaryViewTransitionNames(entries, vtPromise: Promis
|
||||
export function getTheme(): 'dark' | 'light' {
|
||||
return ['light', 'dark'].includes(UserContext.theme) ? UserContext.theme : 'light';
|
||||
}
|
||||
|
||||
Object.assign(window.Hydro.utils, {
|
||||
i18n,
|
||||
rawHtml,
|
||||
substitute,
|
||||
secureRandomString,
|
||||
request,
|
||||
tpl,
|
||||
delay,
|
||||
zIndexManager,
|
||||
withTransitionCallback,
|
||||
setTemporaryViewTransitionNames,
|
||||
});
|
||||
@@ -102,4 +102,3 @@ const Base64 = {
|
||||
};
|
||||
|
||||
export default Base64;
|
||||
window.Hydro.utils.base64 = Base64;
|
||||
@@ -71,11 +71,3 @@ export { default as loadReactRedux } from './loadReactRedux';
|
||||
export * as mediaQuery from './mediaQuery';
|
||||
export { default as pjax } from './pjax';
|
||||
export * from './slide';
|
||||
|
||||
const zip = { createZipStream, createZipBlob };
|
||||
Object.assign(window.Hydro.utils, {
|
||||
zip,
|
||||
pipeStream,
|
||||
mongoId,
|
||||
emulateAnchorClick,
|
||||
});
|
||||
@@ -30,5 +30,3 @@ export default async function loadReactRedux<S, A extends Action = UnknownAction
|
||||
store,
|
||||
};
|
||||
}
|
||||
|
||||
window.Hydro.utils.loadReactRedux = loadReactRedux;
|
||||
@@ -11,5 +11,3 @@ export function isBelow(width) {
|
||||
}
|
||||
return window.innerWidth <= width;
|
||||
}
|
||||
|
||||
Object.assign(window.Hydro.utils, { isAbove, isBelow });
|
||||
@@ -146,4 +146,3 @@ function handlePopState(ev) {
|
||||
$(window).on('popstate', handlePopState);
|
||||
|
||||
export default pjax;
|
||||
window.Hydro.utils.pjax = pjax;
|
||||
@@ -55,5 +55,3 @@ export async function slideUp($element, duration, fromCss = {}, toCss = {}) {
|
||||
display: 'none',
|
||||
});
|
||||
}
|
||||
|
||||
window.Hydro.utils.slide = { slideUp, slideDown };
|
||||
Reference in new issue
Block a user