Skip to content

Commit

Permalink
Merge pull request #7 from DSPAUL/dev
Browse files Browse the repository at this point in the history
Bump to version 0.5.0
  • Loading branch information
DSPaul authored Jul 16, 2022
2 parents fadaf1c + ebaa258 commit 20ab337
Show file tree
Hide file tree
Showing 31 changed files with 488 additions and 235 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# Visual Studio 2015/2017 cache/options directory
.vs/
.vscode/

# Build results
[Dd]ebug/
Expand Down
160 changes: 92 additions & 68 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,92 @@
# CHANGELOG

## COMPASS v0.4.0 (29 June 2022)

### Fixes

- Fixed Adding tags not working
- Fix some inconsistent UI elements

### Enhancements

- various UI improvements

### New Features

- Added new Home layout
- Added option to favourite a book
- Track when and how often books are opened

## COMPASS v0.3.1 (16 June 2022)

### Fixes

- Fixed crash on startup when update is found

## COMPASS v0.3.0 (16 June 2022)

### Fixes

- Fixed crash when trying to open release notes in settings
- COMPASS now installs to "/Program Files/" by default instead of "/Program Files (x86)/"
- Fixed crash when launching COMPASS for the very first time
- User preferences are now retained across updates

### Enhancements

- Added option to delete user data on uninstall
- The icon of the used view (list, cards, tiles) is now highlighted
- Clicking "browse" in the sources section of files now opens in the location of the file
- Search now tolerates typos and accepts abbreviations

### New Features

- Logging has been added to facilitate reporting issues
- Added "Show in Explorer" option to file context menu
- Added a way to update the file path references in all files in a collection when you rename a folder

### Other Changes

- renamed "Changelog" tab in settings to "What's New"

## COMPASS v0.2.0 (14 June 2022)

### Fixes

- Importing a homebrewery file would sometimes fail
- Metadata fields of homebrewery were cut short if they contained a comma

### New Features

- Google drive import has been added, supported metadate is:
- Cover
- Title
- Automatic update checking and installing

## COMPASS v0.1.0 (10 June 2022)

- Release of 0.1.0
# CHANGELOG
## COMPASS v0.5.0 (16 July 2022)

### Fixes

- Fix Import button disappearing when importing from URL
- Fix cover download failing sometimes
- Fix COMPASS sometimes crashing when downloading cover
- Restored sorting in Tile Layout
- Fixed "Move to Collection" not working in certain layouts

### Enhancements

- Downloading covers from homebrewery and gmbinder no longer requires COMPASS to be run as administrator
- All Layout options (cover size and title visibility) now persist in Home Layout
- Cover size now persists in Tile Layout

### New Features

- Added support for multiple authors
- Added separate sorting titles

### Other Changes

- Removed redundant sorting options in Home Layout

## COMPASS v0.4.0 (29 June 2022)

### Fixes

- Fixed Adding tags not working
- Fix some inconsistent UI elements

### Enhancements

- various UI improvements

### New Features

- Added new Home layout
- Added option to favorite a book
- Track when and how often books are opened

## COMPASS v0.3.1 (16 June 2022)

### Fixes

- Fixed crash on startup when update is found

## COMPASS v0.3.0 (16 June 2022)

### Fixes

- Fixed crash when trying to open release notes in settings
- COMPASS now installs to "/Program Files/" by default instead of "/Program Files (x86)/"
- Fixed crash when launching COMPASS for the very first time
- User preferences are now retained across updates

### Enhancements

- Added option to delete user data on uninstall
- The icon of the used view (list, cards, tiles) is now highlighted
- Clicking "browse" in the sources section of files now opens in the location of the file
- Search now tolerates typos and accepts abbreviations

### New Features

- Logging has been added to facilitate reporting issues
- Added "Show in Explorer" option to file context menu
- Added a way to update the file path references in all files in a collection when you rename a folder

### Other Changes

- renamed "Changelog" tab in settings to "What's New"

## COMPASS v0.2.0 (14 June 2022)

### Fixes

- Importing a homebrewery file would sometimes fail
- Metadata fields of homebrewery were cut short if they contained a comma

### New Features

- Google drive import has been added, supported metadata is:
- Cover
- Title
- Automatic update checking and installing

## COMPASS v0.1.0 (10 June 2022)

- Release of 0.1.0
Expand Down
9 changes: 9 additions & 0 deletions src/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@
<setting name="justUpdated" serializeAs="String">
<value>True</value>
</setting>
<setting name="HomeShowTitle" serializeAs="String">
<value>False</value>
</setting>
<setting name="HomeCoverSize" serializeAs="String">
<value>156</value>
</setting>
<setting name="TileCoverSize" serializeAs="String">
<value>156</value>
</setting>
</COMPASS.Properties.Settings>
</userSettings>
<runtime>
Expand Down
5 changes: 3 additions & 2 deletions src/COMPASS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autoupdater.NET.Official" Version="1.7.3" />
<PackageReference Include="Autoupdater.NET.Official" Version="1.7.4" />
<PackageReference Include="BlackPearl.Controls.Library" Version="2.0.2" />
<PackageReference Include="FuzzySharp" Version="2.0.2" />
<PackageReference Include="gong-wpf-dragdrop" Version="3.1.1" />
<PackageReference Include="HtmlAgilityPack">
Expand Down Expand Up @@ -56,7 +57,7 @@
<PackageReference Include="System.Runtime.Caching">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="WebDriverManager" Version="2.14.0" />
<PackageReference Include="WebDriverManager" Version="2.14.1" />
</ItemGroup>

<ItemGroup>
Expand Down
64 changes: 55 additions & 9 deletions src/Models/Codex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,33 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Xml.Serialization;
using System.Linq;

namespace COMPASS.Models
{
public class Codex : ObservableObject, IHasID
{
//empty constructor for serialization
public Codex() { }
public Codex()
{
Authors.CollectionChanged += (e, v) => RaisePropertyChanged(nameof(AuthorsAsString));
}

public Codex(CodexCollection cc)
public Codex(CodexCollection cc):this()
{
Tags = new();
ID = Utils.GetAvailableID(cc.AllCodices);
CoverArt = CodexCollection.CollectionsPath + cc.DirectoryName + @"\CoverArt\" + ID.ToString() + ".png";
Thumbnail = CodexCollection.CollectionsPath + cc.DirectoryName + @"\Thumbnails\" + ID.ToString() + ".png";

}

public void Copy(Codex c)
{
Title = c.Title;
_sortingTitle = c._sortingTitle; //copy field instead of property, or it will copy _title
Path = c.Path;
Author = c.Author;
Authors = new(c.Authors);
Publisher = c.Publisher;
Version = c.Version;
SourceURL = c.SourceURL;
Expand Down Expand Up @@ -66,14 +72,54 @@ public string Path
public string Title
{
get { return _title; }
set { SetProperty(ref _title, value); }
set
{
SetProperty(ref _title, value);
RaisePropertyChanged(nameof(SortingTitle));
}
}

private string _author;
public string Author
{
get { return _author; }
set { SetProperty(ref _author, value); }
private string _sortingTitle = "";
[XmlIgnoreAttribute]
public string SortingTitle
{
get
{
if (String.IsNullOrEmpty(_sortingTitle)) return _title;
else return _sortingTitle;
}
set { SetProperty(ref _sortingTitle, value); }
}
//seperate property needed for serialization or it will get _title and save that
//instead of saving an empty and mirroring _title during runtime
public string SerializableSortingTitle
{
get { return _sortingTitle; }
set { SetProperty(ref _sortingTitle, value); }
}

private ObservableCollection<string> _authors = new();
public ObservableCollection<string> Authors
{
get { return _authors; }
set
{
SetProperty(ref _authors, value);
RaisePropertyChanged(nameof(AuthorsAsString));
}
}

public string AuthorsAsString {
get
{
string str = Authors.Count switch
{
1 => Authors[0],
> 1 => String.Join(", ", Authors.OrderBy(a=>a)),
_ => ""
};
return str;
}
}

private string _publisher;
Expand Down
15 changes: 14 additions & 1 deletion src/Models/CodexCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,21 @@ private void LoadCodices()
AllCodices = serializer.Deserialize(Reader) as List<Codex>;
}


foreach (Codex f in AllCodices)
{
//Populate Author and Publisher List
if (!String.IsNullOrEmpty(f.Author) && !AuthorList.Contains(f.Author)) AuthorList.Add(f.Author);
AddAuthors(f);
if (!String.IsNullOrEmpty(f.Publisher) && !PublisherList.Contains(f.Publisher)) PublisherList.Add(f.Publisher);

//reconstruct tags from ID's
foreach (int id in f.TagIDs)
{
f.Tags.Add(AllTags.First(t => t.ID == id));
}

//apply sorting titles
f.SortingTitle = f.SerializableSortingTitle;
}
//Sort them
AuthorList = new(AuthorList.OrderBy(n => n));
Expand Down Expand Up @@ -173,5 +177,14 @@ public void RenameCollection(string NewCollectionName)
Directory.Move(CollectionsPath + DirectoryName, CollectionsPath + NewCollectionName);
DirectoryName = NewCollectionName;
}

public void AddAuthors(Codex codex)
{
foreach (var author in codex.Authors)
{
if (!String.IsNullOrEmpty(author) && !AuthorList.Contains(author))
AuthorList.Add(author);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.4.0")]
[assembly: AssemblyVersion("0.5.0")]
//[assembly: AssemblyFileVersion("1.0.0")]
36 changes: 36 additions & 0 deletions src/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 20ab337

Please sign in to comment.