Skip to content

Commit

Permalink
自定义修改
Browse files Browse the repository at this point in the history
  • Loading branch information
Larvan2 committed Jan 28, 2024
1 parent 43fae3a commit 5b76143
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ jobs:
node-version: '18.x'
cache: pnpm
- name: Install package and build
run: |
pnpm install --no-frozen-lockfile
pnpm build
run: npm install -g pnpm && pnpm i && pnpm build
- name: Deploy
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: public
fqdn: yacd.metacubex.one
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 8 additions & 5 deletions src/components/ConnectionTable.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,24 @@
}

.break {
/* 上边下边 | 左边右边 */
max-width: 13em;
min-width: 9em;
word-wrap: break-word;
word-break: break-all;
align-items: center;
text-align: left;
overflow-wrap: break-word;
}

.td {
/* 上边下边 | 左边右边 */
padding: 10px 5px;
font-size: 0.9em;
// max-width: 14em;
min-width: 9em;
max-width: 18em;
min-width: 10em;
cursor: default;
text-align: left;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

&:hover {
Expand Down
5 changes: 4 additions & 1 deletion src/components/ConnectionTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
td.ctrl {
min-width: 4em;
text-align: center;
display: flex;
justify-content: center;
align-items: center;

Expand All @@ -20,4 +19,8 @@
min-width: 7em;
text-align: center;
}

td.process {
text-align: center;
}
}
13 changes: 3 additions & 10 deletions src/components/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,9 @@ function modifyChains(chains: string[]): string {

if (chains.length === 1) {
return chains[0];
} else {
return `${chains.pop()} :: ${chains[0]}`;
}

//倒序
if (chains.length === 2) {
return `${chains[1]} -> ${chains[0]}`;
}

const first = chains.pop();
const last = chains.shift();
return `${first} -> ${last}`;
}

function renderTableOrPlaceholder(columns, hiddenColumns, conns: FormattedConn[]) {
Expand All @@ -203,6 +196,7 @@ function ConnQty({ qty }) {
const sortDescFirst = true;
const hiddenColumnsOrigin = ['id'];
const columnsOrigin = [
{ Header: 'c_ctrl', accessor: 'ctrl' },
{ accessor: 'id', show: false },
{ Header: 'c_type', accessor: 'type' },
{ Header: 'c_process', accessor: 'process' },
Expand All @@ -217,7 +211,6 @@ const columnsOrigin = [
{ Header: 'c_source', accessor: 'source' },
{ Header: 'c_destination_ip', accessor: 'destinationIP' },
{ Header: 'c_sni', accessor: 'sniffHost' },
{ Header: 'c_ctrl', accessor: 'ctrl' },
];

const savedHiddenColumns = localStorage.getItem('hiddenColumns');
Expand Down
2 changes: 1 addition & 1 deletion src/components/proxies/ProxyLatency.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
color: #eee;
font-size: 0.75em;
@media (--breakpoint-not-small) {
font-size: 0.8em;
font-size: 1em;
}
}
2 changes: 1 addition & 1 deletion src/components/proxies/ProxyProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function ProxyProviderImpl({
display: 'flex',
alignItems: 'center',
flexWrap: 'wrap',
justifyContent: 'space-between',
justifyContent: 'start',
}}
>
<CollapsibleSectionHeader
Expand Down

0 comments on commit 5b76143

Please sign in to comment.