mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
#6235: Removed Streamable anonymous upload option because not supported by Streamable anymore
This commit is contained in:
parent
e4ac1e36bd
commit
3a06b5bac1
5 changed files with 14 additions and 73 deletions
|
@ -40,20 +40,14 @@ public class StreamableFileUploaderService : FileUploaderService
|
|||
|
||||
public override Icon ServiceIcon => Resources.Streamable;
|
||||
|
||||
public override bool CheckConfig(UploadersConfig config) => true;
|
||||
public override bool CheckConfig(UploadersConfig config)
|
||||
{
|
||||
return !string.IsNullOrEmpty(config.StreamableUsername) && !string.IsNullOrEmpty(config.StreamablePassword);
|
||||
}
|
||||
|
||||
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
|
||||
{
|
||||
string username = "";
|
||||
string password = "";
|
||||
|
||||
if (!config.StreamableAnonymous)
|
||||
{
|
||||
username = config.StreamableUsername;
|
||||
password = config.StreamablePassword;
|
||||
}
|
||||
|
||||
return new Streamable(username, password)
|
||||
return new Streamable(config.StreamableUsername, config.StreamablePassword)
|
||||
{
|
||||
UseDirectURL = config.StreamableUseDirectURL
|
||||
};
|
||||
|
|
|
@ -441,7 +441,6 @@ private void InitializeComponent()
|
|||
this.txtStreamableUsername = new System.Windows.Forms.TextBox();
|
||||
this.lblStreamableUsername = new System.Windows.Forms.Label();
|
||||
this.lblStreamablePassword = new System.Windows.Forms.Label();
|
||||
this.cbStreamableAnonymous = new System.Windows.Forms.CheckBox();
|
||||
this.tpSul = new System.Windows.Forms.TabPage();
|
||||
this.btnSulGetAPIKey = new System.Windows.Forms.Button();
|
||||
this.txtSulAPIKey = new System.Windows.Forms.TextBox();
|
||||
|
@ -3522,7 +3521,6 @@ private void InitializeComponent()
|
|||
this.tpStreamable.Controls.Add(this.txtStreamableUsername);
|
||||
this.tpStreamable.Controls.Add(this.lblStreamableUsername);
|
||||
this.tpStreamable.Controls.Add(this.lblStreamablePassword);
|
||||
this.tpStreamable.Controls.Add(this.cbStreamableAnonymous);
|
||||
resources.ApplyResources(this.tpStreamable, "tpStreamable");
|
||||
this.tpStreamable.Name = "tpStreamable";
|
||||
//
|
||||
|
@ -3556,13 +3554,6 @@ private void InitializeComponent()
|
|||
resources.ApplyResources(this.lblStreamablePassword, "lblStreamablePassword");
|
||||
this.lblStreamablePassword.Name = "lblStreamablePassword";
|
||||
//
|
||||
// cbStreamableAnonymous
|
||||
//
|
||||
resources.ApplyResources(this.cbStreamableAnonymous, "cbStreamableAnonymous");
|
||||
this.cbStreamableAnonymous.Name = "cbStreamableAnonymous";
|
||||
this.cbStreamableAnonymous.UseVisualStyleBackColor = true;
|
||||
this.cbStreamableAnonymous.CheckedChanged += new System.EventHandler(this.cbStreamableAnonymous_CheckedChanged);
|
||||
//
|
||||
// tpSul
|
||||
//
|
||||
this.tpSul.BackColor = System.Drawing.SystemColors.Window;
|
||||
|
@ -5434,7 +5425,6 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.TextBox txtStreamableUsername;
|
||||
private System.Windows.Forms.Label lblStreamableUsername;
|
||||
private System.Windows.Forms.Label lblStreamablePassword;
|
||||
private System.Windows.Forms.CheckBox cbStreamableAnonymous;
|
||||
private System.Windows.Forms.Label lblSulAPIKey;
|
||||
private System.Windows.Forms.TextBox txtSulAPIKey;
|
||||
private System.Windows.Forms.TextBox txtVgymeUserKey;
|
||||
|
|
|
@ -656,10 +656,8 @@ private void LoadFileUploaderSettings()
|
|||
|
||||
#region Streamable
|
||||
|
||||
cbStreamableAnonymous.Checked = Config.StreamableAnonymous;
|
||||
txtStreamablePassword.Text = Config.StreamablePassword;
|
||||
txtStreamableUsername.Text = Config.StreamableUsername;
|
||||
txtStreamableUsername.Enabled = txtStreamablePassword.Enabled = !Config.StreamableAnonymous;
|
||||
cbStreamableUseDirectURL.Checked = Config.StreamableUseDirectURL;
|
||||
|
||||
#endregion Streamable
|
||||
|
@ -2778,13 +2776,6 @@ private void txtSeafileSharePassword_TextChanged(object sender, EventArgs e)
|
|||
|
||||
#region Streamable
|
||||
|
||||
private void cbStreamableAnonymous_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Config.StreamableAnonymous = cbStreamableAnonymous.Checked;
|
||||
txtStreamableUsername.Enabled = !Config.StreamableAnonymous;
|
||||
txtStreamablePassword.Enabled = !Config.StreamableAnonymous;
|
||||
}
|
||||
|
||||
private void txtStreamableUsername_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Config.StreamableUsername = txtStreamableUsername.Text;
|
||||
|
|
|
@ -10000,7 +10000,7 @@ Using an encrypted library disables sharing.</value>
|
|||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="cbStreamableUseDirectURL.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>16, 136</value>
|
||||
<value>16, 112</value>
|
||||
</data>
|
||||
<data name="cbStreamableUseDirectURL.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>93, 17</value>
|
||||
|
@ -10024,7 +10024,7 @@ Using an encrypted library disables sharing.</value>
|
|||
<value>0</value>
|
||||
</data>
|
||||
<data name="txtStreamablePassword.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>16, 104</value>
|
||||
<value>16, 80</value>
|
||||
</data>
|
||||
<data name="txtStreamablePassword.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 6, 6, 6</value>
|
||||
|
@ -10048,7 +10048,7 @@ Using an encrypted library disables sharing.</value>
|
|||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtStreamableUsername.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>16, 56</value>
|
||||
<value>16, 32</value>
|
||||
</data>
|
||||
<data name="txtStreamableUsername.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 6, 6, 6</value>
|
||||
|
@ -10078,7 +10078,7 @@ Using an encrypted library disables sharing.</value>
|
|||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="lblStreamableUsername.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 40</value>
|
||||
<value>13, 16</value>
|
||||
</data>
|
||||
<data name="lblStreamableUsername.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 0, 6, 0</value>
|
||||
|
@ -10111,7 +10111,7 @@ Using an encrypted library disables sharing.</value>
|
|||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="lblStreamablePassword.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 88</value>
|
||||
<value>13, 64</value>
|
||||
</data>
|
||||
<data name="lblStreamablePassword.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 0, 6, 0</value>
|
||||
|
@ -10137,44 +10137,11 @@ Using an encrypted library disables sharing.</value>
|
|||
<data name=">>lblStreamablePassword.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>6, 6, 6, 6</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>81, 17</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="cbStreamableAnonymous.Text" xml:space="preserve">
|
||||
<value>Anonymous</value>
|
||||
</data>
|
||||
<data name=">>cbStreamableAnonymous.Name" xml:space="preserve">
|
||||
<value>cbStreamableAnonymous</value>
|
||||
</data>
|
||||
<data name=">>cbStreamableAnonymous.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=">>cbStreamableAnonymous.Parent" xml:space="preserve">
|
||||
<value>tpStreamable</value>
|
||||
</data>
|
||||
<data name=">>cbStreamableAnonymous.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="tpStreamable.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 220</value>
|
||||
<value>4, 58</value>
|
||||
</data>
|
||||
<data name="tpStreamable.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>178, 0</value>
|
||||
<value>803, 507</value>
|
||||
</data>
|
||||
<data name="tpStreamable.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>24</value>
|
||||
|
@ -10507,13 +10474,13 @@ Using an encrypted library disables sharing.</value>
|
|||
<value>7</value>
|
||||
</data>
|
||||
<data name="tpLithiio.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>4, 58</value>
|
||||
<value>4, 220</value>
|
||||
</data>
|
||||
<data name="tpLithiio.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="tpLithiio.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>803, 507</value>
|
||||
<value>178, 0</value>
|
||||
</data>
|
||||
<data name="tpLithiio.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
|
|
|
@ -381,7 +381,6 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
|||
|
||||
#region Streamable
|
||||
|
||||
public bool StreamableAnonymous { get; set; } = true;
|
||||
public string StreamableUsername { get; set; } = "";
|
||||
[JsonEncrypt]
|
||||
public string StreamablePassword { get; set; } = "";
|
||||
|
|
Loading…
Reference in a new issue