Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 115d31a

Browse files
authored
Merge pull request #46 from KoenZomers/AddSharedWithMe
Added Shared With Me functionality
2 parents aded6c8 + 8814d2e commit 115d31a

19 files changed

+1523
-957
lines changed
184 KB
Binary file not shown.

KeeOneDriveSync.plgx

10.1 KB
Binary file not shown.

KoenZomers.KeePass.OneDriveSync/Configuration.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ public class Configuration : ICloneable
7474
[DataMember]
7575
public string RemoteFolderId { get; set; }
7676

77+
/// <summary>
78+
/// Gets or sets the unique identifier of the drive on OneDrive in which the file is stored. If NULL then the drive of the current user will be used.
79+
/// </summary>
80+
[DataMember]
81+
public string RemoteDriveId { get; set; }
82+
83+
/// <summary>
84+
/// Gets or sets the unique identifier of the file on OneDrive
85+
/// </summary>
86+
[DataMember]
87+
public string RemoteItemId { get; set; }
88+
7789
/// <summary>
7890
/// Gets or sets the filename under which the database is stored on OneDrive
7991
/// </summary>

KoenZomers.KeePass.OneDriveSync/Forms/OneDriveConfigDetailsForm.Designer.cs

Lines changed: 101 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

KoenZomers.KeePass.OneDriveSync/Forms/OneDriveConfigDetailsForm.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private void OneDriveConfigDetailsForm_Load(object sender, EventArgs e)
3131

3232
private void ShowConfiguration()
3333
{
34-
LocationNameLabel.Text = _configuration.Value.CloudStorageType == CloudStorageType.SharePoint ? "SharePoint site:" : "OneDrive:";
34+
LocationNameLabel.Text = _configuration.Value.CloudStorageType == CloudStorageType.SharePoint ? "SharePoint site:" : "OneDrive name:";
3535
LastSyncedLabel.Text = string.Format(LastSyncedLabel.Text, _configuration.Value.CloudStorageType);
3636
LastVerifiedLabel.Text = string.Format(LastVerifiedLabel.Text, _configuration.Value.CloudStorageType);
3737
OneDriveNameTextbox.Text = _configuration.Value.DoNotSync ? "Not enabled for sync" : _configuration.Value.CloudStorageType == CloudStorageType.SharePoint ? _configuration.Value.RemoteDatabasePath + (string.IsNullOrEmpty(_configuration.Value.OneDriveName) ? "" : " (" + _configuration.Value.OneDriveName + ")") : _configuration.Value.OneDriveName;
@@ -46,6 +46,9 @@ private void ShowConfiguration()
4646
LocalKeePassFileHashTextbox.Text = _configuration.Value.LocalFileHash;
4747
OneDriveEtagTextBox.Text = _configuration.Value.ETag;
4848
ForceSyncButton.Enabled = !_configuration.Value.DoNotSync && KoenZomersKeePassOneDriveSyncExt.Host.Database.IOConnectionInfo.Path.Equals(_configuration.Key, StringComparison.InvariantCultureIgnoreCase);
49+
ItemIdTextBox.Text = _configuration.Value.RemoteItemId;
50+
FolderIdTextBox.Text = _configuration.Value.RemoteFolderId;
51+
DriveIdTextBox.Text = _configuration.Value.RemoteDriveId;
4952
}
5053

5154
private void CloseButton_Click(object sender, EventArgs e)
@@ -103,5 +106,15 @@ private void LocalDatabasePathLinkLabel_LinkClicked(object sender, LinkLabelLink
103106

104107
// Both the file and the parent folder no longer exist, nothing we can do
105108
}
109+
110+
private void ItemIdLabel_Click(object sender, EventArgs e)
111+
{
112+
113+
}
114+
115+
private void ItemIdTextBox_TextChanged(object sender, EventArgs e)
116+
{
117+
118+
}
106119
}
107120
}

0 commit comments

Comments
 (0)