Thursday, June 04, 2026 3:51:22 AM
> index.slim
= render "communities/container", **local_assigns do
  / Page header with server admin focus
  .text-center.mb-4
    h1.mb-2 XM8 Notification Routing
    p.lead.text-muted Manage notification routing for your Discord server members

  / Pending Requests Section
  - if pending_routes.size > 0
    .card.border-warning.bg-warning.bg-opacity-10.mb-5
      .card-header.border-warning.d-flex.align-items-center.justify-content-between
        h3.mb-0.text-warning
          i.bi.bi-clock-history.me-2
          | Pending Requests Require Your Attention

      .card-body
        p.text-muted.small.mb-4
          | Players have requested to route their notifications to your Discord channels. Accept or decline each request.

        .row.g-3
          - pending_routes.each do |user, grouped_routes|
            - grouped_routes.each do |route_data|
              = render_component(RouteRequestCardComponent, user:, **route_data)

  / Route cards
  .mb-3
    .row.g-3
      - if routes.size > 0
        - routes.each do |user, grouped_routes|
          .col-12[id=user.dom_id]
            .card.mb-3
              .card-body.py-3
                .d-flex.align-items-center.justify-content-between
                  .d-flex.align-items-center
                    img.rounded-circle.me-3[
                      src=user.avatar_url
                      alt=user.discord_username
                      width="48"
                      height="48"
                    ]
                    div
                      h6.mb-0 = user.discord_username

            - if grouped_routes.any? { |r| r[:channel].nil? }
              .col-12
                .alert.alert-warning.border-warning.d-flex.align-items-start
                  i.bi.bi-exclamation-triangle.text-warning.me-3.fs-5
                  div
                    h6.text-warning.mb-2 Some routes may have issues
                    p.small.mb-0
                      |> We couldn't access one or more channel(s). This might mean the channel was deleted,
                      |> or ESM doesn't have permission to access it.
                      br
                      |> Check the routes below marked with
                      i.bi.bi-exclamation-triangle.text-warning.small
                      |< .

            .row.g-3.mb-5
              - grouped_routes.each do |route_data|
                = render_component( \
                  NotificationRouteCardComponent,
                  user:, paths: route_card_paths,
                  **route_data)
      - else
        = render "no_routes"
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2