From e1bbe57f9c456f39e8301dcb46181b5f5c09c0dd Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Tue, 14 Apr 2026 21:22:23 +0800 Subject: [PATCH] refactor(web): re-design button api (#35166) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- .../tracing/provider-config-modal.tsx | 4 +- .../(humanInputLayout)/form/[token]/form.tsx | 22 +- .../webapp-reset-password/check-code/page.tsx | 10 +- .../webapp-reset-password/page.tsx | 10 +- .../set-password/page.tsx | 10 +- .../webapp-signin/check-code/page.tsx | 10 +- .../components/mail-and-code-auth.tsx | 4 +- .../components/mail-and-password-auth.tsx | 4 +- .../webapp-signin/components/sso-auth.tsx | 2 +- .../account-page/AvatarWithEdit.tsx | 6 +- .../account-page/email-change-modal.tsx | 54 +- .../(commonLayout)/account-page/index.tsx | 32 +- .../delete-account/components/check-email.tsx | 8 +- .../delete-account/components/feed-back.tsx | 4 +- .../components/verify-email.tsx | 10 +- web/app/account/(commonLayout)/header.tsx | 6 +- web/app/account/oauth/authorize/page.tsx | 12 +- web/app/activate/activateForm.tsx | 2 +- .../__tests__/app-info-detail-panel.spec.tsx | 4 +- .../__tests__/app-operations.spec.tsx | 4 +- .../app-info/app-info-detail-panel.tsx | 12 +- .../app-sidebar/app-info/app-operations.tsx | 12 +- .../components/app-sidebar/toggle-button.tsx | 4 +- .../annotation/add-annotation-modal/index.tsx | 6 +- .../csv-uploader.tsx | 4 +- .../batch-add-annotation-modal/index.tsx | 8 +- .../edit-annotation-modal/edit-item/index.tsx | 12 +- .../app/annotation/header-opts/index.tsx | 16 +- .../add-member-or-group-pop.tsx | 8 +- .../app/app-access-control/index.tsx | 6 +- .../components/app/app-publisher/index.tsx | 4 +- .../publish-with-multiple-model.tsx | 2 +- .../components/app/app-publisher/sections.tsx | 2 +- .../app/app-publisher/version-info-modal.tsx | 10 +- .../warning-mask/cannot-query-dataset.tsx | 2 +- .../base/warning-mask/formatting-changed.tsx | 2 +- .../config-prompt/advanced-prompt-input.tsx | 12 +- .../config-prompt/confirm-add-var/index.tsx | 4 +- .../conversation-history/edit-modal.tsx | 6 +- .../app/configuration/config-prompt/index.tsx | 2 +- .../configuration/config-var/modal-foot.tsx | 2 +- .../config-vision/param-config.tsx | 2 +- .../config/agent-setting-button.tsx | 2 +- .../config/agent/agent-setting/index.tsx | 16 +- .../config/agent/agent-tools/index.tsx | 12 +- .../agent-tools/setting-built-in-tool.tsx | 18 +- .../config/automatic/automatic-btn.tsx | 2 +- .../config/automatic/get-automatic-res.tsx | 10 +- .../configuration/config/automatic/result.tsx | 4 +- .../code-generator/get-code-generator-res.tsx | 6 +- .../app/configuration/configuration-view.tsx | 2 +- .../configuration/ctrl-btn-group/index.tsx | 4 +- .../dataset-config/params-config/index.tsx | 2 +- .../dataset-config/select-dataset/index.tsx | 4 +- .../dataset-config/settings-modal/index.tsx | 16 +- .../app/configuration/debug/index.tsx | 16 +- .../prompt-value-panel/index.tsx | 8 +- .../tools/external-data-tool-modal.tsx | 8 +- .../app/create-app-dialog/app-card/index.tsx | 8 +- .../components/app/create-app-modal/index.tsx | 38 +- .../dsl-confirm-modal.tsx | 4 +- .../app/create-from-dsl-modal/index.tsx | 12 +- .../components/app/duplicate-modal/index.tsx | 10 +- .../components/app/in-site-message/index.tsx | 12 +- .../app/overview/apikey-info-panel/index.tsx | 8 +- .../app/overview/app-card-sections.tsx | 2 +- .../app/overview/customize/index.tsx | 20 +- .../app/overview/settings/index.tsx | 46 +- .../components/app/switch-app-modal/index.tsx | 10 +- .../saved-items/no-data/index.tsx | 6 +- .../components/base/app-icon-picker/index.tsx | 4 +- .../base/button/__tests__/add-button.spec.tsx | 49 - .../button/__tests__/sync-button.spec.tsx | 52 - .../base/button/add-button.stories.tsx | 52 - web/app/components/base/button/add-button.tsx | 21 - .../base/button/sync-button.stories.tsx | 57 - .../components/base/button/sync-button.tsx | 26 - .../chat-with-history/inputs-form/index.tsx | 8 +- .../sidebar/__tests__/rename-modal.spec.tsx | 10 +- .../chat/chat-with-history/sidebar/index.tsx | 4 +- .../sidebar/rename-modal.tsx | 4 +- .../human-input-content/human-input-form.tsx | 4 +- .../chat/chat/chat-input-area/operation.tsx | 2 +- web/app/components/base/chat/chat/index.tsx | 2 +- .../components/base/chat/chat/question.tsx | 6 +- .../components/base/chat/chat/try-to-ask.tsx | 6 +- .../embedded-chatbot/inputs-form/index.tsx | 8 +- .../components/base/checkbox-list/index.tsx | 14 +- .../components/base/confirm/index.stories.tsx | 2 +- web/app/components/base/confirm/index.tsx | 12 +- .../date-picker/footer.tsx | 8 +- .../time-picker/footer.tsx | 2 +- .../year-and-month-picker/footer.tsx | 2 +- web/app/components/base/drawer/index.tsx | 4 +- .../components/base/emoji-picker/index.tsx | 4 +- .../components/base/error-boundary/index.tsx | 6 +- .../annotation-reply/config-param-modal.tsx | 4 +- .../annotation-reply/index.tsx | 12 +- .../conversation-opener/index.tsx | 6 +- .../conversation-opener/modal.tsx | 12 +- .../new-feature-panel/feature-bar.tsx | 6 +- .../new-feature-panel/file-upload/index.tsx | 8 +- .../file-upload/setting-content.tsx | 4 +- .../new-feature-panel/image-upload/index.tsx | 8 +- .../new-feature-panel/moderation/index.tsx | 12 +- .../moderation/moderation-setting-modal.tsx | 18 +- .../text-to-speech/index.tsx | 10 +- .../file-from-link-or-local/index.tsx | 8 +- .../file-uploader-in-attachment/index.tsx | 2 +- .../file-image-item.tsx | 8 +- .../file-uploader-in-chat-input/file-item.tsx | 10 +- .../base/form/components/form/actions.tsx | 2 +- .../components/base/form/index.stories.tsx | 2 +- .../base/image-uploader/image-link-input.tsx | 4 +- .../base/inline-delete-confirm/index.tsx | 4 +- .../base/markdown-blocks/button.tsx | 4 +- .../components/base/markdown-blocks/form.tsx | 6 +- .../components/base/modal-like-wrap/index.tsx | 6 +- .../components/base/modal/modal.stories.tsx | 4 +- web/app/components/base/modal/modal.tsx | 12 +- .../base/notion-connector/index.tsx | 6 +- web/app/components/base/pagination/index.tsx | 14 +- .../plugins/hitl-input-block/input-field.tsx | 12 +- .../base/tag-management/tag-remove-modal.tsx | 8 +- .../components/base/ui/alert-dialog/index.tsx | 6 +- .../{ => ui}/button/__tests__/index.spec.tsx | 9 +- .../components/base/{ => ui}/button/index.css | 185 +-- .../base/{ => ui}/button/index.stories.tsx | 11 +- .../components/base/{ => ui}/button/index.tsx | 47 +- .../billing/apps-full-in-dialog/index.tsx | 8 +- .../billing/plan-upgrade-modal/index.tsx | 4 +- web/app/components/billing/plan/index.tsx | 2 +- web/app/components/billing/pricing/header.tsx | 6 +- .../components/billing/upgrade-btn/index.tsx | 2 +- .../components/chat-preview-card.tsx | 12 +- .../components/workflow-preview-card.tsx | 10 +- .../custom/custom-web-app-brand/index.tsx | 16 +- .../datasets/common/image-previewer/index.tsx | 12 +- .../image-uploader-in-chunk/image-item.tsx | 4 +- .../image-item.tsx | 4 +- .../dsl-confirm-modal.tsx | 4 +- .../create-from-dsl-modal/index.tsx | 4 +- .../datasets/create-from-pipeline/header.tsx | 6 +- .../list/template-card/actions.tsx | 2 +- .../list/template-card/details/index.tsx | 12 +- .../list/template-card/edit-pipeline-info.tsx | 10 +- .../create/embedding-process/index.tsx | 4 +- .../empty-dataset-creation-modal/index.tsx | 2 +- .../step-one/components/next-step-button.tsx | 2 +- .../components/general-chunking-options.tsx | 10 +- .../components/indexing-mode-section.tsx | 20 +- .../components/parent-child-options.tsx | 6 +- .../step-two/components/step-two-footer.tsx | 2 +- .../create/stop-embedding-modal/index.tsx | 2 +- .../website/base/__tests__/url-input.spec.tsx | 9 +- .../website/base/crawled-result-item.tsx | 4 +- .../datasets/create/website/base/header.tsx | 4 +- .../create/website/base/url-input.tsx | 3 +- .../base/__tests__/url-input.spec.tsx | 8 +- .../website/jina-reader/base/url-input.tsx | 2 +- .../datasets/create/website/no-data.tsx | 6 +- .../documents/components/documents-header.tsx | 2 +- .../documents/components/empty-element.tsx | 4 +- .../documents/components/rename-modal.tsx | 4 +- .../create-from-pipeline/actions/index.tsx | 6 +- .../base/__tests__/header.spec.tsx | 4 +- .../data-source/base/header.tsx | 4 +- .../online-drive/connect/index.tsx | 6 +- .../file-list/list/empty-search-result.tsx | 2 +- .../data-source/online-drive/header.tsx | 4 +- .../__tests__/crawled-result-item.spec.tsx | 4 +- .../base/crawled-result-item.tsx | 8 +- .../website-crawl/base/options/index.tsx | 5 +- .../create-from-pipeline/left-header.tsx | 12 +- .../preview/chunk-preview.tsx | 2 +- .../__tests__/header.spec.tsx | 4 +- .../process-documents/actions.tsx | 2 +- .../process-documents/header.tsx | 4 +- .../processing/embedding-process/index.tsx | 12 +- .../detail/batch-modal/csv-uploader.tsx | 4 +- .../documents/detail/batch-modal/index.tsx | 6 +- .../completed/common/action-buttons.tsx | 2 +- .../detail/completed/common/batch-action.tsx | 6 +- .../completed/common/regeneration-modal.tsx | 6 +- .../metadata/components/doc-type-selector.tsx | 2 +- .../documents/detail/metadata/index.tsx | 2 +- .../pipeline-settings/left-header.tsx | 12 +- .../process-documents/actions.tsx | 2 +- .../external-api/external-api-modal/index.tsx | 18 +- .../external-api/external-api-panel/index.tsx | 10 +- .../create/ExternalApiSelection.tsx | 2 +- .../external-knowledge-base/create/index.tsx | 10 +- .../datasets/extra-info/service-api/card.tsx | 10 +- .../modify-external-retrieval-modal.spec.tsx | 4 +- .../__tests__/modify-retrieval-modal.spec.tsx | 4 +- .../query-input/__tests__/index.spec.tsx | 6 +- .../components/query-input/index.tsx | 8 +- .../modify-external-retrieval-modal.tsx | 6 +- .../hit-testing/modify-retrieval-modal.tsx | 8 +- web/app/components/datasets/list/index.tsx | 6 +- .../datasets/metadata/add-metadata-button.tsx | 2 +- .../metadata/edit-metadata-batch/modal.tsx | 12 +- .../dataset-metadata-drawer.tsx | 12 +- .../metadata/metadata-document/index.tsx | 2 +- .../metadata/metadata-document/no-data.tsx | 6 +- .../datasets/rename-modal/index.tsx | 8 +- .../datasets/settings/form/index.tsx | 2 +- .../develop/secret-key/secret-key-button.tsx | 4 +- .../secret-key/secret-key-generate.tsx | 6 +- .../develop/secret-key/secret-key-modal.tsx | 6 +- web/app/components/explore/app-card/index.tsx | 12 +- web/app/components/explore/app-list/index.tsx | 6 +- .../explore/create-app-modal/index.tsx | 18 +- .../explore/try-app/app-info/index.tsx | 14 +- web/app/components/explore/try-app/index.tsx | 4 +- .../components/header/account-about/index.tsx | 4 +- .../__tests__/compliance.spec.tsx | 32 +- .../header/account-dropdown/compliance.tsx | 23 +- .../api-based-extension-page/index.tsx | 2 +- .../api-based-extension-page/item.tsx | 2 +- .../api-based-extension-page/modal.tsx | 6 +- .../data-source-page-new/configure.tsx | 4 +- .../data-source-page-new/item.tsx | 8 +- .../header/account-setting/index.tsx | 20 +- .../edit-workspace-modal/index.tsx | 4 +- .../members-page/invite-button.tsx | 2 +- .../members-page/invite-modal/index.tsx | 10 +- .../members-page/invited-modal/index.tsx | 4 +- .../transfer-ownership-modal/index.tsx | 44 +- .../model-auth/add-custom-model.tsx | 10 +- .../model-auth/authorized/index.tsx | 6 +- .../model-auth/config-model.tsx | 6 +- .../model-auth/config-provider.tsx | 4 +- .../manage-custom-model-credentials.tsx | 2 +- .../switch-credential-in-load-balancing.tsx | 2 +- .../model-provider-page/model-modal/index.tsx | 23 +- .../configuration-button.tsx | 2 +- .../presets-parameter.tsx | 4 +- .../model-selector/popup.tsx | 28 +- .../model-auth-dropdown/api-key-section.tsx | 8 +- .../model-auth-dropdown/index.tsx | 4 +- .../model-load-balancing-modal.tsx | 6 +- .../provider-added-card/priority-selector.tsx | 6 +- .../provider-card-actions.tsx | 4 +- .../system-model-selector/index.tsx | 14 +- .../plugins/install-plugin/base/installed.tsx | 2 +- .../install-bundle/steps/install.tsx | 4 +- .../install-bundle/steps/installed.tsx | 2 +- .../install-from-github/steps/loaded.tsx | 2 +- .../steps/selectPackage.tsx | 2 +- .../install-from-github/steps/setURL.tsx | 8 +- .../steps/install.tsx | 6 +- .../steps/uploading.tsx | 2 +- .../steps/install.tsx | 6 +- .../plugins/marketplace/list/card-wrapper.tsx | 6 +- .../authorize/add-api-key-button.tsx | 4 +- .../authorize/add-oauth-button.tsx | 12 +- .../authorize/oauth-client-settings.tsx | 2 +- .../authorized-in-data-source-node.tsx | 2 +- .../plugin-auth/authorized-in-node.tsx | 2 +- .../plugins/plugin-auth/authorized/index.tsx | 6 +- .../plugins/plugin-auth/authorized/item.tsx | 6 +- .../plugin-auth/plugin-auth-in-agent.tsx | 2 +- .../plugin-auth-in-datasource-node.tsx | 2 +- .../datasource-action-list.tsx | 6 +- .../detail-header/__tests__/index.spec.tsx | 4 +- .../detail-header/index.tsx | 6 +- .../plugin-detail-panel/endpoint-modal.tsx | 10 +- .../subscription-list/create/index.tsx | 6 +- .../subscription-list/create/oauth-client.tsx | 8 +- .../components/tool-credentials-form.tsx | 2 +- .../tool-selector/components/tool-item.tsx | 6 +- .../plugins/plugin-mutation-model/index.tsx | 4 +- .../plugin-page/__tests__/debug-info.spec.tsx | 4 +- .../install-plugin-dropdown.spec.tsx | 4 +- .../plugins/plugin-page/debug-info.tsx | 4 +- .../plugins/plugin-page/empty/index.tsx | 10 +- .../components/plugins/plugin-page/index.tsx | 4 +- .../plugin-page/install-plugin-dropdown.tsx | 6 +- .../components/error-plugin-item.tsx | 2 +- .../components/plugin-task-list.tsx | 4 +- .../plugins/plugin-page/plugins-panel.tsx | 4 +- web/app/components/plugins/provider-card.tsx | 6 +- .../__tests__/plugins-picker.spec.tsx | 4 +- .../__tests__/strategy-picker.spec.tsx | 4 +- .../auto-update-setting/plugins-picker.tsx | 4 +- .../auto-update-setting/strategy-picker.tsx | 4 +- .../plugins/reference-setting-modal/index.tsx | 6 +- .../__tests__/from-market-place.spec.tsx | 4 +- .../update-plugin/downgrade-warning.tsx | 6 +- .../update-plugin/from-market-place.tsx | 6 +- .../components/__tests__/conversion.spec.tsx | 4 +- ...blish-as-knowledge-pipeline-modal.spec.tsx | 4 +- .../__tests__/update-dsl-modal.spec.tsx | 8 +- .../rag-pipeline/components/conversion.tsx | 4 +- .../panel/input-field/editor/form/index.tsx | 2 +- .../components/panel/input-field/index.tsx | 6 +- .../test-run/preparation/actions/index.tsx | 2 +- .../document-processing/actions.tsx | 2 +- .../test-run/result/result-preview/index.tsx | 4 +- .../publish-as-knowledge-pipeline-modal.tsx | 10 +- .../input-field-button.tsx | 2 +- .../publisher/__tests__/popup.spec.tsx | 4 +- .../rag-pipeline-header/publisher/index.tsx | 2 +- .../rag-pipeline-header/publisher/popup.tsx | 16 +- .../components/update-dsl-modal.tsx | 11 +- .../components/version-mismatch-modal.tsx | 4 +- .../share/text-generation/result/index.tsx | 6 +- .../share/text-generation/run-batch/index.tsx | 4 +- .../run-batch/res-download/index.tsx | 2 +- .../share/text-generation/run-once/index.tsx | 8 +- .../config-credentials.tsx | 14 +- .../get-schema.tsx | 12 +- .../edit-custom-collection-modal/index.tsx | 26 +- .../edit-custom-collection-modal/test-api.tsx | 16 +- .../components/tools/mcp/detail/content.tsx | 20 +- .../components/tools/mcp/headers-input.tsx | 6 +- .../components/tools/mcp/mcp-server-modal.tsx | 10 +- .../components/tools/mcp/mcp-service-card.tsx | 12 +- web/app/components/tools/mcp/modal.tsx | 8 +- web/app/components/tools/provider/detail.tsx | 8 +- .../setting/build-in/config-credentials.tsx | 4 +- .../tools/workflow-tool/configure-button.tsx | 8 +- .../confirm-modal/__tests__/index.spec.tsx | 3 +- .../workflow-tool/confirm-modal/index.tsx | 8 +- .../components/tools/workflow-tool/index.tsx | 4 +- .../workflow-header/features-trigger.tsx | 2 +- .../block-selector/all-start-blocks.tsx | 6 +- .../workflow/block-selector/all-tools.tsx | 4 +- .../market-place-plugin/action.tsx | 6 +- .../workflow/dsl-export-confirm-modal.tsx | 16 +- .../workflow/header/chat-variable-button.tsx | 2 +- .../header/checklist/plugin-group.tsx | 4 +- .../components/workflow/header/env-button.tsx | 2 +- .../header/global-variable-button.tsx | 2 +- .../workflow/header/header-in-restoring.tsx | 4 +- .../header/header-in-view-history.tsx | 2 +- .../header/version-history-button.tsx | 4 +- .../nodes/_base/components/add-button.tsx | 2 +- .../_base/components/before-run-form/form.tsx | 7 +- .../components/before-run-form/index.tsx | 2 +- .../error-handle-type-selector.tsx | 4 +- .../components/install-plugin-button.tsx | 2 +- .../nodes/_base/components/next-step/item.tsx | 4 +- .../_base/components/next-step/operator.tsx | 4 +- .../variable/var-reference-picker.trigger.tsx | 23 +- .../workflow-panel/last-run/no-data.tsx | 4 +- .../components/workflow/nodes/code/panel.tsx | 28 +- .../nodes/data-source-empty/index.tsx | 4 +- .../nodes/data-source/before-run-form.tsx | 2 +- .../components/workflow/nodes/end/panel.tsx | 9 +- .../http/components/authorization/index.tsx | 4 +- .../nodes/http/components/curl-panel.tsx | 2 +- .../__tests__/button-style-dropdown.spec.tsx | 5 +- .../__tests__/form-content-preview.spec.tsx | 5 +- .../components/__tests__/user-action.spec.tsx | 5 +- .../components/button-style-dropdown.tsx | 2 +- .../delivery-method/email-configure-modal.tsx | 10 +- .../delivery-method/method-item.tsx | 6 +- .../recipient/member-selector.tsx | 2 +- .../delivery-method/test-email-sender.tsx | 12 +- .../delivery-method/upgrade-modal.tsx | 6 +- .../components/form-content-preview.tsx | 6 +- .../components/single-run-form.tsx | 8 +- .../human-input/components/user-action.tsx | 2 +- .../workflow/nodes/human-input/panel.tsx | 8 +- .../if-else/components/condition-add.tsx | 2 +- .../condition-list/condition-operator.tsx | 2 +- .../components/condition-number-input.tsx | 6 +- .../if-else/components/condition-wrap.tsx | 10 +- .../workflow/nodes/if-else/panel.tsx | 4 +- .../components/chunk-structure/index.tsx | 4 +- .../components/chunk-structure/selector.tsx | 4 +- .../components/add-dataset.tsx | 5 +- .../components/metadata/add-condition.tsx | 6 +- .../condition-list/condition-operator.tsx | 2 +- .../condition-list/condition-value-method.tsx | 2 +- .../metadata-filter-selector.tsx | 2 +- .../components/metadata/metadata-trigger.tsx | 4 +- .../components/retrieval-config.tsx | 4 +- .../json-importer.tsx | 10 +- .../json-schema-config.tsx | 10 +- .../generated-result.tsx | 10 +- .../json-schema-generator/prompt-editor.tsx | 14 +- .../visual-editor/add-field.tsx | 2 +- .../edit-card/advanced-actions.tsx | 2 +- .../nodes/llm/components/structure-output.tsx | 6 +- .../components/workflow/nodes/llm/panel.tsx | 11 +- .../nodes/loop/components/condition-add.tsx | 2 +- .../condition-list/condition-operator.tsx | 2 +- .../components/condition-number-input.tsx | 6 +- .../nodes/loop/components/condition-wrap.tsx | 4 +- .../components/extract-parameter/update.tsx | 9 +- .../components/workflow/nodes/start/panel.tsx | 9 +- .../nodes/template-transform/panel.tsx | 9 +- .../nodes/tool/components/tool-form/item.tsx | 10 +- .../components/trigger-form/item.tsx | 10 +- .../plugins/link-editor-plugin/component.tsx | 4 +- .../components/array-bool-list.tsx | 2 +- .../components/array-value-list.tsx | 2 +- .../components/variable-modal-trigger.tsx | 2 +- .../components/variable-modal.sections.tsx | 12 +- .../components/variable-modal.tsx | 4 +- .../panel/env-panel/variable-modal.tsx | 24 +- .../panel/env-panel/variable-trigger.tsx | 2 +- .../workflow/panel/inputs-panel.tsx | 4 +- .../context-menu/index.tsx | 2 +- .../delete-confirm-modal.tsx | 6 +- .../panel/version-history-panel/empty.tsx | 4 +- .../restore-confirm-modal.tsx | 4 +- .../workflow/panel/workflow-preview.tsx | 12 +- .../workflow/run/agent-log/agent-log-item.tsx | 8 +- .../run/agent-log/agent-log-nav-more.tsx | 4 +- .../workflow/run/agent-log/agent-log-nav.tsx | 12 +- .../iteration-log/iteration-log-trigger.tsx | 4 +- .../run/loop-log/loop-log-trigger.tsx | 4 +- .../run/retry-log/retry-log-trigger.tsx | 2 +- .../components/workflow/update-dsl-modal.tsx | 19 +- .../workflow/variable-inspect/group.tsx | 10 +- .../workflow/variable-inspect/left.tsx | 6 +- .../workflow/variable-inspect/listening.tsx | 6 +- .../education-apply/education-apply-page.tsx | 24 +- .../education-apply/expire-notice-modal.tsx | 10 +- web/app/education-apply/user-info.tsx | 8 +- .../education-apply/verify-state-modal.tsx | 12 +- .../forgot-password/ChangePasswordForm.tsx | 2 +- .../forgot-password/ForgotPasswordForm.tsx | 2 +- web/app/init/InitPasswordPopup.tsx | 4 +- web/app/install/installForm.tsx | 2 +- web/app/reset-password/check-code/page.tsx | 10 +- web/app/reset-password/page.tsx | 10 +- web/app/reset-password/set-password/page.tsx | 10 +- web/app/signin/check-code/page.tsx | 10 +- .../signin/components/mail-and-code-auth.tsx | 4 +- .../components/mail-and-password-auth.tsx | 6 +- web/app/signin/components/social-auth.tsx | 2 +- web/app/signin/components/sso-auth.tsx | 2 +- web/app/signin/invite-settings/page.tsx | 18 +- web/app/signin/one-more-step.tsx | 10 +- web/app/signup/check-code/page.tsx | 10 +- web/app/signup/components/input-mail.tsx | 10 +- web/app/signup/set-password/page.tsx | 10 +- web/app/styles/globals.css | 2 +- web/eslint-suppressions.json | 1239 ----------------- 444 files changed, 1636 insertions(+), 3169 deletions(-) delete mode 100644 web/app/components/base/button/__tests__/add-button.spec.tsx delete mode 100644 web/app/components/base/button/__tests__/sync-button.spec.tsx delete mode 100644 web/app/components/base/button/add-button.stories.tsx delete mode 100644 web/app/components/base/button/add-button.tsx delete mode 100644 web/app/components/base/button/sync-button.stories.tsx delete mode 100644 web/app/components/base/button/sync-button.tsx rename web/app/components/base/{ => ui}/button/__tests__/index.spec.tsx (93%) rename web/app/components/base/{ => ui}/button/index.css (66%) rename web/app/components/base/{ => ui}/button/index.stories.tsx (88%) rename web/app/components/base/{ => ui}/button/index.tsx (57%) diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx index 72913b4934..caf6562a3e 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx @@ -5,7 +5,6 @@ import { useBoolean } from 'ahooks' import * as React from 'react' import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' -import Button from '@/app/components/base/button' import Confirm from '@/app/components/base/confirm' import Divider from '@/app/components/base/divider' import { LinkExternal02 } from '@/app/components/base/icons/src/vender/line/general' @@ -14,6 +13,7 @@ import { PortalToFollowElem, PortalToFollowElemContent, } from '@/app/components/base/portal-to-follow-elem' +import { Button } from '@/app/components/base/ui/button' import { toast } from '@/app/components/base/ui/toast' import { addTracingConfig, removeTracingConfig, updateTracingConfig } from '@/service/apps' import { docURL } from './config' @@ -621,7 +621,7 @@ const ProviderConfigModal: FC = ({
diff --git a/web/app/(humanInputLayout)/form/[token]/form.tsx b/web/app/(humanInputLayout)/form/[token]/form.tsx index 221420aade..898dab8f4a 100644 --- a/web/app/(humanInputLayout)/form/[token]/form.tsx +++ b/web/app/(humanInputLayout)/form/[token]/form.tsx @@ -1,5 +1,5 @@ 'use client' -import type { ButtonProps } from '@/app/components/base/button' +import type { ButtonProps } from '@/app/components/base/ui/button' import type { FormInputItem, UserAction } from '@/app/components/workflow/nodes/human-input/types' import type { SiteInfo } from '@/models/share' import type { HumanInputFormError } from '@/service/use-share' @@ -13,12 +13,12 @@ import * as React from 'react' import { useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' -import Button from '@/app/components/base/button' import ContentItem from '@/app/components/base/chat/chat/answer/human-input-content/content-item' import ExpirationTime from '@/app/components/base/chat/chat/answer/human-input-content/expiration-time' import { getButtonStyle } from '@/app/components/base/chat/chat/answer/human-input-content/utils' import Loading from '@/app/components/base/loading' import DifyLogo from '@/app/components/base/logo/dify-logo' +import { Button } from '@/app/components/base/ui/button' import useDocumentTitle from '@/hooks/use-document-title' import { useParams } from '@/next/navigation' import { useGetHumanInputForm, useSubmitHumanInputForm } from '@/service/use-share' @@ -100,7 +100,7 @@ const FormContent = () => { if (success) { return (
-
+
@@ -109,7 +109,7 @@ const FormContent = () => {
{t('humanInput.thanks', { ns: 'share' })}
{t('humanInput.recorded', { ns: 'share' })}
-
{t('humanInput.submissionID', { id: token, ns: 'share' })}
+
{t('humanInput.submissionID', { id: token, ns: 'share' })}
{ if (expired) { return (
-
+
@@ -137,7 +137,7 @@ const FormContent = () => {
{t('humanInput.sorry', { ns: 'share' })}
{t('humanInput.expired', { ns: 'share' })}
-
{t('humanInput.submissionID', { id: token, ns: 'share' })}
+
{t('humanInput.submissionID', { id: token, ns: 'share' })}
{ if (submitted) { return (
-
+
@@ -165,7 +165,7 @@ const FormContent = () => {
{t('humanInput.sorry', { ns: 'share' })}
{t('humanInput.completed', { ns: 'share' })}
-
{t('humanInput.submissionID', { id: token, ns: 'share' })}
+
{t('humanInput.submissionID', { id: token, ns: 'share' })}
{ if (rateLimitExceeded) { return (
-
+
@@ -210,7 +210,7 @@ const FormContent = () => { if (!formData) { return (
-
+
@@ -245,7 +245,7 @@ const FormContent = () => { background={site.icon_background} imageUrl={site.icon_url} /> -
{site.title}
+
{site.title}
diff --git a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx index b71e6b4767..d19e5a7d2d 100644 --- a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx +++ b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx @@ -2,8 +2,8 @@ import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react' import { useState } from 'react' import { useTranslation } from 'react-i18next' -import Button from '@/app/components/base/button' import Input from '@/app/components/base/input' +import { Button } from '@/app/components/base/ui/button' import { toast } from '@/app/components/base/ui/toast' import Countdown from '@/app/components/signin/countdown' import { useLocale } from '@/context/i18n' @@ -62,9 +62,9 @@ export default function CheckCode() {
-
+

{t('checkCode.checkYourEmail', { ns: 'login' })}

-

+

{t('checkCode.tipsPrefix', { ns: 'login' })} {email} @@ -76,7 +76,7 @@ export default function CheckCode() {

- + setVerifyCode(e.target.value)} maxLength={6} className="mt-1" placeholder={t('checkCode.verificationCodePlaceholder', { ns: 'login' }) || ''} /> @@ -88,7 +88,7 @@ export default function CheckCode() {
- {t('back', { ns: 'login' })} + {t('back', { ns: 'login' })}
) diff --git a/web/app/(shareLayout)/webapp-reset-password/page.tsx b/web/app/(shareLayout)/webapp-reset-password/page.tsx index a25b4bb4ef..cb6ece219c 100644 --- a/web/app/(shareLayout)/webapp-reset-password/page.tsx +++ b/web/app/(shareLayout)/webapp-reset-password/page.tsx @@ -3,8 +3,8 @@ import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react' import { noop } from 'es-toolkit/function' import { useState } from 'react' import { useTranslation } from 'react-i18next' -import Button from '@/app/components/base/button' import Input from '@/app/components/base/input' +import { Button } from '@/app/components/base/ui/button' import { toast } from '@/app/components/base/ui/toast' import { COUNT_DOWN_KEY, COUNT_DOWN_TIME_MS } from '@/app/components/signin/countdown' import { emailRegex } from '@/config' @@ -64,9 +64,9 @@ export default function CheckCode() {
-
+

{t('resetPassword', { ns: 'login' })}

-

+

{t('resetPasswordDesc', { ns: 'login' })}

@@ -74,7 +74,7 @@ export default function CheckCode() {
- +
setEmail(e.target.value)} />
@@ -90,7 +90,7 @@ export default function CheckCode() {
- {t('backToLogin', { ns: 'login' })} + {t('backToLogin', { ns: 'login' })}
) diff --git a/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx b/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx index bc8f651d17..5b89084ea1 100644 --- a/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx +++ b/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx @@ -3,8 +3,8 @@ import { RiCheckboxCircleFill } from '@remixicon/react' import { useCountDown } from 'ahooks' import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' -import Button from '@/app/components/base/button' import Input from '@/app/components/base/input' +import { Button } from '@/app/components/base/ui/button' import { toast } from '@/app/components/base/ui/toast' import { validPassword } from '@/config' import { useRouter, useSearchParams } from '@/next/navigation' @@ -91,7 +91,7 @@ const ChangePasswordForm = () => {

{t('changePassword', { ns: 'login' })}

-

+

{t('changePasswordTip', { ns: 'login' })}

@@ -100,7 +100,7 @@ const ChangePasswordForm = () => {
{/* Password */}
-
-
{t('error.passwordInvalid', { ns: 'login' })}
+
{t('error.passwordInvalid', { ns: 'login' })}
{/* Confirm Password */}
-
) diff --git a/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx index fbd6b216df..f600dba8b2 100644 --- a/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx +++ b/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx @@ -1,8 +1,8 @@ import { noop } from 'es-toolkit/function' import { useState } from 'react' import { useTranslation } from 'react-i18next' -import Button from '@/app/components/base/button' import Input from '@/app/components/base/input' +import { Button } from '@/app/components/base/ui/button' import { toast } from '@/app/components/base/ui/toast' import { COUNT_DOWN_KEY, COUNT_DOWN_TIME_MS } from '@/app/components/signin/countdown' import { emailRegex } from '@/config' @@ -52,7 +52,7 @@ export default function MailAndCodeAuth() {
- +
setEmail(e.target.value)} />
diff --git a/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx index 1e9355e7ba..7fe5363927 100644 --- a/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx +++ b/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx @@ -2,8 +2,8 @@ import { noop } from 'es-toolkit/function' import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' -import Button from '@/app/components/base/button' import Input from '@/app/components/base/input' +import { Button } from '@/app/components/base/ui/button' import { toast } from '@/app/components/base/ui/toast' import { emailRegex } from '@/config' import { useLocale } from '@/context/i18n' @@ -103,7 +103,7 @@ export default function MailAndPasswordAuth({ isEmailSetup }: MailAndPasswordAut return (
-