mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 01:36:57 +08:00
feat: dashboard tab
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
import SnowflakeID from 'snowflake-id';
|
||||
|
||||
const snowflake = new SnowflakeID({
|
||||
mid: 42,
|
||||
offset: (2010 - 1970) * 365 * 24 * 3600 * 1000
|
||||
mid: 42,
|
||||
offset: (2010 - 1970) * 365 * 24 * 3600 * 1000
|
||||
});
|
||||
|
||||
export const guid = () => {
|
||||
return snowflake.generate();
|
||||
export const guid = (prefix?: string) => {
|
||||
if (prefix) {
|
||||
return `${prefix}_${snowflake.generate()}`;
|
||||
} else {
|
||||
return snowflake.generate()
|
||||
}
|
||||
}
|
||||
|
||||
export interface CanvasItem {
|
||||
@@ -16,6 +20,7 @@ export interface CanvasItem {
|
||||
y: number
|
||||
sizeX: number
|
||||
sizeY: number
|
||||
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user