Skip to content

Commit

Permalink
Merge pull request #3 from VictorGrycuk/dev/1.3
Browse files Browse the repository at this point in the history
[v1.3] Show action result as icons
  • Loading branch information
VictorGrycuk authored Sep 17, 2020
2 parents 256f30b + ba6359a commit a97f82c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# KeePass for StreamDeck
# KeePass for Stream Deck
## Description

Simple interface to retrieve information from a KeePass database and generate passwords using [KeePassLib](https://www.nuget.org/packages/KeePassLib/).
Expand Down Expand Up @@ -45,4 +45,11 @@ It uses the following configuration:

Check [KeePass Password Generator](https://keepass.info/help/base/pwgenerator.html) help site for more information.

## My other Stream Deck plugins

- **[Color Picker](https://github.com/VictorGrycuk/streamdeck-color-picker)**
- **[Magnifier](https://github.com/VictorGrycuk/streamdeck-magnifier)**

---

The icon for this action is a modified version of *iOS Filled* at [Icon8](https://icons8.com).
3 changes: 3 additions & 0 deletions StreamDeck-KeePass/StreamDeck-KeePass/KeePassGenerate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ public override void KeyPressed(KeyPayload payload)

if (pw.IsEmpty)
{
Connection.ShowAlert().Wait();
Logger.Instance.LogMessage(TracingLevel.WARN, "No password was generated with the given configuration");
return;
}

Connection.ShowOk().Wait();

ClipboardHelper.SendToClipboard(pw.ReadString());
}
catch (Exception ex)
Expand Down
5 changes: 5 additions & 0 deletions StreamDeck-KeePass/StreamDeck-KeePass/KeePassRetrieve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ public override void KeyPressed(KeyPayload payload)

if (entryList.Count() == 0)
{
Connection.ShowAlert().Wait();
Logger.Instance.LogMessage(TracingLevel.WARN, $"No entry found for the title '{ settings.EntryTitle }'.");
db.Close();

return;
}

Expand All @@ -111,10 +113,13 @@ public override void KeyPressed(KeyPayload payload)
break;
}

Connection.ShowOk().Wait();

db.Close();
}
catch (Exception ex)
{
Connection.ShowAlert();
Logger.Instance.LogMessage(TracingLevel.INFO, ex.Message);
}
}
Expand Down
8 changes: 0 additions & 8 deletions StreamDeck-KeePass/StreamDeck-KeePass/Program.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
using BarRaider.SdTools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StreamDeck_KeePass
{
class Program
{
static void Main(string[] args)
{
// Uncomment this line of code to allow for debugging
//while (!System.Diagnostics.Debugger.IsAttached) { System.Threading.Thread.Sleep(100); }

SDWrapper.Run(args);
}
}
Expand Down
10 changes: 5 additions & 5 deletions StreamDeck-KeePass/StreamDeck-KeePass/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("StreamDeck-KeePass")]
[assembly: AssemblyTitle("KeePass")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StreamDeck-KeePass")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyProduct("KeePass for Stream Deck")]
[assembly: AssemblyCopyright("Copyright © Victor Grycuk 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>keepass.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommandLine, Version=2.7.82.0, Culture=neutral, PublicKeyToken=5a870481e358d379, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.2.7.82\lib\net461\CommandLine.dll</HintPath>
Expand Down Expand Up @@ -136,6 +139,7 @@
<Content Include="Images\generate.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="keepass.ico" />
<Content Include="PropertyInspector\caret.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
Binary file added StreamDeck-KeePass/StreamDeck-KeePass/keepass.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion StreamDeck-KeePass/StreamDeck-KeePass/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"Description": "Simple interface to retrieve information from KeePass database. Unofficial.",
"Icon": "Images/pluginIcon",
"URL": "https://github.com/VictorGrycuk/StreamDeck-KeePass",
"Version": "1.2",
"Version": "1.3",
"CodePath": "streamdeck-keepass",
"Category": "KeePass",
"CategoryIcon": "Images/categoryIcon",
Expand Down

0 comments on commit a97f82c

Please sign in to comment.