feat(openapi): complete upload preview and UI evidence
This commit is contained in:
+27
-26
@@ -92,7 +92,7 @@
|
||||
<div class="page-header-actions">
|
||||
<button class="btn-secondary openapi-import-trigger" @click="handleOpenApiImport()">
|
||||
<svg width="13" height="13"><use href="icons/wizard/upload.svg#icon"/></svg>
|
||||
<span>Импорт OpenAPI</span>
|
||||
<span data-i18n="openapi.trigger">Импорт OpenAPI</span>
|
||||
</button>
|
||||
<button class="btn-new" @click="handleNewOperation()">
|
||||
<svg width="13" height="13"><use href="icons/general/plus.svg#icon"/></svg>
|
||||
@@ -382,10 +382,10 @@
|
||||
<section class="openapi-import-dialog" role="dialog" aria-modal="true" aria-labelledby="openapi-import-title">
|
||||
<div class="openapi-import-header">
|
||||
<div>
|
||||
<h2 id="openapi-import-title">Импорт OpenAPI</h2>
|
||||
<p>Загрузите OpenAPI/Swagger документ, выберите методы и создайте черновики MCP-инструментов.</p>
|
||||
<h2 id="openapi-import-title" data-i18n="openapi.title">Импорт OpenAPI</h2>
|
||||
<p data-i18n="openapi.subtitle">Загрузите один OpenAPI/Swagger файл, выберите методы и создайте черновики MCP-инструментов.</p>
|
||||
</div>
|
||||
<button class="modal-close" type="button" data-openapi-close aria-label="Закрыть">
|
||||
<button class="modal-close" type="button" data-openapi-close data-i18n-aria-label="openapi.close" aria-label="Закрыть">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round">
|
||||
<line x1="1" y1="1" x2="11" y2="11"></line><line x1="11" y1="1" x2="1" y2="11"></line>
|
||||
</svg>
|
||||
@@ -393,56 +393,57 @@
|
||||
</div>
|
||||
<div class="openapi-import-body">
|
||||
<div class="openapi-import-upload">
|
||||
<label class="openapi-file-label">
|
||||
<span>Файл OpenAPI/Swagger</span>
|
||||
<div class="openapi-file-label">
|
||||
<span id="openapi-import-file-label" data-i18n="openapi.file.label">Файл OpenAPI/Swagger</span>
|
||||
<span class="openapi-file-control">
|
||||
<span class="btn-secondary openapi-file-button">Выбрать файл</span>
|
||||
<button class="btn-secondary openapi-file-button" id="openapi-import-file-select" type="button" data-i18n="openapi.file.choose">Выбрать файл</button>
|
||||
<span class="openapi-file-name" id="openapi-import-file-name">Файл не выбран</span>
|
||||
</span>
|
||||
<input id="openapi-import-file" type="file" accept=".yaml,.yml,.json,application/json,text/yaml">
|
||||
</label>
|
||||
<textarea id="openapi-import-document" spellcheck="false" placeholder="Вставьте openapi.yaml или swagger.json"></textarea>
|
||||
<input id="openapi-import-file" type="file" aria-labelledby="openapi-import-file-label" accept=".yaml,.yml,.json,application/json,application/openapi+json,application/yaml,application/x-yaml,text/yaml,text/x-yaml" tabindex="-1">
|
||||
</div>
|
||||
<div class="openapi-import-actions">
|
||||
<button class="btn-primary" id="openapi-import-preview" type="button">Разобрать документ</button>
|
||||
<button class="btn-secondary" id="openapi-import-reset" type="button">Сбросить</button>
|
||||
<button class="btn-primary" id="openapi-import-preview" type="button" data-i18n="openapi.preview">Разобрать документ</button>
|
||||
<button class="btn-secondary" id="openapi-import-cancel" type="button" hidden data-i18n="openapi.cancel">Отменить</button>
|
||||
<button class="btn-secondary" id="openapi-import-retry" type="button" hidden data-i18n="openapi.retry">Повторить</button>
|
||||
<button class="btn-secondary" id="openapi-import-reset" type="button" data-i18n="openapi.reset">Сбросить</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="openapi-import-status" id="openapi-import-status"></div>
|
||||
<div class="openapi-import-status" id="openapi-import-status" role="status" aria-live="polite" aria-atomic="true" tabindex="-1"></div>
|
||||
<div class="openapi-import-preview" id="openapi-import-preview-panel" hidden>
|
||||
<div class="openapi-import-source" id="openapi-import-source"></div>
|
||||
<div class="openapi-import-server-row">
|
||||
<label for="openapi-import-server">Base URL</label>
|
||||
<label for="openapi-import-server" data-i18n="openapi.server.label">Base URL</label>
|
||||
<select id="openapi-import-server"></select>
|
||||
<input id="openapi-import-server-custom" class="openapi-import-server-custom" type="url" placeholder="Или укажите свой base URL, например https://api.example.com">
|
||||
<input id="openapi-import-server-custom" class="openapi-import-server-custom" type="url" data-i18n-aria-label="openapi.server.custom_aria" aria-label="Свой Base URL" data-i18n-ph="openapi.server.placeholder" placeholder="Или укажите свой base URL, например https://api.example.com">
|
||||
</div>
|
||||
<div class="openapi-import-server-row">
|
||||
<label for="openapi-import-conflict-mode">Если операция уже существует</label>
|
||||
<label for="openapi-import-conflict-mode" data-i18n="openapi.conflict.label">Если операция уже существует</label>
|
||||
<select id="openapi-import-conflict-mode">
|
||||
<option value="rename" selected>Создать копию с новым именем</option>
|
||||
<option value="skip">Пропустить</option>
|
||||
<option value="rename" selected data-i18n="openapi.conflict.rename">Создать копию с новым именем</option>
|
||||
<option value="skip" data-i18n="openapi.conflict.skip">Пропустить</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="openapi-import-toolbar">
|
||||
<div class="openapi-import-filter">
|
||||
<label for="openapi-import-search">Поиск методов</label>
|
||||
<input id="openapi-import-search" type="search" placeholder="Название, operationId или путь">
|
||||
<label for="openapi-import-search" data-i18n="openapi.search.label">Поиск методов</label>
|
||||
<input id="openapi-import-search" type="search" data-i18n-ph="openapi.search.placeholder" placeholder="Название, operationId или путь">
|
||||
</div>
|
||||
<div class="openapi-import-filter">
|
||||
<label for="openapi-import-method-filter">HTTP-метод</label>
|
||||
<label for="openapi-import-method-filter" data-i18n="openapi.method.label">HTTP-метод</label>
|
||||
<select id="openapi-import-method-filter">
|
||||
<option value="">Все методы</option>
|
||||
<option value="" data-i18n="openapi.method.all">Все методы</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="openapi-import-bulk-actions">
|
||||
<button class="btn-secondary" id="openapi-import-select-visible" type="button">Выбрать видимые</button>
|
||||
<button class="btn-secondary" id="openapi-import-clear-visible" type="button">Снять видимые</button>
|
||||
<button class="btn-secondary" id="openapi-import-select-visible" type="button" data-i18n="openapi.select_visible">Выбрать видимые</button>
|
||||
<button class="btn-secondary" id="openapi-import-clear-visible" type="button" data-i18n="openapi.clear_visible">Снять видимые</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="openapi-import-groups" id="openapi-import-groups"></div>
|
||||
<div class="openapi-import-footer">
|
||||
<span id="openapi-import-selection">Выбрано: 0</span>
|
||||
<button class="btn-primary" id="openapi-import-create" type="button">Создать черновики</button>
|
||||
<span id="openapi-import-selection" data-i18n="openapi.selection.empty">Выбрано: 0</span>
|
||||
<button class="btn-primary" id="openapi-import-create" type="button" data-i18n="openapi.create">Создать черновики</button>
|
||||
</div>
|
||||
<div class="openapi-import-result" id="openapi-import-result" hidden></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user