Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
with:
version: ${{ env.PNPM_VERSION }}

- name: Install formatter
run: pnpm install -D -w oxfmt
- name: Install
run: pnpm install --ignore-scripts

- name: Get changed files
- name: Get changed files and write to temp
id: get-changed-files
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
script: |
const changedFiles = await github.paginate(
Expand All @@ -51,11 +51,13 @@ jobs:
pull_number: context.payload.pull_request.number,
}
);
return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' ');
const files = changedFiles.filter(file=> file.status !== "removed").map(file => file.filename);
if (files.length > 0) {
require('fs').writeFileSync('/tmp/changed-files.txt', files.join('\0'));
core.setOutput('has-files', 'true');
}

- name: Check formatting (changed files)
if: steps.get-changed-files.outputs.has-files == 'true'
run: |
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
if [ -n "$CHANGED_FILES" ]; then
pnpm oxfmt $CHANGED_FILES --check --no-error-on-unmatched-pattern
fi
xargs -0 pnpm oxfmt --check --no-error-on-unmatched-pattern < /tmp/changed-files.txt
21 changes: 11 additions & 10 deletions .github/workflows/fix-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
with:
version: ${{ env.PNPM_VERSION }}

- name: Install formatter
run: pnpm install -D -w oxfmt --ignore-scripts
- name: Install
run: pnpm install --ignore-scripts

- name: Get changed files
- name: Get changed files and write to temp
id: get-changed-files
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
script: |
const changedFiles = await github.paginate(
Expand All @@ -49,15 +49,16 @@ jobs:
pull_number: context.payload.pull_request.number,
}
);
return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' ');
const files = changedFiles.filter(file=> file.status !== "removed").map(file => file.filename);
if (files.length > 0) {
require('fs').writeFileSync('/tmp/changed-files.txt', files.join('\0'));
core.setOutput('has-files', 'true');
}

- name: Fix formatting
env:
CHANGED_FILES: ${{ steps.get-changed-files.outputs.result }}
if: steps.get-changed-files.outputs.has-files == 'true'
run: |
if [ -n "$CHANGED_FILES" ]; then
echo "$CHANGED_FILES" | tr ' ' '\n' | xargs pnpm oxfmt --no-error-on-unmatched-pattern
fi
xargs -0 pnpm oxfmt --no-error-on-unmatched-pattern < /tmp/changed-files.txt

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function BlockedUsersTab() {
return (
<Section
title="blocked users"
fa={{ icon: "fa-user-shield" }}
fa={{ icon: "fa-ban" }}
fullWidth
description=<>Blocked users cannot send you friend requests.</>
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ function getColumns(): DataTableColumnDef<Connection>[] {
/>
<Button
onClick={() => void blockConnection({ id: info.getValue() })}
balloon={{ text: "block" }}
fa={{ icon: "fa-shield-alt", fixedWidth: true }}
balloon={{ text: "block user" }}
fa={{ icon: "fa-ban", fixedWidth: true }}
/>
</div>
),
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/ts/states/account-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const accountSettingsTabs: Record<
> = {
account: { text: "account", icon: "fa-user" },
authentication: { text: "authentication", icon: "fa-key" },
blockedUsers: { text: "blocked users", icon: "fa-user-shield" },
blockedUsers: { text: "blocked users", icon: "fa-ban" },
apeKeys: { text: "ape keys", icon: "fa-code" },
dangerZone: { text: "danger zone", icon: "fa-exclamation-triangle" },
};
Expand Down
Loading