mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-11 17:16:26 +02:00
fix asset and new creation modal
This commit is contained in:
@ -15,7 +15,7 @@ const Assets = () => {
|
|||||||
const [uploadProgress, setUploadProgress] = useState();
|
const [uploadProgress, setUploadProgress] = useState();
|
||||||
const [listType, setListType] = useState('grid');
|
const [listType, setListType] = useState('grid');
|
||||||
|
|
||||||
const storageRef = firebase.storage().ref(`assets/${window.user.uid}`);
|
const storageRef = firebase.storage().ref(`assets/${window.user?.uid}`);
|
||||||
|
|
||||||
const uploadFile = file => {
|
const uploadFile = file => {
|
||||||
if (file.size > 5 * 1024 * 1024) {
|
if (file.size > 5 * 1024 * 1024) {
|
||||||
@ -137,6 +137,18 @@ const Assets = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!window.user?.isPro) {
|
||||||
|
return (
|
||||||
|
<VStack align="stretch" gap={2}>
|
||||||
|
<p>Assets feature is available in PRO plan.</p>
|
||||||
|
<button class="btn btn--primary ">
|
||||||
|
<HStack gap={1} fullWidth justify="center">
|
||||||
|
Upgrade to <ProBadge />
|
||||||
|
</HStack>
|
||||||
|
</button>
|
||||||
|
</VStack>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
onDragEnter={handleDragDropEvent}
|
onDragEnter={handleDragDropEvent}
|
||||||
|
@ -150,11 +150,10 @@ export class CreateNewModal extends Component {
|
|||||||
<h1 class="mt-0">Create New</h1>
|
<h1 class="mt-0">Create New</h1>
|
||||||
<Tabs horizontal onChange={this.modeChangeHandler}>
|
<Tabs horizontal onChange={this.modeChangeHandler}>
|
||||||
<TabPanel label={option1}>
|
<TabPanel label={option1}>
|
||||||
<div class="d-f fxw-w">
|
<div class="templates-container">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn--primary"
|
class="btn btn--primary"
|
||||||
style="margin:20px 10px"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
trackEvent('ui', 'startBlankBtnClick');
|
trackEvent('ui', 'startBlankBtnClick');
|
||||||
onBlankTemplateSelect();
|
onBlankTemplateSelect();
|
||||||
@ -176,11 +175,10 @@ export class CreateNewModal extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel label={option2}>
|
<TabPanel label={option2}>
|
||||||
<div class="d-f fxw-w show-when-app">
|
<div class="templates-container show-when-app">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn--primary"
|
class="btn btn--primary"
|
||||||
style="margin:20px 10px"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
trackEvent('ui', 'startBlankFileBtnClick');
|
trackEvent('ui', 'startBlankFileBtnClick');
|
||||||
onBlankFileTemplateSelect();
|
onBlankFileTemplateSelect();
|
||||||
|
@ -397,10 +397,15 @@ a > svg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn--primary {
|
.btn--primary {
|
||||||
background: var(--color-button)
|
background: linear-gradient(
|
||||||
linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0px, transparent);
|
180deg,
|
||||||
|
var(--color-button),
|
||||||
|
color-mix(in lch, var(--color-button), black)
|
||||||
|
);
|
||||||
color: black;
|
color: black;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
border: 1px solid color-mix(in lch, var(--color-button), black 70%);
|
||||||
|
box-shadow: inset 0 1px 0px 0 rgba(255, 255, 255, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn--big {
|
.btn--big {
|
||||||
@ -2137,6 +2142,14 @@ while the theme CSS file is loading */
|
|||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
.templates-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
.templates-container .saved-item-tile {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
body {
|
body {
|
||||||
font-size: 70%;
|
font-size: 70%;
|
||||||
|
Reference in New Issue
Block a user