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

fix/elvui-tbc #732

Merged
merged 10 commits into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ and `Removed`.
is down. This new button should make it easier to try fetching the data again
instead of relaunching the application.

### Fixed

- ElvUI (and a few other) addons should now properly show up in Ajour again.
- Fixed issue where alt + tabbing would change view in Ajour.

## [1.3.0] - 2021-08-05

### Packaging
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 = "1.3.0"
version = "1.3.1-rc.1"
authors = ["Casper Rogild Storm"]
license = "GPL-3.0"
homepage = "https://github.com/ajour/ajour"
Expand All @@ -18,9 +18,9 @@ opengl = ["ajour-widgets/opengl", "iced/glow", "iced/glow_default_system_font"]
no-self-update = ["ajour-core/no-self-update"]

[dependencies]
ajour-core = { version = "1.3.0", path = "crates/core", features=['gui'] }
ajour-weak-auras = { version = "1.3.0", path = "crates/weak_auras" }
ajour-widgets = { version = "1.3.0", path = "crates/widgets" }
ajour-core = { version = "1.3.1-rc.1", path = "crates/core", features=['gui'] }
ajour-weak-auras = { version = "1.3.1-rc.1", path = "crates/weak_auras" }
ajour-widgets = { version = "1.3.1-rc.1", path = "crates/widgets" }

iced = { version = "0.3.0", default-features = false, features = ["debug"] }
iced_futures = { version = "0.3.0", features = ["async-std"] }
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ Windows:
| <kbd>s</kbd> | Go to Settings |
| <kbd>r</kbd> | Refresh |
| <kbd>u</kbd> | Update |
| <kbd>Tab</kbd> | Go to next tab |
| <kbd>Ctrl</kbd> + <kbd>Tab</kbd> | Go to previous tab |

## Command Line

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 = "1.3.0"
version = "1.3.1-rc.1"
authors = ["Casper Rogild Storm"]
license = "GPL-3.0"
homepage = "https://github.com/ajour/ajour"
Expand Down
37 changes: 22 additions & 15 deletions crates/core/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,24 +272,31 @@ async fn parse_addon_folders(
let mut addon_folders: Vec<_> = all_dirs
.par_iter()
.filter_map(|id| {
// Generate .toc path. If `-BCC` or `-Mainline` exists for Tbc and Era,
// respectively, use that over the standard toc.
// Generate .toc path.
let toc_path = {
let multi_part = match flavor.base_flavor() {
Flavor::Retail => "-Mainline",
Flavor::ClassicEra => "-Classic",
Flavor::ClassicTbc => "-BCC",
_ => "",
};
let toc_with_flavor = || -> Option<PathBuf> {
let multi_part = match flavor.base_flavor() {
Flavor::Retail => vec!["Mainline"],
Flavor::ClassicEra => vec!["Classic", "Vanilla"],
Flavor::ClassicTbc => vec!["BCC", "TBC"],
_ => vec![],
};

for part in multi_part {
for separator in &["-", "_"] {
let toc_with_flavor = root_dir
.join(&id)
.join(format!("{}{}{}.toc", id, separator, part));
Comment on lines +285 to +289
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Check both ways just in case.

if toc_with_flavor.exists() {
return Some(toc_with_flavor);
}
}
}

let standard_path = root_dir.join(&id).join(format!("{}.toc", id));
let multi_path = root_dir.join(&id).join(format!("{}{}.toc", id, multi_part));
None
};

if multi_path.exists() {
multi_path
} else {
standard_path
}
toc_with_flavor().unwrap_or_else(|| root_dir.join(&id).join(format!("{}.toc", id)))
};

if !toc_path.exists() {
Expand Down
20 changes: 16 additions & 4 deletions crates/core/src/repository/backend/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,23 @@ mod github {
Flavor::Retail => {
a.name.ends_with("zip")
&& !a.name.to_lowercase().contains("classic")
&& !a.name.to_lowercase().contains("vanilla")
&& !a.name.to_lowercase().contains("bcc")
&& !a.name.to_lowercase().contains("tbc")
}
Flavor::ClassicEra => {
a.name.ends_with("zip")
&& a.name.to_lowercase().contains("classic")
&& (a.name.to_lowercase().contains("classic")
|| a.name.to_lowercase().contains("vanilla"))
&& !a.name.to_lowercase().contains("bcc")
&& !a.name.to_lowercase().contains("tbc")
}
Flavor::ClassicTbc => {
a.name.ends_with("zip")
&& !a.name.to_lowercase().contains("classic")
&& a.name.to_lowercase().contains("bcc")
&& !a.name.to_lowercase().contains("vanilla")
&& (a.name.to_lowercase().contains("bcc")
|| a.name.to_lowercase().contains("tbc"))
}
_ => a.name.ends_with("zip"),
});
Expand Down Expand Up @@ -404,17 +410,23 @@ mod gitlab {
Flavor::Retail => {
a.name.ends_with("zip")
&& !a.name.to_lowercase().contains("classic")
&& !a.name.to_lowercase().contains("vanilla")
&& !a.name.to_lowercase().contains("bcc")
&& !a.name.to_lowercase().contains("tbc")
}
Flavor::ClassicEra => {
a.name.ends_with("zip")
&& a.name.to_lowercase().contains("classic")
&& (a.name.to_lowercase().contains("classic")
|| a.name.to_lowercase().contains("vanilla"))
&& !a.name.to_lowercase().contains("bcc")
&& !a.name.to_lowercase().contains("tbc")
}
Flavor::ClassicTbc => {
a.name.ends_with("zip")
&& !a.name.to_lowercase().contains("classic")
&& a.name.to_lowercase().contains("bcc")
&& !a.name.to_lowercase().contains("vanilla")
&& (a.name.to_lowercase().contains("bcc")
|| a.name.to_lowercase().contains("tbc"))
}
_ => a.name.ends_with("zip"),
});
Expand Down
4 changes: 2 additions & 2 deletions crates/weak_auras/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ajour-weak-auras"
description = "Weak Auras library for Ajour"
version = "1.3.0"
version = "1.3.1-rc.1"
authors = ["Casper Rogild Storm", "tarkah <admin@tarkah.dev>"]
license = "GPL-3.0"
homepage = "https://github.com/ajour/ajour"
Expand All @@ -17,7 +17,7 @@ name = "cli"
required-features = ["cli"]

[dependencies]
ajour-core = { version = "1.3.0", path = "../core" }
ajour-core = { version = "1.3.1-rc.1", path = "../core" }

async-std = { version = "1.6", features = ["unstable"] }
futures = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion crates/widgets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ajour-widgets"
description = "Widget library for Ajour"
version = "1.3.0"
version = "1.3.1-rc.1"
authors = ["Casper Rogild Storm", "tarkah <admin@tarkah.dev>"]
license = "GPL-3.0"
homepage = "https://github.com/ajour/ajour"
Expand Down
2 changes: 2 additions & 0 deletions src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub enum Mode {
}

impl Mode {
#[allow(dead_code)]
fn next(&self, flavor: Flavor) -> Self {
use Mode::*;
match *self {
Expand All @@ -79,6 +80,7 @@ impl Mode {
}
}

#[allow(dead_code)]
fn previous(&self, flavor: Flavor) -> Self {
use Mode::*;
match *self {
Expand Down
11 changes: 1 addition & 10 deletions src/gui/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ pub fn handle_message(ajour: &mut Ajour, message: Message) -> Result<Command<Mes
Message::RuntimeEvent(iced_native::Event::Keyboard(
iced_native::keyboard::Event::KeyReleased {
key_code,
modifiers,
modifiers: _,
},
)) => match key_code {
iced::keyboard::KeyCode::A => {
Expand Down Expand Up @@ -2467,15 +2467,6 @@ pub fn handle_message(ajour: &mut Ajour, message: Message) -> Result<Command<Mes
}
_ => (),
},
iced::keyboard::KeyCode::Tab if !modifiers.alt => {
let flavor = ajour.config.wow.flavor;

if modifiers.control {
ajour.mode = ajour.mode.previous(flavor);
} else {
ajour.mode = ajour.mode.next(flavor);
}
}
_ => (),
},
Message::Interaction(Interaction::PickBackupCompressionFormat(format)) => {
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载