Skip to content

Commit 92a6de3

Browse files
author
xcodebuild
authored
Merge pull request #15 from xcodebuild/feature/style
修复一些样式问题
2 parents 6a97831 + 82c635f commit 92a6de3

File tree

6 files changed

+37
-10
lines changed

6 files changed

+37
-10
lines changed

app/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
{"name":"iProxy","version":"1.2.0","main":"./dist/main.js","__note":"This file is generated by scripts/sync-version.js"}
1+
{
2+
"name": "iProxy",
3+
"version": "1.2.0",
4+
"main": "./dist/main.js",
5+
"__note": "This file is generated by scripts/sync-version.js"
6+
}

src/renderer/components/app/index.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ body {
8080
outline: none;
8181
}
8282

83-
button {
84-
color: @font-color !important;
85-
border-color: @button-border-color;
86-
background-color: @button-bgcolor !important;
87-
}
88-
8983
.titlebar-stoplight .titlebar-close,
9084
.titlebar-stoplight .titlebar-minimize,
9185
.titlebar-stoplight .titlebar-fullscreen {

src/renderer/extensions/setting/components/setting-form/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CheckOutlined, CloseOutlined, QuestionCircleOutlined } from '@ant-design/icons';
22
import { Form } from '@ant-design/compatible';
33
import '@ant-design/compatible/assets/index.css';
4-
import { Select, Button, Popover, Switch, InputNumber, Alert, Tooltip, Table } from 'antd';
4+
import { Select, Button, Popover, Switch, InputNumber, Alert, Tooltip, Table, Typography } from 'antd';
55
import React, { useEffect, useState } from 'react';
66
import { CoreAPI } from '../../../../core-api';
77
import { message } from 'antd';
@@ -158,7 +158,11 @@ class InnerSettingForm extends React.Component {
158158
<Form.Item label={t('Default Port')}>
159159
{getFieldDecorator('defaultPort')(<InputNumber min={1024} max={65534} />)}
160160
</Form.Item>
161-
<Form.Item label={t('Copyright')}>Version {version} Made with love</Form.Item>
161+
<Form.Item label={t('Copyright')}>
162+
<Typography>
163+
Version {version} Made with love
164+
</Typography>
165+
</Form.Item>
162166
<Form.Item label={t('Actions')}>
163167
<Button className="action-btn" loading={this.state.isUpdating} onClick={checkUpdate} type="primary">
164168
{t('Check Update')}

src/renderer/extensions/weinre/index.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import { CoreAPI } from '../../core-api';
33
import { Extension } from '../../extension';
4+
import { useThemeMode } from '../../hooks/use-theme-mode';
45
import { getWhistlePort } from '../../utils';
56
export class Weinre extends Extension {
67
constructor() {
@@ -33,6 +34,8 @@ export class Weinre extends Extension {
3334
};
3435
}, []);
3536

37+
const { isDarkMode } = useThemeMode();
38+
3639
function changeIframeStyle() {
3740
const iframeDocumentHead = document.querySelector('iframe')?.contentDocument?.querySelector('head');
3841
if (iframeDocumentHead) {
@@ -46,8 +49,19 @@ export class Weinre extends Extension {
4649
iframeDocumentHead.appendChild(customStyle);
4750

4851
const container = document.querySelector('iframe')?.contentDocument?.querySelector('.description');
52+
4953
if (container) {
50-
container.innerHTML = `<div>
54+
container.innerHTML = `<style>
55+
${isDarkMode ? `
56+
.content-header {
57+
background: #3b3b3d !important;
58+
}
59+
div {
60+
color : #f0f0f0 !important;
61+
}
62+
`: ''}
63+
</style>
64+
<div>
5165
通过代理访问带有 iproxy=true 参数的页面开始调试
5266
</div>`;
5367
}

src/renderer/style/theme/dark.lazy.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@
3737

3838
@import "./antd-dark.less";
3939
@import "./base.less";
40+
41+
42+
label {
43+
color: @text-color !important;
44+
}

0 commit comments

Comments
 (0)