Add toggle functionality for exceptions in Rules component

This commit is contained in:
Teriuihi 2025-04-06 17:29:52 +02:00
parent d006a47cf3
commit d981b7dcff
2 changed files with 9 additions and 2 deletions

View File

@ -193,8 +193,9 @@
chunkloaders are prohibited.</p> chunkloaders are prohibited.</p>
<p style="margin-bottom: 0;">We have a system in place to restrict the number of mobs that can be in a <p style="margin-bottom: 0;">We have a system in place to restrict the number of mobs that can be in a
certain area. Please do not try to circumvent this system. Additionally, mob grinder holding chambers must certain area. Please do not try to circumvent this system. Additionally, mob grinder holding chambers must
be either 1x1 or 1x2 blocks in size. <a style="cursor: pointer;" id="ruleButton">Show exceptions...</a></p> be either 1x1 or 1x2 blocks in size. <a style="cursor: pointer;" (click)="toggleExceptions()">Show
<ul id="exceptions" class="full-page-list hide"> exceptions...</a></p>
<ul id="exceptions" class="full-page-list" [ngClass]="{'hide': !showExceptions}">
<li>Magma kill chamber may be up to 3x3</li> <li>Magma kill chamber may be up to 3x3</li>
<li>Hoglin kill chamber may be up to 2x2</li> <li>Hoglin kill chamber may be up to 2x2</li>
<li>Enderman kill chamber may be up to 3x3</li> <li>Enderman kill chamber may be up to 3x3</li>

View File

@ -8,6 +8,12 @@ import {ScrollService} from '../scroll/scroll.service';
styleUrl: './rules.component.scss' styleUrl: './rules.component.scss'
}) })
export class RulesComponent { export class RulesComponent {
showExceptions: boolean = false;
constructor(public scrollService: ScrollService) { constructor(public scrollService: ScrollService) {
} }
public toggleExceptions() {
this.showExceptions = !this.showExceptions;
}
} }