chore: update slash description

This commit is contained in:
Steven
2023-07-27 19:59:49 +08:00
parent 6bbf2df8e0
commit 72106d13de
7 changed files with 28 additions and 10 deletions

View File

@ -23,6 +23,8 @@ const Home: React.FC = () => {
const [state, setState] = useState<State>({
showCreateShortcutDialog: false,
});
const [selectedTab, setSelectedTab] = useState<string>("ALL");
const tags = shortcutList.map((shortcut) => shortcut.tags).flat();
const filter = viewStore.filter;
const filteredShortcutList = getFilteredShortcutList(shortcutList, filter, currentUser);
const orderedShortcutList = getOrderedShortcutList(filteredShortcutList, viewStore.order);
@ -43,6 +45,21 @@ const Home: React.FC = () => {
return (
<>
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start">
<div className="w-full flex flex-row justify-start items-center gap-2 flex-wrap mb-4">
{tags.map((tag) => (
<Button
key={tag}
className="hover:shadow"
variant="plain"
color="neutral"
size="sm"
onClick={() => viewStore.setFilter({ tag: tag })}
>
<Icon.Tag className="w-4 h-auto mr-1" />
<span className="max-w-xs truncate">#{tag}</span>
</Button>
))}
</div>
<div className="w-full flex flex-row justify-between items-center mb-4">
<span className="font-mono text-gray-400 mr-2">Shortcuts</span>
<Input
@ -73,7 +90,7 @@ const Home: React.FC = () => {
>
<TabList>
<Tab value={"ALL"}>All</Tab>
<Tab value={"PRIVATE"}>Mine</Tab>
<Tab value={"PRIVATE"}>My Own</Tab>
</TabList>
</Tabs>
</div>