Skip to content

Commit ee9b9f8

Browse files
committed
refactor: better UI for the toast message
1 parent 6915a91 commit ee9b9f8

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3703,31 +3703,18 @@ function RemoteFunctions(config = {}) {
37033703
overlay.style.cssText = 'position: fixed; top: 0; left: 0; width: 100%; height: 100%; ' +
37043704
'background: rgba(0, 0, 0, 0.5); z-index: 10000; pointer-events: auto;';
37053705

3706-
// create toast card (matching existing overlay style: #666 background, #ededed text)
3707-
const toast = window.document.createElement('div');
3708-
toast.className = 'phoenix-dialog-toast';
3709-
toast.setAttribute('data-phcode-internal-c15r5a9', 'true');
3710-
toast.style.cssText = 'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); ' +
3711-
'background: #666; color: #ededed; padding: 24px 32px; border-radius: 6px; ' +
3712-
'box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-size: 16px; text-align: center;';
3713-
3714-
// create icon
3715-
const icon = window.document.createElement('span');
3716-
icon.className = 'phoenix-dialog-icon';
3717-
icon.setAttribute('data-phcode-internal-c15r5a9', 'true');
3718-
icon.style.cssText = 'margin-right: 10px; font-size: 18px;';
3719-
icon.textContent = 'ⓘ';
3720-
3721-
// create message
3722-
const message = window.document.createElement('span');
3723-
message.className = 'phoenix-dialog-message';
3724-
message.setAttribute('data-phcode-internal-c15r5a9', 'true');
3725-
message.textContent = 'Select image download location in the editor to continue';
3706+
// create message bar
3707+
const messageBar = window.document.createElement('div');
3708+
messageBar.className = 'phoenix-dialog-message-bar';
3709+
messageBar.setAttribute('data-phcode-internal-c15r5a9', 'true');
3710+
messageBar.style.cssText = 'position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); ' +
3711+
'color: #ffffff; background-color: #333333; padding: 1em 1.5em; ' +
3712+
'text-align: center; font-size: 16px; border-radius: 3px;' +
3713+
'font-family: "SourceSansPro", Helvetica, Arial, sans-serif;';
3714+
messageBar.textContent = 'Select image download location in the editor to continue';
37263715

37273716
// assemble the structure
3728-
toast.appendChild(icon);
3729-
toast.appendChild(message);
3730-
overlay.appendChild(toast);
3717+
overlay.appendChild(messageBar);
37313718

37323719
// append to body
37333720
window.document.body.appendChild(overlay);

0 commit comments

Comments
 (0)