+
Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Release 0.7.1 #530

Merged
merged 75 commits into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
66ea3bd
fix: sorted languages alphabetically
casperstorm Jan 27, 2021
24e32f7
added ukrainian
casperstorm Jan 28, 2021
2d31109
chore: added error messages
casperstorm Jan 29, 2021
49dd61b
Update update.rs
casperstorm Jan 29, 2021
0132098
feat: added option categories column to catalog
casperstorm Jan 29, 2021
69b44c3
Update CHANGELOG.md
casperstorm Jan 29, 2021
02da32f
Update localization.rs
casperstorm Jan 29, 2021
cb665f2
tweak search settings
tarkah Jan 29, 2021
aad571c
error message for permissions issues
tarkah Jan 29, 2021
9668dd0
Merge pull request #522 from ajour/feat/categories-column-catalog
casperstorm Jan 30, 2021
a611d33
chore: localized permission error
casperstorm Jan 30, 2021
2198e51
Update Cargo.toml
casperstorm Jan 30, 2021
284bd82
Merge pull request #521 from ajour/feat/context-localizations
casperstorm Jan 30, 2021
7a14b08
Update CHANGELOG.md
casperstorm Jan 30, 2021
c4739eb
Merge branch 'fix/language-updates' of github.com:casperstorm/ajour i…
casperstorm Jan 30, 2021
5b24e8e
feat: added summary column
casperstorm Jan 31, 2021
3786c77
Update CHANGELOG.md
casperstorm Jan 31, 2021
c71fb1f
Merge pull request #524 from ajour/feat/summary-column
casperstorm Feb 1, 2021
384cfe8
Merge remote-tracking branch 'origin/development' into change/search-…
tarkah Feb 1, 2021
2864b2f
update CHANGELOG
tarkah Feb 1, 2021
90ada83
Merge pull request #523 from ajour/change/search-settings
tarkah Feb 1, 2021
706d7d2
Merge branch 'development' into fix/language-updates
casperstorm Feb 1, 2021
43fdbf6
Update uk_UA.json
casperstorm Feb 1, 2021
9784098
Merge pull request #519 from ajour/fix/language-updates
casperstorm Feb 2, 2021
66a0b17
add support for townlong-yak addons
tarkah Feb 6, 2021
78606b4
chore: updated CHANGELOG
casperstorm Feb 6, 2021
56586d9
Update mod.rs
casperstorm Feb 7, 2021
d06a279
Merge pull request #529 from ajour/feat/townlong-yak
casperstorm Feb 7, 2021
f09193a
Update cs_CZ.json (POEditor.com)
casperstorm Feb 7, 2021
bc13f15
Update da_DK.json (POEditor.com)
casperstorm Feb 7, 2021
cd07fac
Update en_US.json (POEditor.com)
casperstorm Feb 7, 2021
6274bb2
Update fr_FR.json (POEditor.com)
casperstorm Feb 7, 2021
3b38583
Update de_DE.json (POEditor.com)
casperstorm Feb 7, 2021
96b6bb9
Update hu_HU.json (POEditor.com)
casperstorm Feb 7, 2021
13abc25
Update nb_NO.json (POEditor.com)
casperstorm Feb 7, 2021
b79e2a6
Update pt_PT.json (POEditor.com)
casperstorm Feb 7, 2021
ee02506
Update ru_RU.json (POEditor.com)
casperstorm Feb 7, 2021
66be6b9
Update sk_SK.json (POEditor.com)
casperstorm Feb 7, 2021
76ff843
Update es_ES.json (POEditor.com)
casperstorm Feb 7, 2021
a346dc7
Update se_SE.json (POEditor.com)
casperstorm Feb 7, 2021
cfc0d70
Update tr_TR.json (POEditor.com)
casperstorm Feb 7, 2021
0aa0213
bumped to 0.7.1-rc.1
casperstorm Feb 7, 2021
96b6ab9
fix: format townlong gameversion
casperstorm Feb 7, 2021
56311d6
Update catalog.rs
casperstorm Feb 7, 2021
ec0f810
Update catalog.rs
casperstorm Feb 7, 2021
1f753ca
feat: initial work on rewriting flavor detection
casperstorm Feb 8, 2021
a383014
fix: catalog source fallback
casperstorm Feb 8, 2021
3faa4f4
fix: if launching ajour before wow we try to create addon folder
casperstorm Feb 8, 2021
17dc9ab
Update CHANGELOG.md
casperstorm Feb 8, 2021
8762877
Update update.rs
casperstorm Feb 8, 2021
f5974bf
Update CHANGELOG.md
casperstorm Feb 8, 2021
4889b43
Merge pull request #533 from ajour/feat/empty-flavor-folders
casperstorm Feb 8, 2021
8558584
Merge pull request #532 from ajour/fix/catalog-source-fallback
casperstorm Feb 8, 2021
0fd099c
Update catalog.rs
casperstorm Feb 9, 2021
54a723c
Merge pull request #531 from ajour/fix/format-townlong-game-versions
casperstorm Feb 9, 2021
1df1376
fix: spelling
casperstorm Feb 9, 2021
bda1b65
Update cs_CZ.json (POEditor.com)
casperstorm Feb 9, 2021
b693778
Update da_DK.json (POEditor.com)
casperstorm Feb 9, 2021
45d4857
Update en_US.json (POEditor.com)
casperstorm Feb 9, 2021
2d1604e
Update fr_FR.json (POEditor.com)
casperstorm Feb 9, 2021
c0c019a
Update de_DE.json (POEditor.com)
casperstorm Feb 9, 2021
7bfd7d7
Update hu_HU.json (POEditor.com)
casperstorm Feb 9, 2021
e169a4e
Update nb_NO.json (POEditor.com)
casperstorm Feb 9, 2021
851ad11
Update pt_PT.json (POEditor.com)
casperstorm Feb 9, 2021
6a2d902
Update ru_RU.json (POEditor.com)
casperstorm Feb 9, 2021
cbc71be
Update sk_SK.json (POEditor.com)
casperstorm Feb 9, 2021
c10f8f9
Update es_ES.json (POEditor.com)
casperstorm Feb 9, 2021
e07c17e
Update se_SE.json (POEditor.com)
casperstorm Feb 9, 2021
e5a95a7
Update tr_TR.json (POEditor.com)
casperstorm Feb 9, 2021
f7a7958
fix: Townlong-Yak > TownlongYak
casperstorm Feb 9, 2021
7a09e8a
Merge branch 'development' of github.com:casperstorm/ajour into devel…
casperstorm Feb 9, 2021
81371f6
chore: bumped version and changelog
casperstorm Feb 13, 2021
6e50635
Update Cargo.toml
casperstorm Feb 13, 2021
11df231
Update Cargo.lock
casperstorm Feb 13, 2021
ecbaf86
Update CHANGELOG.md
casperstorm Feb 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@ and `Removed`.

## [Unreleased]

## [0.7.1] - 2021-02-14

### Added

- Townlong Yak addons has been added to the Catalog.
- Optional 'Categories' column for Catalog.
- Optional 'Summary' column for My Addons.
- New languages added to Ajour:
- 🇺🇦 Ukrainian (thanks Krapka and Orney)

### Changed

- Sorted language picker in Settings.
- Tweaked catalog fuzzy search to weight title matches higher than description
matches.

### Fixed

- Multiple error messages are now correctly localized.
- Corrected error in flavor detection if Ajour was launched before WoW had ever
been launched.

## [0.7.0] - 2021-01-26

### Added
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ajour"
description = "A World of Warcraft addon manager"
version = "0.7.0"
version = "0.7.1"
authors = ["Casper Rogild Storm"]
license = "MIT"
homepage = "https://github.com/ajour/ajour"
Expand All @@ -17,9 +17,9 @@ wgpu = ["ajour-widgets/wgpu", "iced/wgpu", "iced/default_system_font"]
opengl = ["ajour-widgets/opengl", "iced/glow", "iced/glow_default_system_font"]

[dependencies]
ajour-core = { version = "0.7.0", path = "crates/core", features=['gui'] }
ajour-weak-auras = { version = "0.7.0", path = "crates/weak_auras" }
ajour-widgets = { version = "0.7.0", path = "crates/widgets" }
ajour-core = { version = "0.7.1", path = "crates/core", features=['gui'] }
ajour-weak-auras = { version = "0.7.1", path = "crates/weak_auras" }
ajour-widgets = { version = "0.7.1", path = "crates/widgets" }

iced = { version = "0.2.0", default-features = false, features = ["debug"] }
iced_futures = { version = "0.2", features = ["async-std"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ajour-core"
description = "Core library for Ajour"
version = "0.7.0"
version = "0.7.1"
authors = ["Casper Rogild Storm"]
license = "MIT"
homepage = "https://github.com/ajour/ajour"
Expand Down
21 changes: 20 additions & 1 deletion crates/core/src/addon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ impl Addon {
RepositoryKind::WowI => {
self.repository_id() == f.repository_identifiers.wowi.as_deref()
}
// For git sources, prioritize the folder that has a version in it
// For git & townlong sources, prioritize the folder that has a version in it
RepositoryKind::TownlongYak => f.version.is_some(),
RepositoryKind::Git(_) => f.version.is_some(),
}
} else {
Expand Down Expand Up @@ -274,6 +275,13 @@ impl Addon {
}
}

/// Sets the file id of the addon
pub fn set_file_id(&mut self, file_id: i64) {
if let Some(metadata) = self.repository.as_mut().map(|r| &mut r.metadata) {
metadata.file_id = Some(file_id);
}
}

/// Returns the title of the addon.
pub fn title(&self) -> &str {
let meta_title = self.metadata().map(|m| m.title.as_deref()).flatten();
Expand Down Expand Up @@ -413,6 +421,17 @@ impl Addon {
}
}

/// Returns the hub id of the addon, if applicable.
pub fn hub_id(&self) -> Option<i32> {
if self.repository_kind() == Some(RepositoryKind::TownlongYak) {
self.repository()
.map(|r| r.id.parse::<i32>().ok())
.flatten()
} else {
None
}
}

pub fn remote_packages(&self) -> HashMap<ReleaseChannel, RemotePackage> {
self.metadata()
.map(|m| &m.remote_packages)
Expand Down
18 changes: 18 additions & 0 deletions crates/core/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ pub struct AddonCacheEntry {
pub primary_folder_id: String,
pub folder_names: Vec<String>,
pub modified: DateTime<Utc>,
pub external_release_id: Option<ExternalReleaseId>,
}

impl TryFrom<&Addon> for AddonCacheEntry {
Expand All @@ -207,13 +208,23 @@ impl TryFrom<&Addon> for AddonCacheEntry {
let mut folder_names: Vec<_> = addon.folders.iter().map(|a| a.id.clone()).collect();
folder_names.sort();

let external_release_id = if repository == RepositoryKind::TownlongYak {
addon.file_id().map(ExternalReleaseId::FileId)
} else {
addon
.version()
.map(str::to_string)
.map(ExternalReleaseId::Version)
};

Ok(AddonCacheEntry {
title: addon.title().to_owned(),
repository,
repository_id: repository_id.to_owned(),
primary_folder_id: addon.primary_folder_id.clone(),
folder_names,
modified: Utc::now(),
external_release_id,
})
} else {
Err(CacheError::AddonMissingRepo {
Expand All @@ -223,6 +234,12 @@ impl TryFrom<&Addon> for AddonCacheEntry {
}
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub enum ExternalReleaseId {
FileId(i64),
Version(String),
}

#[derive(Serialize, Deserialize, Debug)]
pub struct CatalogCache {
etag: String,
Expand Down Expand Up @@ -307,6 +324,7 @@ mod test {
primary_folder_id: folders.first().map(|f| f.id.clone()).unwrap(),
folder_names: folders.iter().map(|f| f.id.clone()).collect(),
modified: Utc::now(),
external_release_id: None,
}
}));

Expand Down
10 changes: 9 additions & 1 deletion crates/core/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use chrono::prelude::*;
use isahc::ResponseExt;
use serde::{Deserialize, Serialize};

const CATALOG_URL: &str = "https://github.com/ajour/ajour-catalog/raw/master/catalog.json";
const CATALOG_URL: &str = "https://github.com/ajour/ajour-catalog/raw/master/catalog-2.0.json";

type Etag = Option<String>;

Expand Down Expand Up @@ -65,6 +65,10 @@ pub enum Source {
Tukui,
#[serde(alias = "wowi")]
WowI,
#[serde(alias = "townlong-yak")]
TownlongYak,
#[serde(other)]
Other,
}

impl std::fmt::Display for Source {
Expand All @@ -73,6 +77,10 @@ impl std::fmt::Display for Source {
Source::Curse => "Curse",
Source::Tukui => "Tukui",
Source::WowI => "WowInterface",
Source::TownlongYak => "TownlongYak",

// This is a fallback option.
Source::Other => "Unknown",
};
write!(f, "{}", s)
}
Expand Down
52 changes: 32 additions & 20 deletions crates/core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use glob::MatchOptions;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fmt::{self, Display, Formatter};
use std::fs::create_dir_all;
use std::path::PathBuf;

mod addons;
Expand Down Expand Up @@ -60,9 +61,11 @@ impl Config {
/// This will return `None` if no `wow_directory` is set in the config.
pub fn get_addon_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf> {
match &self.wow.directory {
Some(dir) => {
// The path to the directory containing the addons
let mut addon_dir = dir.join(&flavor.folder_name()).join("Interface/AddOns");
Some(wow_dir) => {
// The path to the flavor directory
let flavor_dir = wow_dir.join(&flavor.folder_name());
// The path to the addons directory
let mut addon_dir = flavor_dir.join("Interface/AddOns");

// If path doesn't exist, it could have been modified by the user.
// Check for a case-insensitive version and use that instead.
Expand All @@ -74,10 +77,7 @@ impl Config {

// For some reason the case insensitive pattern doesn't work
// unless we add an actual pattern symbol, hence the `?`.
let pattern = format!(
"{}/?nterface/?ddons",
dir.join(&flavor.folder_name()).display()
);
let pattern = format!("{}/?nterface/?ddons", flavor_dir.display());

for entry in glob::glob_with(&pattern, options).unwrap() {
if let Ok(path) = entry {
Expand All @@ -86,6 +86,13 @@ impl Config {
}
}

// If flavor dir exists but not addon dir we try to create it.
// This state can happen if you do a fresh install of WoW and
// launch Ajour before you launch WoW.
if flavor_dir.exists() && !addon_dir.exists() {
let _ = create_dir_all(&addon_dir);
}

Some(addon_dir)
}
None => None,
Expand Down Expand Up @@ -225,6 +232,7 @@ pub enum Language {
Swedish,
Spanish,
Turkish,
Ukrainian,
}

impl std::fmt::Display for Language {
Expand All @@ -234,38 +242,41 @@ impl std::fmt::Display for Language {
"{}",
match self {
Language::Czech => "Čeština",
Language::English => "English",
Language::Danish => "Dansk",
Language::German => "Deutsch",
Language::Swedish => "Svenska",
Language::English => "English",
Language::French => "Français",
Language::Russian => "Pусский",
Language::Spanish => "Español",
Language::German => "Deutsch",
Language::Hungarian => "Magyar",
Language::Norwegian => "Bokmål",
Language::Norwegian => "Norsk Bokmål",
Language::Portuguese => "Português",
Language::Russian => "Pусский",
Language::Slovak => "Slovenčina",
Language::Spanish => "Español",
Language::Swedish => "Svenska",
Language::Turkish => "Türkçe",
Language::Portuguese => "Português",
Language::Ukrainian => "Yкраїнська",
}
)
}
}

impl Language {
pub const ALL: [Language; 13] = [
// Alphabetically sorted based on their local name (@see `impl Display`).
pub const ALL: [Language; 14] = [
Language::Czech,
Language::Danish,
Language::English,
Language::French,
Language::German,
Language::Russian,
Language::English,
Language::Spanish,
Language::Swedish,
Language::French,
Language::Hungarian,
Language::Norwegian,
Language::Portuguese,
Language::Russian,
Language::Slovak,
Language::Swedish,
Language::Turkish,
Language::Portuguese,
Language::Ukrainian,
];

pub const fn language_code(self) -> &'static str {
Expand All @@ -283,6 +294,7 @@ impl Language {
Language::Slovak => "sk_SK",
Language::Turkish => "tr_TR",
Language::Portuguese => "pt_PT",
Language::Ukrainian => "uk_UA",
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions crates/core/src/config/wow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ impl Flavor {
}
}

/// Returns flavor `String` in WowUp.Hub format
pub(crate) fn hub_format(self) -> String {
match self {
Flavor::Retail | Flavor::RetailPTR | Flavor::RetailBeta => "retail".to_owned(),
Flavor::Classic | Flavor::ClassicPTR => "classic".to_owned(),
}
}

/// Returns `Flavor` which self relates to.
pub fn base_flavor(self) -> Flavor {
match self {
Expand Down
2 changes: 2 additions & 0 deletions crates/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ pub enum RepositoryError {
CurseMissingPackage { id: String },
#[error("No package found for WowI id {id}")]
WowIMissingPackage { id: String },
#[error("No package found for Hub id {id}")]
HubMissingPackage { id: String },
#[error("No remote package found for channel {channel}")]
MissingPackageChannel { channel: ReleaseChannel },
#[error("Git repo must be created with `from_source_url`")]
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载