mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 22:07:15 +00:00
chore: remove the "-temp" part of the shortcut name in the extension (#47)
* increase random id size in shortcut * remove the temp part of the shortcut name
This commit is contained in:
parent
263812f98f
commit
c45a48966d
@ -7,7 +7,7 @@ import { Visibility } from "@/types/proto/api/v2/common";
|
|||||||
import { CreateShortcutResponse, OpenGraphMetadata } from "@/types/proto/api/v2/shortcut_service";
|
import { CreateShortcutResponse, OpenGraphMetadata } from "@/types/proto/api/v2/shortcut_service";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
|
|
||||||
const generateTempName = (length = 6) => {
|
const generateName = (length = 8) => {
|
||||||
let result = "";
|
let result = "";
|
||||||
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
|
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||||
const charactersLength = characters.length;
|
const charactersLength = characters.length;
|
||||||
@ -54,7 +54,7 @@ const CreateShortcutsButton = () => {
|
|||||||
const tab = tabs[0];
|
const tab = tabs[0];
|
||||||
setState((state) => ({
|
setState((state) => ({
|
||||||
...state,
|
...state,
|
||||||
name: generateTempName() + "-temp",
|
name: generateName(),
|
||||||
title: tab.title || "",
|
title: tab.title || "",
|
||||||
link: tab.url || "",
|
link: tab.url || "",
|
||||||
}));
|
}));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user