From 83abec0031e5ac553f9e50d5ee9a64f348c222db Mon Sep 17 00:00:00 2001 From: sergeynikolaev Date: Thu, 7 Sep 2023 11:39:31 +0300 Subject: [PATCH 1/4] fix: font management fix --- .../left-sidebar/elements/common/components/font.tsx | 2 +- libs/editor-model/src/config/config.creator.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wavemail/src/app/mail-builder/left-sidebar/elements/common/components/font.tsx b/apps/wavemail/src/app/mail-builder/left-sidebar/elements/common/components/font.tsx index 79c2241..4cf725b 100644 --- a/apps/wavemail/src/app/mail-builder/left-sidebar/elements/common/components/font.tsx +++ b/apps/wavemail/src/app/mail-builder/left-sidebar/elements/common/components/font.tsx @@ -35,7 +35,7 @@ export const Font = ({ element }: Props) => { ) ), null, - [relations.bs, config.bs] + [relations.bs, config.bs, element.bs] ); // @todo here should be font from closest parent diff --git a/libs/editor-model/src/config/config.creator.ts b/libs/editor-model/src/config/config.creator.ts index eaa699d..87abe0a 100644 --- a/libs/editor-model/src/config/config.creator.ts +++ b/libs/editor-model/src/config/config.creator.ts @@ -26,8 +26,8 @@ export const createInitialConfig = (rootElementId: string): Config => { }; export const createConfigFont = (font: Partial): ConfigFont => ({ - id: generateId(), fallback: 'Helvetica', genericFamily: 'sans-serif', ...font, + id: generateId(), }); From 42733355f8247787b2fa1e0c597c9581a8169eff Mon Sep 17 00:00:00 2001 From: sergeynikolaev Date: Thu, 7 Sep 2023 12:19:44 +0300 Subject: [PATCH 2/4] forbes demo template added --- .../demo-materials/templates/forbes.ts | 1033 +++++++++++++++++ .../demo-materials/templates/index.ts | 2 + 2 files changed, 1035 insertions(+) create mode 100644 apps/backend/src/app/services/demo-materials/templates/forbes.ts diff --git a/apps/backend/src/app/services/demo-materials/templates/forbes.ts b/apps/backend/src/app/services/demo-materials/templates/forbes.ts new file mode 100644 index 0000000..f5a8d71 --- /dev/null +++ b/apps/backend/src/app/services/demo-materials/templates/forbes.ts @@ -0,0 +1,1033 @@ +import { EditorSnapshot } from '@waveditors/editor-model'; + +export const ForbesTemplate: EditorSnapshot = { + config: { + fonts: [ + { + id: '0.12219437662183785', + url: 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap', + name: 'Poppins', + fallback: 'Helvetica', + genericFamily: 'sans-serif', + }, + { + id: '0.7797112123824887', + url: 'https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600&display=swap', + name: 'Work Sans', + fallback: 'Arial', + genericFamily: 'serif', + }, + { + id: '0.6593136584276968', + url: 'https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap', + name: 'Open Sans', + fallback: 'Helvetica', + genericFamily: 'sans-serif', + }, + ], + style: { + margin: '0', + fontSize: '16px', + backgroundColor: '#F7F7F7', + }, + rootElementId: '0.42998990503198664', + viewportWidth: 700, + }, + elements: { + '0.564416205483032': { + id: '0.564416205483032', + link: null, + name: 'main content', + type: 'layout', + style: { + padding: '30px 130px', + backgroundColor: '#ffffff', + }, + params: { + columns: [ + { + children: [ + '0.7726873757593369', + '0.32670942046105345', + '0.4469762444924079', + '0.5302520432134668', + '0.7684601712486583', + '0.7614446921159275', + '0.9910187986678045', + '0.9991282704525641', + '0.24033503158584169', + '0.3222302736979712', + ], + proportion: 100, + }, + ], + }, + }, + '0.691369542084963': { + id: '0.691369542084963', + link: null, + name: 'footer header 1', + type: 'text', + style: { + color: '#ffffff', + padding: '0px 0px 20px', + fontSize: '14px', + lineHeight: '22px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'PREFERENCES', + type: 'text', + marks: [ + { + type: 'bold', + }, + ], + }, + ], + }, + ], + }, + }, + }, + '0.2211801490309886': { + id: '0.2211801490309886', + link: null, + name: 'footer header 2', + type: 'text', + style: { + color: '#ffffff', + padding: '0px 0px 20px', + fontSize: '14px', + lineHeight: '22px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'MORE LINKS', + type: 'text', + marks: [ + { + type: 'bold', + }, + ], + }, + ], + }, + ], + }, + }, + }, + '0.2845336825293603': { + id: '0.2845336825293603', + link: null, + meta: { + width: 341, + height: 304, + }, + name: 'image4', + type: 'image', + style: { + width: '35px', + }, + params: { + url: 'https://ci5.googleusercontent.com/proxy/IjCanDZ41pC5gxMukyoio6XOiW12orcRNoc32jQ3nbft3kjMkLR_QkEkuwh-xElGW9YofaVADJLaUoTuXJh9ROqN55sAxJQEWXGi=s0-d-e1-ft#https://images.cordial.com/869/341x304/checkbox-grey.png', + }, + }, + '0.3222302736979712': { + id: '0.3222302736979712', + link: null, + name: 'button container', + type: 'layout', + style: { + padding: '40px 0px 0px', + textAlign: 'center', + }, + params: { + columns: [ + { + children: ['0.8824741731913492'], + proportion: 100, + }, + ], + }, + }, + '0.3683207730803302': { + id: '0.3683207730803302', + link: null, + name: 'text12', + type: 'text', + style: { + color: '#333333', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Have premium, smooth browsing. Enjoy an ad-light reading experience with fewer ads and interruptions.', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.3913364375144217': { + id: '0.3913364375144217', + link: null, + name: 'preferences', + type: 'text', + style: { + color: '#939393', + fontSize: '14px', + lineHeight: '22px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Unsubscribe', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'https://e.email.forbes.com/', + class: null, + target: '_blank', + }, + }, + { + type: 'underline', + }, + ], + }, + { + text: ' from Unlimited Access Marketing', + type: 'text', + }, + ], + }, + { + type: 'paragraph', + }, + { + type: 'paragraph', + content: [ + { + text: 'Click here', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'http://e.email.forbes.com/', + class: null, + target: '_blank', + }, + }, + { + type: 'underline', + }, + ], + }, + { + text: ' to opt-out of all Forbes marketing emails that include invites to LIVE events, suggested content, and special member offers.', + type: 'text', + }, + ], + }, + { + type: 'paragraph', + }, + { + type: 'paragraph', + content: [ + { + text: 'Manage', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'https://e.email.forbes.com/', + class: null, + target: '_blank', + }, + }, + { + type: 'underline', + }, + ], + }, + { + text: ' Email Preferences', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.4469762444924079': { + id: '0.4469762444924079', + link: null, + name: 'list description', + type: 'text', + style: { + color: '#333333', + padding: '0px 0px 20px', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Your member-exclusive benefits:', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.4993885109326879': { + id: '0.4993885109326879', + link: null, + meta: { + width: 341, + height: 304, + }, + name: 'image5', + type: 'image', + style: { + width: '35px', + }, + params: { + url: 'https://ci5.googleusercontent.com/proxy/IjCanDZ41pC5gxMukyoio6XOiW12orcRNoc32jQ3nbft3kjMkLR_QkEkuwh-xElGW9YofaVADJLaUoTuXJh9ROqN55sAxJQEWXGi=s0-d-e1-ft#https://images.cordial.com/869/341x304/checkbox-grey.png', + }, + }, + '0.5302520432134668': { + id: '0.5302520432134668', + link: null, + name: 'list item1', + type: 'layout', + style: { + padding: '0px 0px 20px', + }, + params: { + gap: 10, + columns: [ + { + style: { + textAlign: 'center', + }, + children: ['0.7661747971972894'], + proportion: 10, + }, + { + children: ['0.21735189934253074'], + proportion: 90, + }, + ], + }, + }, + '0.6771465086959636': { + id: '0.6771465086959636', + link: null, + name: 'text11', + type: 'text', + style: { + color: '#333333', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Join the league of global leaders. Member-only events allow you to connect with the best in business and industry, gaining exclusive insights to drive your own success story.', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.7614446921159275': { + id: '0.7614446921159275', + link: null, + name: 'list item2', + type: 'layout', + style: { + padding: '0px 0px 20px', + }, + params: { + gap: 10, + columns: [ + { + style: { + textAlign: 'center', + }, + children: ['0.2845336825293603'], + proportion: 10, + }, + { + children: ['0.6771465086959636'], + proportion: 90, + }, + ], + }, + }, + '0.7661747971972894': { + id: '0.7661747971972894', + link: null, + meta: { + width: 341, + height: 304, + }, + name: 'image2', + type: 'image', + style: { + width: '35px', + }, + params: { + url: 'https://ci5.googleusercontent.com/proxy/IjCanDZ41pC5gxMukyoio6XOiW12orcRNoc32jQ3nbft3kjMkLR_QkEkuwh-xElGW9YofaVADJLaUoTuXJh9ROqN55sAxJQEWXGi=s0-d-e1-ft#https://images.cordial.com/869/341x304/checkbox-grey.png', + }, + }, + '0.7684601712486583': { + id: '0.7684601712486583', + link: null, + name: 'list item2', + type: 'layout', + style: { + padding: '0px 0px 20px', + }, + params: { + gap: 10, + columns: [ + { + style: { + textAlign: 'center', + }, + children: ['0.7991050237474366'], + proportion: 10, + }, + { + children: ['0.8529751624966742'], + proportion: 90, + }, + ], + }, + }, + '0.7726873757593369': { + id: '0.7726873757593369', + link: null, + name: 'welcome text', + type: 'text', + style: { + color: '#333333', + padding: '0px', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Dear valued ', + type: 'text', + }, + { + type: 'variable', + attrs: { + id: '0.8734198492568526', + label: 'user_name', + }, + }, + { + text: ', ', + type: 'text', + }, + ], + }, + { + type: 'paragraph', + content: [ + { + text: 'Now is the time to join the Forbes community! Take ', + type: 'text', + }, + ], + }, + { + type: 'paragraph', + content: [ + { + text: 'advantage of exclusive Labor Day savings and enjoy 50% off an annual membership!', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.7991050237474366': { + id: '0.7991050237474366', + link: null, + meta: { + width: 341, + height: 304, + }, + name: 'image3', + type: 'image', + style: { + width: '35px', + }, + params: { + url: 'https://ci5.googleusercontent.com/proxy/IjCanDZ41pC5gxMukyoio6XOiW12orcRNoc32jQ3nbft3kjMkLR_QkEkuwh-xElGW9YofaVADJLaUoTuXJh9ROqN55sAxJQEWXGi=s0-d-e1-ft#https://images.cordial.com/869/341x304/checkbox-grey.png', + }, + }, + '0.8529751624966742': { + id: '0.8529751624966742', + link: null, + name: 'text10', + type: 'text', + style: { + color: '#333333', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Make the most of your time with MyForbes.', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'https://e.email.forbes.com/c2/869:64ef678f78abe2ff0c022c64:ot:5e4d3a2b5b099ce02fc101a5:1/746ae807?jwtH=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&jwtP=eyJpYXQiOjE2OTM2NjM5NDksImNkIjoiLmVtYWlsLmZvcmJlcy5jb20iLCJjZSI6ODY0MDAsInRrIjoiZm9yYmVzLWxpdmUiLCJtdGxJRCI6IjY0ZjBmNDdlNGVkNjVjYTVlMzA0YmU4NyIsImxpbmtVcmwiOiJodHRwczpcL1wvYWNjb3VudC5mb3JiZXMuY29tXC9tZW1iZXJzaGlwP3V0bV9zb3VyY2U9cHJvbW90aW9uJnV0bV9tZWRpdW09ZW1haWwmdXRtX2NhbXBhaWduPWdyb3d0aF9ub24tc3ViX29yZ2FuaWNfc3Vic2NyaWJlX2xhYm9yZGF5MjMmdXRtX2NvbnRlbnQ9cHJvc3BlY3RzLTQmY2RsY2lkPTVlNGQzYTJiNWIwOTljZTAyZmMxMDFhNSJ9&jwtS=R5cb3NDincdzMuzTuwLn0QmIa0rxgszIP7HyT8uoWvg', + class: null, + target: '_blank', + }, + }, + { + type: 'underline', + }, + ], + }, + { + text: ' Tailored insights crafted to match your interests and aspirations, optimizing the value of every moment you spend with us.', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.8824741731913492': { + id: '0.8824741731913492', + link: null, + name: 'button', + type: 'text', + style: { + color: '#ffffff', + width: '108px', + padding: '10px', + fontSize: '12px', + lineHeight: '24px', + borderRadius: '10px', + letterSpacing: '1px', + backgroundColor: '#dc0000', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'View offer', + type: 'text', + marks: [ + { + type: 'bold', + }, + ], + }, + ], + }, + ], + }, + }, + }, + '0.9646999953982722': { + id: '0.9646999953982722', + link: null, + name: 'links', + type: 'text', + style: { + color: '#939393', + fontSize: '14px', + lineHeight: '26px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'My Forbes Account', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'https://e.email.forbes.com/c2/869:64ef678f78abe2ff0c022c64:ot:5e4d3a2b5b099ce02fc101a5:1/53be803c?jwtH=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&jwtP=eyJpYXQiOjE2OTM2NjM5NDksImNkIjoiLmVtYWlsLmZvcmJlcy5jb20iLCJjZSI6ODY0MDAsInRrIjoiZm9yYmVzLWxpdmUiLCJtdGxJRCI6IjY0ZjBmNDdlNGVkNjVjYTVlMzA0YmU4YyIsImxpbmtVcmwiOiJodHRwczpcL1wvYWNjb3VudC5mb3JiZXMuY29tXC8_Y2RsY2lkPTVlNGQzYTJiNWIwOTljZTAyZmMxMDFhNSJ9&jwtS=6zzLZghAY-4uGC8uUIpK9Y5mhQeS9Xlbporf5NAEyu8', + class: null, + target: '_blank', + }, + }, + ], + }, + ], + }, + { + type: 'paragraph', + content: [ + { + text: 'Newsletters', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'https://e.email.forbes.com/c2/869:64ef678f78abe2ff0c022c64:ot:5e4d3a2b5b099ce02fc101a5:1/9353d812?jwtH=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&jwtP=eyJpYXQiOjE2OTM2NjM5NDksImNkIjoiLmVtYWlsLmZvcmJlcy5jb20iLCJjZSI6ODY0MDAsInRrIjoiZm9yYmVzLWxpdmUiLCJtdGxJRCI6IjY0ZjBmNDdlNGVkNjVjYTVlMzA0YmU4ZCIsImxpbmtVcmwiOiJodHRwczpcL1wvYWNjb3VudC5mb3JiZXMuY29tXC9uZXdzbGV0dGVycz9jZGxjaWQ9NWU0ZDNhMmI1YjA5OWNlMDJmYzEwMWE1In0&jwtS=qSYyCpmS6VOXbG7PrXuBjiqvtrA1DaVxNiYYuX6y2ko', + class: null, + target: '_blank', + }, + }, + ], + }, + ], + }, + { + type: 'paragraph', + content: [ + { + text: 'Help', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'https://e.email.forbes.com/c2/869:64ef678f78abe2ff0c022c64:ot:5e4d3a2b5b099ce02fc101a5:1/e586361e?jwtH=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&jwtP=eyJpYXQiOjE2OTM2NjM5NDksImNkIjoiLmVtYWlsLmZvcmJlcy5jb20iLCJjZSI6ODY0MDAsInRrIjoiZm9yYmVzLWxpdmUiLCJtdGxJRCI6IjY0ZjBmNDdlNGVkNjVjYTVlMzA0YmU4ZSIsImxpbmtVcmwiOiJodHRwczpcL1wvaGVscC5mb3JiZXMuY29tXC9zdXBwb3J0XC9ob21lP2NkbGNpZD01ZTRkM2EyYjViMDk5Y2UwMmZjMTAxYTUifQ&jwtS=cLZWM_tndYS6nLki7ou7R5T8rPJ-cKm_yfIv1EFXWBE', + class: null, + target: '_blank', + }, + }, + ], + }, + ], + }, + { + type: 'paragraph', + content: [ + { + text: 'Privacy', + type: 'text', + marks: [ + { + type: 'link', + attrs: { + rel: 'noopener noreferrer nofollow', + href: 'http://e.email.forbes.com/c2/869:64ef678f78abe2ff0c022c64:ot:5e4d3a2b5b099ce02fc101a5:1/c3d6b2cd?jwtH=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&jwtP=eyJpYXQiOjE2OTM2NjM5NDksImNkIjoiLmVtYWlsLmZvcmJlcy5jb20iLCJjZSI6ODY0MDAsInRrIjoiZm9yYmVzLWxpdmUiLCJtdGxJRCI6IjY0ZjBmNDdlNGVkNjVjYTVlMzA0YmU4ZiIsImxpbmtVcmwiOiJodHRwOlwvXC93d3cuZm9yYmVzLmNvbVwvZmRjXC9wcml2YWN5Lmh0bWw_Y2RsY2lkPTVlNGQzYTJiNWIwOTljZTAyZmMxMDFhNSJ9&jwtS=XaCTbGaAfSPws3Wk-MW-tgPL1s2sRNucWwVEKlEs_8E', + class: null, + target: '_blank', + }, + }, + ], + }, + ], + }, + ], + }, + }, + }, + '0.9801058442311088': { + id: '0.9801058442311088', + link: null, + name: 'text4', + type: 'text', + style: { + color: '#939393', + fontSize: '14px', + lineHeight: '22px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'The world’s leading voice for entrepreneurial success and free enterprise.', + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.9910187986678045': { + id: '0.9910187986678045', + link: null, + name: 'list item2', + type: 'layout', + style: {}, + params: { + gap: 10, + columns: [ + { + style: { + textAlign: 'center', + }, + children: ['0.4993885109326879'], + proportion: 10, + }, + { + children: ['0.3683207730803302'], + proportion: 90, + }, + ], + }, + }, + '0.9951493629308013': { + id: '0.9951493629308013', + link: null, + meta: { + width: 900, + height: 400, + }, + name: 'image', + type: 'image', + style: {}, + params: { + url: 'https://ci3.googleusercontent.com/proxy/Ra3Br7M9Y2vuY_01bu_5Asb2l68Nn2069sEG8KFmmsb80ClMuca2m5UxbVrRdLM0evylAqxQ472zrBGAsGJLEsa_5cVLtkKTuMB4XI1go8blBKtLT-KYOdLdhhQKYcRH=s0-d-e1-ft#https://images.cordial.com/869/900x400/September-LaborDay-Email-900x400-C.jpg', + }, + }, + '0.9991282704525641': { + id: '0.9991282704525641', + link: null, + name: 'footer text', + type: 'text', + style: { + color: '#333333', + padding: '20px 0px 0px', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: "All that for just $39.99/year, 50% off our regular price. There's only one caveat: it's only for the next few days.", + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.18428953619941435': { + id: '0.18428953619941435', + link: null, + name: 'footer', + type: 'layout', + style: { + padding: '30px 50px 20px', + verticalAlign: 'top', + backgroundColor: '#191919', + }, + params: { + gap: 20, + columns: [ + { + children: ['0.49946369696069937', '0.9801058442311088'], + proportion: 33.33, + }, + { + style: {}, + children: ['0.691369542084963', '0.3913364375144217'], + proportion: 33.33, + }, + { + style: {}, + children: ['0.2211801490309886', '0.9646999953982722'], + proportion: 33.33, + }, + ], + }, + }, + '0.21735189934253074': { + id: '0.21735189934253074', + link: null, + name: 'text9', + type: 'text', + style: { + color: '#333333', + padding: '0px', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: "Make decisions in your life with confidence. With unlimited access to premium journalism, you'll be informed and enlightened by facts and truth.", + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.23876982976491945': { + id: '0.23876982976491945', + link: null, + name: 'top info line', + type: 'text', + style: { + color: '#ffffff', + padding: '10px 0px', + fontSize: '14px', + textAlign: 'center', + lineHeight: '16px', + backgroundColor: '#DC0000', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Save 50% - Invest in Your Success Today', + type: 'text', + marks: [ + { + type: 'bold', + }, + ], + }, + ], + }, + ], + }, + }, + }, + '0.24033503158584169': { + id: '0.24033503158584169', + link: null, + name: 'to action text', + type: 'text', + style: { + color: '#333333', + padding: '20px 0px 0px', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: "Don't miss out — invest in your success. Become a member today.", + type: 'text', + }, + ], + }, + ], + }, + }, + }, + '0.32670942046105345': { + id: '0.32670942046105345', + link: { + url: 'https://demo.waveditor.qvantor.space/some-link', + newTab: true, + }, + name: 'call to action', + type: 'text', + style: { + color: '#15c', + padding: '20px 0px', + fontSize: '16px', + lineHeight: '24px', + }, + params: { + content: { + type: 'doc', + content: [ + { + type: 'paragraph', + content: [ + { + text: 'Become a member today for just $39.99.', + type: 'text', + marks: [ + { + type: 'bold', + }, + { + type: 'underline', + }, + ], + }, + ], + }, + ], + }, + }, + }, + '0.42998990503198664': { + id: '0.42998990503198664', + link: null, + name: 'root', + type: 'layout', + style: { + margin: '0px auto', + padding: '0px', + }, + params: { + columns: [ + { + children: [ + '0.23876982976491945', + '0.9951493629308013', + '0.564416205483032', + '0.18428953619941435', + ], + proportion: 100, + }, + ], + }, + }, + '0.49946369696069937': { + id: '0.49946369696069937', + link: null, + meta: { + width: 400, + height: 127, + }, + name: 'logo', + type: 'image', + style: { + width: '130px', + padding: '0px 0px 20px', + }, + params: { + url: 'https://ci6.googleusercontent.com/proxy/UpxRZVlRZ6wTlE1zOZzeCL0dmPfOPt92XJcMo1aycAYLSLafsFJ4ZYmM9zB-HOeZgv0n5AvtAXYsZiS5QZUo_Ak6XsCII-_LGyurbGqQ2w=s0-d-e1-ft#https://images.cordial.com/869/400x127/forbes-logo-white.png', + }, + }, + }, + relations: { + elementFont: { + '0.691369542084963': '0.6593136584276968', + '0.2211801490309886': '0.6593136584276968', + '0.3683207730803302': '0.7797112123824887', + '0.3913364375144217': '0.6593136584276968', + '0.4469762444924079': '0.7797112123824887', + '0.6771465086959636': '0.7797112123824887', + '0.7726873757593369': '0.7797112123824887', + '0.8529751624966742': '0.7797112123824887', + '0.8824741731913492': '0.7797112123824887', + '0.9646999953982722': '0.6593136584276968', + '0.9801058442311088': '0.6593136584276968', + '0.9991282704525641': '0.7797112123824887', + '0.21735189934253074': '0.7797112123824887', + '0.24033503158584169': '0.7797112123824887', + '0.32670942046105345': '0.7797112123824887', + }, + }, + variables: [ + { + id: '0.8734198492568526', + type: 'string', + label: 'user_name', + defaultValue: 'Sergei Nikolaev', + }, + ], +}; diff --git a/apps/backend/src/app/services/demo-materials/templates/index.ts b/apps/backend/src/app/services/demo-materials/templates/index.ts index e6a88ca..de8fa21 100644 --- a/apps/backend/src/app/services/demo-materials/templates/index.ts +++ b/apps/backend/src/app/services/demo-materials/templates/index.ts @@ -1,7 +1,9 @@ import { BinanceTemplate } from './binance'; +import { ForbesTemplate } from './forbes'; import { StackOverflowTemplate } from './stack-overflow'; export const Templates = [ { name: 'Demo Binance email template', version: BinanceTemplate }, { name: 'Demo StackOverflow email template', version: StackOverflowTemplate }, + { name: 'Demo Forbes email template', version: ForbesTemplate }, ]; From 7fd27a804bbf87a30eacfb4b9150f295be42651c Mon Sep 17 00:00:00 2001 From: sergeynikolaev Date: Thu, 7 Sep 2023 12:28:12 +0300 Subject: [PATCH 3/4] 0.2.3 --- docker-compose.yml | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0f995ce..259df40 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.8' services: frontend: - image: waveditor/frontend:0.2.2 + image: waveditor/frontend:0.2.3 restart: on-failure depends_on: - backend @@ -13,7 +13,7 @@ services: - NX_BACKEND_URL=${NX_BACKEND_URL} - NX_GOOGLE_OAUTH_CLIENT=${NX_GOOGLE_OAUTH_CLIENT} backend: - image: waveditor/backend:0.2.2 + image: waveditor/backend:0.2.3 restart: on-failure depends_on: - postgres diff --git a/package-lock.json b/package-lock.json index 9701a4a..1dd03ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "waveditors", - "version": "0.2.2", + "version": "0.2.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "waveditors", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "dependencies": { "@apollo/client": "^3.7.15", diff --git a/package.json b/package.json index 9675d83..c2f9528 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waveditors", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "scripts": { "dev:frontend": "nx run wavemail:serve", From d041dca6ec90017c84a01b3b91f8d61913eafef2 Mon Sep 17 00:00:00 2001 From: sergeynikolaev Date: Thu, 7 Sep 2023 14:35:00 +0300 Subject: [PATCH 4/4] release on tag, not on merge --- .github/workflows/build.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ecf9c72..48f8c19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Test and Publish Containers on: push: branches: ['main'] + tags: ['*.*.*'] pull_request: branches: ['main'] @@ -31,7 +32,7 @@ jobs: path: dist push_container: - if: github.ref == 'refs/heads/main' + if: github.ref_type == 'tag' runs-on: ubuntu-latest needs: [build] steps: @@ -50,16 +51,12 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: get-npm-version - id: package-version - uses: martinbeentjes/npm-get-version-action@v1.3.1 - - name: Backend Build and push uses: docker/build-push-action@v2 with: file: ./apps/backend/Dockerfile push: true - tags: waveditor/backend:${{ steps.package-version.outputs.current-version }} + tags: waveditor/backend:${{ github.ref_name }} context: . - name: Frontend Build and push @@ -67,11 +64,11 @@ jobs: with: file: ./apps/wavemail/Dockerfile push: true - tags: waveditor/frontend:${{ steps.package-version.outputs.current-version }} + tags: waveditor/frontend:${{ github.ref_name }} context: . deploy: - if: github.ref == 'refs/heads/main' + if: github.ref_type == 'tag' runs-on: ubuntu-latest needs: [push_container] steps: