Skip to content

Commit

Permalink
devices: add android-12.0
Browse files Browse the repository at this point in the history
Change-Id: I223741f9046b1ee79fd31618d0c54b6bc8f747d1
  • Loading branch information
maxwen committed Nov 18, 2021
1 parent 6a0e45e commit ce40252
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions views/devices/devices.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<div class="col-lg-2 col-md-3 col-sm-6">
<a href="#devices/android-11" id="android-11" class="btn btn-light">Android R (11)</a>
</div>
<div class="col-lg-2 col-md-3 col-sm-6">
<a href="#devices/android-12_0" id="android-12" class="btn btn-light">Android S (12)</a>
</div>
</div>
<div class="row justify-content-center" id="device-list">

Expand Down
6 changes: 4 additions & 2 deletions views/devices/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { siteURL, container, showSpinner } from '../../js/const.js'
var devicesList = []
const gerritURL = 'https://gerrit.omnirom.org'
const rawURL = 'https://raw.githubusercontent.com/omnirom/'
var currentVersion = 'android-11'
var currentVersion = 'android-12.0'

class DevicesView {

Expand Down Expand Up @@ -74,7 +74,8 @@ class DevicesView {
devicesContainer.innerHTML += card
})

let activeButton = tempObject.querySelector('#' + currentVersion)
let version = currentVersion.replace(/\./g, "_")
let activeButton = tempObject.querySelector('#' + version)
activeButton.classList.add("btn-dark");

container.innerHTML = tempObject.innerHTML
Expand All @@ -84,6 +85,7 @@ class DevicesView {
try {
if (hash) {
let androidVersion = hash.split("/")[1]
androidVersion = androidVersion.replace(/_/g, ".")
if (androidVersion !== currentVersion) {
currentVersion = androidVersion
}
Expand Down

0 comments on commit ce40252

Please sign in to comment.