From 0cdd84a70797bfd40919e3d41cdb03cf61167d61 Mon Sep 17 00:00:00 2001 From: Sean Archibeque Date: Thu, 13 Jun 2024 10:08:54 -0600 Subject: [PATCH] MWPW-151885 - [LocUI] messaging for auth redirect (#2463) * foe locui block that displays the message to re-run * update message --- libs/blocks/locui/locui.css | 8 ++++++++ libs/blocks/locui/locui.js | 16 ++++++++++++++++ libs/utils/utils.js | 1 + 3 files changed, 25 insertions(+) create mode 100644 libs/blocks/locui/locui.css create mode 100644 libs/blocks/locui/locui.js diff --git a/libs/blocks/locui/locui.css b/libs/blocks/locui/locui.css new file mode 100644 index 0000000000..2c9de0b76a --- /dev/null +++ b/libs/blocks/locui/locui.css @@ -0,0 +1,8 @@ +.locui.container { + margin: 0 auto; + margin-top: 10vh; + max-width: 700px; + border-radius: 10px; + border: 10px solid #eee; + padding: 10px 30px 30px; +} diff --git a/libs/blocks/locui/locui.js b/libs/blocks/locui/locui.js new file mode 100644 index 0000000000..2c9acdac1b --- /dev/null +++ b/libs/blocks/locui/locui.js @@ -0,0 +1,16 @@ +import { createTag } from '../../utils/utils.js'; + +export default function init(el) { + el.classList.add('container'); + const heading = createTag('h2', null, 'Missing project details'); + const paragraph = createTag('p', null, 'The project details were removed after you logged in. To resolve this:'); + const steps = createTag('ol', null); + const stepList = ['Close this window or tab.', 'Open your project Excel file.', 'Click "Localize..." in Sidekick again.']; + stepList.forEach((step) => steps.append(createTag('li', null, step))); + const learnmore = createTag('a', { + class: 'con-button', + href: 'https://milo.adobe.com/docs/authoring/localization#:~:text=at%20render%20time.-,Troubleshooting,-Error%20matrix', + target: '_blank', + }, 'Learn More'); + el.append(heading, paragraph, steps, learnmore); +} diff --git a/libs/utils/utils.js b/libs/utils/utils.js index ed41f1ad0d..a70602485f 100644 --- a/libs/utils/utils.js +++ b/libs/utils/utils.js @@ -41,6 +41,7 @@ const MILO_BLOCKS = [ 'icon-block', 'iframe', 'instagram', + 'locui', 'marketo', 'marquee', 'marquee-anchors',