obs-ss-plugin-webui/lib/constants.ts
Decobus c28baa9e44
Some checks failed
Lint and Build / build (20) (push) Has been cancelled
Lint and Build / build (22) (push) Has been cancelled
Update UI to match consistent layout patterns between pages
- Refactor Add Stream page to match Teams page layout with glass panels
- Rename "Add Stream" to "Streams" in navigation and page title
- Add existing streams display with loading states and empty state
- Implement unified design system with modern glass morphism styling
- Add Header and Footer components with OBS status monitoring
- Update global CSS with comprehensive component styling
- Consolidate client components into main page files
- Add real-time OBS connection status with 30-second polling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 04:39:40 -04:00

42 lines
1.3 KiB
TypeScript

// Base table names
export const BASE_TABLE_NAMES = {
STREAMS: 'streams',
TEAMS: 'teams',
} as const;
// Table configuration interface
export interface TableConfig {
year: number;
season: 'spring' | 'summer' | 'fall' | 'winter';
suffix?: string;
}
// Default configuration
export const DEFAULT_TABLE_CONFIG: TableConfig = {
year: 2025,
season: 'summer',
suffix: 'sat'
};
/**
* Generates a full table name using the provided configuration
* @param baseTableName - The base table name (e.g., 'streams' or 'teams')
* @param config - Optional configuration object. If not provided, uses DEFAULT_TABLE_CONFIG
* @returns The full table name with year, season, and suffix
*/
export function getTableName(
baseTableName: typeof BASE_TABLE_NAMES[keyof typeof BASE_TABLE_NAMES],
config: Partial<TableConfig> = {}
): string {
const finalConfig = {...DEFAULT_TABLE_CONFIG, ...config};
const suffix = finalConfig.suffix ? `_${finalConfig.suffix}` : '';
return `${baseTableName}_${finalConfig.year}_${finalConfig.season}${suffix}`;
}
// Export commonly used full table names with default configuration
export const TABLE_NAMES = {
STREAMS: getTableName(BASE_TABLE_NAMES.STREAMS),
TEAMS: getTableName(BASE_TABLE_NAMES.TEAMS),
} as const;