Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 774cda37 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Display more information about app compatibility on the device page

parent 66093e67
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
# AGENTS Methods Log
- # AGENTS Methods Log
- 2025-12-09: Removed the redundant `safetynet` and `rootbeer_pass` entries from every device YAML because the new `compatibility` map now drives Apps compatibility, and updated the detail include to list each metric along with the computed level.
- 2025-12-08: Applied the compatibility map generator across all `htdocs/_data/devices/*.yml` files so the default (unlockable/userdebug/true/basic/pass/community) and explicit device overrides from the shared table now appear everywhere and supply `data-compatibility-level`.
- 2025-12-07: Taught `htdocs/assets/js/code.js` to respect the `data-compatibility-level` attribute so the Apps compatibility selector filters reliably.
- 2025-12-06: Simplified the `/devices` compatibility column to show only the computed level label while keeping the compatibility span for filtering.
+69 −18
Original line number Diff line number Diff line
@@ -82,27 +82,78 @@
            <h1>{{ device_title }}</h1>
            <img src="{{ image_url }}" alt="{{ image_alt }}" height="350px" >
            <h3 class="mb-3 mt-3">Apps Compatibility</h3>
          {%- assign compatibility = device.compatibility | default: {} -%}
          {%- assign bootloader_value = compatibility.bootloader | default: 'unlockable' -%}
          {%- assign bootloader_label = bootloader_value | replace: '_', ' ' | capitalize -%}
          {%- assign build_type_value = compatibility.build_type | default: 'userdebug' | downcase -%}
          {%- assign build_type_label = build_type_value | replace: '_', ' ' | capitalize -%}
          {%- assign google_value = compatibility.google_certified -%}
          {%- assign google_label = google_value == true or google_value == 'true' ? 'Yes' : 'No' -%}
          {%- assign play_value = compatibility.play_integrity | default: 'basic' | downcase -%}
          {%- assign play_label = play_value | capitalize -%}
          {%- assign rootbeer_value = compatibility.rootbeer | default: 'pass' | downcase -%}
          {%- assign rootbeer_label = rootbeer_value == 'pass' ? '✅' : '❌' -%}
          {%- assign channel_value = compatibility.channel | default: 'community' | downcase -%}
          {%- assign channel_label = channel_value | capitalize -%}
          {%- assign score = 0 -%}
          {%- if bootloader_value == 'locked_green' -%}
          {%- assign score = score | plus: 2 -%}
          {%- elsif bootloader_value == 'locked_yellow' -%}
          {%- assign score = score | plus: 1 -%}
          {%- endif -%}
          {%- if build_type_value == 'user' -%}
          {%- assign score = score | plus: 1 -%}
          {%- endif -%}
          {%- if google_value == true or google_value == 'true' -%}
          {%- assign score = score | plus: 1 -%}
          {%- endif -%}
          {%- case play_value -%}
          {%- when 'basic' -%}
          {%- assign score = score | plus: 1 -%}
          {%- when 'device' -%}
          {%- assign score = score | plus: 2 -%}
          {%- when 'strong' -%}
          {%- assign score = score | plus: 3 -%}
          {%- endcase -%}
          {%- if rootbeer_value == 'pass' -%}
          {%- assign score = score | plus: 1 -%}
          {%- endif -%}
          {%- if channel_value == 'official' -%}
          {%- assign score = score | plus: 2 -%}
          {%- elsif channel_value == 'community' -%}
          {%- assign score = score | plus: 1 -%}
          {%- endif -%}
          {%- assign level_label = 'Generally compatible' -%}
          {%- if score > 5 -%}
          {%- assign level_label = 'Highly compatible' -%}
          {%- endif -%}
          <div class="row row-detail">
            {%- if device.safetynet == 0 %}
              <dt class="dt-right col-sm-9">Safetynet</dt>
              <dd class="dd-right col-sm-3"></dd>
            {%-elsif device.safetynet == 1 %}
              <dt class="dt-right col-sm-9">Safetynet</dt>
              <dd class="dd-right col-sm-3"></dd>
            {%-elsif device.safetynet == 2 %}
              <dt class="dt-right col-sm-9">Safetynet</dt>
              <dd class="dd-right col-sm-3"></dd>
            {%- endif %}
            <dt class="dt-right col-sm-9">Compatibility level</dt>
            <dd class="dd-right col-sm-3">{{ level_label }}</dd>
          </div>
          <div class="row row-detail">
            <dt class="dt-right col-sm-9">Bootloader</dt>
            <dd class="dd-right col-sm-3">{{ bootloader_label }}</dd>
          </div>
          <div class="row row-detail">
            <dt class="dt-right col-sm-9">Build type</dt>
            <dd class="dd-right col-sm-3">{{ build_type_label }}</dd>
          </div>
          <div class="row row-detail">
            <dt class="dt-right col-sm-9">Google certified</dt>
            <dd class="dd-right col-sm-3">{{ google_label }}</dd>
          </div>
          <div class="row row-detail">
            <dt class="dt-right col-sm-9">Play Integrity</dt>
            <dd class="dd-right col-sm-3">{{ play_label }}</dd>
          </div>
          <div class="row row-detail">
            {% if device.rootbeer_pass == 1 %}
              <dt class="dt-right col-sm-9">Rootbeer</dt>
              <dd class="dd-right col-sm-3"></dd>
            
            {% elsif device.rootbeer_pass == 0 %}
            <dt class="dt-right col-sm-9">Rootbeer</dt>
              <dd class="dd-right col-sm-3"></dd>
            {% endif %}
            <dd class="dd-right col-sm-3">{{ rootbeer_label }}</dd>
          </div>
          <div class="row row-detail">
            <dt class="dt-right col-sm-9">Channel</dt>
            <dd class="dd-right col-sm-3">{{ channel_label }}</dd>
          </div>

            <h3 class="mb-3 mt-3">Bootloader relocking support</h3>