Skip to content

Commit 5695580

Browse files
committed
refactor: move download icon from centre to top-right
1 parent 3338691 commit 5695580

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,15 +2147,14 @@ function RemoteFunctions(config = {}) {
21472147
21482148
.phoenix-download-icon {
21492149
position: absolute !important;
2150-
top: 50% !important;
2151-
left: 50% !important;
2152-
transform: translate(-50%, -50%) !important;
2150+
top: 8px !important;
2151+
right: 8px !important;
21532152
background: rgba(0,0,0,0.7) !important;
21542153
border: none !important;
21552154
color: #eee !important;
21562155
border-radius: 50% !important;
2157-
width: 21px !important;
2158-
height: 21px !important;
2156+
width: 18px !important;
2157+
height: 18px !important;
21592158
padding: 4px !important;
21602159
display: flex !important;
21612160
align-items: center !important;
@@ -2175,7 +2174,7 @@ function RemoteFunctions(config = {}) {
21752174
21762175
.phoenix-download-icon:hover {
21772176
background: rgba(0,0,0,0.9) !important;
2178-
transform: translate(-50%, -50%) scale(1.1) !important;
2177+
transform: scale(1.1) !important;
21792178
}
21802179
21812180
.phoenix-ribbon-thumb {
@@ -2521,6 +2520,7 @@ function RemoteFunctions(config = {}) {
25212520
// download icon
25222521
const downloadIcon = window.document.createElement('div');
25232522
downloadIcon.className = 'phoenix-download-icon';
2523+
downloadIcon.title = config.strings.imageGalleryUseImage;
25242524
downloadIcon.innerHTML = `<svg viewBox="0 0 640 640" fill="currentColor">
25252525
<path d="M352 96C352 78.3 337.7 64 320 64C302.3 64 288 78.3 288 96L288 306.7L246.6 265.3C234.1 252.8 213.8 252.8 201.3 265.3C188.8 277.8 188.8 298.1 201.3 310.6L297.3 406.6C309.8 419.1 330.1 419.1 342.6 406.6L438.6 310.6C451.1 298.1 451.1 277.8 438.6 265.3C426.1 252.8 405.8 252.8 393.3 265.3L352 306.7L352 96zM160 384C124.7 384 96 412.7 96 448L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 448C544 412.7 515.3 384 480 384L433.1 384L376.5 440.6C345.3 471.8 294.6 471.8 263.4 440.6L206.9 384L160 384zM464 440C477.3 440 488 450.7 488 464C488 477.3 477.3 488 464 488C450.7 488 440 477.3 440 464C440 450.7 450.7 440 464 440z"/>
25262526
</svg>`;

src/LiveDevelopment/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ define(function main(require, exports, module) {
8080
duplicate: Strings.LIVE_DEV_MORE_OPTIONS_DUPLICATE,
8181
delete: Strings.LIVE_DEV_MORE_OPTIONS_DELETE,
8282
ai: Strings.LIVE_DEV_MORE_OPTIONS_AI,
83-
aiPromptPlaceholder: Strings.LIVE_DEV_AI_PROMPT_PLACEHOLDER
83+
aiPromptPlaceholder: Strings.LIVE_DEV_AI_PROMPT_PLACEHOLDER,
84+
imageGalleryUseImage: Strings.LIVE_DEV_IMAGE_GALLERY_USE_IMAGE
8485
}
8586
};
8687
// Status labels/styles are ordered: error, not connected, progress1, progress2, connected.

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ define({
189189
"LIVE_DEV_MORE_OPTIONS_DUPLICATE": "Duplicate",
190190
"LIVE_DEV_MORE_OPTIONS_DELETE": "Delete",
191191
"LIVE_DEV_MORE_OPTIONS_AI": "Edit with AI",
192+
"LIVE_DEV_IMAGE_GALLERY_USE_IMAGE": "Use this image",
192193
"LIVE_DEV_AI_PROMPT_PLACEHOLDER": "Ask Phoenix AI to modify this element...",
193194
"LIVE_PREVIEW_CUSTOM_SERVER_BANNER": "Getting preview from your custom server {0}",
194195
"LIVE_PREVIEW_MODE_PREVIEW": "Preview Mode",

0 commit comments

Comments
 (0)