I can't remember lol

This commit is contained in:
2026-03-03 12:51:33 +01:00
parent cdfdd05b20
commit cd052e459a
4 changed files with 26 additions and 38 deletions

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="69.150963" x2="79.065437" y1="19.117874" y2="19.117874">
<stop offset="0" stop-color="#26a269"/>
<stop offset="0.15" stop-color="#8ff0a4"/>
<stop offset="0.3" stop-color="#33d17a"/>
<stop offset="0.7" stop-color="#33d17a"/>
<stop offset="0.85" stop-color="#8ff0a4"/>
<stop offset="1" stop-color="#26a269"/>
</linearGradient>
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="50.909448" x2="108.604761" y1="81.807729" y2="81.807729">
<stop offset="0" stop-color="#9a9996"/>
<stop offset="0.3" stop-color="#77767b"/>
<stop offset="0.704716" stop-color="#77767b"/>
<stop offset="1" stop-color="#9a9996"/>
</linearGradient>
<linearGradient id="c" gradientUnits="userSpaceOnUse" x1="68.137415" x2="81.482355" y1="21.085765" y2="21.085765">
<stop offset="0" stop-color="#77767b"/>
<stop offset="0.1" stop-color="#c0bfbc"/>
<stop offset="0.2" stop-color="#9a9996"/>
<stop offset="0.801949" stop-color="#9a9996"/>
<stop offset="0.897654" stop-color="#c0bfbc"/>
<stop offset="1" stop-color="#77767b"/>
</linearGradient>
<path d="m 49.171875 8.640625 c -0.40625 0 -0.804687 0.046875 -1.203125 0.140625 c -2.378906 0.566406 -4.535156 2.808594 -5.363281 5.894531 l -22.8125 85.140625 l -0.398438 -1.144531 v 3.882813 v 0.070312 c 0.023438 3.09375 1.613281 5.71875 4.136719 6.398438 l 52.085938 13.957031 c 3.207031 0.859375 6.675781 -1.761719 7.777343 -5.875 l 22.871094 -85.367188 c 0.234375 -0.875 0.34375 -1.742187 0.335937 -2.574219 v -3.527343 l -0.542968 0.578125 c -0.667969 -1.714844 -1.921875 -3.011719 -3.589844 -3.457032 l -52.085938 -13.957031 c -0.402343 -0.105469 -0.808593 -0.15625 -1.210937 -0.160156 z m 24.9375 10.835937 c 0.433594 0 0.863281 0.054688 1.28125 0.167969 c 2.644531 0.707031 4.214844 3.425781 3.503906 6.070313 c -0.707031 2.644531 -3.425781 4.214844 -6.070312 3.507812 c -2.644531 -0.710937 -4.214844 -3.429687 -3.503907 -6.074218 c 0.582032 -2.167969 2.546876 -3.671876 4.789063 -3.671876 z m 0 0" fill="#26a269"/>
<path d="m 49.171875 4.859375 c -0.40625 0 -0.804687 0.046875 -1.203125 0.140625 c -2.378906 0.566406 -4.535156 2.808594 -5.363281 5.894531 l -22.875 85.371094 c -1.101563 4.113281 0.59375 8.117187 3.800781 8.976563 l 52.085938 13.957031 c 3.207031 0.859375 6.675781 -1.761719 7.777343 -5.875 l 22.871094 -85.367188 c 1.105469 -4.113281 -0.589844 -8.121093 -3.796875 -8.980469 l -52.085938 -13.957031 c -0.402343 -0.105469 -0.808593 -0.15625 -1.210937 -0.160156 z m 24.9375 10.835937 c 0.433594 0 0.863281 0.054688 1.28125 0.167969 c 2.644531 0.707031 4.214844 3.425781 3.503906 6.070313 c -0.707031 2.644531 -3.425781 4.214844 -6.070312 3.507812 c -2.644531 -0.710937 -4.214844 -3.429687 -3.503907 -6.074218 c 0.582032 -2.167969 2.546876 -3.671876 4.789063 -3.671876 z m 0 0" fill="#57e389"/>
<path d="m 74.109375 15.695312 c -2.242187 0 -4.207031 1.503907 -4.789063 3.671876 c -0.28125 1.050781 -0.210937 2.167968 0.203126 3.175781 c 0.949218 -2.304688 3.460937 -3.546875 5.867187 -2.902344 c 1.492187 0.402344 2.710937 1.472656 3.300781 2.902344 c 0.082032 -0.199219 0.148438 -0.402344 0.203125 -0.609375 c 0.710938 -2.644532 -0.859375 -5.363282 -3.503906 -6.070313 c -0.417969 -0.113281 -0.847656 -0.167969 -1.28125 -0.167969 z m 0 0" fill="url(#a)"/>
<path d="m 53.054688 30.128906 c -0.265626 -0.074218 -0.535157 -0.105468 -0.800782 -0.105468 c -0.269531 -0.003907 -0.535156 0.027343 -0.796875 0.089843 c -1.578125 0.375 -3.011719 1.863281 -3.558593 3.910157 l -15.171876 56.621093 c -0.730468 2.730469 0.394532 5.382813 2.519532 5.953125 l 34.546875 9.257813 c 2.125 0.570312 4.425781 -1.167969 5.15625 -3.894531 l 15.171875 -56.621094 c 0.730468 -2.726563 -0.390625 -5.386719 -2.519532 -5.953125 z m 0 0" fill="#2ec27e"/>
<path d="m 52.253906 30.023438 c -0.269531 -0.003907 -0.535156 0.027343 -0.796875 0.089843 c -1.578125 0.375 -3.011719 1.863281 -3.558593 3.910157 l -15.171876 56.621093 c -0.332031 1.242188 -0.28125 2.472657 0.074219 3.496094 l 15.097657 -56.335937 c 0.546874 -2.046876 1.980468 -3.535157 3.558593 -3.910157 c 0.261719 -0.0625 0.527344 -0.09375 0.796875 -0.09375 c 0.265625 0.003907 0.535156 0.035157 0.800782 0.105469 l 34.546874 9.257812 c 1.15625 0.308594 2.015626 1.238282 2.441407 2.460938 l 0.078125 -0.285156 c 0.730468 -2.726563 -0.390625 -5.386719 -2.519532 -5.953125 l -34.546874 -9.257813 c -0.265626 -0.074218 -0.535157 -0.105468 -0.800782 -0.105468 z m 0 0" fill="#26a269" fill-opacity="0.499179"/>
<path d="m 108.351562 41.921875 l -1.425781 1.253906 l 1.082031 2.316407 c -1.054687 7.542968 -5.0625 14.359374 -11.140624 18.949218 l 0.835937 3.125 c 6.488281 -5.277344 10.351563 -13.125 10.582031 -21.484375 z m -57.441406 1.398437 v 1.914063 v 0.027344 v 0.535156 l 0.003906 -0.003906 c 0.042969 2.328125 0.371094 4.640625 0.972657 6.886719 c 3.035156 11.332031 12.65625 19.679687 24.304687 21.085937 l 2.753906 10.277344 l 2.617188 1.511719 l 1.636719 -2.835938 l -4.253907 -2.457031 l -2.753906 -10.277344 c -11.648437 -1.402344 -21.269531 -9.75 -24.304687 -21.085937 c -0.304688 -1.128907 -0.535157 -2.273438 -0.699219 -3.433594 l 1.800781 -2.144532 z m 27.382813 47.90625 v 3.78125 l 4.25 2.449219 l 2.613281 1.511719 l 1.636719 -2.832031 l -4.25 -2.460938 l -2.617188 -1.507812 z m 3.59375 13.414063 v 3.78125 l 2.613281 1.507813 l 1.636719 -2.832032 l -2.617188 -1.511718 z m 26.71875 3.625 l -0.691407 1.195313 l -4.871093 8.433593 l -5.480469 1.46875 l -9.628906 -5.5625 l -2.613282 -1.511719 l -1.636718 -0.945312 v 3.78125 l 4.25 2.457031 l 9.628906 5.558594 l 5.480469 -1.46875 l 5.5625 -9.628906 z m 0 0" fill="url(#b)"/>
<path d="m 79.628906 12.742188 c -2.511718 0 -5.011718 0.332031 -7.433594 0.980468 c -15.320312 4.109375 -24.414062 19.855469 -20.308593 35.175782 c 3.035156 11.332031 12.65625 19.679687 24.304687 21.085937 l 2.753906 10.277344 l 4.253907 2.457031 l -2.453125 4.25 l -2.453125 4.257812 l 4.25 2.449219 l 4.25 2.457031 l -2.453125 4.25 l -2.453125 4.257813 l 4.25 2.453125 l -2.453125 4.25 l 4.25 2.457031 l 9.628906 5.558594 l 5.480469 -1.46875 l 5.5625 -9.628906 l -11.738281 -43.820313 c 9.382812 -7.039062 13.542968 -19.078125 10.507812 -30.410156 c -2.65625 -9.910156 -10.398438 -17.652344 -20.3125 -20.308594 c -2.425781 -0.652344 -4.921875 -0.980468 -7.433594 -0.980468 z m -4.816406 4.0625 c 3.019531 0 5.664062 2.027343 6.445312 4.945312 c 0.957032 3.5625 -1.15625 7.222656 -4.71875 8.175781 s -7.222656 -1.160156 -8.175781 -4.71875 c -0.953125 -3.5625 1.160157 -7.21875 4.71875 -8.175781 c 0.566407 -0.152344 1.144531 -0.226562 1.730469 -0.226562 z m 0 0" fill="#c0bfbc"/>
<path d="m 74.8125 16.804688 c -0.585938 0 -1.164062 0.074218 -1.730469 0.226562 c -3.558593 0.957031 -5.671875 4.613281 -4.71875 8.175781 c 0.019531 0.054688 0.039063 0.105469 0.054688 0.160157 c 0.65625 -2.226563 2.421875 -3.953126 4.664062 -4.558594 c 3.496094 -0.929688 7.097657 1.089844 8.121094 4.558594 c 0.351563 -1.175782 0.371094 -2.429688 0.054687 -3.617188 c -0.78125 -2.917969 -3.425781 -4.945312 -6.445312 -4.945312 z m 0 0" fill="url(#c)"/>
<g fill="#9a9996">
<path d="m 63.082031 41.011719 l 30.652344 -8.214844 c 1.78125 -0.476563 3.617187 0.582031 4.09375 2.363281 c 0.476563 1.785156 -0.582031 3.617188 -2.363281 4.09375 l -30.652344 8.214844 c -1.785156 0.476562 -3.617188 -0.582031 -4.09375 -2.363281 c -0.476562 -1.785157 0.582031 -3.617188 2.363281 -4.09375 z m 0 0"/>
<path d="m 69.335938 49.6875 l 23.320312 -6.246094 c 1.785156 -0.480468 3.617188 0.578125 4.09375 2.359375 c 0.476562 1.785157 -0.578125 3.617188 -2.363281 4.09375 l -23.320313 6.25 c -1.785156 0.476563 -3.617187 -0.578125 -4.09375 -2.363281 c -0.476562 -1.78125 0.578125 -3.613281 2.363282 -4.09375 z m 0 0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -49,7 +49,7 @@ public partial class MainWindow
}
private void BindUIElements()
{
{
var builder = new Gtk.Builder("Keys.UI.MainWindow.MainWindow.xml");
Window = builder.GetObject(windowId) as Window;
if (Window == null)
@@ -109,4 +109,9 @@ public partial class MainWindow
throw new Exception("Failed to load UI element with ID: " + e.Message);
}
}
private void ShowAboutDialog()
{
}
}

View File

@@ -2,7 +2,9 @@ namespace Logic;
public interface ISecretService
{
public event Action OnFinishedCreatingSecret;
public List<Secret.Collection> GetCollections();
public bool CreateCollection(string label);
public void DeleteCollection(string label);
public void CreateOrReplaceSecret(string collectionLabel, string secretLabel, string secret);
}

View File

@@ -2,6 +2,8 @@ namespace Logic;
public class SecretService : ISecretService
{
public event Action OnFinishedCreatingSecret;
Secret.Service service;
public SecretService()
@@ -17,6 +19,7 @@ public class SecretService : ISecretService
GLib.List.Foreach(collections, data =>
{
Secret.Collection collection = (Secret.Collection)GObject.Internal.InstanceWrapper.WrapHandle<Secret.Collection>(data, false);
collection.LoadItemsSync(null);
result.Add(collection);
});
return result;
@@ -39,4 +42,19 @@ public class SecretService : ISecretService
{
GetCollections().FirstOrDefault(c => c.Label == label).DeleteSync(null);
}
public void CreateOrReplaceSecret(string collectionLabel, string secretLabel, string secret)
{
GLib.HashTable.NewSimilar();
Secret.Item.CreateSync(
GetCollections().Where(c => c.Label == collectionLabel).First(),
null,
secretLabel,
Secret.Value.New(secret, secret.Length, "text/plain"),
Secret.ItemCreateFlags.Replace,
null
);
}
}