mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-06 21:22:36 +00:00
chore: update slash description
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user