From d9150528298160b2f36690ac54af787b238b3e4a Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 13 Jun 2025 16:29:12 +0200 Subject: [PATCH 1/7] Add funding.json and FUNDING.json to .gitignore This may fix issues with case-insensitive file systems --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 346d62bce..78212683a 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,9 @@ www/common/onlyoffice/v* www/common/worker.bundle.js _build +FUNDING.json +funding.json + # ---> Node # Logs logs From e831c6a984eb0b5a9c9d6bf9c4e16bbe403e32ed Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Wed, 2 Apr 2025 18:21:24 +0300 Subject: [PATCH 2/7] Remove side splitter from drive on mobile #1092 --- customize.dist/src/less2/include/drive.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/customize.dist/src/less2/include/drive.less b/customize.dist/src/less2/include/drive.less index f9982fe2b..56c99ccdd 100644 --- a/customize.dist/src/less2/include/drive.less +++ b/customize.dist/src/less2/include/drive.less @@ -138,6 +138,12 @@ display: none; } } + + #cp-app-drive-content-container { + .cp-splitter { + display: none; + } + } } } From c778c5ad884124e757097d2a5ebf5d21c5dd3fa8 Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Tue, 22 Apr 2025 14:05:53 +0300 Subject: [PATCH 3/7] Spillter functionality on touch #1831 --- www/common/drive-ui.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 2c3213676..e4cc32997 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -664,19 +664,23 @@ define([ h('i.fa.fa-ellipsis-v') ]); $contentContainer.append(splitter); - APP.$splitter = $(splitter).on('mousedown', function (e) { + APP.$splitter = $(splitter).on('mousedown touchstart', function (e) { e.preventDefault(); - var x = e.pageX; + var x = e.type === 'touchstart' ? e.originalEvent.touches[0].pageX : e.pageX; var w = $tree.width(); + var handler = function (evt) { - if (evt.type === 'mouseup') { - $(window).off('mouseup mousemove', handler); - return; + if (evt.type === 'mouseup' || evt.type === 'touchend') { + $(window).off('mouseup mousemove touchend touchmove', handler); + return; } - $tree.css('width', (w - x + evt.pageX) + 'px'); + var pageX = evt.type === 'touchmove' + ? evt.originalEvent.touches[0].pageX + : evt.pageX; + $tree.css('width', (w - x + pageX) + 'px'); }; - $(window).off('mouseup mousemove', handler); - $(window).on('mouseup mousemove', handler); + $(window).off('mouseup mousemove touchend touchmove', handler); + $(window).on('mouseup mousemove touchend touchmove', handler); }); // TOOLBAR From 7ac02b4037e26ed2315c27c61be0e1c8968e346f Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Tue, 22 Apr 2025 15:26:09 +0300 Subject: [PATCH 4/7] Make adjustments for firefox dragging #1092 --- customize.dist/src/less2/include/drive.less | 9 ++++++++- www/common/drive-ui.js | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/customize.dist/src/less2/include/drive.less b/customize.dist/src/less2/include/drive.less index 56c99ccdd..7d7adbf65 100644 --- a/customize.dist/src/less2/include/drive.less +++ b/customize.dist/src/less2/include/drive.less @@ -499,7 +499,7 @@ } } } - + /* CONTENT */ #cp-app-drive-content-container { display: flex; @@ -518,6 +518,13 @@ display: flex; align-items: center; justify-content: flex-end; + touch-action: none; + -ms-touch-action: none; + -webkit-touch-action: none; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; &:hover { border-left: 1px solid @cryptpad_text_col; } diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index e4cc32997..05fd912d9 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -679,10 +679,10 @@ define([ : evt.pageX; $tree.css('width', (w - x + pageX) + 'px'); }; - $(window).off('mouseup mousemove touchend touchmove', handler); + $(window).off('mouseup mousemove touchend touchmove', handler, { passive: false }); $(window).on('mouseup mousemove touchend touchmove', handler); }); - + // TOOLBAR // DRIVE From 602f8f8df3f180e85077510ac04c4e10874f61cb Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Tue, 22 Apr 2025 15:26:09 +0300 Subject: [PATCH 5/7] Make adjustments for firefox dragging #1092 From a280a1a6b461b5daf0d5911f7ddebe14c514aabf Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Fri, 13 Jun 2025 14:34:08 +0300 Subject: [PATCH 6/7] Save --- www/common/drive-ui.js | 47 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 05fd912d9..dbda5df3c 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -660,29 +660,30 @@ define([ var $trashContextMenu = $("#cp-app-drive-context-trash"); $content.attr("tabindex", "0"); - var splitter = h('div.cp-splitter', [ - h('i.fa.fa-ellipsis-v') - ]); - $contentContainer.append(splitter); - APP.$splitter = $(splitter).on('mousedown touchstart', function (e) { - e.preventDefault(); - var x = e.type === 'touchstart' ? e.originalEvent.touches[0].pageX : e.pageX; - var w = $tree.width(); - - var handler = function (evt) { - if (evt.type === 'mouseup' || evt.type === 'touchend') { - $(window).off('mouseup mousemove touchend touchmove', handler); - return; - } - var pageX = evt.type === 'touchmove' - ? evt.originalEvent.touches[0].pageX - : evt.pageX; - $tree.css('width', (w - x + pageX) + 'px'); - }; - $(window).off('mouseup mousemove touchend touchmove', handler, { passive: false }); - $(window).on('mouseup mousemove touchend touchmove', handler); - }); - + if (APP.currentUser) { + var splitter = h('div.cp-splitter', [ + h('i.fa.fa-ellipsis-v') + ]); + $contentContainer.append(splitter); + APP.$splitter = $(splitter).on('mousedown touchstart', function (e) { + e.preventDefault(); + var x = e.type === 'touchstart' ? e.originalEvent.touches[0].pageX : e.pageX; + var w = $tree.width(); + + var handler = function (evt) { + if (evt.type === 'mouseup' || evt.type === 'touchend') { + $(window).off('mouseup mousemove touchend touchmove', handler); + return; + } + var pageX = evt.type === 'touchmove' + ? evt.originalEvent.touches[0].pageX + : evt.pageX; + $tree.css('width', (w - x + pageX) + 'px'); + }; + $(window).off('mouseup mousemove touchend touchmove', handler, { passive: false }); + $(window).on('mouseup mousemove touchend touchmove', handler); + }); + } // TOOLBAR // DRIVE From e01302703f9c2b4a6ee13f09f812f7c870c0cd77 Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Fri, 13 Jun 2025 14:39:34 +0300 Subject: [PATCH 7/7] Only add splitter to logged in user drive # 1092 --- www/common/drive-ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index dbda5df3c..ae84d4368 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -660,7 +660,7 @@ define([ var $trashContextMenu = $("#cp-app-drive-context-trash"); $content.attr("tabindex", "0"); - if (APP.currentUser) { + if (APP.loggedIn) { var splitter = h('div.cp-splitter', [ h('i.fa.fa-ellipsis-v') ]);