This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: add tooltip to url card actions

+81 -66
+79 -65
src/webapp/features/cards/components/urlCardActions/UrlCardActions.tsx
··· 6 6 type User, 7 7 CollectionAccessType, 8 8 } from '@/api-client'; 9 - import { ActionIcon, Button, Collapse, CopyButton, Group, Menu } from '@mantine/core'; 9 + import { 10 + ActionIcon, 11 + Button, 12 + Collapse, 13 + CopyButton, 14 + Group, 15 + Menu, 16 + Tooltip, 17 + } from '@mantine/core'; 10 18 import { Fragment, useState } from 'react'; 11 19 import { FiPlus } from 'react-icons/fi'; 12 20 import { BsThreeDots, BsTrash2Fill } from 'react-icons/bs'; ··· 92 100 )} 93 101 <Group justify="space-between"> 94 102 <Group gap={'xs'}> 95 - <Button 96 - variant="light" 97 - color={'gray'} 98 - size="xs" 99 - radius={'xl'} 100 - leftSection={ 101 - props.urlLibraryCount > 0 ? ( 102 - props.urlIsInLibrary ? ( 103 - <IoMdCheckmark size={18} /> 104 - ) : ( 105 - <FiPlus size={18} /> 106 - ) 107 - ) : undefined 108 - } 109 - onClick={(e) => { 110 - e.stopPropagation(); 111 - if (!isAuthenticated) { 112 - router.push('/login'); 113 - return; 114 - } 115 - trigger(); 116 - setShowAddToModal(true); 117 - }} 118 - > 119 - {props.urlLibraryCount ? ( 120 - props.urlLibraryCount 121 - ) : props.urlIsInLibrary ? ( 122 - <IoMdCheckmark size={18} /> 123 - ) : ( 124 - <FiPlus size={18} /> 125 - )} 126 - </Button> 127 - <Button 128 - variant="light" 129 - color="gray" 130 - c={props.urlIsConnected ? 'green' : 'gray'} 131 - size="xs" 132 - radius={'xl'} 133 - leftSection={ 134 - props.urlConnectionCount > 0 ? ( 135 - <TbPlugConnected size={15} /> 136 - ) : undefined 137 - } 138 - onClick={(e) => { 139 - e.stopPropagation(); 140 - if (!isAuthenticated) { 141 - router.push('/login'); 142 - return; 103 + <Tooltip label="Save or update" withArrow> 104 + <Button 105 + variant="light" 106 + color={'gray'} 107 + size="xs" 108 + radius={'xl'} 109 + leftSection={ 110 + props.urlLibraryCount > 0 ? ( 111 + props.urlIsInLibrary ? ( 112 + <IoMdCheckmark size={18} /> 113 + ) : ( 114 + <FiPlus size={18} /> 115 + ) 116 + ) : undefined 143 117 } 144 - trigger(); 145 - setShowAddConnectionModal(true); 146 - }} 147 - > 148 - {props.urlConnectionCount ? ( 149 - props.urlConnectionCount 150 - ) : ( 151 - <TbPlugConnected size={15} /> 152 - )} 153 - </Button> 154 - 155 - {props.note && ( 156 - <ActionIcon 118 + onClick={(e) => { 119 + e.stopPropagation(); 120 + if (!isAuthenticated) { 121 + router.push('/login'); 122 + return; 123 + } 124 + trigger(); 125 + setShowAddToModal(true); 126 + }} 127 + > 128 + {props.urlLibraryCount ? ( 129 + props.urlLibraryCount 130 + ) : props.urlIsInLibrary ? ( 131 + <IoMdCheckmark size={18} /> 132 + ) : ( 133 + <FiPlus size={18} /> 134 + )} 135 + </Button> 136 + </Tooltip> 137 + <Tooltip label="Connect to another card" withArrow> 138 + <Button 157 139 variant="light" 158 140 color="gray" 141 + c={props.urlIsConnected ? 'green' : 'gray'} 142 + size="xs" 159 143 radius={'xl'} 144 + leftSection={ 145 + props.urlConnectionCount > 0 ? ( 146 + <TbPlugConnected size={15} /> 147 + ) : undefined 148 + } 160 149 onClick={(e) => { 161 150 e.stopPropagation(); 162 - setShowNote((prev) => !prev); 151 + if (!isAuthenticated) { 152 + router.push('/login'); 153 + return; 154 + } 155 + trigger(); 156 + setShowAddConnectionModal(true); 163 157 }} 164 158 > 165 - <MdOutlineStickyNote2 /> 166 - </ActionIcon> 159 + {props.urlConnectionCount ? ( 160 + props.urlConnectionCount 161 + ) : ( 162 + <TbPlugConnected size={15} /> 163 + )} 164 + </Button> 165 + </Tooltip> 166 + 167 + {props.note && ( 168 + <Tooltip label="View note" withArrow> 169 + <ActionIcon 170 + variant="light" 171 + color="gray" 172 + radius={'xl'} 173 + onClick={(e) => { 174 + e.stopPropagation(); 175 + setShowNote((prev) => !prev); 176 + }} 177 + > 178 + <MdOutlineStickyNote2 /> 179 + </ActionIcon> 180 + </Tooltip> 167 181 )} 168 182 </Group> 169 183
+1 -1
src/webapp/next-env.d.ts
··· 1 1 /// <reference types="next" /> 2 2 /// <reference types="next/image-types/global" /> 3 - import "./.next/dev/types/routes.d.ts"; 3 + import "./.next/types/routes.d.ts"; 4 4 5 5 // NOTE: This file should not be edited 6 6 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+1
src/webapp/styles/theme.tsx
··· 148 148 Tooltip: Tooltip.extend({ 149 149 defaultProps: { 150 150 position: 'top-start', 151 + openDelay: 500, 151 152 }, 152 153 }), 153 154 Title: Text.extend({