Skip to content

Commit

Permalink
fix: re-use flarum/subscription colors so follow menu works with dark… (
Browse files Browse the repository at this point in the history
#74)

* fix: re-use flarum/subscription colors so follow menu works with dark mode better

* fix: php stan error - require php ^8.0
  • Loading branch information
imorland authored Aug 28, 2024
1 parent 186b695 commit 8eca7a3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
with:
enable_backend_testing: false
enable_phpstan: true
php_versions: '["8.0", "8.1", "8.2"]'
php_versions: '["8.0", "8.1", "8.2", "8.3"]'
backend_directory: .
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
}
],
"require": {
"php": "^8.0",
"flarum/core": "^1.8.3",
"flarum/tags": "^1.8.0",
"fof/extend": "^1.2.0"
Expand Down
18 changes: 14 additions & 4 deletions resources/less/forum.less
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,24 @@
}

&.selected {
background-color: @alert-bg;
color: @alert-color;
background-color: var(--following-bg);
color: var(--following-color);

.SubscriptionOption-icon {
color: var(--following-color);
}

.SubscriptionOption-title {
color: var(--following-color);
}

.SubscriptionOption-description {
color: var(--following-color);
}
}

.SubscriptionOption-icon {
flex-shrink: 0;
color: @muted-color;
font-size: 1.2em; // Increase the size of the icon
}

Expand All @@ -105,7 +116,6 @@
.SubscriptionOption-description {
flex-grow: 1; // This will make the description take up the remaining width
padding-left: 10px; // Some spacing between the title and the description
color: @muted-color;
}

.SubscriptionOption-selectedIcon {
Expand Down
1 change: 0 additions & 1 deletion src/AddTagSubscriptionAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function getStateFor(Tag $tag, User $actor): TagState
// If $tag->state is loaded *and* null, this might be because the actor doesn't have tag-specific state
// OR because the wrong actor has been used for loading it. `$tag->stateFor()` will return the correct state.
// If it doesn't exist, it returns a dummy state with the correct actor & tag IDs.
// @phpstan-ignore-next-line ($tag->state may indeed be null)
if (!$tag->relationLoaded('state') || is_null($tag->state) || $tag->state->user_id !== $actor->id) {
$tag->setRelation('state', $tag->stateFor($actor));
}
Expand Down

0 comments on commit 8eca7a3

Please sign in to comment.