Skip to content

Conversation

@zhengkunwang223
Copy link
Member

No description provided.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jun 10, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

const isHidden = ref(false);

const { searchableStatus, searchablePath, searchableInputRef, searchableInputBlur } = useSearchable(paths);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple of improvements and corrections you can make to improve the code:

  1. Variable Name Correction: The isHidden variable should be set to true if you want files to always appear regardless of their status being hidden.

  2. Code Readability: While not strictly necessary, using consistent indentation and spacing helps readability.

Here's the corrected and improved version of the code snippet:

@@ -15,7 +15,13 @@
                     <el-button icon="Refresh" circle @click="search" />
                 </el-tooltip>
                 <el-tooltip :content="isHidden ? $t('file.showHide') : $t('file.noShowHide')" placement="top">
-                    <el-button class="btn" circle :icon="isHidden ? Hide : View" @click="viewHideFile" />
+                    <el-button
+                            class="btn"
+                            circle
+                            :type="isHidden ? 'primary' : ''"
+                            :icon="isHidden ? Hide : View"
+                            @click="viewHideFile"
+                    />
                 </el-tooltip>
             </div>
             <div class="flex-1 sm:w-min w-full hidden sm:block" ref="pathRef">
@@ -648,7 +657,7 @@ const calculateBtn = ref(false);
 const dirNum = ref(0);
 const fileNum = ref(0);
 const imageFiles = ref([]);
-const isHidden = ref(true);
+const isHidden = ref(false);  // Ensure this is false if you do NOT want files hidden by default

const { searchableStatus, searchablePath, searchableInputRef, searchableInputBlur } = useSearchable(paths);

If you want files to always show up, change isHidden: true to isHidden: false. However, keep in mind that this might need additional handling based on your application's logic.

docsUrl: (state) => (state.isIntl ? 'https://docs.1panel.hk' : 'https://1panel.cn/docs/v2'),
isMaster: (state) => state.currentNode === 'local',
},
actions: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two differences in the provided code snippet:

  1. URL Change: The docsUrl action now points to https://1panel.cn/docs/v2 instead of https://1panel.cn/docs. This indicates that there has been an update or a change in documentation URLs within version 2.

  2. No other apparent issues are identified based on this snippet alone, suggesting good practices have mostly been followed.

These changes might impact URL handling and consistency across different versions of your application if further checks against these URLs during runtime were necessary.

@sonarqubecloud
Copy link

Copy link
Member

@wanghe-fit2cloud wanghe-fit2cloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@wanghe-fit2cloud
Copy link
Member

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jun 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wanghe-fit2cloud

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot merged commit 4528f1f into dev-v2 Jun 10, 2025
7 checks passed
@f2c-ci-robot f2c-ci-robot bot deleted the pr@dev-v2@website branch June 10, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants