Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Hide all API keys in Admin Settings by default by setting the input type to password, and provide a button to unhide the keys.
One side effect that might require some hacks to solve is that Chrome will ask to save the API keys as passwords due to type=password. It's probably worth making a ToggleableSensitiveInput component that can be reused.
The {...{ type: showSTTKey ? 'text' : 'password' }} construction is used because Svelte disallows the use of a bind:value and a dynamic type.
Changed
API keys in Admin Settings are hidden by default.
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/3418
**Author:** [@cheahjs](https://github.com/cheahjs)
**Created:** 6/25/2024
**Status:** ✅ Merged
**Merged:** 6/25/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `feat/hide-tokens-in-ui`
---
### 📝 Commits (2)
- [`d5b91fb`](https://github.com/open-webui/open-webui/commit/d5b91fb0847379d8fb67cf0e1c305a4504aec84b) feat: hide all API keys by default in admin settings
- [`f8f6943`](https://github.com/open-webui/open-webui/commit/f8f69431288ae668218ef1e368626cfa55dd75ad) refac: use new SensitiveInput component
### 📊 Changes
**44 files changed** (+115 additions, -260 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/components/admin/Settings/Audio.svelte` (+6 -15)
📝 `src/lib/components/admin/Settings/Connections.svelte` (+3 -8)
📝 `src/lib/components/admin/Settings/Documents.svelte` (+30 -22)
📝 `src/lib/components/admin/Settings/Images.svelte` (+4 -16)
📝 `src/lib/components/admin/Settings/WebSearch.svelte` (+7 -66)
📝 `src/lib/components/chat/Settings/Account.svelte` (+3 -96)
➕ `src/lib/components/common/SensitiveInput.svelte` (+62 -0)
📝 `src/lib/i18n/locales/ar-BH/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/bg-BG/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/bn-BD/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/ca-ES/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/ceb-PH/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/de-DE/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/dg-DG/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/en-GB/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/en-US/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/es-ES/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/fa-IR/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/fi-FI/translation.json` (+0 -1)
📝 `src/lib/i18n/locales/fr-CA/translation.json` (+0 -1)
_...and 24 more files_
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for validating the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
Hide all API keys in Admin Settings by default by setting the `input` type to `password`, and provide a button to unhide the keys.
One side effect that might require some hacks to solve is that Chrome will ask to save the API keys as passwords due to `type=password`. It's probably worth making a `ToggleableSensitiveInput` component that can be reused.
The `{...{ type: showSTTKey ? 'text' : 'password' }}` construction is used because Svelte disallows the use of a `bind:value` and a dynamic `type`.
### Changed
- API keys in Admin Settings are hidden by default.
### Screenshots or Videos
<img width="1453" alt="image" src="https://github.com/open-webui/open-webui/assets/818368/d7c85838-e80f-4dcf-8c81-7f7a525f8daa">
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/3418
Author: @cheahjs
Created: 6/25/2024
Status: ✅ Merged
Merged: 6/25/2024
Merged by: @tjbck
Base:
dev← Head:feat/hide-tokens-in-ui📝 Commits (2)
d5b91fbfeat: hide all API keys by default in admin settingsf8f6943refac: use new SensitiveInput component📊 Changes
44 files changed (+115 additions, -260 deletions)
View changed files
📝
src/lib/components/admin/Settings/Audio.svelte(+6 -15)📝
src/lib/components/admin/Settings/Connections.svelte(+3 -8)📝
src/lib/components/admin/Settings/Documents.svelte(+30 -22)📝
src/lib/components/admin/Settings/Images.svelte(+4 -16)📝
src/lib/components/admin/Settings/WebSearch.svelte(+7 -66)📝
src/lib/components/chat/Settings/Account.svelte(+3 -96)➕
src/lib/components/common/SensitiveInput.svelte(+62 -0)📝
src/lib/i18n/locales/ar-BH/translation.json(+0 -1)📝
src/lib/i18n/locales/bg-BG/translation.json(+0 -1)📝
src/lib/i18n/locales/bn-BD/translation.json(+0 -1)📝
src/lib/i18n/locales/ca-ES/translation.json(+0 -1)📝
src/lib/i18n/locales/ceb-PH/translation.json(+0 -1)📝
src/lib/i18n/locales/de-DE/translation.json(+0 -1)📝
src/lib/i18n/locales/dg-DG/translation.json(+0 -1)📝
src/lib/i18n/locales/en-GB/translation.json(+0 -1)📝
src/lib/i18n/locales/en-US/translation.json(+0 -1)📝
src/lib/i18n/locales/es-ES/translation.json(+0 -1)📝
src/lib/i18n/locales/fa-IR/translation.json(+0 -1)📝
src/lib/i18n/locales/fi-FI/translation.json(+0 -1)📝
src/lib/i18n/locales/fr-CA/translation.json(+0 -1)...and 24 more files
📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Hide all API keys in Admin Settings by default by setting the
inputtype topassword, and provide a button to unhide the keys.One side effect that might require some hacks to solve is that Chrome will ask to save the API keys as passwords due to
type=password. It's probably worth making aToggleableSensitiveInputcomponent that can be reused.The
{...{ type: showSTTKey ? 'text' : 'password' }}construction is used because Svelte disallows the use of abind:valueand a dynamictype.Changed
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.