Skip to content

Commit 87f54b5

Browse files
Merge pull request #269 from dutchdronesquad/release/v1.4.0
Release v1.4.0
2 parents 23d82e7 + 16324d6 commit 87f54b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+6534
-512
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: ⤵️ Check out code from GitHub
25-
uses: actions/checkout@v5.0.0
25+
uses: actions/checkout@v6.0.0
2626
- name: 🏗 Set up UV
27-
uses: astral-sh/setup-uv@v7.1.3
27+
uses: astral-sh/setup-uv@v7.1.4
2828
- name: 🏗 Install project dependencies
2929
run: uv sync --group docs
3030
- name: 🏗 Build documentation

.github/workflows/linting.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: ⤵️ Check out code from GitHub
22-
uses: actions/checkout@v5.0.0
22+
uses: actions/checkout@v6.0.0
2323
- name: 🏗 Set up UV
24-
uses: astral-sh/setup-uv@v7.1.3
24+
uses: astral-sh/setup-uv@v7.1.4
2525
with:
2626
enable-cache: true
2727
- name: 🏗 Install project dependencies
@@ -36,9 +36,9 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: ⤵️ Check out code from GitHub
39-
uses: actions/checkout@v5.0.0
39+
uses: actions/checkout@v6.0.0
4040
- name: 🏗 Set up UV
41-
uses: astral-sh/setup-uv@v7.1.3
41+
uses: astral-sh/setup-uv@v7.1.4
4242
with:
4343
enable-cache: true
4444
- name: 🏗 Install project dependencies

.github/workflows/rhfest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: ⤵️ Check out code from GitHub
21-
uses: actions/checkout@v5.0.0
21+
uses: actions/checkout@v6.0.0
2222
- name: 🚀 Run RHFest validation
2323
uses: docker://ghcr.io/rotorhazard/rhfest-action:v3.0.0

.github/workflows/sync-labels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
issues: write
2323
steps:
2424
- name: ⤵️ Check out code from GitHub
25-
uses: actions/checkout@v5.0.0
25+
uses: actions/checkout@v6.0.0
2626
- name: 🚀 Run Label Syncer
2727
uses: micnncim/action-label-syncer@v1.3.0
2828
env:

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ repos:
4040
language: system
4141
types: [yaml]
4242
entry: uv run check-yaml
43+
exclude: ^mkdocs\.yml$
4344
- id: detect-private-key
4445
name: 🕵️ Detect Private Keys
4546
language: system

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.PHONY: serve build clean deploy help
2+
3+
# Development server with live reload
4+
serve:
5+
@echo "🚀 Starting development server with live reload..."
6+
@uv run mkdocs serve --livereload
7+
8+
# Build documentation
9+
build:
10+
@echo "📦 Building documentation..."
11+
@uv run mkdocs build
12+
13+
# Clean build artifacts
14+
clean:
15+
@echo "🧹 Cleaning build artifacts..."
16+
@uv run mkdocs build --clean
17+
18+
# Show help
19+
help:
20+
@echo "Available commands:"
21+
@echo " make serve - Start development server"
22+
@echo " make build - Build documentation"
23+
@echo " make clean - Clean build artifacts"

custom_plugins/stream_overlays/__init__.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
from flask.blueprints import Blueprint
66

77
from .utils import (
8+
create_heat_markdown,
89
create_leaderboard_markdown,
910
create_nodes_markdown,
1011
create_topbar_markdown,
1112
)
1213

1314
overlays: dict = {
14-
"DDS": {"node": True, "topbar": True, "leaderboard": True},
15-
"LCDR": {"node": True, "topbar": True, "leaderboard": False},
15+
"DDS": {"node": True, "topbar": True, "leaderboard": True, "heat": True},
16+
"LCDR": {"node": True, "topbar": True, "leaderboard": False, "heat": True},
17+
"APEX": {"node": True, "topbar": True, "leaderboard": False, "heat": True},
1618
}
1719

1820

@@ -50,7 +52,7 @@ def create_panels(self, _args: dict) -> None:
5052
panel_id,
5153
f"{overlay_name} - OBS Overlays",
5254
"streams",
53-
open=True,
55+
open=False,
5456
)
5557

5658
# Create and register markdown blocks based on the features
@@ -80,6 +82,12 @@ def create_panels(self, _args: dict) -> None:
8082
panel_id, f"{overlay_name}-Nodes", nodes_markdown
8183
)
8284

85+
if features.get("heat"):
86+
heat_markdown = create_heat_markdown(overlay_name, base_path)
87+
self._rhapi.ui.register_markdown(
88+
panel_id, f"{overlay_name}-Heat", heat_markdown
89+
)
90+
8391

8492
def initialize(rhapi: object) -> None:
8593
"""Initialize the plugin.
@@ -149,4 +157,16 @@ def render_class_leaderboard_overlay(name: str, class_id: int) -> str:
149157
class_id=class_id,
150158
)
151159

160+
@bp.route("/stream/overlay/<string:name>/heat/upcoming")
161+
def render_heat_overlay(name: str) -> str:
162+
"""Render the upcoming heat overlay."""
163+
return templating.render_template(
164+
f"stream/heat/heat_{name}.html",
165+
serverInfo=None,
166+
getOption=rhapi.db.option,
167+
getConfig=rhapi.config.get_item,
168+
__=rhapi.__,
169+
num_nodes=len(rhapi.interface.seats),
170+
)
171+
152172
rhapi.ui.blueprint_add(bp)

custom_plugins/stream_overlays/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"description": "Add new designed stream overlays to RotorHazard, which can be used in OBS (Open Broadcaster Software).",
77
"documentation_uri": "https://overlays.dutchdronesquad.nl",
88
"required_rhapi_version": "1.2",
9-
"version": "1.3.2"
9+
"version": "1.4.0"
1010
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% extends 'stream/heat/heat_base.html' %}
2+
{% set theme_name = 'apex' %}
3+
{% block heat_theme_css %}
4+
<link rel="stylesheet" href="{{ url_for('stream_overlays.static', filename='css/apex/heat.css') }}">
5+
{% endblock %}
6+
{% block content %}
7+
<main class="page-streamheat theme-{{ theme_name }}">
8+
<div class="apex-canvas">
9+
<header class="apex-header">
10+
<div class="apex-header__primary">
11+
<p class="lead-label" id="heat_lead">{{ __('Up Next') }}</p>
12+
<h1 id="heat_name">{{ __('Waiting for heat...') }}</h1>
13+
</div>
14+
<div class="apex-header__meta">
15+
<span class="meta-chip event-name">{{ getOption('eventName') }}</span>
16+
<span class="meta-chip" id="class_name"></span>
17+
<span class="meta-chip" id="round_info"></span>
18+
<span class="meta-chip" id="format_name"></span>
19+
</div>
20+
</header>
21+
22+
<section class="apex-body">
23+
<div class="apex-body__label">
24+
<span class="label-dot"></span>
25+
<span>{{ __('Seat lineup') }}</span>
26+
</div>
27+
<div id="heat_slots" class="heat-grid apex-grid"></div>
28+
</section>
29+
30+
<footer class="apex-foot" id="heat_notice"></footer>
31+
</div>
32+
</main>
33+
{% endblock %}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{% extends 'layout-basic.html' %}
2+
{% set theme_name = theme_name | default('dds') %}
3+
{% block title %}{{ __('Stream') }}: {{ __('Upcoming Heat') }}{% endblock %}
4+
{% block head %}
5+
<link rel="stylesheet" href="{{ url_for('stream_overlays.static', filename='css/main/base.css') }}">
6+
<link rel="stylesheet" href="{{ url_for('stream_overlays.static', filename='css/main/heat_base.css') }}">
7+
{% block heat_theme_css %}{% endblock %}
8+
<script>
9+
window.heatOverlayConfig = {{ {
10+
"theme": theme_name,
11+
"num_nodes": num_nodes,
12+
"labels": {
13+
"upNext": __('Up Next'),
14+
"practiceMode": __('Practice Mode'),
15+
"practiceNotice": __('Profile layout - frequencies only'),
16+
"emptySlot": __('Awaiting Assignment'),
17+
"classFallback": __('Unclassified'),
18+
"formatFallback": __('Format TBD'),
19+
"pilotTBD": __('TBD'),
20+
"noHeat": __('Waiting for heat...'),
21+
"rankLabel": __('Rank'),
22+
"roundLabel": __('Round'),
23+
"seatLabel": __('Seat'),
24+
"noSeats": __('Waiting for pilots')
25+
}
26+
} | tojson }};
27+
</script>
28+
<script type="text/javascript" charset="utf-8"
29+
src="{{ url_for('stream_overlays.static', filename='js/overlay_heat.js') }}"></script>
30+
{% endblock %}
31+
32+
{% block content %}
33+
<main class="page-streamheat theme-{{ theme_name }}">
34+
<div class="heat-wrapper">
35+
<div class="heat-header">
36+
<p class="label" id="heat_lead">{{ __('Up Next') }}</p>
37+
<h1 id="heat_name">{{ __('Waiting for heat...') }}</h1>
38+
<div class="heat-meta">
39+
<span id="class_name"></span>
40+
<span id="round_info"></span>
41+
<span id="format_name"></span>
42+
</div>
43+
</div>
44+
<div id="heat_slots" class="heat-grid"></div>
45+
<div class="heat-footnote" id="heat_notice"></div>
46+
</div>
47+
</main>
48+
{% endblock %}

0 commit comments

Comments
 (0)