Skip to content

Commit a191f45

Browse files
committed
Merge branch 'master' of https://github.com/liriliri/chii
2 parents a5c6d74 + ae22de5 commit a191f45

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.15.4 (3 Nov 2024)
2+
3+
* fix: auto change theme
4+
15
## 1.15.3 (27 Oct 2024)
26

37
* fix: embedded mode not resizable on mobile [#81](https://github.com/liriliri/chii/issues/81)

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chii",
3-
"version": "1.15.3",
3+
"version": "1.15.4",
44
"description": "Chrome devtools framework",
55
"main": "./server/index.js",
66
"bin": {
@@ -50,9 +50,9 @@
5050
"globals": "^15.6.0",
5151
"gulp": "^4.0.2",
5252
"gulp-clean": "^0.4.0",
53-
"luna-data-grid": "^1.0.0",
54-
"luna-modal": "^1.2.3",
55-
"luna-toolbar": "^0.5.8",
53+
"luna-data-grid": "^1.1.0",
54+
"luna-modal": "^1.3.0",
55+
"luna-toolbar": "^0.7.0",
5656
"ncp": "^2.0.0",
5757
"style-loader": "^3.3.1",
5858
"svg-url-loader": "^8.0.0",

server/tpl/index.hbs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
z-index: 1;
2929
margin-bottom: 8px;
3030
}
31+
.toolbar > div:first-child {
32+
margin-left: 0;
33+
}
34+
.toolbar > div:last-child {
35+
margin-right: 0;
36+
}
3137
.description {
3238
margin: 1rem 0;
3339
font-size: .875rem;

src/index.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import detectOs from 'licia/detectOs';
22
import $ from 'licia/$';
33
import randomId from 'licia/randomId';
44
import toInt from 'licia/toInt';
5-
import isDarkMode from 'licia/isDarkMode';
65
import LunaDataGrid from 'luna-data-grid';
76
import LunaModal from 'luna-modal';
87
import LunaToolbar from 'luna-toolbar';
@@ -64,21 +63,18 @@ const $toolbar = $('.toolbar');
6463
const $help = $('.help');
6564
const $description = $('.description');
6665

67-
const theme = isDarkMode() ? 'dark' : 'light';
68-
6966
const help = new LunaModal($help.get(0) as HTMLElement, {
70-
theme,
67+
theme: 'auto',
7168
title: 'Help',
7269
content: $description.get(0) as HTMLElement,
7370
});
7471

7572
const toolbar = new LunaToolbar($toolbar.get(0) as HTMLElement, {
76-
theme,
73+
theme: 'auto',
7774
});
75+
toolbar.appendInput('filter', '', 'Filter');
7876
const targets = toolbar.appendText('0 Target');
7977
toolbar.appendSpace();
80-
toolbar.appendInput('filter', '', 'Filter');
81-
toolbar.appendSeparator();
8278
toolbar.appendButton('Help', () => {
8379
$description.rmClass('hidden');
8480
help.show();
@@ -90,7 +86,7 @@ toolbar.on('change', (key, val) => {
9086
});
9187

9288
const dataGrid = new LunaDataGrid($targets.get(0) as HTMLElement, {
93-
theme,
89+
theme: 'auto',
9490
columns: [
9591
{
9692
id: 'title',

0 commit comments

Comments
 (0)