diff --git a/api/v1/shortcut.go b/api/v1/shortcut.go index a74ac83..8fe1688 100644 --- a/api/v1/shortcut.go +++ b/api/v1/shortcut.go @@ -92,7 +92,7 @@ func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) { shortcut := &storepb.Shortcut{ CreatorId: userID, - Name: strings.ToLower(create.Name), + Name: create.Name, Link: create.Link, Title: create.Title, Description: create.Description, @@ -157,10 +157,6 @@ func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) { if err := json.NewDecoder(c.Request().Body).Decode(patch); err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("failed to decode patch shortcut request, err: %s", err)).SetInternal(err) } - if patch.Name != nil { - name := strings.ToLower(*patch.Name) - patch.Name = &name - } shortcutUpdate := &store.UpdateShortcut{ ID: shortcutID, diff --git a/frontend/extension/src/components/CreateShortcutsButton.tsx b/frontend/extension/src/components/CreateShortcutsButton.tsx index 153eb4c..05da50c 100644 --- a/frontend/extension/src/components/CreateShortcutsButton.tsx +++ b/frontend/extension/src/components/CreateShortcutsButton.tsx @@ -8,7 +8,7 @@ import Icon from "./Icon"; const generateTempName = (length = 6) => { let result = ""; - const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; const charactersLength = characters.length; let counter = 0; while (counter < length) { @@ -53,7 +53,7 @@ const CreateShortcutsButton = () => { const tab = tabs[0]; setState((state) => ({ ...state, - name: generateTempName().toLowerCase() + "-temp", + name: generateTempName() + "-temp", title: tab.title || "", link: tab.url || "", })); diff --git a/frontend/web/src/components/CreateShortcutDialog.tsx b/frontend/web/src/components/CreateShortcutDialog.tsx index 57b87f3..93858ef 100644 --- a/frontend/web/src/components/CreateShortcutDialog.tsx +++ b/frontend/web/src/components/CreateShortcutDialog.tsx @@ -74,7 +74,7 @@ const CreateShortcutDialog: React.FC = (props: Props) => { const handleNameInputChange = (e: React.ChangeEvent) => { setPartialState({ shortcutCreate: Object.assign(state.shortcutCreate, { - name: e.target.value.replace(/\s+/g, "-").toLowerCase(), + name: e.target.value.replace(/\s+/g, "-"), }), }); };