Commit 7b5c4e12 authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[tools][system-analyzer] Remove theme settings

Removing some additional complexity that is not frequently used.

Change-Id: I10195971d872d710ba3a87170fb62c1948e7716e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2923502Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74851}
parent 456855a4
......@@ -22,28 +22,6 @@
--border-color: rgba(var(--border-color-rgb), 0.2);
}
[data-theme="light"] {
--background-color: #ffffff;
--surface-color: #ffffff;
--primary-color: #6200ee;
--secondary-color: #03dac5;
--on-surface-color: #000000;
--on-background-color: #000000;
--on-primary-color: #ffffff;
--on-secondary-color: #000000;
--default-color: #3700b3;
--error-color: #b00020;
--map-background-color: #5e5454;
--timeline-background-color: #fdfcfc;
--file-reader-background-color: #887e8b80;
--red: #b71c1c;
--green: #7db300;
--yellow: #ffff00;
--blue: #0024b3;
--orange: #ef6c00;
--violet: #8f00b3;
}
body {
font-family: sans-serif;
font-size: 14px;
......
......@@ -23,44 +23,6 @@ found in the LICENSE file. -->
</script>
<link rel="stylesheet" type="text/css" href="./index.css">
<style>
.theme-switch {
display: inline-block;
height: 16px;
position: relative;
width: 38px;
vertical-align: middle;
}
.theme-switch input {
display: none;
}
.slider {
background-color: var(--primary-color);
bottom: 0;
cursor: pointer;
left: 0;
position: absolute;
right: 0;
top: 0;
border-radius: 34px;
}
.slider:before {
background-color: var(--surface-color);
position: absolute;
height: 10px;
width: 10px;
bottom: 3px;
content: "";
left: 4px;
border-radius: 50%;
}
input:checked+.slider:before {
transform: translateX(20px);
}
#container.initial {
display: none;
}
......@@ -133,17 +95,6 @@ found in the LICENSE file. -->
</section>
<div class="panels">
<section id="settings" class="panel">
<h2>Settings</h2>
<div class="panelBody">
<span>Theme:</span>
<label class="theme-switch" for="theme-switch-input">
<input type="checkbox" id="theme-switch-input" >
<div class="slider"></div>
</label>
</div>
</section>
<section id="instructions" class="panel">
<h2>Instructions</h2>
<div class="panelBody">
......
......@@ -44,8 +44,6 @@ class App {
toolTip: $('#tool-tip'),
};
this.toggleSwitch = $('.theme-switch input[type="checkbox"]');
this.toggleSwitch.addEventListener('change', (e) => this.switchTheme(e));
this._view.logFileReader.addEventListener(
'fileuploadstart', (e) => this.handleFileUploadStart(e));
this._view.logFileReader.addEventListener(
......@@ -342,14 +340,6 @@ class App {
this._view.codeTrack.data = this._state.codeTimeline;
this._view.apiTrack.data = this._state.apiTimeline;
}
switchTheme(event) {
document.documentElement.dataset.theme =
event.target.checked ? 'light' : 'dark';
CSSColor.reset();
if (!this.fileLoaded) return;
this.refreshTimelineTrackView();
}
}
class Navigation {
......
......@@ -17,6 +17,7 @@ export class CSSColor {
this._cache.set(name, color);
return color;
}
static reset() {
this._cache.clear();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment