WIP jordan
This commit is contained in:
31
app/composables/useBrokerageBranding.ts
Normal file
31
app/composables/useBrokerageBranding.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { BRANDING_STORAGE_KEY, type BrokerageBrandingState } from '~/types/branding'
|
||||
import { useLocalStorageRef } from '~/utils/useLocalStorageRef'
|
||||
|
||||
export function defaultBrokerageBranding(): BrokerageBrandingState {
|
||||
return {
|
||||
companyName: '',
|
||||
logoDataUrl: null,
|
||||
logoFileName: '',
|
||||
reportPageHeader: '',
|
||||
reportPageFooter: ''
|
||||
}
|
||||
}
|
||||
|
||||
export function useBrokerageBranding() {
|
||||
const saved = useLocalStorageRef(BRANDING_STORAGE_KEY, defaultBrokerageBranding)
|
||||
|
||||
const productDisplayName = computed(() => {
|
||||
const n = saved.value.companyName?.trim()
|
||||
if (n) return n
|
||||
return null
|
||||
})
|
||||
|
||||
const sidebarTitle = computed(() => productDisplayName.value ?? 'Segur-OS')
|
||||
|
||||
return {
|
||||
saved,
|
||||
productDisplayName,
|
||||
sidebarTitle,
|
||||
defaultBrokerageBranding
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user