mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Merge pull request #5910 from EmilyLove26/master
[ownCloud] Added an option to enable animation friendly links
This commit is contained in:
commit
6258e2c582
5 changed files with 51 additions and 1 deletions
|
@ -55,6 +55,7 @@ public override GenericUploader CreateUploader(UploadersConfig config, TaskRefer
|
||||||
CreateShare = config.OwnCloudCreateShare,
|
CreateShare = config.OwnCloudCreateShare,
|
||||||
DirectLink = config.OwnCloudDirectLink,
|
DirectLink = config.OwnCloudDirectLink,
|
||||||
PreviewLink = config.OwnCloudUsePreviewLinks,
|
PreviewLink = config.OwnCloudUsePreviewLinks,
|
||||||
|
AnimationEnabled = config.OwnCloudAnimationFriendlyLinks,
|
||||||
IsCompatibility81 = config.OwnCloud81Compatibility,
|
IsCompatibility81 = config.OwnCloud81Compatibility,
|
||||||
AutoExpireTime = config.OwnCloudExpiryTime,
|
AutoExpireTime = config.OwnCloudExpiryTime,
|
||||||
AutoExpire = config.OwnCloudAutoExpire
|
AutoExpire = config.OwnCloudAutoExpire
|
||||||
|
@ -72,6 +73,7 @@ public sealed class OwnCloud : FileUploader
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public int AutoExpireTime { get; set; }
|
public int AutoExpireTime { get; set; }
|
||||||
public bool CreateShare { get; set; }
|
public bool CreateShare { get; set; }
|
||||||
|
public bool AnimationEnabled { get; set; }
|
||||||
public bool DirectLink { get; set; }
|
public bool DirectLink { get; set; }
|
||||||
public bool PreviewLink { get; set; }
|
public bool PreviewLink { get; set; }
|
||||||
public bool IsCompatibility81 { get; set; }
|
public bool IsCompatibility81 { get; set; }
|
||||||
|
@ -187,7 +189,7 @@ public string ShareFile(string path)
|
||||||
}
|
}
|
||||||
else if (DirectLink)
|
else if (DirectLink)
|
||||||
{
|
{
|
||||||
link += (IsCompatibility81 ? "/" : "&") + "download";
|
link += (IsCompatibility81 ? "/" : "&") + "download" + (AnimationEnabled ? "/" + System.IO.Path.GetFileName(path) : "");
|
||||||
}
|
}
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
|
@ -626,6 +626,7 @@ private void InitializeComponent()
|
||||||
this.txtVgymeUserKey = new System.Windows.Forms.TextBox();
|
this.txtVgymeUserKey = new System.Windows.Forms.TextBox();
|
||||||
this.lvlVgymeUserKey = new System.Windows.Forms.Label();
|
this.lvlVgymeUserKey = new System.Windows.Forms.Label();
|
||||||
this.tcUploaders = new System.Windows.Forms.TabControl();
|
this.tcUploaders = new System.Windows.Forms.TabControl();
|
||||||
|
this.cbOwnCloudAnimationFriendlyLinks = new System.Windows.Forms.CheckBox();
|
||||||
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
|
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
|
||||||
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
|
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
|
||||||
this.tpOtherUploaders.SuspendLayout();
|
this.tpOtherUploaders.SuspendLayout();
|
||||||
|
@ -2643,6 +2644,7 @@ private void InitializeComponent()
|
||||||
// tpOwnCloud
|
// tpOwnCloud
|
||||||
//
|
//
|
||||||
this.tpOwnCloud.BackColor = System.Drawing.SystemColors.Window;
|
this.tpOwnCloud.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
this.tpOwnCloud.Controls.Add(this.cbOwnCloudAnimationFriendlyLinks);
|
||||||
this.tpOwnCloud.Controls.Add(this.txtOwnCloudExpiryTime);
|
this.tpOwnCloud.Controls.Add(this.txtOwnCloudExpiryTime);
|
||||||
this.tpOwnCloud.Controls.Add(this.cbOwnCloudAutoExpire);
|
this.tpOwnCloud.Controls.Add(this.cbOwnCloudAutoExpire);
|
||||||
this.tpOwnCloud.Controls.Add(this.lblOwnCloudExpiryTime);
|
this.tpOwnCloud.Controls.Add(this.lblOwnCloudExpiryTime);
|
||||||
|
@ -4915,6 +4917,14 @@ private void InitializeComponent()
|
||||||
this.tcUploaders.Name = "tcUploaders";
|
this.tcUploaders.Name = "tcUploaders";
|
||||||
this.tcUploaders.SelectedIndex = 0;
|
this.tcUploaders.SelectedIndex = 0;
|
||||||
//
|
//
|
||||||
|
// cbOwnCloudAnimationFriendlyLinks
|
||||||
|
//
|
||||||
|
resources.ApplyResources(this.cbOwnCloudAnimationFriendlyLinks, "cbOwnCloudAnimationFriendlyLinks");
|
||||||
|
this.cbOwnCloudAnimationFriendlyLinks.Name = "cbOwnCloudAnimationFriendlyLinks";
|
||||||
|
this.cbOwnCloudAnimationFriendlyLinks.UseMnemonic = false;
|
||||||
|
this.cbOwnCloudAnimationFriendlyLinks.UseVisualStyleBackColor = true;
|
||||||
|
this.cbOwnCloudAnimationFriendlyLinks.CheckedChanged += new System.EventHandler(this.cbOwnCloudAnimationFriendlyLinks_CheckedChanged);
|
||||||
|
//
|
||||||
// tttvMain
|
// tttvMain
|
||||||
//
|
//
|
||||||
this.tttvMain.AutoSelectChild = true;
|
this.tttvMain.AutoSelectChild = true;
|
||||||
|
@ -5671,5 +5681,6 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.TextBox txtZWSURL;
|
private System.Windows.Forms.TextBox txtZWSURL;
|
||||||
private System.Windows.Forms.Label lblZWSToken;
|
private System.Windows.Forms.Label lblZWSToken;
|
||||||
private System.Windows.Forms.Label lblZWSURL;
|
private System.Windows.Forms.Label lblZWSURL;
|
||||||
|
private System.Windows.Forms.CheckBox cbOwnCloudAnimationFriendlyLinks;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -577,6 +577,7 @@ private void LoadFileUploaderSettings()
|
||||||
txtOwnCloudExpiryTime.Value = Config.OwnCloudExpiryTime;
|
txtOwnCloudExpiryTime.Value = Config.OwnCloudExpiryTime;
|
||||||
cbOwnCloudCreateShare.Checked = Config.OwnCloudCreateShare;
|
cbOwnCloudCreateShare.Checked = Config.OwnCloudCreateShare;
|
||||||
cbOwnCloudDirectLink.Checked = Config.OwnCloudDirectLink;
|
cbOwnCloudDirectLink.Checked = Config.OwnCloudDirectLink;
|
||||||
|
cbOwnCloudAnimationFriendlyLinks.Checked = Config.OwnCloudAnimationFriendlyLinks;
|
||||||
cbOwnCloud81Compatibility.Checked = Config.OwnCloud81Compatibility;
|
cbOwnCloud81Compatibility.Checked = Config.OwnCloud81Compatibility;
|
||||||
cbOwnCloudUsePreviewLinks.Checked = Config.OwnCloudUsePreviewLinks;
|
cbOwnCloudUsePreviewLinks.Checked = Config.OwnCloudUsePreviewLinks;
|
||||||
cbOwnCloudAutoExpire.Checked = Config.OwnCloudAutoExpire;
|
cbOwnCloudAutoExpire.Checked = Config.OwnCloudAutoExpire;
|
||||||
|
@ -2292,6 +2293,11 @@ private void cbOwnCloudDirectLink_CheckedChanged(object sender, EventArgs e)
|
||||||
Config.OwnCloudDirectLink = cbOwnCloudDirectLink.Checked;
|
Config.OwnCloudDirectLink = cbOwnCloudDirectLink.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void cbOwnCloudAnimationFriendlyLinks_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Config.OwnCloudAnimationFriendlyLinks = cbOwnCloudAnimationFriendlyLinks.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
private void cbOwnCloud81Compatibility_CheckedChanged(object sender, EventArgs e)
|
private void cbOwnCloud81Compatibility_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Config.OwnCloud81Compatibility = cbOwnCloud81Compatibility.Checked;
|
Config.OwnCloud81Compatibility = cbOwnCloud81Compatibility.Checked;
|
||||||
|
|
|
@ -6955,6 +6955,36 @@ For example, if your bucket is called "bucket.example.com" then URL will be "htt
|
||||||
<data name=">>tpMega.ZOrder" xml:space="preserve">
|
<data name=">>tpMega.ZOrder" xml:space="preserve">
|
||||||
<value>11</value>
|
<value>11</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="cbOwnCloudAnimationFriendlyLinks.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbOwnCloudAnimationFriendlyLinks.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||||
|
<value>NoControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbOwnCloudAnimationFriendlyLinks.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>95, 287</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbOwnCloudAnimationFriendlyLinks.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>139, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbOwnCloudAnimationFriendlyLinks.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>21</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbOwnCloudAnimationFriendlyLinks.Text" xml:space="preserve">
|
||||||
|
<value>Animation Friendly Links</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbOwnCloudAnimationFriendlyLinks.Name" xml:space="preserve">
|
||||||
|
<value>cbOwnCloudAnimationFriendlyLinks</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbOwnCloudAnimationFriendlyLinks.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbOwnCloudAnimationFriendlyLinks.Parent" xml:space="preserve">
|
||||||
|
<value>tpOwnCloud</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbOwnCloudAnimationFriendlyLinks.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
<data name="txtOwnCloudExpiryTime.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="txtOwnCloudExpiryTime.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>16, 224</value>
|
<value>16, 224</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -298,6 +298,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
public bool OwnCloudDirectLink { get; set; } = false;
|
public bool OwnCloudDirectLink { get; set; } = false;
|
||||||
public bool OwnCloud81Compatibility { get; set; } = true;
|
public bool OwnCloud81Compatibility { get; set; } = true;
|
||||||
public bool OwnCloudUsePreviewLinks { get; set; } = false;
|
public bool OwnCloudUsePreviewLinks { get; set; } = false;
|
||||||
|
public bool OwnCloudAnimationFriendlyLinks { get; set; } = false;
|
||||||
public bool OwnCloudAutoExpire { get; set; } = false;
|
public bool OwnCloudAutoExpire { get; set; } = false;
|
||||||
|
|
||||||
#endregion ownCloud / Nextcloud
|
#endregion ownCloud / Nextcloud
|
||||||
|
|
Loading…
Reference in a new issue