mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-02 04:01:35 +00:00
chore: remove shorcut lower name
This commit is contained in:
@ -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 || "",
|
||||
}));
|
||||
|
@ -74,7 +74,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
|
||||
const handleNameInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setPartialState({
|
||||
shortcutCreate: Object.assign(state.shortcutCreate, {
|
||||
name: e.target.value.replace(/\s+/g, "-").toLowerCase(),
|
||||
name: e.target.value.replace(/\s+/g, "-"),
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user