SFTP fixes
This commit is contained in:
parent
2b9e615e51
commit
daf53226c3
3 changed files with 54 additions and 36 deletions
|
@ -85,7 +85,7 @@ void OtherProtocolsLogic::onPushButtonSftpMountDriveClicked()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// QString cmd = QString("net use \\\\sshfs\\%1@51.77.32.168!%2 /USER:%1 %3")
|
// QString cmd = QString("net use \\\\sshfs\\%1@x.x.x.x!%2 /USER:%1 %3")
|
||||||
// .arg(labelTftpUserNameText())
|
// .arg(labelTftpUserNameText())
|
||||||
// .arg(labelTftpPortText())
|
// .arg(labelTftpPortText())
|
||||||
// .arg(labelTftpPasswordText());
|
// .arg(labelTftpPasswordText());
|
||||||
|
|
|
@ -120,6 +120,11 @@ PageBase {
|
||||||
delegateModelGroup.remove(0,count);
|
delegateModelGroup.remove(0,count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function selectAll(){
|
||||||
|
for(var i = 0; i < visualModel.count; i++){
|
||||||
|
visualModel.items.get(i).inMultiSelect = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
|
@ -213,35 +218,6 @@ PageBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onPressed: {
|
|
||||||
if (event.key == Qt.Key_PageUp) {
|
|
||||||
let idx = tb.indexAt(1, tb.contentY)
|
|
||||||
tb.positionViewAtIndex(idx-20, ListView.Beginning)
|
|
||||||
event.accepted = true
|
|
||||||
}
|
|
||||||
else if (event.key == Qt.Key_PageDown) {
|
|
||||||
let idx = tb.indexAt(1, tb.contentY)
|
|
||||||
tb.positionViewAtIndex(idx+20, ListView.Beginning)
|
|
||||||
event.accepted = true
|
|
||||||
}
|
|
||||||
else if (event.key == Qt.Key_Home) {
|
|
||||||
tb.positionViewAtBeginning()
|
|
||||||
event.accepted = true
|
|
||||||
}
|
|
||||||
else if (event.key == Qt.Key_End) {
|
|
||||||
tb.positionViewAtEnd()
|
|
||||||
event.accepted = true
|
|
||||||
}
|
|
||||||
else if (event.key == Qt.Key_Delete) {
|
|
||||||
let items = []
|
|
||||||
for(let i = 0; i < visualModel.count; i++){
|
|
||||||
if (visualModel.items.get(i).inMultiSelect) items.push(i)
|
|
||||||
}
|
|
||||||
SitesLogic.onPushButtonSitesDeleteClicked(items)
|
|
||||||
event.accepted = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: tb
|
id: tb
|
||||||
x: 20
|
x: 20
|
||||||
|
@ -256,9 +232,41 @@ PageBase {
|
||||||
activeFocusOnTab: true
|
activeFocusOnTab: true
|
||||||
keyNavigationEnabled: true
|
keyNavigationEnabled: true
|
||||||
property int currentRow: -1
|
property int currentRow: -1
|
||||||
//model: SitesLogic.tableViewSitesModel
|
|
||||||
model: visualModel
|
model: visualModel
|
||||||
|
|
||||||
|
Keys.onPressed: {
|
||||||
|
if (event.key === Qt.Key_PageUp) {
|
||||||
|
let idx = tb.indexAt(1, tb.contentY)
|
||||||
|
tb.positionViewAtIndex(idx-20, ListView.Beginning)
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
else if (event.key === Qt.Key_PageDown) {
|
||||||
|
let idx = tb.indexAt(1, tb.contentY)
|
||||||
|
tb.positionViewAtIndex(idx+20, ListView.Beginning)
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
else if (event.key === Qt.Key_Home) {
|
||||||
|
tb.positionViewAtBeginning()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
else if (event.key === Qt.Key_End) {
|
||||||
|
tb.positionViewAtEnd()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
else if (event.key === Qt.Key_Delete) {
|
||||||
|
let items = []
|
||||||
|
for(let i = 0; i < visualModel.count; i++){
|
||||||
|
if (visualModel.items.get(i).inMultiSelect) items.push(i)
|
||||||
|
}
|
||||||
|
SitesLogic.onPushButtonSitesDeleteClicked(items)
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
else if (event.key === Qt.Key_A) {
|
||||||
|
delegateModelGroup.selectAll()
|
||||||
|
event.accepted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
|
@ -288,9 +296,7 @@ PageBase {
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
text: qsTr("Select all")
|
text: qsTr("Select all")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
for(var i = 0; i < visualModel.count; i++){
|
delegateModelGroup.selectAll()
|
||||||
visualModel.items.get(i).inMultiSelect = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,11 +96,23 @@ PageProtocolBase {
|
||||||
//- Install the latest version of SSHFS-Win. Choose the x64 or x86 installer according to your computer's architecture [https://github.com/billziss-gh/sshfs-win/releases]"
|
//- Install the latest version of SSHFS-Win. Choose the x64 or x86 installer according to your computer's architecture [https://github.com/billziss-gh/sshfs-win/releases]"
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
text:"In order to mount remote SFTP folder as local drive, perform following steps:
|
readonly property string windows_text: "In order to mount remote SFTP folder as local drive, perform following steps:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Install the latest version of <a href=\"https://github.com/billziss-gh/winfsp/releases/latest\">WinFsp</a>.</li>
|
<li>Install the latest version of <a href=\"https://github.com/billziss-gh/winfsp/releases/latest\">WinFsp</a>.</li>
|
||||||
<li>Install the latest version of <a href=\"https://github.com/billziss-gh/sshfs-win/releases\">SSHFS-Win</a>. Choose the x64 or x86 installer according to your computer's architecture.</li>
|
<li>Install the latest version of <a href=\"https://github.com/billziss-gh/sshfs-win/releases\">SSHFS-Win</a>. Choose the x64 or x86 installer according to your computer's architecture.</li>
|
||||||
</ul>"
|
</ul>"
|
||||||
|
|
||||||
|
readonly property string macos_text: "In order to mount remote SFTP folder as local folder, perform following steps:
|
||||||
|
<ul>
|
||||||
|
<li>Install the latest version of <a href=\"https://osxfuse.github.io/\">macFUSE</a>.</li>
|
||||||
|
</ul>"
|
||||||
|
|
||||||
|
text: {
|
||||||
|
if (Qt.platform.os == "windows") return windows_text
|
||||||
|
else if (Qt.platform.os == "osx") return macos_text
|
||||||
|
else if (Qt.platform.os == "linux") return ""
|
||||||
|
else return ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBoxType {
|
CheckBoxType {
|
||||||
|
@ -110,7 +122,7 @@ PageProtocolBase {
|
||||||
x: 30
|
x: 30
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 21
|
height: 21
|
||||||
text: qsTr("Restore drive after restart")
|
text: qsTr("Restore drive when client starts")
|
||||||
checked: logic.checkBoxSftpRestoreChecked
|
checked: logic.checkBoxSftpRestoreChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
logic.checkBoxSftpRestoreChecked = checked
|
logic.checkBoxSftpRestoreChecked = checked
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue