Serverless function UI (#6388)
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=36235-120877 Did not do the file manager part. A Function is defined using one unique file at the moment Feature protected by featureFlag `IS_FUNCTION_SETTINGS_ENABLED` ## Demo https://github.com/user-attachments/assets/0acb8291-47b4-4521-a6fa-a88b9198609b
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import { sortByAscString } from '~/utils/array/sortByAscString';
|
||||
|
||||
describe('sortByAscString', () => {
|
||||
test('should sort properly', () => {
|
||||
expect(sortByAscString('a', 'b')).toEqual(-1);
|
||||
expect(sortByAscString('b', 'a')).toEqual(1);
|
||||
expect(sortByAscString('a', 'a')).toEqual(0);
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,10 @@
|
||||
import { getFileAbsoluteURI } from '../getFileAbsoluteURI';
|
||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||
|
||||
describe('getFileAbsoluteURI', () => {
|
||||
test('should return absolute uri', () => {
|
||||
expect(getFileAbsoluteURI('foo')).toEqual(
|
||||
`${REACT_APP_SERVER_BASE_URL}/files/foo`,
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,5 @@
|
||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||
|
||||
export const getFileAbsoluteURI = (fileUrl?: string) => {
|
||||
return `${REACT_APP_SERVER_BASE_URL}/files/${fileUrl}`;
|
||||
};
|
||||
@ -10,6 +10,7 @@ export enum SettingsPageTitles {
|
||||
Members = 'Members - Settings',
|
||||
Developers = 'Developers - Settings',
|
||||
Integration = 'Integrations - Settings',
|
||||
ServerlessFunctions = 'Functions - Settings',
|
||||
General = 'General - Settings',
|
||||
Default = 'Settings',
|
||||
}
|
||||
@ -21,6 +22,7 @@ enum SettingsPathPrefixes {
|
||||
Objects = `${AppBasePath.Settings}/${SettingsPath.Objects}`,
|
||||
Members = `${AppBasePath.Settings}/${SettingsPath.WorkspaceMembersPage}`,
|
||||
Developers = `${AppBasePath.Settings}/${SettingsPath.Developers}`,
|
||||
ServerlessFunctions = `${AppBasePath.Settings}/${SettingsPath.ServerlessFunctions}`,
|
||||
Integration = `${AppBasePath.Settings}/${SettingsPath.Integrations}`,
|
||||
General = `${AppBasePath.Settings}/${SettingsPath.Workspace}`,
|
||||
}
|
||||
@ -63,6 +65,8 @@ export const getPageTitleFromPath = (pathname: string): string => {
|
||||
return SettingsPageTitles.Objects;
|
||||
case SettingsPathPrefixes.Developers:
|
||||
return SettingsPageTitles.Developers;
|
||||
case SettingsPathPrefixes.ServerlessFunctions:
|
||||
return SettingsPageTitles.ServerlessFunctions;
|
||||
case SettingsPathPrefixes.Integration:
|
||||
return SettingsPageTitles.Integration;
|
||||
case SettingsPathPrefixes.General:
|
||||
|
||||
Reference in New Issue
Block a user