mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[PR #14618] [CLOSED] feat: edit?id= URL functionality to the Admin Settings "Models" edit page
#23524
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14618
Author: @silentoplayz
Created: 6/3/2025
Status: ❌ Closed
Base:
dev← Head:admin-models-edit-id📝 Commits (1)
1e05852feat: edit?id= for admin models edit page📊 Changes
2 files changed (+32 additions, -5 deletions)
View changed files
📝
src/lib/components/admin/Settings/Models.svelte(+27 -5)➕
src/routes/(app)/admin/settings/models/edit/+page.svelte(+5 -0)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
edit?id=URL functionality to the Admin Settings "Models" edit page, enabling direct access to a specific model's edit interface via URL query parameters. This provides a consistent editing experience with workspace models and improves navigability.Added
src/routes/(app)/admin/settings/models/edit/+page.svelte: New file to define the/admin/settings/models/editroute, which renders theModels.sveltecomponent.Changed
src/lib/components/admin/Settings/Models.svelte:import { page } from '$app/stores';andimport { goto } from '$app/navigation';.$: { ... }) to dynamically setselectedModelIdbased on theidquery parameter when the URL path is/admin/settings/models/edit. This ensures the model editor is displayed when accessing the URL directly.on:clickhandlers for model list items (both the main button and the edit icon) to navigate to/admin/settings/models/edit?id=${model.id}.onSubmitandonBackhandlers of theModelEditorto navigate back to/admin/settings/models, clearing theidquery parameter and returning to the model list view.filteredModelswith an empty array (let filteredModels = [];) to preventReferenceError: assignment to undeclared variable.Fixed
ModelEditorcorrectly displays a specific model when accessed via a URL like/admin/settings/models/edit?id=your-model-id.idin the URL for the edit page redirects gracefully back to the model list.Additional Information
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.