gerrit: update OpenDev theme CSS installation
registerStyleModule has been deprecated for a few releases, and is removed in 3.8. This inserts the style element directly, as suggested by the Gerrit plugin documentation [1]. [1] https://gerrit-documentation.storage.googleapis.com/Documentation/3.7.2/pg-plugin-dev.html#low-level-style Change-Id: I23600754dc35a9d455e611ac25a6162b2e973a03
This commit is contained in:
parent
276396babc
commit
7b6125aace
@ -17,10 +17,9 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const openDevThemeStyle = document.createElement('dom-module');
|
||||
openDevThemeStyle.innerHTML = `
|
||||
<template>
|
||||
<style>
|
||||
Gerrit.install(plugin => {
|
||||
const styleEl = document.createElement('style');
|
||||
styleEl.innerHTML = `
|
||||
html {
|
||||
--header-title-content: "OpenDev";
|
||||
--header-icon: url("/static/opendev-sm.png");
|
||||
@ -29,11 +28,6 @@ openDevThemeStyle.innerHTML = `
|
||||
--header-border-bottom: 1px solid;
|
||||
--header-border-image: linear-gradient(to right, #ee265e, #f9b8cb, #ee265e) 1;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
`;
|
||||
openDevThemeStyle.register('opendev-site-theme');
|
||||
|
||||
Gerrit.install(plugin => {
|
||||
plugin.registerStyleModule('app-theme', 'opendev-site-theme');
|
||||
`;
|
||||
document.head.appendChild(styleEl);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user