Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow themed join/exit button and fix wrap bug #1185

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Josh-Archer
Copy link
Contributor

@Josh-Archer Josh-Archer commented May 4, 2023

Did this for fun on the side because seemed like easy nice thing to have while I was fixing issue with our button not wrapping correctly

image

Now the button will never overlap and style (and updates with it) to the color this made it easier to find for new people and I think was a nice addition to bring attention to AVTT on the page. And added hover support

image
image

@@ -655,6 +649,13 @@ function observe_character_theme_change() {
// console.log("theme_observer is calling find_and_set_player_color", mutation, node);
const newColor = node.innerHTML.match(/#(?:[0-9a-fA-F]{3}){1,2}/)?.[0];
if (newColor) {
let button = $("#avtt-character-join-button");
//$(".ct-character-sheet-desktop > .ct-character-header-desktop > .ct-character-header-desktop__group--gap");
let color = $(".ct-character-header-desktop__button").css("border-color") ?? "black";
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can find the theme color a little easier in all layouts with $('.dice-toolbar').css('--dice-color')
Currently this doesn't look like it grabs it in mobile layout.

I find it a little distracting being fully colored rather than just the border like the other buttons. I'm sure I'd get used to it but if you guys like it though I'm good with putting it in I use my own theme anyway lol.

@@ -559,32 +559,26 @@ function inject_join_exit_abovevtt_button() {
if ($(".ddbc-campaign-summary").length === 0) return; // we don't have any campaign data
if ($("#avtt-character-join-button").length > 0) return; // we already injected a button

$(".ct-character-sheet-desktop > .ct-character-header-desktop").css({display: "inline-flex"})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This unfortunately pushes the edit button off the other side of the screen for me when not full screen with beyond20 enabled.

I think the button overlapping the player header tidbits (xp race etc.) is also only an issue with beyond20 enabled and not full screen?

It's still a good issue to fix since so many of our users use beyond20.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants