Refactor VPN proxy client implementation
This commit is contained in:
@@ -0,0 +1,401 @@
|
||||
.client-local-rules {
|
||||
width: min(480px, 100vw);
|
||||
}
|
||||
|
||||
.client-local-rules-header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 9px;
|
||||
margin: 0 8px 34px;
|
||||
}
|
||||
|
||||
.client-local-rules-header > span,
|
||||
.client-local-rules-group > span {
|
||||
color: var(--client-muted);
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.client-local-rules-header h2 {
|
||||
grid-column: 1 / -1;
|
||||
font-size: 22px;
|
||||
letter-spacing: -0.045em;
|
||||
}
|
||||
|
||||
.client-local-rules-header p {
|
||||
grid-column: 1 / -1;
|
||||
max-width: 46ch;
|
||||
color: var(--client-muted);
|
||||
font-size: 11px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.client-local-rules-save {
|
||||
align-self: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--client-accent);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: color 200ms ease, filter 300ms ease, opacity 220ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-local-rules-save:hover:not(:disabled) {
|
||||
filter: drop-shadow(0 0 7px color-mix(in oklch, var(--client-accent) 42%, transparent));
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.client-local-rules-save:disabled {
|
||||
opacity: 0.28;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.client-local-rules-header .client-local-rules-runtime {
|
||||
color: oklch(0.68 0.14 72);
|
||||
animation: client-local-rules-notice 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
||||
}
|
||||
|
||||
.client-local-rules-form,
|
||||
.client-local-rules-group,
|
||||
.client-local-rules-list {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.client-local-rules-form {
|
||||
gap: 28px;
|
||||
}
|
||||
|
||||
.client-local-rules-group {
|
||||
gap: 11px;
|
||||
}
|
||||
|
||||
.client-local-rules-list {
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.client-local-rule {
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
min-width: 0;
|
||||
display: grid;
|
||||
grid-template-columns: 24px 116px minmax(0, 1fr) 112px 28px;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 7px 0;
|
||||
animation: client-local-rule-enter 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
||||
transition: opacity 260ms ease, filter 360ms ease;
|
||||
}
|
||||
|
||||
.client-local-rule:has(.client-rule-type.is-open) {
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.client-local-rule-status {
|
||||
color: var(--client-muted);
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.07em;
|
||||
text-align: right;
|
||||
text-transform: uppercase;
|
||||
transition: color 280ms ease, opacity 280ms ease, filter 360ms ease;
|
||||
}
|
||||
|
||||
.client-local-rule.is-active .client-local-rule-status {
|
||||
color: var(--client-accent);
|
||||
}
|
||||
|
||||
.client-local-rule.is-pending .client-local-rule-status,
|
||||
.client-local-rule.is-unsaved .client-local-rule-status {
|
||||
color: var(--client-warning, oklch(0.72 0.12 72));
|
||||
}
|
||||
|
||||
.client-local-rule.is-disabled {
|
||||
opacity: 0.42;
|
||||
filter: saturate(0);
|
||||
}
|
||||
|
||||
.client-local-rule.is-removing {
|
||||
pointer-events: none;
|
||||
animation: client-local-rule-leave 820ms cubic-bezier(0.7, 0, 0.84, 0) both;
|
||||
}
|
||||
|
||||
.client-local-rule-enabled {
|
||||
width: 24px;
|
||||
height: 32px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--client-muted);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.client-local-rule-enabled svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
overflow: visible;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
transition: color 260ms ease, filter 360ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-local-rule-enabled circle {
|
||||
stroke-width: 1.4;
|
||||
transition: fill 320ms ease, stroke 260ms ease;
|
||||
}
|
||||
|
||||
.client-rule-check {
|
||||
stroke-width: 1.8;
|
||||
stroke-dasharray: 12;
|
||||
stroke-dashoffset: 12;
|
||||
transition: opacity 160ms ease, stroke-dashoffset 360ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-local-rule-enabled[aria-checked='true'] {
|
||||
color: var(--client-accent);
|
||||
}
|
||||
|
||||
.client-local-rule-enabled[aria-checked='true'] svg {
|
||||
filter: drop-shadow(0 0 7px color-mix(in oklch, var(--client-accent) 48%, transparent));
|
||||
transform: scale(1.08);
|
||||
}
|
||||
|
||||
.client-local-rule-enabled[aria-checked='true'] circle {
|
||||
fill: color-mix(in oklch, var(--client-accent) 12%, transparent);
|
||||
}
|
||||
|
||||
.client-local-rule-enabled[aria-checked='true'] .client-rule-check {
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
|
||||
.client-rule-type {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.client-rule-type.is-open {
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.client-rule-type-trigger {
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--client-text);
|
||||
font: 600 9px/1 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: color 220ms ease, text-shadow 300ms ease;
|
||||
}
|
||||
|
||||
.client-rule-type-trigger svg {
|
||||
width: 9px;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.5;
|
||||
transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-rule-type.is-open .client-rule-type-trigger {
|
||||
color: var(--client-accent);
|
||||
text-shadow: 0 0 10px color-mix(in oklch, var(--client-accent) 44%, transparent);
|
||||
}
|
||||
|
||||
.client-rule-type.is-open .client-rule-type-trigger svg {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.client-rule-type-list {
|
||||
position: absolute;
|
||||
top: calc(100% - 1px);
|
||||
left: -8px;
|
||||
z-index: 3;
|
||||
width: max-content;
|
||||
min-width: calc(100% + 16px);
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
padding: 7px 8px;
|
||||
background: color-mix(in oklch, var(--client-bg) 91%, transparent);
|
||||
-webkit-backdrop-filter: blur(18px);
|
||||
backdrop-filter: blur(18px);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
filter: blur(8px);
|
||||
transform: translateY(-8px) scale(0.97);
|
||||
transform-origin: top left;
|
||||
pointer-events: none;
|
||||
transition: opacity 200ms ease, filter 360ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 420ms;
|
||||
}
|
||||
|
||||
.client-rule-type.is-open .client-rule-type-list {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
filter: blur(0);
|
||||
transform: translateY(0) scale(1);
|
||||
pointer-events: auto;
|
||||
transition-delay: 0s;
|
||||
}
|
||||
|
||||
.client-rule-type-list button {
|
||||
padding: 7px 6px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--client-muted);
|
||||
font: 600 9px/1 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
filter: blur(5px);
|
||||
transform: translateY(-5px);
|
||||
transition: color 180ms ease, opacity 260ms ease, filter 340ms ease, transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-rule-type.is-open .client-rule-type-list button {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.client-rule-type.is-open .client-rule-type-list button:nth-child(2) {
|
||||
transition-delay: 35ms;
|
||||
}
|
||||
|
||||
.client-rule-type.is-open .client-rule-type-list button:nth-child(3) {
|
||||
transition-delay: 70ms;
|
||||
}
|
||||
|
||||
.client-rule-type-list button:hover,
|
||||
.client-rule-type-list button:focus-visible,
|
||||
.client-rule-type-list button[aria-selected='true'] {
|
||||
outline: 0;
|
||||
color: var(--client-accent);
|
||||
text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 40%, transparent);
|
||||
}
|
||||
|
||||
.client-local-rule input {
|
||||
min-width: 0;
|
||||
height: 34px;
|
||||
padding: 0 2px;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
background: transparent;
|
||||
color: var(--client-text);
|
||||
font: 500 10px/1 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
|
||||
box-shadow: 0 1px 0 transparent;
|
||||
transition: color 220ms ease, box-shadow 300ms ease, text-shadow 300ms ease;
|
||||
}
|
||||
|
||||
.client-local-rule input::placeholder {
|
||||
color: color-mix(in oklch, var(--client-muted) 70%, transparent);
|
||||
}
|
||||
|
||||
.client-local-rule input:focus {
|
||||
box-shadow: 0 1px 0 color-mix(in oklch, var(--client-accent) 58%, transparent);
|
||||
text-shadow: 0 0 9px color-mix(in oklch, var(--client-accent) 22%, transparent);
|
||||
}
|
||||
|
||||
.client-local-rules-empty {
|
||||
padding: 14px 4px 4px;
|
||||
color: var(--client-muted);
|
||||
font-size: 10px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.client-local-rules-note {
|
||||
max-width: 48ch;
|
||||
color: var(--client-muted);
|
||||
font-size: 9px;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.client-inline-error.is-routing {
|
||||
position: static;
|
||||
width: 100%;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.client-local-rules-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.client-local-rules-actions button {
|
||||
padding: 8px 0 8px 14px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--client-text);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: color 200ms ease, filter 300ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-local-rules-actions button:hover:not(:disabled) {
|
||||
color: var(--client-accent);
|
||||
filter: drop-shadow(0 0 7px color-mix(in oklch, var(--client-accent) 40%, transparent));
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.client-local-rules-actions button:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: wait;
|
||||
}
|
||||
|
||||
@keyframes client-local-rules-notice {
|
||||
from { opacity: 0; filter: blur(6px); transform: translateY(-6px); }
|
||||
to { opacity: 1; filter: blur(0); transform: translateY(0); }
|
||||
}
|
||||
|
||||
.client-route-rules-pending {
|
||||
min-height: 17px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin: -10px 0 -8px;
|
||||
color: var(--client-warning, oklch(0.72 0.12 72));
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.06em;
|
||||
opacity: 0;
|
||||
filter: blur(5px);
|
||||
transform: translateY(-3px);
|
||||
transition: opacity 240ms ease, filter 320ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.client-route-rules-pending.is-visible {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.client-route-rules-pending button {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--client-accent);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
.client-route-rules-pending button:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.35;
|
||||
}
|
||||
Reference in New Issue
Block a user