diff --git a/.github/workflows/check-images.yml b/.github/workflows/check-images.yml new file mode 100644 index 0000000..02296cd --- /dev/null +++ b/.github/workflows/check-images.yml @@ -0,0 +1,13 @@ +name: Check Images + +on: + pull_request: + branches: [main] + +jobs: + check-images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check for orphaned and missing images + run: bash scripts/check-images.sh diff --git a/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/4-withdraw-fil-from-glif.md b/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/4-withdraw-fil-from-glif.md index 5524220..7e38afa 100644 --- a/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/4-withdraw-fil-from-glif.md +++ b/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/4-withdraw-fil-from-glif.md @@ -17,11 +17,11 @@ This tutorial will guide you through the process of using your iFIL tokens to wi ## Step 2: Go to the “Pool” page -1. Within the “Pool” section, find the “**Withdraw**” option. +1. Within the “**Pool**” section, find the “**Withdraw**” option. 2. Enter the amount of iFIL you want to redeem, and the corresponding amount of FIL to receive will be displayed. Read more about iFIL [here](/for-liquidity-providers/glif-reward-mechanism-ifil). -3. Click “**Approve**”. +3. Click “**Withdraw**”. -![Approve button](en-image-177.webp) +![Approve button](en-image-1h.webp) ## Step 3: Submit transaction 1 of 2 - approve GLIF pool to transfer @@ -29,29 +29,21 @@ The GLIF smart contract needs permission to spend your iFIL Tokens to process th 1. Click **“Approve”.** -![Approve button](en-image-383.webp) +![Approve button](en-image-383b.webp) -2. Click “**Confirm**” - note you can approve just the amount of iFIL you want to redeem, or you can approve “**max**”, and not have to do this approval transaction step for withdrawals in the future. - -![Withdraw button](en-image-384.webp) +2. Click “**Confirm**” in your wallet. ## Step 4: Submit transaction 2 of 2 - Withdraw FIL -1. After a short wait (around 1 to 2 minutes), you should see a transaction success notification appear. After the approval transaction succeeds, you can proceed with the withdrawal - click “**Withdraw**”. - -![Withdraw button](en-image-385.webp) - -2. Click “**Confirm**” in your MetaMask. - -![MetaMask prompt](en-image-184.webp) +1. After the approval transaction succeeds, you can proceed with the withdrawal - click “**Withdraw**”. -3. After a short wait, you will see a transaction completion message in the bottom right corner. Withdrawal success! +![Withdraw button](en-image-385b.webp) -![Transaction pending](en-image-185.webp) +2. Click “**Confirm**” in your wallet. ## Step 5: Check your FIL balance -After withdrawing FIL, your wallet's FIL balance will increase by the amount of FIL withdrawn. For a more detailed view of your position, click on “**Wallet**” in the GLIF navigation +After withdrawing FIL, your wallet's FIL balance will increase by the amount of FIL withdrawn. For a more detailed view of your position, click on “**Wallet**”: ![Position view](en-image-41.webp) diff --git a/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/5-how-to-withdraw-fil-from-glif-using-a-multisig-wallet.md b/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/5-how-to-withdraw-fil-from-glif-using-a-multisig-wallet.md index 535845b..b889c82 100644 --- a/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/5-how-to-withdraw-fil-from-glif-using-a-multisig-wallet.md +++ b/apps/www/docs/en/7-troubleshooting/2-tutorials/1-for-token-holders/2-using-the-pool/5-how-to-withdraw-fil-from-glif-using-a-multisig-wallet.md @@ -2,11 +2,6 @@ Withdrawing FIL from GLIF using a multisig wallet involves a two-step proposal process to ensure security and consensus among wallet signers. This tutorial will guide you through withdrawing your deposited FIL and converting your iFIL back to FIL. -In this tutorial, you will follow these two main steps: - -1. Approve the GLIF pool to transfer your iFIL -2. Withdraw from the GLIF pool - *** ## Prerequisites @@ -33,99 +28,42 @@ Go to the “**Tokens**” section, click on the “**⋯**” button next to yo ![Withdraw button](en-image-327.webp) -3. **Enter withdrawal amount** +3. **Approve the iFIL transfer** -Input the amount of iFIL you wish to withdraw. Click “**Approve**” to allow the GLIF Pool to transfer your iFIL. +Input the amount of iFIL you wish to withdraw. +Click “**Approve iFIL Transfer**” to allow the GLIF Pool to transfer your iFIL. -> [!NOTE] -> In the left sidebar, you will see that Step 1, “**Approve the Infinity Pool to transfer your iFIL**” is highlighted. +Confirm the transaction in your connected wallet to proceed. -![Approve pool access](en-image-1.webp) +Wait for the network to complete the transaction. -4. **Create the approval proposal** +![](en-image-1av2.webp) -A prompt will appear in your connected wallet. Confirm the transaction to create the approval proposal. This step may take a few minutes as the transaction is processed on the network. +4. **Initiate the withdrawal** -You will be able to withdraw your iFIL once the multisig proposal to approve the transfer by the Infinity Pool is approved. There is a “**View Proposal**” button, click it. +Click "**Withdraw**" and approve the prompt in your wallet. Confirm the transaction in your connected wallet to proceed. -![Proposal approval](en-image-2.webp) +![](en-image-2av2.webp) -You should now see the pending multisig proposal. If not, navigate to the “**Multisig Proposals**” section in your multisig wallet interface. +After the transaction is completed, this will automatically generate two multisig proposals: "**Approve**" and "**RedeemF**". -![Approve pool access](en-image-343.webp) +![](en-image-3bv2.webp) -5. **Other signers connect wallet and access the proposal** +5. **Access proposals as another signer** -Now, **the proposer's wallet** should be disconnected. **Other signers** need to connect their wallets and approve the proposal. +Connect other signers's wallet, navigate to the Admin section, and locate the pending proposals. +Click the check mark next to the proposals. -Then, navigate to the “**Multisig Proposals**” section in your multisig wallet interface. Locate the pending proposal, created by the proposer (another wallet). +6. **Confirm the proposals** -![Approve pool access](en-image-3.webp) + Click "**Approve**" and confirm in the signer’s wallet. Repeat this for all required signers. -6. **Other signers approve the proposal** - -After selecting the proposal, click “**Approve Proposal**” and confirm the approval in the wallet prompt. +![](en-image-4av2.webp) > [!NOTE] -> Each signer's wallet must have a small amount of FIL to cover the gas fee. - -![Approve pool access](en-image-323.webp) - -7. **Confirmed approval** - -Once the required number of signers have approved, the approval transaction will be executed.If you don't see immediate updates, try refreshing the page or reconnecting your wallet after a few minutes. - -You can check the transaction details on the “**Transactions**” page at the bottom of the **Multisig** page, where the method column will display “**Approve**”. - -![Approve pool access](en-image-277.webp) - -*** - -## Step 2: Withdraw from the Infinity Pool - -After completing Step 1, the Infinity Pool is now allowed to transfer the specified amount of iFIL entered in Step 1. - -1. **Initiate the withdrawal** - -Return to the “**Tokens**” section in your multisig wallet. Click on the “**⋯**” button next to your iFIL balance and select “**Withdraw from Pool**” again. - -![Withdraw button](en-image-324.webp) - -You should see a small checkmark next to “**Approve the Infinity Pool to transfer your iFIL**”. Then, you can proceed to **Step 2 to initiate the withdrawal!** - -If you need to withdraw more than the previously approved amount, you will need to return to Step 1. - -![Approve pool access](en-image-330.webp) - -2. **Confirm withdrawal** - -You will now see step 2, “**Withdraw from the Infinity Pool**”. Confirm the details and click “**Withdraw**”. - -![Withdraw button](en-image-4.webp) - -3. **Create another withdrawal proposal** - -Confirm the transaction in the wallet to create the proposal. - -Then, a new multisig proposal will be created for the withdrawal transaction. You can check the details of this proposal in the “**Multisig proposals**” section. - -![Create multisig](en-image-5.webp) - -4. **Approve the Withdrawal Proposal** - -Now, _similar to step 1_, **the proposer's wallet** should be disconnected. **Other signers** need to connect their wallets and approve the proposal. - -Then, navigate to the “**Multisig Proposals**” section in your multisig wallet interface. Locate the pending proposal, created by the proposer's wallet. Click “**Approve proposal**” and confirm the approval in the **other signers' wallets.** - -5. **Check the transactions** - -Once the required number of signers have approved, the transaction will be executed. Please wait if you cannot see the transaction immediately, as it may take a few minutes for it to be confirmed on the network. - -You can check the transaction details in the “**Transactions**” section at the bottom of the multisig page. - -![Approve proposal](en-image-6.webp) +> You must approve the "Approve" proposal before you can approve the "RedeemF" proposal. -6. **Complete the Withdrawal** +8. **Complete the Withdrawal** Once the required approvals are obtained, the withdrawal transaction will be executed. Your iFIL will be converted back to FIL and deposited to your multisig wallet. Check the “**Filecoin Balance**” section to confirm your updated FIL balance. diff --git a/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/4-cong-glif-ti-qu-fil.md b/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/4-cong-glif-ti-qu-fil.md index 0c23f3c..ab1b24e 100644 --- a/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/4-cong-glif-ti-qu-fil.md +++ b/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/4-cong-glif-ti-qu-fil.md @@ -18,43 +18,38 @@ 1. 在 “**池**” 页面中,点击 “**取款**” 选项。 2. 输入您想要赎回的 iFIL 数量,将会显示相应可获得的 FIL 数量。请[点击此处](/liu-dong-xing-ti-gong-zhe/glif-jiang-li-ji-zhi-ifil)了解更多关于 iFIL 的信息。 -3. 点击 “**批准**”。 +3. 点击 “**取款**”。 -![步骤 2:前往 “池” 页面](cn-image-79.webp) +![步骤 2:前往 “池” 页面](cn-image-79av2.webp) ## 步骤 3:提交第 1 笔交易(共 2 笔)— 批准GLIF池转账 GLIF 智能合约需要获得权限,才能使用您的 iFIL 代币来处理提取要求。 -1. 点击 “Approve”。 +1. 点击 “**批准iFIL转帐**”。 -![步骤 3:提交第 1 笔交易(](cn-image-82.webp) +![步骤 3:提交第 1 笔交易(](cn-image-82av2.webp) -2. 点击 “确认”——请注意您可以只批准想要赎回的那部分 iFIL 数量,也可以批准 “max”,这样今后提取时就不需要重复进行该批准步骤。 - -![步骤 3:提交第 1 笔交易(](cn-image-84.webp) +2. 在钱包点击 “**确认**” ## 步骤 4:提交第 2 笔交易(共 2 笔)— 提取 FIL -1. 稍等片刻(大约 1 ~ 2 分钟),您会看到交易成功的通知。在批准交易成功后,您就可以进行提取操作,点击 “**取款**”。 - -![步骤 4:提交第 2 笔交易(](cn-image-85.webp) +1. 稍等片刻(大约 1 ~ 2 分钟),在批准交易成功后,您就可以进行提取操作,点击 “**取款**”。 -2. 在 MetaMask 中点击 “**确认**”。 +![步骤 4:提交第 2 笔交易(](cn-image-85av2.webp) -![MetaMask prompt](cn-image-86.webp) +2. 在钱包点击 “**确认**”。 -3. 等待片刻,您会在右下角看到交易完成的提示。提取成功! - -![步骤 4:提交第 2 笔交易(](cn-image-87.webp) +3. 等待片刻,提取成功! ## 步骤 5:查看您的 FIL 余额 1. 在提取 FIL 后,您的钱包将增加相应数量的 FIL 。如需查看更详细的持仓信息,请点击 GLIF 左上方的 “**钱包**”。 -2. 您可以在 “Account” 标签下查看钱包中的 FIL 和 iFIL 余额。 +2. 您可以在 "**代币**" 标签下查看钱包中的 FIL 和 iFIL 余额。 ![步骤 5:查看您的 FIL 余](cn-image-89.webp) ## 结论 恭喜您成功从 GLIF 提取了 FIL! + diff --git a/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/5-ru-he-shi-yong-duo-qian-qian-bao-cong-glif-ti-qu-fil.md b/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/5-ru-he-shi-yong-duo-qian-qian-bao-cong-glif-ti-qu-fil.md index 8a154be..d5cdd47 100644 --- a/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/5-ru-he-shi-yong-duo-qian-qian-bao-cong-glif-ti-qu-fil.md +++ b/apps/www/docs/zh/7-gu-zhang-pai-cha/2-cao-zuo-jiao-cheng/1-cao-zuo-jiao-cheng-liu-dong-xing-ti-gong-zhe/2-shi-yong-glif-chi-cun-ru-he-ti-qu/5-ru-he-shi-yong-duo-qian-qian-bao-cong-glif-ti-qu-fil.md @@ -15,119 +15,54 @@ *** -## 第一步:批准 Infinity Pool 转移您的 iFIL - -1\. 访问您的多签钱包 +1. **打开您的多签钱包** 打开 [GLIF 网站](https://www.glif.io/zh),进入“**多重签名钱包**”标签页。确保您的钱包已连接,并且查看您的多签钱包。 -![第一步:批准 Infinity](cn-image-325.webp) +![第一步:批准 Infinity](cn-image-325a.webp) -2\. 发起提取授权 +2. **发起提取授权** 在“**代币**”区域,点击 iFIL 余额旁边的“**…**”图标。从下拉菜单中选择“**从池中提取**”。 -![第一步:批准 Infinity](cn-image-324.webp) - -3\. 输入要提取的数量 - -输入想要提取的 iFIL 数量。点击“Approve”,允许 GLIF 池转移您的 iFIL。 - -> [!NOTE] -> 在网站左侧边栏,您会看到第一步 “Approve the Infinity Pool to transfer your iFIL” 。 - -![第一步:批准 Infinity](cn-image-327.webp) - -4\. 创建授权提案 - -您所连接的钱包将弹出提示,确认交易以创建授权提案。该过程可能需要几分钟,以等待网络确认。 - -当提案获得批准后,您就可以提取这部分 iFIL。 - -如果弹窗提示您可点击“**View Proposal**”,请点击查看;若没有弹窗提示,可在多签页面的“**多重签名钱包提案**”中查看提案。 - -![第一步:批准 Infinity](cn-image-328.webp) - -5\. 其他签名人连接钱包并查看提案 - -发起提案的钱包(即 proposer's wallet)应先断开连接。 - -当其他签名人连接到 GLIF 网站后,进入多签页面的“多重签名钱包提案”查看该待批准提案。 - -![第一步:批准 Infinity](cn-image-329.webp) - -6\. 其他签名人批准提案 - -选中相应提案,点击“**批准提案**”,并在弹出的钱包中确认批准。 +![第一步:批准 Infinity](cn-image-324a.webp) -> [!TIP] -> 每位签名人的钱包中都需要少量 FIL(0.001 FIL 即可)用于支付 Gas 。 +3. **授权 iFIL 转移** -![第一步:批准 Infinity](cn-image-330.webp) +输入您希望提取的 iFIL 金额。点击 “**批准 iFIL 转帐**” 以允许 GLIF 资金池转移您的 iFIL。在钱包中确认交易并等待处理完成。 -7\. 确认通过 +![](cn-image-1av2.webp) -1. 当达到所需的签名人数后,授权交易即会执行。 -2. 如果未及时看到更新,可等待几分钟后刷新页面或重新连接钱包。 -3. 您可以在多签页面底部的“交易”区域查看交易详情,“方法” 列会显示 “Approve”。 +4. **发起取款** -![第一步:批准 Infinity](cn-image-333.webp) +点击 “**取款**” ,在钱包中确认交易并等待处理完成。 -*** - -## 第二步:从 Infinity Pool 提取 - -完成第一步后,Infinity Pool 已获准转移第一步中指定的 iFIL 数量。 - -1\. 发起提取 - -返回多签钱包的“代币”区域。点击 iFIL 余额旁的“**…**”图标,再次选择“**从池中提取**”。 - -![第二步:从 Infinity](cn-image-334.webp) - -您会在“Approve the Infinity Pool to transfer your iFIL”处看到一个小的对勾图标,这表明已完成授权,现在可以进行第二步来发起提取。 - -如果需要提取超过已授权数量的 iFIL,则需重新回到第一步进行授权。 - -![第二步:从 Infinity](cn-image-335.webp) +![](cn-image-2av2.webp) -2\. 确认提取 +5. **以其他签署人身份访问提案** -现在您会看到第二步 “Withdraw from the Infinity Pool”。检查信息后点击“取款”。 +确认交易后,系统将自动生成两个多签提案:“**Approve**” 和 “**RedeemF**”。 -![第二步:从 Infinity](cn-image-336.webp) +连接其他签署人的钱包,点击 **管理员** 部分,找到待处理的提案。 -3\. 创建新的提取提案 +点击提案旁边的勾选标记。 -在钱包中确认此笔交易,以创建提案。系统将生成一个新的关于提取交易的多签提案,您可以在“**多重签名钱包提案**”区域查看其详细信息。 +![](cn-image-3av2.webp) -![第二步:从 Infinity](cn-image-337.webp) +6. **确认提案** -4\. 批准提取提案 +点击 “**批准**” 并在所有签署人钱包中确认。 -和第一步类似,发起提案的钱包应断开连接,让其他签名人连接并查看提案。 +![](cn-image-4av2.webp) -在多签钱包的“**多重签名钱包提案**”区域找到此待处理提案。 - -点击“**批准提案**”,并在弹出的钱包中确认批准。 - -![第二步:从 Infinity](cn-image-338.webp) - -5\. 查看交易 - -当满足必要的签名人数后,交易会被执行。若暂时未看到交易结果,请稍等几分钟,以等待网络确认。 - -您可以在多签页面底部的“交易”区域查看提取交易的详情。 - -![第二步:从 Infinity](cn-image-341.webp) - -6\. 完成提取 +> [!NOTE] +> 您必须先批准 “**Approve**” 提案,然后才能批准 “**RedeemF**” 提案。 -当提案获得所有必须的批准后,提取交易将被执行。您的 iFIL 会被转换回 FIL 并存入多签钱包中。 +7. **完成提取** -您可以在“Filecoin 余额”栏查看更新后的 FIL 余额。 +获得所需数量的批准后,提取交易将被执行。您的 iFIL 将被转换回 FIL 并存入您的多签钱包。您可以在 “**代币**” 部分确认更新后的 FIL 余额。 -![第二步:从 Infinity](cn-image-343.webp) +![](cn-image-89av2.webp) **恭喜您!您已经成功使用多签钱包从 GLIF 提取了所存入的 FIL。** diff --git a/apps/www/public/docs/img/cn-image-1av2.webp b/apps/www/public/docs/img/cn-image-1av2.webp new file mode 100644 index 0000000..065cb1c Binary files /dev/null and b/apps/www/public/docs/img/cn-image-1av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-2av2.webp b/apps/www/public/docs/img/cn-image-2av2.webp new file mode 100644 index 0000000..c14f338 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-2av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-324.webp b/apps/www/public/docs/img/cn-image-324.webp deleted file mode 100644 index c8c9900..0000000 Binary files a/apps/www/public/docs/img/cn-image-324.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-324a.webp b/apps/www/public/docs/img/cn-image-324a.webp new file mode 100644 index 0000000..078f4c3 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-324a.webp differ diff --git a/apps/www/public/docs/img/cn-image-325.webp b/apps/www/public/docs/img/cn-image-325.webp deleted file mode 100644 index 42679a3..0000000 Binary files a/apps/www/public/docs/img/cn-image-325.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-325a.webp b/apps/www/public/docs/img/cn-image-325a.webp new file mode 100644 index 0000000..6dcb443 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-325a.webp differ diff --git a/apps/www/public/docs/img/cn-image-327.webp b/apps/www/public/docs/img/cn-image-327.webp deleted file mode 100644 index df4f477..0000000 Binary files a/apps/www/public/docs/img/cn-image-327.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-328.webp b/apps/www/public/docs/img/cn-image-328.webp deleted file mode 100644 index ce7830e..0000000 Binary files a/apps/www/public/docs/img/cn-image-328.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-329.webp b/apps/www/public/docs/img/cn-image-329.webp deleted file mode 100644 index 890db03..0000000 Binary files a/apps/www/public/docs/img/cn-image-329.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-330.webp b/apps/www/public/docs/img/cn-image-330.webp deleted file mode 100644 index 3528d97..0000000 Binary files a/apps/www/public/docs/img/cn-image-330.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-333.webp b/apps/www/public/docs/img/cn-image-333.webp deleted file mode 100644 index 5568c90..0000000 Binary files a/apps/www/public/docs/img/cn-image-333.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-334.webp b/apps/www/public/docs/img/cn-image-334.webp deleted file mode 100644 index c8c9900..0000000 Binary files a/apps/www/public/docs/img/cn-image-334.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-335.webp b/apps/www/public/docs/img/cn-image-335.webp deleted file mode 100644 index c4f2082..0000000 Binary files a/apps/www/public/docs/img/cn-image-335.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-336.webp b/apps/www/public/docs/img/cn-image-336.webp deleted file mode 100644 index 5d1b3c4..0000000 Binary files a/apps/www/public/docs/img/cn-image-336.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-337.webp b/apps/www/public/docs/img/cn-image-337.webp deleted file mode 100644 index 55ec079..0000000 Binary files a/apps/www/public/docs/img/cn-image-337.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-338.webp b/apps/www/public/docs/img/cn-image-338.webp deleted file mode 100644 index 65c890a..0000000 Binary files a/apps/www/public/docs/img/cn-image-338.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-341.webp b/apps/www/public/docs/img/cn-image-341.webp deleted file mode 100644 index 850c975..0000000 Binary files a/apps/www/public/docs/img/cn-image-341.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-343.webp b/apps/www/public/docs/img/cn-image-343.webp deleted file mode 100644 index 5f6f33a..0000000 Binary files a/apps/www/public/docs/img/cn-image-343.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-3av2.webp b/apps/www/public/docs/img/cn-image-3av2.webp new file mode 100644 index 0000000..26bd3d4 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-3av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-4av2.webp b/apps/www/public/docs/img/cn-image-4av2.webp new file mode 100644 index 0000000..918a11a Binary files /dev/null and b/apps/www/public/docs/img/cn-image-4av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-79.webp b/apps/www/public/docs/img/cn-image-79.webp deleted file mode 100644 index 5418089..0000000 Binary files a/apps/www/public/docs/img/cn-image-79.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-79av2.webp b/apps/www/public/docs/img/cn-image-79av2.webp new file mode 100644 index 0000000..1a1867f Binary files /dev/null and b/apps/www/public/docs/img/cn-image-79av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-82.webp b/apps/www/public/docs/img/cn-image-82.webp deleted file mode 100644 index d7baa8d..0000000 Binary files a/apps/www/public/docs/img/cn-image-82.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-82av2.webp b/apps/www/public/docs/img/cn-image-82av2.webp new file mode 100644 index 0000000..e6a8895 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-82av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-84.webp b/apps/www/public/docs/img/cn-image-84.webp deleted file mode 100644 index 059e1b0..0000000 Binary files a/apps/www/public/docs/img/cn-image-84.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-85.webp b/apps/www/public/docs/img/cn-image-85.webp deleted file mode 100644 index bd128fd..0000000 Binary files a/apps/www/public/docs/img/cn-image-85.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-85av2.webp b/apps/www/public/docs/img/cn-image-85av2.webp new file mode 100644 index 0000000..4f0a368 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-85av2.webp differ diff --git a/apps/www/public/docs/img/cn-image-86.webp b/apps/www/public/docs/img/cn-image-86.webp deleted file mode 100644 index 9c04098..0000000 Binary files a/apps/www/public/docs/img/cn-image-86.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-87.webp b/apps/www/public/docs/img/cn-image-87.webp deleted file mode 100644 index 75d8191..0000000 Binary files a/apps/www/public/docs/img/cn-image-87.webp and /dev/null differ diff --git a/apps/www/public/docs/img/cn-image-89.webp b/apps/www/public/docs/img/cn-image-89.webp index 3174970..7c82564 100644 Binary files a/apps/www/public/docs/img/cn-image-89.webp and b/apps/www/public/docs/img/cn-image-89.webp differ diff --git a/apps/www/public/docs/img/cn-image-89av2.webp b/apps/www/public/docs/img/cn-image-89av2.webp new file mode 100644 index 0000000..15eb299 Binary files /dev/null and b/apps/www/public/docs/img/cn-image-89av2.webp differ diff --git a/apps/www/public/docs/img/en-image-1.webp b/apps/www/public/docs/img/en-image-1.webp deleted file mode 100644 index 7ea53d2..0000000 Binary files a/apps/www/public/docs/img/en-image-1.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-177.webp b/apps/www/public/docs/img/en-image-177.webp deleted file mode 100644 index 29fd1c5..0000000 Binary files a/apps/www/public/docs/img/en-image-177.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-184.webp b/apps/www/public/docs/img/en-image-184.webp deleted file mode 100644 index 1e3aa00..0000000 Binary files a/apps/www/public/docs/img/en-image-184.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-185.webp b/apps/www/public/docs/img/en-image-185.webp deleted file mode 100644 index 47bf1b4..0000000 Binary files a/apps/www/public/docs/img/en-image-185.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-1av2.webp b/apps/www/public/docs/img/en-image-1av2.webp new file mode 100644 index 0000000..460da06 Binary files /dev/null and b/apps/www/public/docs/img/en-image-1av2.webp differ diff --git a/apps/www/public/docs/img/en-image-1h.webp b/apps/www/public/docs/img/en-image-1h.webp new file mode 100644 index 0000000..36b23ad Binary files /dev/null and b/apps/www/public/docs/img/en-image-1h.webp differ diff --git a/apps/www/public/docs/img/en-image-2.webp b/apps/www/public/docs/img/en-image-2.webp deleted file mode 100644 index d91fd66..0000000 Binary files a/apps/www/public/docs/img/en-image-2.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-277.webp b/apps/www/public/docs/img/en-image-277.webp deleted file mode 100644 index d68dc8c..0000000 Binary files a/apps/www/public/docs/img/en-image-277.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-2av2.webp b/apps/www/public/docs/img/en-image-2av2.webp new file mode 100644 index 0000000..22ae729 Binary files /dev/null and b/apps/www/public/docs/img/en-image-2av2.webp differ diff --git a/apps/www/public/docs/img/en-image-3.webp b/apps/www/public/docs/img/en-image-3.webp deleted file mode 100644 index 873c0b7..0000000 Binary files a/apps/www/public/docs/img/en-image-3.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-323.webp b/apps/www/public/docs/img/en-image-323.webp deleted file mode 100644 index 7546ca4..0000000 Binary files a/apps/www/public/docs/img/en-image-323.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-324.webp b/apps/www/public/docs/img/en-image-324.webp deleted file mode 100644 index 6d6ae8e..0000000 Binary files a/apps/www/public/docs/img/en-image-324.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-330.webp b/apps/www/public/docs/img/en-image-330.webp deleted file mode 100644 index ad87e9d..0000000 Binary files a/apps/www/public/docs/img/en-image-330.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-343.webp b/apps/www/public/docs/img/en-image-343.webp deleted file mode 100644 index 441acc5..0000000 Binary files a/apps/www/public/docs/img/en-image-343.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-383.webp b/apps/www/public/docs/img/en-image-383.webp deleted file mode 100644 index b57539f..0000000 Binary files a/apps/www/public/docs/img/en-image-383.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-383b.webp b/apps/www/public/docs/img/en-image-383b.webp new file mode 100644 index 0000000..4445c63 Binary files /dev/null and b/apps/www/public/docs/img/en-image-383b.webp differ diff --git a/apps/www/public/docs/img/en-image-384.webp b/apps/www/public/docs/img/en-image-384.webp deleted file mode 100644 index 229ce54..0000000 Binary files a/apps/www/public/docs/img/en-image-384.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-385.webp b/apps/www/public/docs/img/en-image-385.webp deleted file mode 100644 index 554d298..0000000 Binary files a/apps/www/public/docs/img/en-image-385.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-385b.webp b/apps/www/public/docs/img/en-image-385b.webp new file mode 100644 index 0000000..51023b0 Binary files /dev/null and b/apps/www/public/docs/img/en-image-385b.webp differ diff --git a/apps/www/public/docs/img/en-image-3bv2.webp b/apps/www/public/docs/img/en-image-3bv2.webp new file mode 100644 index 0000000..d7ff5f2 Binary files /dev/null and b/apps/www/public/docs/img/en-image-3bv2.webp differ diff --git a/apps/www/public/docs/img/en-image-4.webp b/apps/www/public/docs/img/en-image-4.webp deleted file mode 100644 index 75ed9de..0000000 Binary files a/apps/www/public/docs/img/en-image-4.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-4av2.webp b/apps/www/public/docs/img/en-image-4av2.webp new file mode 100644 index 0000000..362697c Binary files /dev/null and b/apps/www/public/docs/img/en-image-4av2.webp differ diff --git a/apps/www/public/docs/img/en-image-5.webp b/apps/www/public/docs/img/en-image-5.webp deleted file mode 100644 index 419b828..0000000 Binary files a/apps/www/public/docs/img/en-image-5.webp and /dev/null differ diff --git a/apps/www/public/docs/img/en-image-6.webp b/apps/www/public/docs/img/en-image-6.webp deleted file mode 100644 index 8d23084..0000000 Binary files a/apps/www/public/docs/img/en-image-6.webp and /dev/null differ diff --git a/package.json b/package.json index bba88be..967137c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "dev": "turbo run dev", "tsc": "turbo run tsc", "lint": "eslint .", - "fix": "eslint --fix ." + "fix": "eslint --fix .", + "check:images": "bash scripts/check-images.sh" }, "devDependencies": { "@formatjs/intl-localematcher": "^0.8.1", diff --git a/scripts/check-images.sh b/scripts/check-images.sh new file mode 100644 index 0000000..2c9b868 --- /dev/null +++ b/scripts/check-images.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# +# Check for orphaned and missing images across all apps. +# Exits 0 if clean, 1 if any issues found. + +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" +errors=0 + +for app_dir in "$REPO_ROOT"/apps/*/; do + app="$(basename "$app_dir")" + docs_dir="$app_dir/docs" + img_dir="$app_dir/public/docs/img" + + # Skip apps without a docs folder + [[ -d "$docs_dir" ]] || continue + + # Collect referenced images from markdown (bare filenames, skip external URLs) + referenced=$(grep -roh '!\[[^]]*\]([^)]*)' "$docs_dir" --include='*.md' \ + | sed 's/.*](//' | sed 's/)$//' \ + | grep -v '^https\?://' \ + | sort -u) + + # Collect actual image files (relative to img/ dir) + if [[ -d "$img_dir" ]]; then + actual=$(find "$img_dir" -type f -printf '%f\n' | sort -u) + else + actual="" + fi + + # Compare + missing=$(comm -23 <(echo "$referenced") <(echo "$actual")) + orphaned=$(comm -13 <(echo "$referenced") <(echo "$actual")) + + # Report + if [[ -n "$missing" || -n "$orphaned" ]]; then + echo "=== $app ===" + if [[ -n "$missing" ]]; then + missing_count=$(echo "$missing" | wc -l) + echo " Missing images ($missing_count):" + echo "$missing" | sed 's/^/ /' + errors=1 + fi + if [[ -n "$orphaned" ]]; then + orphaned_count=$(echo "$orphaned" | wc -l) + echo " Orphaned images ($orphaned_count):" + echo "$orphaned" | sed 's/^/ /' + errors=1 + fi + echo + else + echo "=== $app === OK" + fi +done + +if [[ "$errors" -eq 0 ]]; then + echo "All apps clean." +else + echo "Image integrity check failed." +fi + +exit "$errors"