Z ZPI 文档 v0.3.8
介绍页

源码

packages/desktop/src/renderer/hooks-settings.css

css303 行查看原文
.hooks-toolbar,
.hooks-scope,
.hook-plugin-state,
.hook-form-top,
.hook-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hooks-toolbar,
.hook-form-top {
  justify-content: space-between;
  flex-wrap: wrap;
}
.hooks-scope {
  min-width: 0;
}
.hooks-scope .settings-select-trigger {
  width: auto;
  border-radius: 999px;
  min-width: 0;
  max-width: 260px;
  height: 32px;
}
.hooks-count {
  border-left: 1px solid var(--color-border);
  padding-left: 16px;
  white-space: nowrap;
}
.hooks-count > span {
  color: var(--color-text-subtle);
  margin-left: 4px;
  font-size: var(--text-small);
}
.hooks-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 256px;
  max-width: 100%;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  padding: 0 12px;
  color: var(--color-text-subtle);
}
.hooks-search input {
  min-width: 0;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  outline: none;
  color: var(--color-text);
}
.hooks-search:focus-within {
  outline: 2px solid var(--color-border);
  outline-offset: 2px;
}
.hooks-search button {
  display: flex;
  padding: 0;
}
.hooks-scope-note {
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  margin: 0;
}
.hook-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-width: 0;
}
.hook-row + .hook-row {
  border-top: 1px solid var(--color-border);
}
.hook-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text-subtle);
  flex-shrink: 0;
}
.hook-row-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 0;
}
button.hook-row-copy:hover {
  background: transparent;
  color: var(--color-text);
}
.hook-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.hook-row-title strong {
  font-weight: 500;
}
.hook-badge {
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1px 6px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hook-row-command {
  color: var(--color-text-subtle);
  font-size: var(--text-small);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.hook-plugin-state {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hook-plugin-state button {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  padding: 0;
}
.hook-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hook-form-heading h3 {
  font-size: calc(var(--text-body) + 4px);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 4px;
}
.hook-form-heading p {
  color: var(--color-text-subtle);
  margin: 0;
}
.hook-form-panel {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hook-form-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.hook-form-top {
  align-items: flex-start;
}
.hook-form-top > .hook-form-columns {
  grid-template-columns: repeat(2, 192px);
}
.hook-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.hook-field > label,
.hook-form-scope {
  color: var(--color-text-subtle);
}
.hook-field > input,
.hook-field > textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 8px 12px;
}
.hook-field > input {
  height: 32px;
}
.hook-field > textarea {
  field-sizing: content;
  min-height: 64px;
  padding: 8px;
  resize: vertical;
}
.hook-field .settings-select-trigger {
  width: 100%;
  max-width: none;
  height: 32px;
}
.hook-field p {
  font-size: var(--text-small);
  color: var(--color-text-subtle);
  margin: 0;
  line-height: 1.6;
}
.hook-field > input[type="number"] {
  width: 128px;
}
.hook-code {
  font-family: var(--font-mono);
}
.hook-form-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-small);
}
.hook-form-scope .settings-select-trigger {
  height: 28px;
  width: auto;
  min-width: 0;
  max-width: 240px;
  border-radius: 999px;
}
.hook-advanced {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}
.hook-advanced summary {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
  color: var(--color-text-subtle);
}
.hook-advanced summary::-webkit-details-marker {
  display: none;
}
.hook-advanced[open] summary svg {
  transform: rotate(90deg);
}
.hook-advanced > .hook-field {
  margin-top: 12px;
}
.hook-form-actions {
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.hook-cancel {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
}
.hook-delete {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-danger);
  margin-right: auto;
  padding: 0;
}
.hook-delete-backdrop {
  z-index: 70;
}
.hook-delete-dialog {
  z-index: 71;
  width: min(420px, calc(100vw - 32px));
}
@media (max-width: 799px) {
  .hooks-search {
    width: 100%;
  }
  .hook-form-top > .hook-form-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    flex-basis: 100%;
  }
  .hook-plugin-state {
    max-width: 60%;
  }
}

@media (max-width: 639px) {
  .hook-form-columns,
  .hook-form-top > .hook-form-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}