Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

5.7 KB
Raw Blame
.b3-dialog {
  &--window {
    & > .b3-dialog__container {
      transform: none;
      opacity: 1;
      transition: none;
      border-radius: 0;
      border: 0;
    }

    .config__panel,
    .config__tab-wrap,
    .config__view {
      border-radius: 0;
    }

    & > .b3-dialog__container > .toolbar {
      flex-shrink: 0;
    }

    .toolbar--settings {
      position: relative;
      border-bottom: 1px solid var(--b3-border-color);

      #drag {
        position: absolute;
        inset: 0;
        min-width: 0;
        padding-inline: var(--settings-window-title-inset, var(--b3-toolbar-left-mac));
        overflow: hidden;
        text-overflow: ellipsis;
      }

      #windowControls {
        margin-left: auto;
        -webkit-app-region: no-drag;

        .toolbar__item {
          align-self: stretch;
          align-items: center;
          height: auto;
        }
      }
    }

    & > .b3-dialog__scrim,
    & > .b3-dialog__container > [class^="resize__"] {
      display: none;
    }
  }
  position: fixed;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  font-size: var(--b3-font-size, 16px);

  &--open {
    .b3-dialog__scrim {
      opacity: 1;
    }

    .b3-dialog__container {
      transform: none;
      opacity: 1;
    }
  }

  &__scrim {
    background-color: var(--b3-mask-background);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 150ms linear;

    &--progress {
      @supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
        background-color: rgba(255, 255, 255, .08);
        -webkit-backdrop-filter: blur(8px) saturate(105%);
        backdrop-filter: blur(8px) saturate(105%);

        :root[data-theme-mode="dark"] & {
          background-color: rgba(0, 0, 0, .06);
        }
      }

      @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
        &,
        :root[data-theme-mode="dark"] & {
          background-color: var(--b3-mask-background);
          -webkit-backdrop-filter: none;
          backdrop-filter: none;
        }
      }
    }
  }

  &__container {
    outline: none;
    border-radius: var(--b3-border-radius-b);
    background-color: var(--b3-theme-surface, Canvas);
    position: relative;
    box-shadow: var(--b3-dialog-shadow);
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    max-width: 88vw;
    transform: scale(.8);
    opacity: 0;
    transition: opacity 75ms linear, transform 150ms 0ms cubic-bezier(0, 0, .2, 1);
    border: 1px solid var(--b3-theme-surface-lighter);

    &--theme {
      background-color: var(--b3-theme-background);
    }
  }

  &__header {
    cursor: default;
    padding: var(--b3-ui-dialog-header-padding, 9px 16px);
    line-height: 24px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--b3-theme-surface-lighter);
  }

  &__body {
    overflow: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  &__content {
    padding: var(--b3-ui-dialog-content-padding, 16px 16px);
    word-break: break-all;
    flex: 1;
    overflow: auto;
  }

  &__action {
    padding: var(--b3-ui-dialog-action-padding, 7px 16px);
    border-top: 1px solid var(--b3-theme-surface-lighter);
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    user-select: none;
  }

  &__close {
    position: absolute;
    cursor: pointer;
    top: 4px;
    right: 4px;
    height: 18px;
    width: 18px;
    opacity: .68;
    color: var(--b3-theme-on-surface);
    padding: var(--b3-ui-dialog-close-padding, 8px);
    z-index: 1;

    &:hover {
      opacity: 1;
    }
  }

  &__loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    color: var(--b3-theme-on-surface);
    background: var(--b3-theme-background);
    padding: 24px;
    border: 1px solid var(--b3-theme-surface-lighter);
    border-radius: var(--b3-border-radius-b);
    box-shadow: var(--b3-dialog-shadow);
  }

  &__progress-label {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  &__progress {
    margin: 12px 0;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    color: var(--b3-loading-color, var(--b3-theme-on-surface));
    background-color: var(--b3-theme-surface-lighter);
  }

  &__progressbar {
    height: 100%;
    border-radius: inherit;
    background-color: currentColor;
    transition: width 150ms linear;
  }

  &__progress--indeterminate > .b3-dialog__progressbar {
    background: none;
    transition: none;

    &::before {
      content: "";
      display: block;
      width: 40%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, transparent, currentColor);
      animation: b3-progress-slide var(--b3-loading-duration, 1s) linear infinite;
    }
  }
}

@keyframes b3-progress-slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .b3-dialog__progressbar {
    transition: none;
  }

  .b3-dialog__progress--indeterminate > .b3-dialog__progressbar::before {
    animation: none;
    transform: translateX(75%);
  }
}

@media (forced-colors: active) {
  .b3-dialog__progress {
    color: CanvasText;
    background-color: Canvas;
    outline: 1px solid GrayText;
  }

  .b3-dialog__progress--indeterminate > .b3-dialog__progressbar::before {
    background: currentColor;
  }
}