Procházet zdrojové kódy

132486 remove isDisappear

soumaeda před 2 roky
rodič
revize
f61fe3958c

+ 1 - 1
apps/app/src/components/PageControls/PageControls.tsx

@@ -57,7 +57,7 @@ const Tags = (props: TagsProps): JSX.Element => {
   return (
   return (
     <div className="grw-taglabels-container d-flex align-items-center">
     <div className="grw-taglabels-container d-flex align-items-center">
       <a
       <a
-        className="btn btn-link btn-edit-tags text-muted p-0 d-flex align-items-center"
+        className="btn btn-link btn-edit-tags text-muted border border-secondary p-1 d-flex align-items-center"
         onClick={() => openTagEditModal(tagsInfoData?.tags)}
         onClick={() => openTagEditModal(tagsInfoData?.tags)}
       >
       >
         <i className="icon-tag me-2" />
         <i className="icon-tag me-2" />

+ 0 - 3
apps/app/src/components/PageSideContents/PageSideContents.tsx

@@ -54,8 +54,6 @@ const Tags = (props: TagsProps): JSX.Element => {
 
 
   const isTagLabelsDisabled = !!isGuestUser || !!isReadOnlyUser;
   const isTagLabelsDisabled = !!isGuestUser || !!isReadOnlyUser;
 
 
-  const isDisappear = false;
-
   return (
   return (
     <div className="grw-taglabels-container">
     <div className="grw-taglabels-container">
       { tagsInfoData?.tags != null
       { tagsInfoData?.tags != null
@@ -63,7 +61,6 @@ const Tags = (props: TagsProps): JSX.Element => {
           <PageTags
           <PageTags
             tags={tagsInfoData.tags}
             tags={tagsInfoData.tags}
             isTagLabelsDisabled={isTagLabelsDisabled ?? false}
             isTagLabelsDisabled={isTagLabelsDisabled ?? false}
-            isDisappear={isDisappear}
             pageId={pageId}
             pageId={pageId}
           />
           />
         )
         )

+ 1 - 3
apps/app/src/components/PageTags/PageTags.tsx

@@ -10,7 +10,6 @@ import styles from './TagLabels.module.scss';
 type Props = {
 type Props = {
   tags?: string[],
   tags?: string[],
   isTagLabelsDisabled: boolean,
   isTagLabelsDisabled: boolean,
-  isDisappear: boolean,
   tagsUpdateInvoked?: (tags: string[]) => Promise<void> | void,
   tagsUpdateInvoked?: (tags: string[]) => Promise<void> | void,
   pageId: string,
   pageId: string,
 }
 }
@@ -21,7 +20,7 @@ export const PageTagsSkeleton = (): JSX.Element => {
 
 
 export const PageTags:FC<Props> = (props: Props) => {
 export const PageTags:FC<Props> = (props: Props) => {
   const {
   const {
-    tags, isTagLabelsDisabled, isDisappear, pageId,
+    tags, isTagLabelsDisabled, pageId,
   } = props;
   } = props;
 
 
   if (tags == null) {
   if (tags == null) {
@@ -34,7 +33,6 @@ export const PageTags:FC<Props> = (props: Props) => {
         <RenderTagLabels
         <RenderTagLabels
           tags={tags}
           tags={tags}
           isTagLabelsDisabled={isTagLabelsDisabled}
           isTagLabelsDisabled={isTagLabelsDisabled}
-          isDisappear={isDisappear}
           pageId={pageId}
           pageId={pageId}
         />
         />
       </div>
       </div>

+ 3 - 5
apps/app/src/components/PageTags/RenderTagLabels.tsx

@@ -12,13 +12,12 @@ import { NotAvailableForReadOnlyUser } from '../NotAvailableForReadOnlyUser';
 type RenderTagLabelsProps = {
 type RenderTagLabelsProps = {
   tags: string[],
   tags: string[],
   isTagLabelsDisabled: boolean,
   isTagLabelsDisabled: boolean,
-  isDisappear: boolean,
   pageId: string,
   pageId: string,
 }
 }
 
 
 const RenderTagLabels = React.memo((props: RenderTagLabelsProps) => {
 const RenderTagLabels = React.memo((props: RenderTagLabelsProps) => {
   const {
   const {
-    tags, isTagLabelsDisabled, isDisappear, pageId,
+    tags, isTagLabelsDisabled, pageId,
   } = props;
   } = props;
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
@@ -30,7 +29,7 @@ const RenderTagLabels = React.memo((props: RenderTagLabelsProps) => {
 
 
   return (
   return (
     <>
     <>
-      {!isDisappear && tags.map(tag => (
+      {tags.map(tag => (
         <a
         <a
           key={tag}
           key={tag}
           type="button"
           type="button"
@@ -47,8 +46,7 @@ const RenderTagLabels = React.memo((props: RenderTagLabelsProps) => {
               className={
               className={
                 `btn btn-link btn-edit-tags text-muted d-flex align-items-center
                 `btn btn-link btn-edit-tags text-muted d-flex align-items-center
                 ${isTagsEmpty && 'no-tags'}
                 ${isTagsEmpty && 'no-tags'}
-                ${isTagLabelsDisabled && 'disabled'}
-                ${isDisappear && 'border border-secondary p-1'}`
+                ${isTagLabelsDisabled && 'disabled'}`
               }
               }
               onClick={() => openTagEditModal(tagsInfoData?.tags)}
               onClick={() => openTagEditModal(tagsInfoData?.tags)}
             >
             >