mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-14 09:38:59 +08:00
Design tweaks
This commit is contained in:
@@ -183,7 +183,7 @@ function SampleApp() {
|
||||
]}
|
||||
textSearchController={textSearchController}
|
||||
allowSkipLogin={true}
|
||||
// logo={logo}
|
||||
logo={logo}
|
||||
navigation={navigation}
|
||||
schemaResolver={customSchemaResolver}
|
||||
firebaseConfig={firebaseConfig}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
buildEnumValueConfig,
|
||||
buildProperties,
|
||||
buildProperty,
|
||||
buildSchema,
|
||||
resolveNavigationFrom
|
||||
@@ -61,6 +62,38 @@ export const testEntitySchema = buildSchema({
|
||||
});
|
||||
},
|
||||
properties: {
|
||||
source: ({ values }) => {
|
||||
|
||||
const properties = buildProperties<any>({
|
||||
type: {
|
||||
dataType: "string",
|
||||
config: {
|
||||
enumValues: {
|
||||
"facebook": "FacebookId",
|
||||
"apple": "Apple"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (values.source) {
|
||||
if ((values.source as any).type === "facebook") {
|
||||
properties["facebookId"] = buildProperty({
|
||||
dataType: "string"
|
||||
});
|
||||
} else if ((values.source as any).type === "apple") {
|
||||
properties["appleId"] = buildProperty({
|
||||
dataType: "number"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return ({
|
||||
dataType: "map",
|
||||
title: "Source",
|
||||
properties: properties
|
||||
});
|
||||
},
|
||||
test_date: {
|
||||
title: "Test date",
|
||||
dataType: "timestamp"
|
||||
|
||||
@@ -17,6 +17,11 @@ export const useTableStyles = makeStyles<Theme>(theme => createStyles({
|
||||
height: "100%",
|
||||
flexGrow: 1
|
||||
},
|
||||
headerTypography: {
|
||||
fontSize: "0.750rem",
|
||||
fontWeight: 600,
|
||||
textTransform: "uppercase"
|
||||
},
|
||||
header: {
|
||||
width: "calc(100% + 24px)",
|
||||
margin: "0px -12px",
|
||||
@@ -27,7 +32,7 @@ export const useTableStyles = makeStyles<Theme>(theme => createStyles({
|
||||
height: "100%",
|
||||
fontSize: "0.750rem",
|
||||
textTransform: "uppercase",
|
||||
fontWeight: 600,
|
||||
fontWeight: 600
|
||||
},
|
||||
tableRow: {
|
||||
display: "flex",
|
||||
|
||||
@@ -73,7 +73,9 @@ export function CMSDrawer({
|
||||
src={logo}
|
||||
alt={"Logo"}/>;
|
||||
} else {
|
||||
logoComponent = <FireCMSLogo/>;
|
||||
logoComponent = <div className={classes.logo}>
|
||||
<FireCMSLogo/>
|
||||
</div>;
|
||||
}
|
||||
|
||||
return <>
|
||||
@@ -83,9 +85,6 @@ export function CMSDrawer({
|
||||
color="inherit"
|
||||
onClick={closeDrawer}
|
||||
component={ReactLink}
|
||||
style={{
|
||||
padding: "16px"
|
||||
}}
|
||||
to={"/"}>
|
||||
{logoComponent}
|
||||
</Link>
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from "react";
|
||||
export function FireCMSLogo() {
|
||||
return (
|
||||
<svg
|
||||
width="200" height="200"
|
||||
width="232" height="232"
|
||||
viewBox="0 0 599 599" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
@@ -41,7 +41,7 @@ export function FireCMSLogo() {
|
||||
offset="100%"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none"
|
||||
<g id="Page-1" stroke="none" strokeWidth="1" fill="none"
|
||||
fillRule="evenodd">
|
||||
<g id="firecms_logo">
|
||||
<circle fill="url(#radialGradient-1)" cx="299.5" cy="299.5"
|
||||
|
||||
@@ -114,12 +114,14 @@ export default function FirebaseLoginView({
|
||||
}
|
||||
|
||||
let logoComponent;
|
||||
if(logo){
|
||||
if (logo) {
|
||||
logoComponent = <img className={classes.logo}
|
||||
src={logo}
|
||||
alt={"Logo"}/>;
|
||||
} else{
|
||||
logoComponent = <FireCMSLogo/>;
|
||||
src={logo}
|
||||
alt={"Logo"}/>;
|
||||
} else {
|
||||
logoComponent = <div className={classes.logo}>
|
||||
<FireCMSLogo/>
|
||||
</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -237,7 +237,7 @@ export interface PermissionsBuilderProps<M extends { [Key: string]: any } = any>
|
||||
* Context of the app status
|
||||
*/
|
||||
context: CMSAppContext;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -320,5 +320,5 @@ export interface ExportMappingFunction {
|
||||
* valid, otherwise it reverts to the simpler valid case
|
||||
* @category Models
|
||||
*/
|
||||
export type CompositeIndex<Key extends string> = Partial<Record<Key, "asc" | "desc">>
|
||||
export type CompositeIndex<Key extends string> = Partial<Record<Key, "asc" | "desc">>;
|
||||
|
||||
|
||||
@@ -688,6 +688,7 @@ export interface MapFieldConfig<T extends {}> extends FieldConfig<T> {
|
||||
|
||||
/**
|
||||
* MIME types for storage fields
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
||||
* @category Entity properties
|
||||
*/
|
||||
export type StorageFileTypes =
|
||||
@@ -697,7 +698,7 @@ export type StorageFileTypes =
|
||||
| "application/*"
|
||||
| "text/*"
|
||||
| "font/*"
|
||||
| string; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
||||
| string;
|
||||
|
||||
/**
|
||||
* @category Entity properties
|
||||
|
||||
Reference in New Issue
Block a user