repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/dateUtil.ts | frontend/src/utils/dateUtil.ts | /**
* Independent time operation tool to facilitate subsequent switch to dayjs
*/
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime'
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
const DATE_FORMAT = 'YYYY-MM-DD';
// 使用中文语言包。固定格式
// dayjs.locale('zh-cn')
// 使用对时间插件插件。固定格式dayjs.extend(插件... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/props.ts | frontend/src/utils/props.ts | // copy from element-plus
import { warn } from 'vue';
import { isObject } from '@vue/shared';
import { fromPairs } from 'lodash-es';
import type { ExtractPropTypes, PropType } from '@vue/runtime-core';
import type { Mutable } from './types';
const wrapperKey = Symbol();
export type PropWrapper<T> = { [wrapperKey]: T ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/types.ts | frontend/src/utils/types.ts | // copy from element-plus
import type { CSSProperties, Plugin } from 'vue';
type OptionalKeys<T extends Record<string, unknown>> = {
[K in keyof T]: T extends Record<K, T[K]> ? never : K;
}[keyof T];
type RequiredKeys<T extends Record<string, unknown>> = Exclude<keyof T, OptionalKeys<T>>;
type MonoArgEmitter<T, K... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/index.ts | frontend/src/utils/index.ts | import type { RouteLocationNormalized, RouteRecordNormalized } from 'vue-router';
import type { App, Plugin } from 'vue';
import { unref } from 'vue';
import { isObject } from '/@/utils/is';
import { cloneDeep } from 'lodash-es';
export const noop = () => {};
/**
* @description: Set ui mount node
*/
export functi... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/auth/index.ts | frontend/src/utils/auth/index.ts | import { Persistent, BasicKeys } from '/@/utils/cache/persistent';
import { CacheTypeEnum } from '/@/enums/cacheEnum';
import projectSetting from '/@/settings/projectSetting';
import { TOKEN_KEY } from '/@/enums/cacheEnum';
const { permissionCacheType } = projectSetting;
const isLocal = permissionCacheType === CacheTy... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/file/download.ts | frontend/src/utils/file/download.ts | import { openWindow } from '..';
import { dataURLtoBlob, urlToBase64 } from './base64Conver';
/**
* Download online pictures
* @param url
* @param filename
* @param mime
* @param bom
*/
export function downloadByOnlineUrl(url: string, filename: string, mime?: string, bom?: BlobPart) {
urlToBase64(url).then((ba... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/file/base64Conver.ts | frontend/src/utils/file/base64Conver.ts | /**
* @description: base64 to blob
*/
export function dataURLtoBlob(base64Buf: string): Blob {
const arr = base64Buf.split(',');
const typeItem = arr[0];
const mime = typeItem.match(/:(.*?);/)![1];
const bstr = window.atob(arr[1]);
let n = bstr.length;
const u8arr = new Uint8Array(n);
while (n--) {
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/cache/storageCache.ts | frontend/src/utils/cache/storageCache.ts | import { cacheCipher } from '/@/settings/encryptionSetting';
import type { EncryptionParams } from '/@/utils/cipher';
import { AesEncryption } from '/@/utils/cipher';
import { isNullOrUnDef } from '/@/utils/is';
export interface CreateStorageParams extends EncryptionParams {
prefixKey: string;
storage: Storage;
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/cache/memory.ts | frontend/src/utils/cache/memory.ts | export interface Cache<V = any> {
value?: V;
timeoutId?: ReturnType<typeof setTimeout>;
time?: number;
alive?: number;
}
const NOT_ALIVE = 0;
export class Memory<T = any, V = any> {
private cache: { [key in keyof T]?: Cache<V> } = {};
private alive: number;
constructor(alive = NOT_ALIVE) {
// Unit ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/cache/persistent.ts | frontend/src/utils/cache/persistent.ts | import type { ProjectConfig } from '/#/config';
import type { RouteLocationNormalized } from 'vue-router';
import { createLocalStorage, createSessionStorage } from '/@/utils/cache';
import { Memory } from './memory';
import {
TOKEN_KEY,
ROLES_KEY,
LOCK_INFO_KEY,
PROJ_CFG_KEY,
APP_LOCAL_CACHE_KEY,
APP_SESSI... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/cache/index.ts | frontend/src/utils/cache/index.ts | import { getStorageShortName } from '/@/utils/env';
import { createStorage as create, CreateStorageParams } from './storageCache';
import { enableStorageEncryption } from '/@/settings/encryptionSetting';
import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting';
export type Options = Partial<CreateStoragePara... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/event/index.ts | frontend/src/utils/event/index.ts | import ResizeObserver from 'resize-observer-polyfill';
const isServer = typeof window === 'undefined';
/* istanbul ignore next */
function resizeHandler(entries: any[]) {
for (const entry of entries) {
const listeners = entry.target.__resizeListeners__ || [];
if (listeners.length) {
listeners.forEach(... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/helper/tsxHelper.tsx | frontend/src/utils/helper/tsxHelper.tsx | import { Slots } from 'vue';
import { isFunction } from '/@/utils/is';
/**
* @description: Get slot to prevent empty error
*/
export function getSlot(slots: Slots, slot = 'default', data?: any) {
if (!slots || !Reflect.has(slots, slot)) {
return null;
}
if (!isFunction(slots[slot])) {
console.error(`$... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/helper/treeHelper.ts | frontend/src/utils/helper/treeHelper.ts | interface TreeHelperConfig {
id: string;
children: string;
pid: string;
}
// 默认配置
const DEFAULT_CONFIG: TreeHelperConfig = {
id: 'id',
children: 'children',
pid: 'pid',
};
// 获取配置。 Object.assign 从一个或多个源对象复制到目标对象
const getConfig = (config: Partial<TreeHelperConfig>) => Object.assign({}, DEFAULT_CONFIG, co... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/lib/echarts.ts | frontend/src/utils/lib/echarts.ts | import * as echarts from 'echarts/core';
import {
BarChart,
LineChart,
PieChart,
MapChart,
PictorialBarChart,
RadarChart,
ScatterChart,
} from 'echarts/charts';
import {
TitleComponent,
TooltipComponent,
GridComponent,
PolarComponent,
AriaComponent,
ParallelComponent,
LegendComponent,
Ra... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/utils/factory/createAsyncComponent.tsx | frontend/src/utils/factory/createAsyncComponent.tsx | import {
defineAsyncComponent,
// FunctionalComponent, CSSProperties
} from 'vue';
import { Spin } from 'ant-design-vue';
import { noop } from '/@/utils';
// const Loading: FunctionalComponent<{ size: 'small' | 'default' | 'large' }> = (props) => {
// const style: CSSProperties = {
// position: 'absolute',
/... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/connectionsPinger.ts | frontend/src/api/connectionsPinger.ts | import {watch} from 'vue'
import {get} from 'lodash-es'
import {storeToRefs} from 'pinia'
import {apiCall} from '/@/second/utility/api'
import {useBootstrapStore} from "/@/store/modules/bootstrap"
let openedConnectionsHandle: null | number = null
let currentDatabaseHandle: null | number = null
const doServerPing = va... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/simpleApis.ts | frontend/src/api/simpleApis.ts | import {apiCall} from '/@/second/utility/api'
/**
* @description connection
*/
export async function connectionTestApi(params) {
return await apiCall('bridge.Connections.Test', params)
}
export async function connectionSaveApi(params) {
return await apiCall('bridge.Connections.Save', params)
}
export async fun... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/recentDatabaseSwitch.ts | frontend/src/api/recentDatabaseSwitch.ts | import {watch} from 'vue'
import {storeToRefs} from 'pinia'
import {compact} from 'lodash-es'
import {useLocaleStore} from '/@/store/modules/locale'
import {useBootstrapStore} from '/@/store/modules/bootstrap'
export function subscribeRecentDatabaseSwitch() {
const bootstrap = useBootstrapStore()
const {currentDat... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/bridge.ts | frontend/src/api/bridge.ts | import {isReactive, isRef, ref, Ref} from 'vue'
import {isArray} from 'lodash-es'
import {isFunction} from '/@/utils/is'
import stableStringify from 'json-stable-stringify'
import {extendDatabaseInfo} from '/@/second/keeper-tools'
import {setLocalStorage} from '/@/second/utility/storageCache'
import {EventsOn} from '/@... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/event.ts | frontend/src/api/event.ts | import {storeToRefs} from 'pinia'
import {EventsOn, EventsEmit}from '/@/wailsjs/runtime/runtime'
import {useBootstrapStore} from '/@/store/modules/bootstrap'
import {findEngineDriver} from '/@/second/keeper-tools'
import {useClusterApiStore} from '/@/store/modules/clusterApi'
import {dumpSqlSelect} from '/@/second/keep... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/changeCurrentDbByTab.ts | frontend/src/api/changeCurrentDbByTab.ts | import {useBootstrapStore} from '/@/store/modules/bootstrap'
import {useLocaleStore} from '/@/store/modules/locale'
import {callWhenAppLoaded} from '/@/second/utility/appLoadManager'
import {storeToRefs} from 'pinia'
import {watch} from 'vue'
import {getConnectionInfo} from './bridge'
import {IPinnedDatabasesItem} from... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/api/sys/model/uploadModel.ts | frontend/src/api/sys/model/uploadModel.ts | export interface UploadApiResult {
message: string;
code: number;
url: string;
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/wailsjs/runtime/runtime.d.ts | frontend/src/wailsjs/runtime/runtime.d.ts | /*
_ __ _ __
| | / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__ )
|__/|__/\__,_/_/_/____/
The electron alternative for Go
(c) Lea Anthony 2019-present
*/
export interface Position {
x: number;
y: number;
}
export interface Size {
w: number;
h: number;
}
export inte... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/helper.ts | frontend/src/locales/helper.ts | import type { LocaleType } from '/#/config';
import { set } from 'lodash-es';
export const loadLocalePool: LocaleType[] = [];
export function setHtmlPageLang(locale: LocaleType) {
document.querySelector('html')?.setAttribute('lang', locale);
}
export function setLoadLocalePool(cb: (loadLocalePool: LocaleType[]) =... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/setupI18n.ts | frontend/src/locales/setupI18n.ts | import type { App } from 'vue';
import type { I18n, I18nOptions } from 'vue-i18n';
import { createI18n } from 'vue-i18n';
import { setHtmlPageLang, setLoadLocalePool } from './helper';
import { localeSetting } from '/@/settings/localeSetting';
import { useLocaleStoreWithOut } from '/@/store/modules/locale';
const { f... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/useLocale.ts | frontend/src/locales/useLocale.ts | /**
* Multi-language related operations
*/
import type { LocaleType } from '/#/config';
import { i18n } from './setupI18n';
import { useLocaleStoreWithOut } from '/@/store/modules/locale';
import { unref, computed } from 'vue';
import { loadLocalePool, setHtmlPageLang } from './helper';
interface LangModule {
mes... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en.ts | frontend/src/locales/lang/en.ts | import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/en_US';
const modules = import.meta.globEager('./en/**/*.ts');
export default {
message: {
...genMessage(modules, 'en'),
antdLocale,
},
dateLocale: null,
dateLocaleName: 'en',
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh_CN.ts | frontend/src/locales/lang/zh_CN.ts | import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/zh_CN';
const modules = import.meta.globEager('./zh-CN/**/*.ts');
export default {
message: {
...genMessage(modules, 'zh-CN'),
antdLocale,
},
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/sys.ts | frontend/src/locales/lang/en/sys.ts | export default {
api: {
operationSuccess: 'Operation Success',
operationFailed: 'Operation failed',
errorTip: 'Error Tip',
successTip: 'Success Tip',
errorMessage: 'The operation failed, the system is abnormal!',
timeoutMessage: 'Login timed out, please log in again!',
apiTimeoutMessage: '... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/common.ts | frontend/src/locales/lang/en/common.ts | export default {
okText: 'OK',
closeText: 'Close',
cancelText: 'Cancel',
loadingText: 'Loading...',
saveText: 'Save',
delText: 'Delete',
resetText: 'Reset',
searchText: 'Search',
queryText: 'Search',
inputText: 'Please enter',
chooseText: 'Please choose',
redo: 'Refresh',
back: 'Back',
li... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/layout.ts | frontend/src/locales/lang/en/layout.ts | export default {
footer: { onlinePreview: 'Preview', onlineDocument: 'Document' },
header: {
// user dropdown
dropdownItemDoc: 'Document',
dropdownItemLoginOut: 'Log Out',
tooltipErrorLog: 'Error log',
tooltipLock: 'Lock screen',
tooltipNotify: 'Notification',
tooltipEntryFull: 'Full S... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/component.ts | frontend/src/locales/lang/en/component.ts | export default {
app: {
searchNotData: 'No search results yet',
toSearch: 'to search',
toNavigate: 'to navigate',
},
countdown: {
normalText: 'Get SMS code',
sendText: 'Reacquire in {0}s',
},
cropper: {
selectImage: 'Select Image',
uploadSuccess: 'Uploaded success!',
modalTitle... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/routes/dashboard.ts | frontend/src/locales/lang/en/routes/dashboard.ts | export default {
dashboard: 'Dashboard',
about: 'About',
workbench: 'Workbench',
analysis: 'Analysis',
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/routes/basic.ts | frontend/src/locales/lang/en/routes/basic.ts | export default {
login: 'Login',
errorLogList: 'Error Log',
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/en/routes/demo.ts | frontend/src/locales/lang/en/routes/demo.ts | export default {
charts: {
baiduMap: 'Baidu map',
aMap: 'A map',
googleMap: 'Google map',
charts: 'Chart',
map: 'Map',
line: 'Line',
pie: 'Pie',
},
comp: {
comp: 'Component',
basic: 'Basic',
transition: 'Animation',
countTo: 'Count To',
scroll: 'Scroll',
scroll... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/sys.ts | frontend/src/locales/lang/zh-CN/sys.ts | export default {
api: {
operationSuccess: '操作成功',
operationFailed: '操作失败',
errorTip: '错误提示',
successTip: '成功提示',
errorMessage: '操作失败,系统异常!',
timeoutMessage: '登录超时,请重新登录!',
apiTimeoutMessage: '接口请求超时,请刷新页面重试!',
apiRequestFailed: '请求出错,请稍候重试',
networkException: '网络异常',
networkExc... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/common.ts | frontend/src/locales/lang/zh-CN/common.ts | export default {
okText: '确认',
closeText: '关闭',
cancelText: '取消',
loadingText: '加载中...',
saveText: '保存',
delText: '删除',
resetText: '重置',
searchText: '搜索',
queryText: '查询',
inputText: '请输入',
chooseText: '请选择',
redo: '刷新',
back: '返回',
light: '亮色主题',
dark: '黑暗主题',
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/layout.ts | frontend/src/locales/lang/zh-CN/layout.ts | export default {
footer: { onlinePreview: '在线预览', onlineDocument: '在线文档' },
header: {
// user dropdown
dropdownItemDoc: '文档',
dropdownItemLoginOut: '退出系统',
// tooltip
tooltipErrorLog: '错误日志',
tooltipLock: '锁定屏幕',
tooltipNotify: '消息通知',
tooltipEntryFull: '全屏',
tooltipExitFull: '... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/component.ts | frontend/src/locales/lang/zh-CN/component.ts | export default {
app: {
searchNotData: '暂无搜索结果',
toSearch: '确认',
toNavigate: '切换',
},
countdown: {
normalText: '获取验证码',
sendText: '{0}秒后重新获取',
},
cropper: {
selectImage: '选择图片',
uploadSuccess: '上传成功',
modalTitle: '头像上传',
okText: '确认并上传',
btn_reset: '重置',
btn_rotate_... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/routes/dashboard.ts | frontend/src/locales/lang/zh-CN/routes/dashboard.ts | export default {
dashboard: 'Dashboard',
about: '关于',
workbench: '工作台',
analysis: '分析页',
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/routes/basic.ts | frontend/src/locales/lang/zh-CN/routes/basic.ts | export default {
login: '登录',
errorLogList: '错误日志列表',
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/routes/demo.ts | frontend/src/locales/lang/zh-CN/routes/demo.ts | export default {
charts: {
baiduMap: '百度地图',
aMap: '高德地图',
googleMap: '谷歌地图',
charts: '图表',
map: '地图',
line: '折线图',
pie: '饼图',
},
comp: {
comp: '组件',
basic: '基础组件',
transition: '动画组件',
countTo: '数字动画',
scroll: '滚动组件',
scrollBasic: '基础滚动',
scrollAction: '滚动函... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/locales/lang/zh-CN/antdLocale/DatePicker.ts | frontend/src/locales/lang/zh-CN/antdLocale/DatePicker.ts | export default {
lang: {
shortWeekDays: ['一', '二', '三', '四', '五', '六', '日'],
shortMonths: [
'1月',
'2月',
'3月',
'4月',
'5月',
'6月',
'7月',
'8月',
'9月',
'10月',
'11月',
'12月',
],
},
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/initAppConfig.ts | frontend/src/logics/initAppConfig.ts | /**
* Application configuration
*/
import type {ProjectConfig} from '/#/config';
import {PROJ_CFG_KEY} from '/@/enums/cacheEnum';
import projectSetting from '/@/settings/projectSetting';
import {updateDarkTheme} from '/@/logics/theme/dark';
import {useAppStore} from '/@/store/modules/app';
import {getCommonStoragePre... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/mitt/routeChange.ts | frontend/src/logics/mitt/routeChange.ts | /**
* Used to monitor routing changes to change the status of menus and tabs. There is no need to monitor the route, because the route status change is affected by the page rendering time, which will be slow
*/
import mitt from '/@/utils/mitt';
import type { RouteLocationNormalized } from 'vue-router';
import { getR... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/theme/dark.ts | frontend/src/logics/theme/dark.ts | import {darkCssIsReady, loadDarkThemeCss} from 'vite-plugin-theme/es/client';
import {addClass, hasClass, removeClass} from '/@/utils/domUtils';
export async function updateDarkTheme(mode: string | null = 'light') {
const htmlRoot = document.getElementById('htmlRoot');
if (!htmlRoot) {
return;
}
const hasD... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/theme/updateGrayMode.ts | frontend/src/logics/theme/updateGrayMode.ts | import { toggleClass } from './util';
/**
* Change project gray mode status
* @param gray
*/
export function updateGrayMode(gray: boolean) {
toggleClass(gray, 'gray-mode', document.documentElement);
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/theme/util.ts | frontend/src/logics/theme/util.ts | const docEle = document.documentElement;
export function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
const targetEl = target || document.body;
let { className } = targetEl;
className = className.replace(clsName, '');
targetEl.className = flag ? `${className} ${clsName} ` : className;
}
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/theme/updateBackground.ts | frontend/src/logics/theme/updateBackground.ts | import { colorIsDark, lighten, darken } from '/@/utils/color';
import { useAppStore } from '/@/store/modules/app';
import { ThemeEnum } from '/@/enums/appEnum';
import { setCssVar } from './util';
const HEADER_BG_COLOR_VAR = '--header-bg-color';
const HEADER_BG_HOVER_COLOR_VAR = '--header-bg-hover-color';
const HEADER... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/theme/updateColorWeak.ts | frontend/src/logics/theme/updateColorWeak.ts | import { toggleClass } from './util';
/**
* Change the status of the project's color weakness mode
* @param colorWeak
*/
export function updateColorWeak(colorWeak: boolean) {
toggleClass(colorWeak, 'color-weak', document.documentElement);
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/logics/theme/index.ts | frontend/src/logics/theme/index.ts | import { getThemeColors, generateColors } from '../../../build/config/themeConfig';
import { replaceStyleVariables } from 'vite-plugin-theme/es/client';
import { mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme/es/colorUtils';
export async function changeTheme(color: string) {
const colors = generateColor... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/router/constant.ts | frontend/src/router/constant.ts | export const REDIRECT_NAME = 'Redirect';
/**
* @description: default layout
*/
export const LAYOUT = () => import('/@/layouts/default/index.vue');
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/router/types.ts | frontend/src/router/types.ts | import type { RouteRecordRaw, RouteMeta } from 'vue-router';
import { RoleEnum } from '/@/enums/roleEnum';
import { defineComponent } from 'vue';
export type Component<T = any> =
| ReturnType<typeof defineComponent>
| (() => Promise<typeof import('*.vue')>)
| (() => Promise<T>);
// @ts-ignore
export interface A... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/router/index.ts | frontend/src/router/index.ts | import type { RouteRecordRaw } from 'vue-router';
import type { App } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';
import { basicRoutes } from './routes';
// 白名单应该包含基本静态路由
const WHITE_NAME_LIST: string[] = [];
const getRouteNames = (array: any[]) =>
array.forEach((item) => {
WHITE_NA... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/router/routes/index.ts | frontend/src/router/routes/index.ts | import type { AppRouteRecordRaw } from '/@/router/types';
import {LAYOUT} from '../constant'
// 根路由
export const RootRoute: AppRouteRecordRaw = {
path: '/',
name: 'Root',
component: LAYOUT,
meta: {
title: 'Root',
},
};
// Basic routing without permission
// 未经许可的基本路由
export const basicRoutes = [
RootR... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/router/helper/menuHelper.ts | frontend/src/router/helper/menuHelper.ts | import type { MenuModule, Menu } from '/@/router/types';
import { findPath } from '/@/utils/helper/treeHelper';
import { isUrl } from '/@/utils/is';
import { RouteParams } from 'vue-router';
import { toRaw } from 'vue';
export function getAllParentPath<T = Recordable>(treeData: T[], path: string) {
const menuList = ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/router/menus/index.ts | frontend/src/router/menus/index.ts | import type { Menu, MenuModule } from '/@/router/types';
import type { RouteRecordNormalized } from 'vue-router';
import { useAppStoreWithOut } from '/@/store/modules/app';
import { transformMenuModule, getAllParentPath } from '/@/router/helper/menuHelper';
import { filter } from '/@/utils/helper/treeHelper';
import {... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/loading.ts | frontend/src/directives/loading.ts | import { createLoading } from '/@/components/Loading';
import type { Directive, App } from 'vue';
const loadingDirective: Directive = {
mounted(el, binding) {
const tip = el.getAttribute('loading-tip');
const background = el.getAttribute('loading-background');
const size = el.getAttribute('loading-size')... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/resizeObserver.ts | frontend/src/directives/resizeObserver.ts | import type {App, Directive} from 'vue'
import ResizeObserver from 'resize-observer-polyfill'
const resizeObserver: Directive = {
// 在绑定元素的 attribute 或事件监听器被应用之前调用, 在指令需要附加须要在普通的 v-on 事件监听器前调用的事件监听器时,这很有用
created() {
},
// 当指令第一次绑定到元素并且在挂载父组件之前调用
beforeMount() {
},
mounted(node, bindings, ...arg) {
n... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/clickOutside.ts | frontend/src/directives/clickOutside.ts | import { on } from '/@/utils/domUtils';
import { isServer } from '/@/utils/is';
import type { ComponentPublicInstance, DirectiveBinding, ObjectDirective } from 'vue';
type DocumentHandler = <T extends MouseEvent>(mouseup: T, mousedown: T) => void;
type FlushList = Map<
HTMLElement,
{
documentHandler: Document... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/repeatClick.ts | frontend/src/directives/repeatClick.ts | /**
* Prevent repeated clicks
* @Example v-repeat-click="()=>{}"
*/
import { on, once } from '/@/utils/domUtils';
import type { Directive, DirectiveBinding } from 'vue';
const repeatDirective: Directive = {
beforeMount(el: Element, binding: DirectiveBinding<any>) {
let interval: Nullable<IntervalHandle> = nul... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/index.ts | frontend/src/directives/index.ts | /**
* Configure and register global directives
*/
import type { App } from 'vue';
import { setupPermissionDirective } from './permission';
import { setupLoadingDirective } from './loading';
import { setupSplitterDrag } from './splitterDrag';
import { setupResizeObserver } from './resizeObserver';
export function set... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/permission.ts | frontend/src/directives/permission.ts | /**
* Global authority directive
* Used for fine-grained control of component permissions
* @Example v-auth="RoleEnum.TEST"
*/
import type { App, Directive, DirectiveBinding } from 'vue';
import { usePermission } from '/@/hooks/web/usePermission';
function isAuth(el: Element, binding: any) {
const { hasPermissi... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/splitterDrag.ts | frontend/src/directives/splitterDrag.ts | import type {App, Directive} from 'vue'
const splitterDrag: Directive = {
// 在绑定元素的 attribute 或事件监听器被应用之前调用, 在指令需要附加须要在普通的 v-on 事件监听器前调用的事件监听器时,这很有用
created() {
},
// 当指令第一次绑定到元素并且在挂载父组件之前调用
beforeMount() {
},
mounted(node, bindings, ...arg) {
node.resizeStart = null
const {value} = bindings
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/directives/ripple/index.ts | frontend/src/directives/ripple/index.ts | import type { Directive } from 'vue';
import './index.less';
export interface RippleOptions {
event: string;
transition: number;
}
export interface RippleProto {
background?: string;
zIndex?: string;
}
export type EventType = Event & MouseEvent & TouchEvent;
const options: RippleOptions = {
event: 'mousedo... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/roleEnum.ts | frontend/src/enums/roleEnum.ts | export enum RoleEnum {
// super admin
SUPER = 'super',
// tester
TEST = 'test',
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/pageEnum.ts | frontend/src/enums/pageEnum.ts | export enum PageEnum {
// basic home path
BASE_HOME = '/dashboard',
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/appEnum.ts | frontend/src/enums/appEnum.ts | export const SIDE_BAR_MINI_WIDTH = 48;
export const SIDE_BAR_SHOW_TIT_MINI_WIDTH = 80;
export enum ContentEnum {
// auto width
FULL = 'full',
// fixed width
FIXED = 'fixed',
}
// menu theme enum
export enum ThemeEnum {
DARK = 'dark',
LIGHT = 'light',
}
export enum SettingButtonPositionEnum {
AUTO = 'au... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/exceptionEnum.ts | frontend/src/enums/exceptionEnum.ts | /**
* @description: Exception related enumeration
*/
export enum ExceptionEnum {
// page not access
PAGE_NOT_ACCESS = 403,
// page not found
PAGE_NOT_FOUND = 404,
// error
ERROR = 500,
// net work error
NET_WORK_ERROR = 10000,
// No data on the page. In fact, it is not an exception page
PAGE_N... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/breakpointEnum.ts | frontend/src/enums/breakpointEnum.ts | export enum sizeEnum {
XS = 'XS',
SM = 'SM',
MD = 'MD',
LG = 'LG',
XL = 'XL',
XXL = 'XXL',
}
export enum screenEnum {
XS = 480,
SM = 576,
MD = 768,
LG = 992,
XL = 1200,
XXL = 1600,
}
const screenMap = new Map<sizeEnum, number>();
screenMap.set(sizeEnum.XS, screenEnum.XS);
screenMap.set(sizeEn... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/cacheEnum.ts | frontend/src/enums/cacheEnum.ts | // token key
export const TOKEN_KEY = 'TOKEN__';
export const LOCALE_KEY = 'LOCALE__';
// user info key
export const USER_INFO_KEY = 'USER__INFO__';
// role info key
export const ROLES_KEY = 'ROLES__KEY__';
// project config key
export const PROJ_CFG_KEY = 'PROJ__CFG__KEY__';
// lock info
export const LOCK_INFO_KE... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/sizeEnum.ts | frontend/src/enums/sizeEnum.ts | export enum SizeEnum {
DEFAULT = 'default',
SMALL = 'small',
LARGE = 'large',
}
export enum SizeNumberEnum {
DEFAULT = 48,
SMALL = 16,
LARGE = 64,
}
export const sizeMap: Map<SizeEnum, SizeNumberEnum> = (() => {
const map = new Map<SizeEnum, SizeNumberEnum>();
map.set(SizeEnum.DEFAULT, SizeNumberEnum.... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/enums/menuEnum.ts | frontend/src/enums/menuEnum.ts | /**
* @description: menu type
*/
export enum MenuTypeEnum {
// left menu
SIDEBAR = 'sidebar',
MIX_SIDEBAR = 'mix-sidebar',
// mixin menu
MIX = 'mix',
// top menu
TOP_MENU = 'top-menu',
}
// 折叠触发器位置
export enum TriggerEnum {
// 不显示
NONE = 'NONE',
// 菜单底部
FOOTER = 'FOOTER',
// 头部
HEADER = 'H... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/constant.ts | frontend/build/constant.ts | /**
* The name of the configuration file entered in the production environment
*/
export const GLOB_CONFIG_FILE_NAME = '_app.config.js';
export const OUTPUT_DIR = 'dist';
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/utils.ts | frontend/build/utils.ts | import fs from 'fs';
import path from 'path';
import dotenv from 'dotenv';
export function isDevFn(mode: string): boolean {
return mode === 'development';
}
export function isProdFn(mode: string): boolean {
return mode === 'production';
}
/**
* Whether to generate package preview
*/
export function isReportMod... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/getConfigFileName.ts | frontend/build/getConfigFileName.ts | /**
* Get the configuration file variable name
* @param env
*/
export const getConfigFileName = (env: Record<string, any>) => {
return `__PRODUCTION__${env.VITE_GLOB_APP_SHORT_NAME || '__APP'}__CONF__`
.toUpperCase()
.replace(/\s/g, '');
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/proxy.ts | frontend/build/vite/proxy.ts | /**
* Used to parse the .env.development proxy configuration
*/
import type { ProxyOptions } from 'vite';
type ProxyItem = [string, string];
type ProxyList = ProxyItem[];
type ProxyTargetList = Record<string, ProxyOptions>;
const httpsRE = /^https:\/\//;
/**
* Generate proxy
* @param list
*/
export function c... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/svgSprite.ts | frontend/build/vite/plugin/svgSprite.ts | /**
* Vite Plugin for fast creating SVG sprites.
* https://github.com/anncwb/vite-plugin-svg-icons
*/
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import path from 'path';
export function configSvgIconsPlugin(isBuild: boolean) {
const svgIconsPlugin = createSvgIconsPlugin({
iconDirs: [path.... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/imagemin.ts | frontend/build/vite/plugin/imagemin.ts | // Image resource files used to compress the output of the production environment
// https://github.com/anncwb/vite-plugin-imagemin
import viteImagemin from 'vite-plugin-imagemin';
export function configImageminPlugin() {
const plugin = viteImagemin({
gifsicle: {
optimizationLevel: 7,
interlaced: fal... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/visualizer.ts | frontend/build/vite/plugin/visualizer.ts | /**
* Package file containers analysis
*/
import visualizer from 'rollup-plugin-visualizer';
import { isReportMode } from '../../utils';
export function configVisualizerConfig() {
if (isReportMode()) {
return visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gz... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/html.ts | frontend/build/vite/plugin/html.ts | /**
* Plugin to minimize and use ejs template syntax in index.html.
* https://github.com/anncwb/vite-plugin-html
*/
import type { PluginOption } from 'vite';
import { createHtmlPlugin } from 'vite-plugin-html';
export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
const { VITE_GLOB_APP_TITLE } = env;... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/compress.ts | frontend/build/vite/plugin/compress.ts | /**
* Used to package and output gzip. Note that this does not work properly in Vite, the specific reason is still being investigated
* https://github.com/anncwb/vite-plugin-compression
*/
import type { PluginOption } from 'vite';
import compressPlugin from 'vite-plugin-compression';
export function configCompressP... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/index.ts | frontend/build/vite/plugin/index.ts | import { PluginOption } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import legacy from '@vitejs/plugin-legacy';
import purgeIcons from 'vite-plugin-purge-icons';
import windiCSS from 'vite-plugin-windicss';
import VitePluginCertificate from 'vite-plugin-mkcert';
impor... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/theme.ts | frontend/build/vite/plugin/theme.ts | /**
* Vite plugin for website theme color switching
* https://github.com/anncwb/vite-plugin-theme
*/
import type { PluginOption } from 'vite';
import path from 'path';
import {
viteThemePlugin,
antdDarkThemePlugin,
mixLighten,
mixDarken,
tinycolor,
} from 'vite-plugin-theme';
import { getThemeColors, gener... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/vite/plugin/styleImport.ts | frontend/build/vite/plugin/styleImport.ts | /**
* Introduces component library styles on demand.
* https://github.com/anncwb/vite-plugin-style-import
*/
import { createStyleImportPlugin } from 'vite-plugin-style-import';
export function configStyleImportPlugin(_isBuild: boolean) {
if (!_isBuild) {
return [];
}
const styleImportPlugin = createStyle... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/generate/generateModifyVars.ts | frontend/build/generate/generateModifyVars.ts | import { generateAntColors, primaryColor } from '../config/themeConfig';
import { getThemeVariables } from 'ant-design-vue/dist/theme';
import { resolve } from 'path';
/**
* less global variable
*/
export function generateModifyVars(dark = false) {
const palettes = generateAntColors(primaryColor);
const primary ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/generate/icon/index.ts | frontend/build/generate/icon/index.ts | import path from 'path';
import fs from 'fs-extra';
import inquirer from 'inquirer';
import colors from 'picocolors';
import pkg from '../../../package.json';
async function generateIcon() {
const dir = path.resolve(process.cwd(), 'node_modules/@iconify/json');
const raw = await fs.readJSON(path.join(dir, 'collec... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/script/postBuild.ts | frontend/build/script/postBuild.ts | // #!/usr/bin/env node
import { runBuildConfig } from './buildConf';
import colors from 'picocolors';
import pkg from '../../package.json';
export const runBuild = async () => {
try {
const argvList = process.argv.splice(2);
// Generate configuration file
if (!argvList.includes('disabled-config')) {
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/script/buildConf.ts | frontend/build/script/buildConf.ts | /**
* Generate additional configuration files when used for packaging. The file can be configured with some global variables, so that it can be changed directly externally without repackaging
*/
import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant';
import fs, { writeFileSync } from 'fs-extra';
import color... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/build/config/themeConfig.ts | frontend/build/config/themeConfig.ts | import { generate } from '@ant-design/colors';
export const primaryColor = '#0960bd';
export const darkMode = 'light';
type Fn = (...arg: any) => any;
type GenerateTheme = 'default' | 'dark';
export interface GenerateColorsParams {
mixLighten: Fn;
mixDarken: Fn;
tinycolor: any;
color?: string;
}
export fu... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/config.d.ts | frontend/types/config.d.ts | import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
import {
ContentEnum,
PermissionModeEnum,
ThemeEnum,
RouterTransitionEnum,
SettingButtonPositionEnum,
SessionTimeoutProcessingEnum,
} from '/@/enums/appEnum';
import { CacheTypeEnum } from '/@/enums/cacheEnu... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/module.d.ts | frontend/types/module.d.ts | declare module '*.vue' {
import { DefineComponent } from 'vue';
const Component: DefineComponent<{}, {}, any>;
export default Component;
}
declare module 'ant-design-vue/es/locale/*' {
import { Locale } from 'ant-design-vue/types/locale-provider';
const locale: Locale & ReadonlyRecordable;
export default l... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/vue-router.d.ts | frontend/types/vue-router.d.ts | import { RoleEnum } from '/@/enums/roleEnum';
export {};
declare module 'vue-router' {
interface RouteMeta extends Record<string | number | symbol, unknown> {
orderNo?: number;
// title
title: string;
// dynamic router level.
dynamicLevel?: number;
// dynamic router real route path (For perf... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/global.d.ts | frontend/types/global.d.ts | import type {
ComponentRenderProxy,
VNode,
VNodeChild,
ComponentPublicInstance,
FunctionalComponent,
PropType as VuePropType,
} from 'vue';
declare global {
const __APP_INFO__: {
pkg: {
name: string;
version: string;
dependencies: Recordable<string>;
devDependencies: Recordabl... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/utils.d.ts | frontend/types/utils.d.ts | import type { ComputedRef, Ref } from 'vue';
export type DynamicProps<T> = {
[P in keyof T]: Ref<T[P]> | T[P] | ComputedRef<T[P]>;
};
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/index.d.ts | frontend/types/index.d.ts | declare interface Fn<T = any, R = T> {
(...arg: T[]): R;
}
declare interface PromiseFn<T = any, R = T> {
(...arg: T[]): Promise<R>;
}
declare type RefType<T> = T | null;
declare type LabelValueOptions = {
label: string;
value: any;
[key: string]: string | number | boolean;
}[];
declare type EmitType = (ev... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/types/store.d.ts | frontend/types/store.d.ts | import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum';
export interface BeforeMiniState {
menuCollapsed?: boolean;
menuSplit?: boolean;
menuMode?: MenuModeEnum;
menuType?: MenuTypeEnum;
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
yaakov123/hagana | https://github.com/yaakov123/hagana/blob/5e9c881cac1171f7e62abee163ff4c6d1747385c/vite.config.ts | vite.config.ts | import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
includeSource: ["src/**/*.{js,ts}"],
},
});
| typescript | MIT | 5e9c881cac1171f7e62abee163ff4c6d1747385c | 2026-01-05T04:59:47.888334Z | false |
yaakov123/hagana | https://github.com/yaakov123/hagana/blob/5e9c881cac1171f7e62abee163ff4c6d1747385c/src/trace.ts | src/trace.ts | import * as parser from "error-stack-parser";
import { filter, findIndex, map, reverse } from "./natives/$array";
import { $Error } from "./natives/$error";
import { includes, split, startsWith } from "./natives/$string";
import { getModulesFolder } from "./runtime";
import { uniq } from "./utils";
export function isN... | typescript | MIT | 5e9c881cac1171f7e62abee163ff4c6d1747385c | 2026-01-05T04:59:47.888334Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.