mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Add SaaS frontend code (#5879)
# Description of Changes Adds the code for the SaaS frontend as proprietary code to the OSS repo. This version of the code is adapted from 22/1/2026, which was the last SaaS version based on the 'V2' design. This will move us closer to being able to have the OSS products understand whether the user has a SaaS account, and provide the correct UI in those cases.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Re-export all constants from core
|
||||
export * from '@core/constants/app';
|
||||
|
||||
// SaaS-specific overrides
|
||||
// Get base URL with fallback (for use outside React components)
|
||||
export const getBaseUrl = (): string => {
|
||||
// Try to get from window object if set by app config
|
||||
const baseUrl = (window as any).__STIRLING_PDF_BASE_URL__ || window.location.origin;
|
||||
return baseUrl;
|
||||
};
|
||||
|
||||
// Helper to set base URL (to be called when app config loads)
|
||||
export const setBaseUrl = (url: string): void => {
|
||||
(window as any).__STIRLING_PDF_BASE_URL__ = url;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
export type OAuthProviderId = 'google' | 'apple' | 'github' | 'azure'
|
||||
|
||||
export type OAuthProviderMeta = {
|
||||
id: OAuthProviderId
|
||||
label: string
|
||||
file: string
|
||||
isDisabled: boolean
|
||||
}
|
||||
|
||||
export const oauthProviders: readonly OAuthProviderMeta[] = [
|
||||
{ id: 'google', label: 'Google', file: 'google.svg', isDisabled: false },
|
||||
{ id: 'github', label: 'GitHub', file: 'github.svg', isDisabled: false },
|
||||
] as const
|
||||
@@ -0,0 +1 @@
|
||||
export const devApiLink = "https://registry.scalar.com/@stirlingpdf/apis/stirling-pdf-processing-api/";
|
||||
Reference in New Issue
Block a user