diff --git a/Sunfish/ShareWeb/$sunfish/sunfish-directory.js b/Sunfish/ShareWeb/$sunfish/sunfish-directory.js index 44fca25..eef9f45 100644 --- a/Sunfish/ShareWeb/$sunfish/sunfish-directory.js +++ b/Sunfish/ShareWeb/$sunfish/sunfish-directory.js @@ -78,12 +78,15 @@ sunfish.askString('Folder name:', "", function (name) { if (!name) return; - sunfish.ajax(document.location.href + "?action=createFolder&name=" + name, { + sunfish.ajax(document.location.href + name + '/', { + method: "PUT", ok: function (result) { if (result != "OK") - sunfish.error("Error creading folder", function () { + sunfish.error("Error creading file", function () { document.location.reload(); }); + else + document.location.reload(); } }); }); @@ -93,12 +96,15 @@ sunfish.askString('File name:', "", function (name) { if (!name) return; - sunfish.ajax(document.location.href + "?action=createFolder&name=" + name, { + sunfish.ajax(document.location.href + name, { + method: "PUT", ok: function (result) { if (result != "OK") sunfish.error("Error creading file", function () { document.location.reload(); }); + else + document.location.reload(); } }); }); @@ -185,9 +191,10 @@ itemProgress.style.backgroundColor = "tomato"; if (info) console.error(info); + me.pos = me.length; } function step() { - var length = Math.min(1024 * 128, me.length - me.pos); + var length = Math.min(1024 * 512, me.length - me.pos); var blob = file.slice(me.pos, me.pos + length); if (blob.length == 0) return ko("Nothing to send"); @@ -200,7 +207,7 @@ }, ok: function (result) { if (result != "OK") - ko("Upload is "+result); + ko("Upload is " + result); else { me.pos += blob.size; updateProgress(); @@ -222,8 +229,14 @@ $: "div", className: "upload-progress", _: [ { $: "button", className: "upload-close", style: { display: "none" }, _: ["Close"], onclick: function () { + /* document.body.removeChild(edrop); uploads = []; + elist.innerHTML=""; + cbutton.style.display = "none"; + pb.style.width="0"; + */ + document.location.reload(); } } ] @@ -264,7 +277,6 @@ upload(ev.dataTransfer.files[i].getAsFile()); } }); - document.body.addEventListener("dragover", function (ev) { ev.preventDefault(); document.body.appendChild(edrop); @@ -276,6 +288,7 @@ }); function upload(file, to) { + document.body.appendChild(edrop); if (!elist) show(); to = to || file.name; diff --git a/Sunfish/Sunfish/Extensions.cs b/Sunfish/Sunfish/Extensions.cs index f4662c0..3a54f9a 100644 --- a/Sunfish/Sunfish/Extensions.cs +++ b/Sunfish/Sunfish/Extensions.cs @@ -30,7 +30,7 @@ { int toRead = (int)Math.Min(buf.Length, length); int readed = from.Read(buf, 0, toRead); - if (readed != toRead) + if (readed == 0) throw new IOException("Unexpected EOF"); s.Write(buf, 0, readed); length -= readed; diff --git a/Sunfish/Sunfish/Form1.Designer.cs b/Sunfish/Sunfish/Form1.Designer.cs index 7cf3041..c126fab 100644 --- a/Sunfish/Sunfish/Form1.Designer.cs +++ b/Sunfish/Sunfish/Form1.Designer.cs @@ -45,6 +45,8 @@ this.btShowIp = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.cbRootList = new System.Windows.Forms.CheckBox(); + this.cbAdmin = new System.Windows.Forms.CheckBox(); + this.tbAdminPWD = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.nudPort)).BeginInit(); this.cmsItem.SuspendLayout(); this.SuspendLayout(); @@ -52,10 +54,9 @@ // btDone // this.btDone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btDone.Location = new System.Drawing.Point(238, 521); - this.btDone.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btDone.Location = new System.Drawing.Point(155, 298); this.btDone.Name = "btDone"; - this.btDone.Size = new System.Drawing.Size(138, 35); + this.btDone.Size = new System.Drawing.Size(92, 23); this.btDone.TabIndex = 1; this.btDone.Text = "Ok"; this.toolTip1.SetToolTip(this.btDone, "Hide"); @@ -65,15 +66,14 @@ // nudPort // this.nudPort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.nudPort.Location = new System.Drawing.Point(293, 9); - this.nudPort.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.nudPort.Location = new System.Drawing.Point(191, 6); this.nudPort.Maximum = new decimal(new int[] { 64000, 0, 0, 0}); this.nudPort.Name = "nudPort"; - this.nudPort.Size = new System.Drawing.Size(82, 26); + this.nudPort.Size = new System.Drawing.Size(55, 20); this.nudPort.TabIndex = 3; this.toolTip1.SetToolTip(this.nudPort, "Listen port"); this.nudPort.Value = new decimal(new int[] { @@ -87,10 +87,9 @@ // this.cbActive.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.cbActive.AutoSize = true; - this.cbActive.Location = new System.Drawing.Point(153, 12); - this.cbActive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.cbActive.Location = new System.Drawing.Point(96, 8); this.cbActive.Name = "cbActive"; - this.cbActive.Size = new System.Drawing.Size(132, 24); + this.cbActive.Size = new System.Drawing.Size(90, 17); this.cbActive.TabIndex = 4; this.cbActive.Text = "Listen on port"; this.toolTip1.SetToolTip(this.cbActive, "Enable whole server"); @@ -103,10 +102,9 @@ this.btAdd.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btAdd.ImageIndex = 0; this.btAdd.ImageList = this.il16; - this.btAdd.Location = new System.Drawing.Point(9, 521); - this.btAdd.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btAdd.Location = new System.Drawing.Point(6, 298); this.btAdd.Name = "btAdd"; - this.btAdd.Size = new System.Drawing.Size(34, 35); + this.btAdd.Size = new System.Drawing.Size(23, 23); this.btAdd.TabIndex = 5; this.toolTip1.SetToolTip(this.btAdd, "Add new access"); this.btAdd.UseVisualStyleBackColor = true; @@ -126,10 +124,9 @@ this.btSub.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btSub.ImageKey = "bt_minus.bmp"; this.btSub.ImageList = this.il16; - this.btSub.Location = new System.Drawing.Point(52, 521); - this.btSub.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btSub.Location = new System.Drawing.Point(35, 298); this.btSub.Name = "btSub"; - this.btSub.Size = new System.Drawing.Size(34, 35); + this.btSub.Size = new System.Drawing.Size(23, 23); this.btSub.TabIndex = 6; this.toolTip1.SetToolTip(this.btSub, "Remove >selected access"); this.btSub.UseVisualStyleBackColor = true; @@ -146,10 +143,9 @@ this.lbPaths.FormattingEnabled = true; this.lbPaths.IntegralHeight = false; this.lbPaths.ItemHeight = 28; - this.lbPaths.Location = new System.Drawing.Point(0, 49); - this.lbPaths.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.lbPaths.Location = new System.Drawing.Point(0, 58); this.lbPaths.Name = "lbPaths"; - this.lbPaths.Size = new System.Drawing.Size(383, 460); + this.lbPaths.Size = new System.Drawing.Size(253, 233); this.lbPaths.TabIndex = 7; this.lbPaths.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lbPaths_DrawItem); this.lbPaths.SelectedIndexChanged += new System.EventHandler(this.lbPaths_SelectedIndexChanged); @@ -166,14 +162,14 @@ this.borrarToolStripMenuItem, this.toolStripSeparator1}); this.cmsItem.Name = "cmsItem"; - this.cmsItem.Size = new System.Drawing.Size(193, 106); + this.cmsItem.Size = new System.Drawing.Size(132, 76); this.cmsItem.Opening += new System.ComponentModel.CancelEventHandler(this.cmsItem_Opening); // // añadirToolStripMenuItem // this.añadirToolStripMenuItem.Name = "añadirToolStripMenuItem"; this.añadirToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Insert; - this.añadirToolStripMenuItem.Size = new System.Drawing.Size(192, 32); + this.añadirToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.añadirToolStripMenuItem.Text = "Añadir"; this.añadirToolStripMenuItem.Click += new System.EventHandler(this.btAdd_Click); // @@ -181,31 +177,30 @@ // this.editarToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold); this.editarToolStripMenuItem.Name = "editarToolStripMenuItem"; - this.editarToolStripMenuItem.Size = new System.Drawing.Size(192, 32); + this.editarToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.editarToolStripMenuItem.Text = "Editar"; // // borrarToolStripMenuItem // this.borrarToolStripMenuItem.Name = "borrarToolStripMenuItem"; this.borrarToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete; - this.borrarToolStripMenuItem.Size = new System.Drawing.Size(192, 32); + this.borrarToolStripMenuItem.Size = new System.Drawing.Size(131, 22); this.borrarToolStripMenuItem.Text = "Borrar"; this.borrarToolStripMenuItem.Click += new System.EventHandler(this.btSub_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(189, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(128, 6); // // btShowIp // this.btShowIp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btShowIp.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btShowIp.Image = global::DolphinWebXplorer2.Properties.Resources.messagebox_info; - this.btShowIp.Location = new System.Drawing.Point(195, 521); - this.btShowIp.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btShowIp.Location = new System.Drawing.Point(126, 298); this.btShowIp.Name = "btShowIp"; - this.btShowIp.Size = new System.Drawing.Size(34, 35); + this.btShowIp.Size = new System.Drawing.Size(23, 23); this.btShowIp.TabIndex = 8; this.toolTip1.SetToolTip(this.btShowIp, "Show network information"); this.btShowIp.UseVisualStyleBackColor = true; @@ -214,9 +209,10 @@ // cbRootList // this.cbRootList.AutoSize = true; - this.cbRootList.Location = new System.Drawing.Point(12, 12); + this.cbRootList.Location = new System.Drawing.Point(8, 8); + this.cbRootList.Margin = new System.Windows.Forms.Padding(2); this.cbRootList.Name = "cbRootList"; - this.cbRootList.Size = new System.Drawing.Size(114, 24); + this.cbRootList.Size = new System.Drawing.Size(78, 17); this.cbRootList.TabIndex = 9; this.cbRootList.Text = "Root menu"; this.toolTip1.SetToolTip(this.cbRootList, "If there is no service located at root sunfish will show a listing page with all " + @@ -224,11 +220,38 @@ this.cbRootList.UseVisualStyleBackColor = true; this.cbRootList.CheckedChanged += new System.EventHandler(this.cbRootList_CheckedChanged); // + // cbAdmin + // + this.cbAdmin.AutoSize = true; + this.cbAdmin.Location = new System.Drawing.Point(8, 34); + this.cbAdmin.Margin = new System.Windows.Forms.Padding(2); + this.cbAdmin.Name = "cbAdmin"; + this.cbAdmin.Size = new System.Drawing.Size(85, 17); + this.cbAdmin.TabIndex = 10; + this.cbAdmin.Text = "Admin Panel"; + this.toolTip1.SetToolTip(this.cbAdmin, "If there is no service located at root sunfish will show a listing page with all " + + "availables services and paths."); + this.cbAdmin.UseVisualStyleBackColor = true; + this.cbAdmin.CheckedChanged += new System.EventHandler(this.cbAdmin_CheckedChanged); + // + // tbAdminPWD + // + this.tbAdminPWD.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbAdminPWD.Location = new System.Drawing.Point(96, 32); + this.tbAdminPWD.Name = "tbAdminPWD"; + this.tbAdminPWD.PasswordChar = '•'; + this.tbAdminPWD.Size = new System.Drawing.Size(150, 20); + this.tbAdminPWD.TabIndex = 11; + this.tbAdminPWD.TextChanged += new System.EventHandler(this.tbAdminPWD_TextChanged); + // // Form1 // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(385, 565); + this.ClientSize = new System.Drawing.Size(253, 326); + this.Controls.Add(this.tbAdminPWD); + this.Controls.Add(this.cbAdmin); this.Controls.Add(this.cbRootList); this.Controls.Add(this.btShowIp); this.Controls.Add(this.lbPaths); @@ -237,7 +260,6 @@ this.Controls.Add(this.cbActive); this.Controls.Add(this.nudPort); this.Controls.Add(this.btDone); - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Sunfish"; @@ -269,6 +291,8 @@ private System.Windows.Forms.ToolStripMenuItem borrarToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.CheckBox cbRootList; + private System.Windows.Forms.CheckBox cbAdmin; + private System.Windows.Forms.TextBox tbAdminPWD; } } diff --git a/Sunfish/Sunfish/Form1.cs b/Sunfish/Sunfish/Form1.cs index 3dbe37f..2bfecc7 100644 --- a/Sunfish/Sunfish/Form1.cs +++ b/Sunfish/Sunfish/Form1.cs @@ -1,5 +1,4 @@ using DolphinWebXplorer2.Properties; -using DolphinWebXplorer2.wx; using System; using System.Collections.Generic; using System.ComponentModel; @@ -34,10 +33,13 @@ nudPort.Value = Sunfish.Port; cbActive.Checked = Sunfish.Active; cbRootList.Checked = Sunfish.RootMenu; + cbAdmin.Checked = Sunfish.AdminPanel; + tbAdminPWD.Text = Sunfish.AdminPwd; lbPaths.Items.Clear(); foreach (SunfishService s in Sunfish.Services) lbPaths.Items.Add(s); Enabled = true; + tbAdminPWD.Enabled = cbAdmin.Checked; } private List ListInterfacesIPs() @@ -120,6 +122,7 @@ private void btAdd_Click(object sender, EventArgs e) { SunfishServiceConfiguration ssc = new SunfishServiceConfiguration(); + ssc.Type = "WebService"; EditConfiguration(ssc, null); } @@ -186,7 +189,7 @@ } sb.Append("\r\nSunfish "); sb.Append(Program.VERSION); - sb.Append(" (C) XWolfOverride@gmail.com 2007-2020\r\nEasy folder shares"); + sb.Append(" (C) XWolfOverride@gmail.com 2007-2021\r\nEasy folder shares"); MessageBox.Show(sb.ToString(), "Sunfish information", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -262,5 +265,16 @@ { Sunfish.RootMenu = cbRootList.Checked; } + + private void cbAdmin_CheckedChanged(object sender, EventArgs e) + { + Sunfish.AdminPanel = cbAdmin.Checked; + tbAdminPWD.Enabled = cbAdmin.Checked; + } + + private void tbAdminPWD_TextChanged(object sender, EventArgs e) + { + Sunfish.AdminPwd = tbAdminPWD.Text; + } } } diff --git a/Sunfish/Sunfish/Form1.resx b/Sunfish/Sunfish/Form1.resx index 0650a43..086e21f 100644 --- a/Sunfish/Sunfish/Form1.resx +++ b/Sunfish/Sunfish/Form1.resx @@ -128,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAq - AQAAAk1TRnQBSQFMAgEBAgEAAYABAAGAAQABEAEAARABAAT/AQUBAAj/AUIBTQF2BwABdgMAASgDAAFA + AQAAAk1TRnQBSQFMAgEBAgEAAZABAAGQAQABEAEAARABAAT/AQUBAAj/AUIBTQF2BwABdgMAASgDAAFA AwABEAMAAQEBAAEEBgABAhgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQADgAMAAf8CAAH/ AwAC/wEAAf8DAAH/AQAB/wEAAv8CAAP//wD/AAMAAUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEB BQABgBcAA/8BAAT/BAAE/wQABP8EAAH8AT8C/wQAAfwBPwL/BAAB/AE/Av8EAAHgAQcB4AEHBAAB4AEH diff --git a/Sunfish/Sunfish/Program.cs b/Sunfish/Sunfish/Program.cs index 35b2bcf..adbede3 100644 --- a/Sunfish/Sunfish/Program.cs +++ b/Sunfish/Sunfish/Program.cs @@ -1,5 +1,4 @@ using DolphinWebXplorer2.Middleware; -using DolphinWebXplorer2.wx; using System; using System.Windows.Forms; diff --git a/Sunfish/Sunfish/Services/AdminService.cs b/Sunfish/Sunfish/Services/AdminService.cs deleted file mode 100644 index ae688a7..0000000 --- a/Sunfish/Sunfish/Services/AdminService.cs +++ /dev/null @@ -1,28 +0,0 @@ -using DolphinWebXplorer2.Middleware; - -namespace DolphinWebXplorer2.Services -{ - [DefineConfigurator(typeof(AdminServiceConfigurator))] - class AdminService : SunfishService - { - public AdminService(SunfishServiceConfiguration ssc) : base(ssc) - { - - } - - public override void Process(string path, HttpCall call) - { - throw new System.NotImplementedException(); - } - - protected override void Start() - { - } - - protected override void Stop() - { - } - - public override string Description => "Allow remote configuration of Sunfish server"; - } -} diff --git a/Sunfish/Sunfish/Services/AdminServiceConfigurator.cs b/Sunfish/Sunfish/Services/AdminServiceConfigurator.cs deleted file mode 100644 index a301577..0000000 --- a/Sunfish/Sunfish/Services/AdminServiceConfigurator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using DolphinWebXplorer2.Configurator; - -namespace DolphinWebXplorer2.Services -{ - class AdminServiceConfigurator : SunfishServiceConfigurator - { - internal const string CFG_ADMIN_PWD = "adminPwd"; - - internal protected override ConfigurationScreen GetConfigurationScreen() - { - return new ConfigurationScreen() - { - Elements = new ConfigurationElement[] - { - new ConfigurationString(CFG_ADMIN_PWD,"Admin password: (blank for none)") - { - Tooltip="Password for the administration panel.\n Leave it blank for no password access (not recommended)", - IsPassword=true, - } - } - }; - } - } -} diff --git a/Sunfish/Sunfish/Services/WebService.cs b/Sunfish/Sunfish/Services/WebService.cs index 2daab56..a144c7e 100644 --- a/Sunfish/Sunfish/Services/WebService.cs +++ b/Sunfish/Sunfish/Services/WebService.cs @@ -219,33 +219,31 @@ string soffset = call.Request.Headers["X-Sunfish-Offset"]; string slength = call.Request.Headers["X-Sunfish-Length"]; if (string.IsNullOrEmpty(soffset)) - soffset = call.Parameters["offset"]; + call.Parameters.TryGetValue("offset", out soffset); if (string.IsNullOrEmpty(slength)) - slength = call.Parameters["length"]; + call.Parameters.TryGetValue("length", out slength); int pos, len; - if (string.IsNullOrEmpty(soffset) || string.IsNullOrEmpty(slength) || !int.TryParse(soffset, out pos) || !int.TryParse(slength, out len)) - { - call.Write("KO: No offset or length"); - return; - } + int.TryParse(soffset, out pos); + int.TryParse(slength, out len); try { VFSItem fil = vfs.GetItem(path); if (fil == null) fil = vfs.Create(path); - if (fil.Directory) + if (fil.Directory && len > 0) { call.Write("KO: Exists as directory"); return; } - using (Stream s = fil.OpenWrite()) - { - s.Position = pos; - using (Stream sin = call.Request.InputStream) + if (len > 0) + using (Stream s = fil.OpenWrite()) { - s.TransferFrom(sin, len); + s.Position = pos; + using (Stream sin = call.Request.InputStream) + { + s.TransferFrom(sin, len); + } } - } call.Write("OK"); } catch (Exception e) diff --git a/Sunfish/Sunfish/Services/WebServiceConfigurator.cs b/Sunfish/Sunfish/Services/WebServiceConfigurator.cs index b3a3b71..3433734 100644 --- a/Sunfish/Sunfish/Services/WebServiceConfigurator.cs +++ b/Sunfish/Sunfish/Services/WebServiceConfigurator.cs @@ -55,7 +55,7 @@ }, new ConfigurationMessage(ConfigurationMessage.MessageType.WARNING,"WARNING: Sunfish is executed as elevated process, any anction or process started by sunfish will be also elevated.") }, - Advanced = AdvancedEditing + //Advanced = AdvancedEditing }; } diff --git a/Sunfish/Sunfish/Sunfish.cs b/Sunfish/Sunfish/Sunfish.cs index cd58b9a..f995148 100644 --- a/Sunfish/Sunfish/Sunfish.cs +++ b/Sunfish/Sunfish/Sunfish.cs @@ -12,9 +12,11 @@ { class SunfishConfiguration { - public int Port { get; set; }= 90; + public int Port { get; set; } = 90; public bool Active { get; set; } = false; public bool SunfishRoot { get; set; } = true; + public bool AdminPanel { get; set; } = false; + public string AdminPwd { get; set; } = ""; public List Services { get; set; } = new List(); } @@ -175,6 +177,9 @@ public static bool Active { get => conf.Active; set => SetActive(value); } public static int Port { get => conf.Port; set => SetPort(value); } public static bool RootMenu { get => conf.SunfishRoot; set => conf.SunfishRoot = value; } + public static bool AdminPanel { get => conf.AdminPanel; set => conf.AdminPanel = value; } + public static string AdminPwd { get => conf.AdminPwd; set => conf.AdminPwd = value; } + public static SunfishService[] Services => srvs.ToArray(); } } diff --git a/Sunfish/Sunfish/Sunfish.csproj b/Sunfish/Sunfish/Sunfish.csproj index 7a2be48..ab44d7d 100644 --- a/Sunfish/Sunfish/Sunfish.csproj +++ b/Sunfish/Sunfish/Sunfish.csproj @@ -145,8 +145,6 @@ - - @@ -160,9 +158,6 @@ - - - @@ -195,7 +190,9 @@ true - + + +