Просмотр исходного кода

Fixed share button on gridm ode

Toby Chui 2 лет назад
Родитель
Сommit
3c09042132

+ 23 - 0
web/SystemAO/file_system/file_explorer.css

@@ -384,6 +384,29 @@ body{
     padding-bottom: 0.4em;
 }
 
+/* Share icon overlay for card view */
+.fileviewList .fileObject.card .image{
+    position: relative;
+}
+
+.fileviewList .fileObject.card .shareOverlay.visible{
+    position: absolute;
+    bottom: 0.4em;
+    left: 0.4em;
+    padding-top: 4px;
+    background-color: var(--navi_bgcolor);
+    height: 28px;
+    width: 28px;
+    border-radius: 0.4em;
+    border: 1px solid var(--divider);
+    box-shadow: 3px 1px 5px 1px rgba(158,158,158,0.2);
+    opacity: 0.9;
+}
+
+.fileviewList .fileObject.card .shareOverlay.visible:hover{
+    /*opacity: 0.6;*/
+}
+
 .fileviewList .fileObject.card .content .header{
     font-size: 1.2em;
     font-weight: 500;

+ 6 - 8
web/SystemAO/file_system/file_explorer.html

@@ -213,8 +213,6 @@
                 <div class="popupbuttons allowHover" onclick="cancelDelete(); ">
                     <i class="remove icon"></i> <span locale="opr/remove/cancel">Cancel</span>
                 </div>
-                
-              
             </div>
         </div>
 
@@ -546,6 +544,7 @@
                         $(".dropdown").dropdown();
                         $("#sortingMethodSelector").dropdown("set selected", sortMode);
                         updateSelectedObjectsCount();
+                        initWindowSizes(false);
                     });
                 }else{
                     //Applocale not found. Is this a trim down version of ArozOS?
@@ -1076,15 +1075,12 @@
                     var icon = "folder";
                     var shareicon = "";
                     if (isShared == true){
-                        shareicon = `<button class="sharebtn" onclick='handleShareFilebuttonClick(event, this);' style="margin-left: 4px; height: 16px;">
+                        shareicon = `<button class="sharebtn" onclick='handleShareFilebuttonClick(event, this);' style="margin-left: 0; height: 16px;">
                             <i class='share alternate icon'></i>
                         </button>`
                     }
                     if (viewMode == "list"){
                         var textclass = "normal object";
-                        if (currentTheme == "darkTheme"){
-                            textclass += " darkTheme";
-                        }
                         var displayName = filename;
                         try{
                             //Try to decode it using ArozOS Beta naming scheme
@@ -1121,13 +1117,15 @@
                         <div class="fileObject card" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="folder" style="width:${gridSize}px; display:inline-block !important;vertical-align:top; height:15em; margin-top:0px !important; overflow:hidden;">
                             <div class="image" style="text-align: center;">
                                 <img draggable="true"ondragstart="disableDrag(event);" src="../../img/desktop/files_icon/${filesIconTheme}/folder.png" style="height: 148px; width: 148px; display: inline-block;">
+                                <div class="shareOverlay ${isShared?"visible":""}">${shareicon}</div>
                             </div>
                             <div class="content" style="font-size: 12px;">
-                                <div class="header ${textclass}" title="${filename}">${displayName} ${shareicon}</div>
+                                <div class="header ${textclass}" title="${filename}">${displayName}</div>
                             </div>
+                            
                         </div>`);
                     }else if (viewMode == "details"){
-                        let isSharedIcon = '<i class="ui grey remove icon" style="margin-left: 8px;"></i>';
+                        let isSharedIcon = '<i class="ui grey remove icon" style="margin-left: 6px;"></i>';
                         if (isShared){
                             isSharedIcon = shareicon;
                         }