Skip to content

Commit eeb13c2

Browse files
committed
feat: add choose download folder button
1 parent 3d6adae commit eeb13c2

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,23 @@ function RemoteFunctions(config = {}) {
21342134
transition: all 0.2s ease !important;
21352135
}
21362136
2137+
.phoenix-ribbon-folder-select {
2138+
background: rgba(0,0,0,0.5) !important;
2139+
border: none !important;
2140+
color: white !important;
2141+
cursor: pointer !important;
2142+
padding: 4px 8px !important;
2143+
border-radius: 3px !important;
2144+
margin-right: 8px !important;
2145+
display: flex !important;
2146+
align-items: center !important;
2147+
justify-content: center !important;
2148+
}
2149+
2150+
.phoenix-ribbon-folder-select:hover {
2151+
background: rgba(0,0,0,0.7) !important;
2152+
}
2153+
21372154
.phoenix-ribbon-close {
21382155
background: rgba(0,0,0,0.5) !important;
21392156
border: none !important;
@@ -2250,6 +2267,11 @@ function RemoteFunctions(config = {}) {
22502267
</div>
22512268
</div>
22522269
<div class="phoenix-ribbon-header-right">
2270+
<button class="phoenix-ribbon-folder-select" title="${config.strings.imageGalleryChooseFolder}">
2271+
<svg viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
2272+
<path d="M10 4H4c-1.11 0-2 .89-2 2v12c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2h-8l-2-2z"/>
2273+
</svg>
2274+
</button>
22532275
<button class="phoenix-ribbon-close">×</button>
22542276
</div>
22552277
</div>
@@ -2529,6 +2551,7 @@ function RemoteFunctions(config = {}) {
25292551
const searchInput = this._shadow.querySelector('.phoenix-ribbon-search input');
25302552
const searchButton = this._shadow.querySelector('.phoenix-ribbon-search-btn');
25312553
const closeButton = this._shadow.querySelector('.phoenix-ribbon-close');
2554+
const folderSelectBtn = this._shadow.querySelector('.phoenix-ribbon-folder-select');
25322555
const navLeft = this._shadow.querySelector('.phoenix-ribbon-nav.left');
25332556
const navRight = this._shadow.querySelector('.phoenix-ribbon-nav.right');
25342557
const selectImageBtn = this._shadow.querySelector('.phoenix-select-image-btn');
@@ -2582,6 +2605,13 @@ function RemoteFunctions(config = {}) {
25822605
});
25832606
}
25842607

2608+
if (folderSelectBtn) {
2609+
folderSelectBtn.addEventListener('click', (e) => {
2610+
e.stopPropagation();
2611+
console.log('i got clicked');
2612+
});
2613+
}
2614+
25852615
if (navLeft) {
25862616
navLeft.addEventListener('click', (e) => {
25872617
e.stopPropagation();

src/LiveDevelopment/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ define(function main(require, exports, module) {
8383
aiPromptPlaceholder: Strings.LIVE_DEV_AI_PROMPT_PLACEHOLDER,
8484
imageGalleryUseImage: Strings.LIVE_DEV_IMAGE_GALLERY_USE_IMAGE,
8585
imageGallerySelectFromComputer: Strings.LIVE_DEV_IMAGE_GALLERY_SELECT_FROM_COMPUTER,
86+
imageGalleryChooseFolder: Strings.LIVE_DEV_IMAGE_GALLERY_CHOOSE_FOLDER,
8687
imageGallerySearchPlaceholder: Strings.LIVE_DEV_IMAGE_GALLERY_SEARCH_PLACEHOLDER
8788
}
8889
};

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ define({
191191
"LIVE_DEV_MORE_OPTIONS_AI": "Edit with AI",
192192
"LIVE_DEV_IMAGE_GALLERY_USE_IMAGE": "Use this image",
193193
"LIVE_DEV_IMAGE_GALLERY_SELECT_FROM_COMPUTER": "Select image from computer",
194+
"LIVE_DEV_IMAGE_GALLERY_CHOOSE_FOLDER": "Choose download folder",
194195
"LIVE_DEV_IMAGE_GALLERY_SEARCH_PLACEHOLDER": "Search images...",
195196
"LIVE_DEV_AI_PROMPT_PLACEHOLDER": "Ask Phoenix AI to modify this element...",
196197
"LIVE_PREVIEW_CUSTOM_SERVER_BANNER": "Getting preview from your custom server {0}",

0 commit comments

Comments
 (0)