Skip to content

Commit

Permalink
release: v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Jan 5, 2023
1 parent aa859dd commit e96e725
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.8.0 (5 Jan 2022)

* feat: target filter

## 1.7.2 (2 Dec 2022)

* chore: update chobitsu(support android 5.0)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chii",
"version": "1.7.2",
"version": "1.8.0",
"description": "Chrome devtools framework",
"main": "./server/index.js",
"bin": {
Expand Down Expand Up @@ -43,14 +43,14 @@
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"babel-eslint": "^10.1.0",
"chobitsu": "^1.4.1",
"chobitsu": "^1.4.4",
"css-loader": "^6.7.2",
"es-check": "^6.2.1",
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.5.0",
"gulp": "^4.0.2",
"gulp-clean": "^0.4.0",
"luna-data-grid": "^0.2.0",
"luna-data-grid": "^0.4.0",
"ncp": "^2.0.0",
"style-loader": "^3.3.1",
"terser": "^5.10.0",
Expand Down
2 changes: 1 addition & 1 deletion patches/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
查看 [electron/docs/development/patches.md](https://github.com/electron/electron/blob/master/docs/development/patches.md)
Check [electron/docs/development/patches.md](https://github.com/electron/electron/blob/master/docs/development/patches.md)
23 changes: 21 additions & 2 deletions server/tpl/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
padding: 0 20px;
font-size: 13px;
font-family: Roboto;
min-width: 320px;
}
body.platform-windows {
font-family: 'Segoe UI', Tahoma, sans-serif;
Expand All @@ -31,6 +32,21 @@
z-index: 1;
margin-bottom: 8px;
}
.content-header .filter {
float: right;
border: 1px solid #eee;
margin-top: 4px;
height: 20px;
line-height: 20px;
box-sizing: border-box;
outline: none;
width: 150px;
color: #303942;
padding: 0 4px;
}
.content-header .filter:focus {
box-shadow: 0 0 0 1px #1a73e8;
}
.description {
margin: 1rem 0;
font-size: .875rem;
Expand All @@ -54,8 +70,11 @@
</style>
</head>
<body>
<div class="content-header">Pages</div>
<div class="description">
<div class="content-header">
Pages
<input class="filter hidden" placeholder="Filter"/>
</div>
<div class="description hidden">
You can use this script to inject the chii target code into your web page.<br/>
<a target="_blank" href="//{{domain}}{{basePath}}target.js">{{domain}}{{basePath}}target.js</a> <br/>
Or just open the demo page <a target="_blank" href="//{{domain}}{{basePath}}test/demo.html">{{domain}}{{basePath}}test/demo.html</a> to play around with.<br/>
Expand Down
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import throttle from 'licia/throttle';
import escape from 'licia/escape';
import toEl from 'licia/toEl';
import h from 'licia/h';
import debounce from 'licia/debounce';
import 'luna-data-grid/luna-data-grid.css';

declare const window: any;
Expand Down Expand Up @@ -50,8 +51,17 @@ setInterval(() => {

const $description = $('.description');
const $targets = $('.targets');
const $filter = $('.filter');
const $contentHeader = $('.content-header');

$filter.on(
'input',
debounce(function () {
const filter = $filter.val();
dataGrid.setOption('filter', filter);
}, 500)
);

const dataGrid = new LunaDataGrid($targets.get(0) as HTMLElement, {
columns: [
{
Expand Down Expand Up @@ -90,9 +100,11 @@ function update() {
if (isEmpty(targets)) {
$description.rmClass('hidden');
$targets.addClass('hidden');
$filter.addClass('hidden');
} else {
$description.addClass('hidden');
$targets.rmClass('hidden');
$filter.rmClass('hidden');
render(targets);
}
});
Expand Down

1 comment on commit e96e725

@vercel
Copy link

@vercel vercel bot commented on e96e725 Jan 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

chii – ./

chii-dev-lionelhornc.vercel.app
chii-git-master-dev-lionelhornc.vercel.app
chii.vercel.app

Please sign in to comment.