]> insang Git - ZipProject.git/commitdiff
오랜만에 css등 많이 바꿈
authorjocloud <dhkq92@icloud.com>
Mon, 18 May 2020 12:44:52 +0000 (12:44 +0000)
committerjocloud <dhkq92@icloud.com>
Mon, 18 May 2020 12:44:52 +0000 (12:44 +0000)
12 files changed:
ZipProject/Controllers/WebZipController.cs
ZipProject/Program.cs
ZipProject/Properties/PublishProfiles/FolderProfile.pubxml
ZipProject/Views/Shared/_Navbar.cshtml
ZipProject/Views/WebZip/Index.cshtml
ZipProject/Views/WebZip/partial_zip.cshtml
ZipProject/_publish/ZipProject.runtimeconfig.json
ZipProject/_publish/wwwroot/js/Zip/Index.js
ZipProject/wwwroot/css/site.css
ZipProject/wwwroot/js/Zip/Index.js
ZipProject/wwwroot/js/Zip/partial_zip.js
packages-microsoft-prod.deb [new file with mode: 0644]

index 1d07e8efd7fef6cd4dab3315cb59627b7f33a8fd..dad008b9c9414b7029a9ea2d5037802ec3a5e386 100644 (file)
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Diagnostics;
@@ -51,6 +51,8 @@ namespace ZipProject.Controllers {
       Dictionary<string, object> data = new Dictionary<string, object> ();
       ZipModel zipModel = new ZipModel ();
 
+      Dictionary<string, string> test= new Dictionary<string, string> ();
+
       string[] listDir = dirList.Split (',');
       string filename = listDir[0] + "." + format;
 
index b8744397c2cb8a9400dd78bf4ba6a3f17abf1d93..6e6e835b7564f854653527eceab80aee6c13c8e5 100644 (file)
@@ -1,4 +1,4 @@
-using System;\r
+using System;\r
 using System.Collections.Generic;\r
 using System.IO;\r
 using System.Linq;\r
@@ -11,7 +11,7 @@ using Microsoft.Extensions.Logging;
 namespace ZipProject {\r
   public class Program {\r
     public static void Main (string[] args) {\r
-      CreateWebHostBuilder (args).UseUrls ("http://localhost:5001").Build ().Run ();\r
+      CreateWebHostBuilder (args).UseUrls ("http://localhost:9999").Build ().Run ();\r
     }\r
 \r
     public static IWebHostBuilder CreateWebHostBuilder (string[] args) =>\r
index 83d5458e0e0b40dd41d668f0d63f360ad4555147..2be616dceac77a41de3a42a38b257656aaa767af 100644 (file)
@@ -6,7 +6,7 @@
     <LastUsedPlatform>AnyCPU</LastUsedPlatform>
     <publishUrl>_publish</publishUrl>
     <DeleteExistingFiles>false</DeleteExistingFiles>
-    <TargetFramework>netcoreapp2.1</TargetFramework>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
     <SelfContained>false</SelfContained>
     <_IsPortable>true</_IsPortable>
   </PropertyGroup>
index 15bc04d69f26be798c78646a6c2a8c650b5de422..f2db693587460692acf1eaaf7c8869e5861ee15c 100644 (file)
@@ -1,4 +1,4 @@
-@*\r
+@*\r
   For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860\r
 *@\r
 @{\r
index fbae7e9caec49042e449590e7ea473c5a227e267..6d8c9cd11545782c7fee62604a7233c150197d5b 100644 (file)
@@ -1,4 +1,4 @@
-@*\r
+@*\r
   For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860\r
 *@\r
 @{\r
 \r
   <div class="webzip-section-zipbutton">\r
     <div class="btn-group btn-group-toggle" data-toggle="buttons">\r
-      <label class="btn btn-danger btn-secondary" id="partial_zip" style="outline: none; width: 120px; color: #879292; background-color: #e5e5e5;\r
-            border: 1.5px solid #e5e5e5; font-weight: 500; font-size: 16px; border-top-left-radius: 10px; border-bottom-left-radius: 10px;">\r
+      <label class="btn btn-danger btn-secondary" id="partial_zip" \r
+            style="outline: none; width: 115px; color: black; background-color: #e5e5e5;\r
+            border: 1.5px solid #e5e5e5; font-weight: bold; font-size: 16px; border-top-left-radius: 10px; border-bottom-left-radius: 10px;">\r
         <input type="radio" name="options" autocomplete="off" /> @LanguagePack.GetText(lang, "zip")\r
       </label>\r
       <label class="btn btn-danger btn-secondary" id="partial_unzip"\r
-             style="outline: none; width: 120px; color: #879292; background-color: #e5e5e5;\r
-            border: 1.5px solid #e5e5e5; font-weight: 500; font-size: 16px; border-top-right-radius: 10px; border-bottom-right-radius: 10px;">\r
+          style="outline: none; width: 115px; color: black; background-color: #e5e5e5;\r
+          border: 1.5px solid #e5e5e5; font-weight: bold; font-size: 16px; border-top-right-radius: 10px; border-bottom-right-radius: 10px;">\r
         <input type="radio" name="options" autocomplete="off" /> @LanguagePack.GetText(lang, "unzip")\r
       </label> \r
     </div>\r
   \r
   <script src="~/js/Zip/Index.js" asp-append-version="true"></script>\r
 \r
+<!-- #region 모바일 클릭, 더블클릭, 드래그(메뉴소환) 이벤트 -->\r
+  <script>\r
+    var bStartEvent= false;\r
+    var bMoveEvent= false;\r
+\r
+    htClickInfo= { //더블탭 판단하기위한 해시\r
+      sType: null,\r
+      nX: -1,\r
+      nY: -1,\r
+      nTime: 0\r
+    }\r
+\r
+    htDragInfo= {\r
+      startX: -1,\r
+      endX: -1,\r
+      startY: -1,\r
+      endY: -1\r
+    }\r
+\r
+    var nDoubleTapDuration= 200; //더블탭을 판단하는 기준 시간(ms)\r
+    var nTapThreshold= 5; //더블탭을 판단하는 거리\r
+    var oTapEventTimer= null; //탭-더블탭 대기 타이머\r
+\r
+    var filter = "win16|win32|win64|mac";\r
+    if(navigator.platform){\r
+      if(-1 == filter.indexOf(navigator.platform.toLowerCase()) || true){ //모바일접속일경우\r
+        document.addEventListener('touchstart', this.onStart.bind(this), false);\r
+        document.addEventListener('touchmove', this.onMove.bind(this), false);\r
+        document.addEventListener('touchend', this.onEnd.bind(this), false)\r
+      }\r
+    }\r
+    function initClearInfo(){\r
+      htClickInfo.sType= null;\r
+    }\r
+    function onStart(e) {\r
+      bStartEvent= true;\r
+      htDragInfo.startX= e.changedTouches[0].pageX;\r
+      htDragInfo.startY= e.changedTouches[0].pageY;\r
+    }\r
+    function onMove(e) {\r
+      if(!bStartEvent) {\r
+        return;\r
+      }\r
+      var nX= e.changedTouches[0].pageX;\r
+      var nY= e.changedTouches[0].pageY;\r
+\r
+      // 현재 touchmove에서 사용자 터치에 대한 움직임을 판단\r
+      nMoveType= getMoveType(nX, nY);\r
+\r
+      //수직스크롤\r
+      if (nMoveType == 1){\r
+      } else {\r
+      }\r
+    }\r
+    function getMoveType(x, y) {\r
+      //0은 수평, 1은 수직\r
+      var nMoveType= 1;\r
+      var nX= Math.abs(htClickInfo.nX-x);\r
+      var nY= Math.abs(htClickInfo.nY-y);\r
+      var nDis= nX + nY;\r
+\r
+\r
+      //현재 움직인 거리가 기준거리보다 적을땐 방향 판단하지않음\r
+      if (nDis< 25) {return nMoveType}\r
+\r
+      //수평 방향을 판단하는 기준 기울기\r
+      var nHSlope= ((window.innerHeight / 2) / window.innerWidth).toFixed(2) * 1;\r
+\r
+      //현재 터치의 기울기\r
+      var nSlope= parseFloat((nY / nX).toFixed(2), 10);\r
+\r
+      if(nSlope > nHSlope){\r
+        nMoveType= 1;\r
+      } else {\r
+        nMoveType= 0;\r
+      }\r
+      return nMoveType;\r
+    }\r
+    function onEnd(e) {\r
+      var nX= e.changedTouches[0].pageX;\r
+      var nY= e.changedTouches[0].pageY;\r
+      var nTime= e.timeStamp;\r
+\r
+      if ((htDragInfo.startY - nY <= 10 && htDragInfo.startY - nY >= -10) && htDragInfo.startX - nX < -30){\r
+        var menuX= parseInt($("#zipExplore").offset().top) + parseInt($("#toolbar_zipExplore").height()) + 5;\r
+        var menuY= parseInt($("#zipExplore").offset().left) + parseInt($("#zipExplore").width()) * 0.5;\r
+        HideContextmenu();\r
+        event.preventDefault();\r
+        HideContextmenu();\r
+        $(GetMenu("mobile"))\r
+          .appendTo("body")\r
+          .css({ top: menuX + "px", left: menuY + "px", 'z-index': '99999999' });\r
+      }\r
+\r
+      if(bStartEvent && !bMoveEvent) {\r
+        //이전 탭 이벤트와 시간차가 200ms 이하일경우\r
+        if(htClickInfo.sType == "tap" && (nTime - htClickInfo.nTime) <= nDoubleTapDuration){\r
+          if ((Math.abs(htClickInfo.nX - nX) <= nTapThreshold) && (Math.abs(htClickInfo.nY-nY) <= nTapThreshold)){\r
+            //더블탭으로 판단 (탭이 발생하지않게 타이머 초기화)\r
+            clearTimeout(oTapEventTimer);\r
+            //터치시 선택한 element에 id추가 (jquery selector를 사용하기위함)\r
+            if(e.path[0].tagName == 'LABEL'){\r
+              e.path[0].id= 'touchedElement';\r
+              $touchedElement= $("#touchedElement");\r
+\r
+              tagName= $touchedElement.prop('tagName');\r
+              prevElement= $touchedElement.prev().attr('is');\r
+              if (tagName == 'LABEL' && 'open|close'.indexOf(prevElement) != -1) {\r
+                AddDbclickEvent($touchedElement);\r
+              }\r
+            }\r
+          }\r
+        } else {\r
+          //탭 이벤트로 판단\r
+          //현재 탭 이벤트에 대한 정보를 업데이트\r
+          oTapEventTimer = setTimeout(function(){\r
+            // alert('tap')\r
+          }.bind(this), 300);\r
+          htClickInfo.sType= "tap";\r
+          htClickInfo.nX= nX;\r
+          htClickInfo.nY= nY;\r
+          htClickInfo.nTime= nTime;\r
+        }\r
+      } else {\r
+        //탭 이벤트가 아니므로 정보를 초기화\r
+        initClearInfo();\r
+      }\r
+\r
+\r
+      bStartEvent= false;\r
+      bMoveEvent= false;\r
+      $("#touchedElement").attr('id', '');\r
+    }\r
+\r
+  </script>\r
+  <!-- #endregion -->\r
+  <!-- #endregion -->\r
+\r
 }\r
index 31d6ac19a186c4575f02babc3347c2492886cfb0..007dcf0f1a0195cd44fbcf5eaea2b248921f1d51 100644 (file)
@@ -1,4 +1,4 @@
-@* zip page *@\r
+@* zip page *@\r
 @{\r
   string lang = (string)ViewData["lang"];\r
 }\r
@@ -68,7 +68,7 @@
 <div class="col-sm-12 webzip-section-sidezip webzip-section-explore" id="zipExplore"\r
      style="border: 0px solid lightgray; overflow-x: auto; white-space: nowrap; text-align: left; padding: 0; background-color: #f9f9f9f9;\r
      border-radius: 10px;">\r
-  <div style="background-color: lightgray; padding-left: 10px; padding-right: 10px; height: 25px; line-height: 2; margin-bottom: 5px; position: sticky; top: 0px;">\r
+  <div style="background-color: lightgray; padding-left: 10px; padding-right: 10px; height: 25px; line-height: 2; margin-bottom: 5px; position: sticky; top: 0px;" id="toolbar_zipExplore">\r
     <i class="fas fa-dot-circle" style="color: rgb(251, 64, 65);"></i>\r
     <i class="fas fa-circle" style="color: rgb(223, 181, 33);"></i>\r
     <i class="fas fa-circle" style="color: rgb(70, 186, 33);"></i>\r
index 304ba52deac382fdd8ae22ac299d13046f121fd1..1a601d52a0e25873b65dafc17d73350061a95a2b 100644 (file)
@@ -1,9 +1,9 @@
 {
   "runtimeOptions": {
-    "tfm": "netcoreapp2.1",
+    "tfm": "netcoreapp3.1",
     "framework": {
       "name": "Microsoft.AspNetCore.App",
-      "version": "2.1.1"
+      "version": "3.1.2"
     },
     "configProperties": {
       "System.GC.Server": true
index 6ffe06311cc77a98fc427df04ccc8a7baae24d5d..f38864177698f9646421e4c783a8f87786ec0e64 100644 (file)
@@ -1,4 +1,4 @@
-if (partial_page == "partial_zip") {
+if (partial_page == "partial_zip") {
   $(".webzip-section-zipbutton .btn").css("background-color", "#e5e5e5");
   $(".webzip-section-zipbutton .btn").css("color", "#879292");
   $("#" + partial_page).css("background-color", "#e5e5e5");
index ad295f2fa8ce3d918b6b04eeb3245c6c2fd3d015..09ab4d5e7f484e58f9d19001741a9b5d89ec29be 100644 (file)
@@ -1,4 +1,4 @@
-/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification\ \r
+/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification\ \r
 for details on configuring this project to bundle and minify static web assets. */\r
 body {\r
   padding-top: 50px;\r
@@ -60,6 +60,13 @@ body {
 \r
 .webzip-bodycontainer {\r
   text-align: center;\r
+  margin: auto;\r
+  width: 80%;\r
+}\r
+@media (min-width: 1300px){\r
+  .webzip-bodycontainer {\r
+    width: 1200px;\r
+  }\r
 }\r
 \r
 .webzip-ad-body {\r
@@ -141,7 +148,10 @@ ul {
 }\r
 \r
 .webzip-explore-placeholder {\r
-  border: 1px solid red;\r
+  border: 1px solid gray;\r
+  background-color: gray;\r
+  height: 21px;\r
+\r
 }\r
 \r
 .webzip-explore-liEmpty {\r
@@ -221,9 +231,7 @@ ul {
   z-index: 1000;\r
 }\r
 .webzip-btn-customMenu div {\r
-  padding: 1px;\r
-  padding-left: 10px;\r
-  padding-right: 10px;\r
+  padding: 5px 15px;\r
 }\r
 .webzip-btn-complate {\r
   float:right;\r
@@ -232,9 +240,10 @@ ul {
   padding-left: 5px; \r
   padding-right: 5px; \r
   margin-right: 5px; \r
-  position: sticky\r
+  position: relative\r
   text-align: center;\r
-  top: 420px;\r
+  top: 375px;\r
+  right: 20px;\r
 }\r
 .webzip-btn-complate div {\r
   background-color: rgb(255, 100, 100);\r
@@ -243,4 +252,18 @@ ul {
   padding-left: 10px;\r
   padding-right: 10px;\r
   border-radius: 5px;\r
+}\r
+@media (max-width: 768px){\r
+  .navbar-right {\r
+    float: right !important;\r
+    margin-right: -15px;\r
+    position: fixed;\r
+    right: 30px;\r
+    top: 0px;\r
+  }\r
+  .collapse {\r
+    display: block !important;\r
+    position: absolute;\r
+    top: -1px;\r
+  }\r
 }
\ No newline at end of file
index 6ffe06311cc77a98fc427df04ccc8a7baae24d5d..4d85dc215fa8c080d9c45fd3838a93d7acd07fd8 100644 (file)
@@ -1,14 +1,14 @@
-if (partial_page == "partial_zip") {
+if (partial_page == "partial_zip") {
   $(".webzip-section-zipbutton .btn").css("background-color", "#e5e5e5");
   $(".webzip-section-zipbutton .btn").css("color", "#879292");
   $("#" + partial_page).css("background-color", "#e5e5e5");
-  $("#" + partial_page).css("color", "#1f8ecd");
+  $("#" + partial_page).css("color", "black");
   $("#" + partial_page).addClass("active");
 } else {
   $(".webzip-section-zipbutton .btn").css("background-color", "#e5e5e5");
   $(".webzip-section-zipbutton .btn").css("color", "#879292");
   $("#" + partial_page).css("background-color", "#e5e5e5");
-  $("#" + partial_page).css("color", "#1f8ecd");
+  $("#" + partial_page).css("color", "black");
   $("#" + partial_page).addClass("active");
 }
 
index a330cc9fb84b9f270109d06fe5528a2386766978..cba1557e5f9ce5d1f0980ce4fcbc067f6b896815 100644 (file)
@@ -1,4 +1,4 @@
-var selected = $("#zipExplore directory:first ul:first"); //기본변수
+var selected = $("#zipExplore directory:first ul:first"); //기본변수
 var selected_nameChange; //폴더명 바꿀때 반응하는 라벨객체 선택변수
 var bullet_directory = '<i class="fas fa-folder"></i>'; //폰트어썸
 var bullet_directory_open = '<i class="fas fa-folder-open"></i>'; //폰트어썸
@@ -94,7 +94,7 @@ function AddFile($elem) {
     filesSize += frontfiles[i].size;
     var lab =
       '\
-    <li class="sort-file">\
+    <li class="sort-file" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-right: 15px;">\
       <bullet is="file"></bullet>\
       <label onmousedown="Clicked($(this))" key="">' +
       name +
@@ -293,6 +293,7 @@ function isTooLongFileName(val) {
 //압축 시작(백단에 파일들과 파일정보 map 전송)
 function RequestCompress() {
   if (parseInt(filesSize, 10) === 0) {
+    // alert(_Language["nofilesadded"]);
     alert(_Language["nofilesadded"]);
     $(".modal").css("display", "none");
     return false;
@@ -421,7 +422,8 @@ function NameFormToggle() {
   selected_nameChange.next().focus();
 }
 
-function GetMenu() {
+function GetMenu(gubun) {
+  $(".webzip-btn-customMenu").remove();
   var result = "";
   var first = '<div class="webzip-btn-customMenu">';
   var last = "</div>";
@@ -434,9 +436,15 @@ function GetMenu() {
     _Language["addFile"] +
     "</div>";
   var rename =
-    '<div class="webzip-btn" onclick="NameFormToggle();HideContextmenu();">' +
-    _Language["renameDir"] +
-    "</div>";
+    '<div class="webzip-btn" onclick="NameFormToggle();HideContextmenu();">';
+    if (selected_nameChange != undefined && selected_nameChange.prev().attr('is') == 'zip'){
+      rename += _Language["renameZip"];
+    } else {
+      rename += _Language["renameDir"];
+    }
+    rename += "</div>";
+
+
 
   result += first;
   if (selected_nameChange != undefined) {
@@ -444,7 +452,9 @@ function GetMenu() {
       result += rename;
     }
   }
-  result += addFolder;
+  if (gubun == undefined){
+    result += addFolder;
+  }
   result += chooseFiles;
   result += last;
 
@@ -491,3 +501,4 @@ directories.put(0, "example");
 // socket.onerror = function(e) {
 //   console.error(e.data);
 // };
+
diff --git a/packages-microsoft-prod.deb b/packages-microsoft-prod.deb
new file mode 100644 (file)
index 0000000..97fffd3
Binary files /dev/null and b/packages-microsoft-prod.deb differ