@@ -1219,6 +1219,12 @@ function RemoteFunctions(config = {}) {
12191219 <svg viewBox="0 0 640 640" fill="currentColor">
12201220 <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"/>
12211221 </svg>
1222+ ` ,
1223+
1224+ folderSettings : `
1225+ <svg viewBox="0 0 24 24" fill="currentColor">
1226+ <path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>
1227+ </svg>
12221228 `
12231229 } ;
12241230
@@ -2301,10 +2307,35 @@ function RemoteFunctions(config = {}) {
23012307 .phoenix-select-image-btn:hover {
23022308 background: rgba(21,25,36,0.85) !important;
23032309 border-color: rgba(255,255,255,0.25) !important;
2304- transform: scale(1.05) !important;
23052310 box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
23062311 }
23072312
2313+ .phoenix-ribbon-folder-settings {
2314+ background: rgba(21,25,36,0.65) !important;
2315+ border: 1px solid rgba(255,255,255,0.14) !important;
2316+ color: #eaeaf0 !important;
2317+ cursor: pointer !important;
2318+ padding: 2px 6px 1px 6px !important;
2319+ border-radius: 6px !important;
2320+ margin-right: 8px !important;
2321+ transition: all 0.2s ease !important;
2322+ font-size: 12px !important;
2323+ display: flex !important;
2324+ align-items: center !important;
2325+ justify-content: center !important;
2326+ }
2327+
2328+ .phoenix-ribbon-folder-settings:hover {
2329+ background: rgba(21,25,36,0.85) !important;
2330+ border-color: rgba(255,255,255,0.25) !important;
2331+ box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
2332+ }
2333+
2334+ .phoenix-ribbon-folder-settings svg {
2335+ width: 16px !important;
2336+ height: 16px !important;
2337+ }
2338+
23082339 .phoenix-ribbon-close {
23092340 background: rgba(21,25,36,0.65) !important;
23102341 border: 1px solid rgba(255,255,255,0.14) !important;
@@ -2320,7 +2351,6 @@ function RemoteFunctions(config = {}) {
23202351 .phoenix-ribbon-close:hover {
23212352 background: rgba(21,25,36,0.85) !important;
23222353 border-color: rgba(255,255,255,0.25) !important;
2323- transform: scale(1.05) !important;
23242354 box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
23252355 }
23262356
@@ -2461,6 +2491,9 @@ function RemoteFunctions(config = {}) {
24612491 </div>
24622492 </div>
24632493 <div class="phoenix-ribbon-header-right">
2494+ <button class="phoenix-ribbon-folder-settings" title="Select image download folder">
2495+ ${ ICONS . folderSettings }
2496+ </button>
24642497 <button class="phoenix-ribbon-close">×</button>
24652498 </div>
24662499 </div>
@@ -2725,6 +2758,7 @@ function RemoteFunctions(config = {}) {
27252758 const searchInput = this . _shadow . querySelector ( '.phoenix-ribbon-search input' ) ;
27262759 const searchButton = this . _shadow . querySelector ( '.phoenix-ribbon-search-btn' ) ;
27272760 const closeButton = this . _shadow . querySelector ( '.phoenix-ribbon-close' ) ;
2761+ const folderSettingsButton = this . _shadow . querySelector ( '.phoenix-ribbon-folder-settings' ) ;
27282762 const navLeft = this . _shadow . querySelector ( '.phoenix-ribbon-nav.left' ) ;
27292763 const navRight = this . _shadow . querySelector ( '.phoenix-ribbon-nav.right' ) ;
27302764 const selectImageBtn = this . _shadow . querySelector ( '.phoenix-select-image-btn' ) ;
@@ -2778,6 +2812,20 @@ function RemoteFunctions(config = {}) {
27782812 } ) ;
27792813 }
27802814
2815+ if ( folderSettingsButton ) {
2816+ folderSettingsButton . addEventListener ( 'click' , ( e ) => {
2817+ e . stopPropagation ( ) ;
2818+ // send message to LivePreviewEdit to show folder selection dialog
2819+ const tagId = this . element . getAttribute ( "data-brackets-id" ) ;
2820+ window . _Brackets_MessageBroker . send ( {
2821+ livePreviewEditEnabled : true ,
2822+ resetImageFolderSelection : true ,
2823+ element : this . element ,
2824+ tagId : Number ( tagId )
2825+ } ) ;
2826+ } ) ;
2827+ }
2828+
27812829 if ( navLeft ) {
27822830 navLeft . addEventListener ( 'click' , ( e ) => {
27832831 e . stopPropagation ( ) ;
0 commit comments