- Notifications
You must be signed in to change notification settings - Fork254
Branding updates#1494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Branding updates#1494
Changes fromall commits
Commits
Show all changes
3 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
29 changes: 0 additions & 29 deletionsclient/packages/lowcoder/src/api/commonSettingApi.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
103 changes: 84 additions & 19 deletionsclient/packages/lowcoder/src/api/enterpriseApi.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,110 @@ | ||
import axios from 'axios'; | ||
export interface FetchBrandingSettingPayload { | ||
orgId?: string; | ||
} | ||
export interface BrandingSettings { | ||
logo?: string | null; | ||
squareLogo?: string | null; | ||
mainBrandingColor?: string; | ||
appHeaderColor?: string; | ||
adminSidebarColor?: string; | ||
adminSidebarFontColor?: string; | ||
adminSidebarActiveBgColor?: string; | ||
adminSidebarActiveFontColor?: string; | ||
editorSidebarColor?: string; | ||
editorSidebarFontColor?: string; | ||
editorSidebarActiveBgColor?: string; | ||
editorSidebarActiveFontColor?: string; | ||
font?: string; | ||
errorPageText?: string; | ||
errorPageImage?: string | null; | ||
signUpPageText?: string; | ||
signUpPageImage?: string | null; | ||
loggedOutPageText?: string; | ||
loggedOutPageImage?: string | null; | ||
standardDescription?: string; | ||
standardTitle?: string; | ||
showDocumentation?: boolean; | ||
documentationLink?: string | null; | ||
submitIssue?: boolean; | ||
whatsNew?: boolean; | ||
whatsNewLink?: string | null; | ||
} | ||
export interface BrandingConfig { | ||
config_name?: string, | ||
config_description?: string, | ||
config_icon?: string, | ||
config_set?: BrandingSettings, | ||
org_id?: string, | ||
user_id?: string, | ||
id?: string, | ||
} | ||
export interface BrandingSettingResponse extends BrandingConfig {}; | ||
export interface EnterpriseLicenseResponse { | ||
eeActive: boolean; | ||
remainingAPICalls: number; | ||
eeLicenses: Array<{ | ||
uuid: string; | ||
issuedTo: string; | ||
apiCallsLimit: number; | ||
}>; | ||
} | ||
// Existing functions | ||
export const getEnterpriseLicense = async () => { | ||
const response = await axios.get('/api/plugins/enterprise/license'); | ||
return response.data; | ||
}; | ||
export const getAuditLogs = async (params = {}) => { | ||
const query = new URLSearchParams(params).toString(); | ||
const response = await axios.get(`/api/plugins/enterprise/audit-logs${query ? `?${query}` : ''}`); | ||
return response.data; | ||
}; | ||
export const getAuditLogStatistics = async (groupByParam : string) => { | ||
const response = await axios.get(`/api/plugins/enterprise/audit-logs/statistics?groupByParam=${groupByParam}`); | ||
return response.data; | ||
}; | ||
export const getAppUsageLogs = async (params = {}) => { | ||
const query = new URLSearchParams(params).toString(); | ||
const response = await axios.get(`/api/plugins/enterprise/app-usage-logs${query ? `?${query}` : ''}`); | ||
return response.data; | ||
}; | ||
export const getAppUsageStatistics = async (groupByParam : string) => { | ||
const response = await axios.get(`/api/plugins/enterprise/app-usage-logs/statistics?groupByParam=${groupByParam}`); | ||
return response.data; | ||
}; | ||
export const getBranding = async (orgId: string = '') => { | ||
const response = await axios.get('/api/plugins/enterprise/branding?orgId='+orgId); | ||
const data = response.data; | ||
if (Boolean(data.error)) { | ||
return {}; | ||
} | ||
return { | ||
...data, | ||
config_set: JSON.parse(data.config_set), | ||
}; | ||
}; | ||
export const createBranding = async (brandingData : any) => { | ||
let response; | ||
if (brandingData.id) { | ||
response = await axios.put(`/api/plugins/enterprise/branding?brandId=${brandingData.id}`, brandingData); | ||
} else { | ||
response = await axios.post('/api/plugins/enterprise/branding', brandingData); | ||
} | ||
return response.data; | ||
}; | ||
export const updateBranding = async (brandingData : any) => { | ||
const response = await axios.put('/api/plugins/enterprise/branding', brandingData); | ||
return response.data; | ||
}; |
11 changes: 7 additions & 4 deletionsclient/packages/lowcoder/src/app.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletionsclient/packages/lowcoder/src/components/layout/Layout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletionsclient/packages/lowcoder/src/components/layout/SideBarSection.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletionsclient/packages/lowcoder/src/constants/reduxActionConstants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletionsclient/packages/lowcoder/src/i18n/locales/en.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletionsclient/packages/lowcoder/src/pages/ApplicationV2/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletionsclient/packages/lowcoder/src/pages/common/header.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.