woodpecker/web/src/compositions/useConfig.ts

22 lines
613 B
TypeScript
Raw Normal View History

import { User } from '~/lib/api/types';
declare global {
interface Window {
WOODPECKER_USER: User | undefined;
WOODPECKER_DOCS: string | undefined;
WOODPECKER_VERSION: string | undefined;
WOODPECKER_CSRF: string | undefined;
2022-06-17 18:14:01 +00:00
WOODPECKER_FORGE: string | undefined;
WOODPECKER_ROOT_URL: string | undefined;
}
}
export default () => ({
user: window.WOODPECKER_USER || null,
docs: window.WOODPECKER_DOCS || null,
version: window.WOODPECKER_VERSION,
csrf: window.WOODPECKER_CSRF || null,
2022-06-17 18:14:01 +00:00
forge: window.WOODPECKER_FORGE || null,
rootURL: window.WOODPECKER_ROOT_URL || null,
});