Merge branch 'issue-433' of https://github.com/isaacwise06/linkwarden into issue-433
This commit is contained in:
commit
8f62f4dffb
|
@ -70,7 +70,7 @@ export default function LinkCard({
|
||||||
|
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
const isVisible = useOnScreen(ref);
|
const isVisible = useOnScreen(ref);
|
||||||
const permissions = usePermissions(collection.id as number);
|
const permissions = usePermissions(collection?.id as number);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let interval: any;
|
let interval: any;
|
||||||
|
|
|
@ -64,7 +64,7 @@ export default function LinkCardCompact({
|
||||||
);
|
);
|
||||||
}, [collections, links]);
|
}, [collections, links]);
|
||||||
|
|
||||||
const permissions = usePermissions(collection.id as number);
|
const permissions = usePermissions(collection?.id as number);
|
||||||
|
|
||||||
const [showInfo, setShowInfo] = useState(false);
|
const [showInfo, setShowInfo] = useState(false);
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@ export default function Index() {
|
||||||
useState<CollectionIncludingMembersAndLinkCount>();
|
useState<CollectionIncludingMembersAndLinkCount>();
|
||||||
|
|
||||||
const permissions = usePermissions(activeCollection?.id as number);
|
const permissions = usePermissions(activeCollection?.id as number);
|
||||||
console.log(permissions)
|
|
||||||
|
|
||||||
useLinks({ collectionId: Number(router.query.id), sort: sortBy });
|
useLinks({ collectionId: Number(router.query.id), sort: sortBy });
|
||||||
|
|
||||||
|
@ -307,6 +306,7 @@ export default function Index() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-full flex justify-between items-center min-h-[32px]">
|
<div className="w-full flex justify-between items-center min-h-[32px]">
|
||||||
|
{links.length > 0 && (
|
||||||
<div className="flex gap-3 ml-3">
|
<div className="flex gap-3 ml-3">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
@ -320,6 +320,7 @@ export default function Index() {
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
{selectedLinks.length > 0 && (permissions === true || permissions?.canUpdate) &&
|
{selectedLinks.length > 0 && (permissions === true || permissions?.canUpdate) &&
|
||||||
<button onClick={() => setBulkEditLinksModal(true)} className="btn btn-sm btn-accent dark:border-violet-400 text-white w-fit ml-auto">
|
<button onClick={() => setBulkEditLinksModal(true)} className="btn btn-sm btn-accent dark:border-violet-400 text-white w-fit ml-auto">
|
||||||
|
|
|
@ -145,8 +145,7 @@ export default function Index() {
|
||||||
</p>
|
</p>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<div
|
<div
|
||||||
className={`dropdown dropdown-bottom font-normal ${
|
className={`dropdown dropdown-bottom font-normal ${activeTag?.name.length && activeTag?.name.length > 8
|
||||||
activeTag?.name.length && activeTag?.name.length > 8
|
|
||||||
? "dropdown-end"
|
? "dropdown-end"
|
||||||
: ""
|
: ""
|
||||||
}`}
|
}`}
|
||||||
|
@ -200,6 +199,7 @@ export default function Index() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<LinkComponent
|
<LinkComponent
|
||||||
|
showCheckbox={false}
|
||||||
links={links.filter((e) =>
|
links={links.filter((e) =>
|
||||||
e.tags.some((e) => e.id === Number(router.query.id))
|
e.tags.some((e) => e.id === Number(router.query.id))
|
||||||
)}
|
)}
|
||||||
|
|
Ŝarĝante…
Reference in New Issue