Skip to content

Commit

Permalink
chore: Release v0.0.1-alpha.17 (RSSNext#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod authored Sep 23, 2024
2 parents 103c2bf + bbe9b0d commit e2ba869
Show file tree
Hide file tree
Showing 90 changed files with 2,566 additions and 678 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/auto-fix-lint-format-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Auto Fix Lint and Format

on:
pull_request_target:
types: [opened, synchronize]

jobs:
auto-fix:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Setup pnpm
uses: pnpm/action-setup@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run linter and fix issues
run: pnpm run lint:fix

- name: Run formatter
run: pnpm run format

- name: Check for changes
id: check_changes
run: |
git diff --exit-code || echo "has_changes=true" >> $GITHUB_ENV
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true' || env.has_changes == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: auto-fix linting and formatting issues"
commit_options: "--no-verify"
file_pattern: "."

- name: Add PR comment
if: steps.check_changes.outputs.has_changes == 'true' || env.has_changes == 'true'
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Linting and formatting issues were automatically fixed. Please review the changes.'
});
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ jobs:
fetch-depth: 1
lfs: true

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ matrix.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ matrix.os }}-
- name: Setup pnpm
uses: pnpm/action-setup@v4

Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,36 @@ jobs:
if: runner.os == 'macOS'
run: pnpm add -g appdmg

# ... (macOS certificate and provisioning profile setup steps) ...
- name: Install the Apple certificate and provisioning profile
if: runner.os == 'macOS'
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.provisionprofile
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Install dependencies
run: pnpm i
Expand Down
26 changes: 25 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@egjs/react-infinitegrid": "4.12.0",
"@egoist/tipc": "0.3.2",
"@electron-toolkit/preload": "^3.0.1",
"@follow/electron-main": "workspace:*",
Expand Down Expand Up @@ -71,6 +70,7 @@
"lethargy": "1.0.9",
"linkedom": "^0.18.5",
"lodash-es": "4.17.21",
"masonic": "4.0.1",
"nanoid": "5.0.7",
"ofetch": "1.4.0",
"path-to-regexp": "8.1.0",
Expand Down
3 changes: 2 additions & 1 deletion apps/renderer/src/@types/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const currentSupportedLanguages = [
"it",
"ru",
"es",
"ko",
]

export const dayjsLocaleImportMap = {
en: ["en", () => import("dayjs/locale/en")],
["zh-CN"]: ["zh-cn", () => import("dayjs/locale/zh-cn")],
Expand All @@ -38,6 +38,7 @@ export const dayjsLocaleImportMap = {
["ar-KW"]: ["ar-kw", () => import("dayjs/locale/ar-kw")],
["ar-TN"]: ["ar-tn", () => import("dayjs/locale/ar-tn")],
["zh-HK"]: ["zh-hk", () => import("dayjs/locale/zh-hk")],
["ko"]: ["ko", () => import("dayjs/locale/ko")],
}
export const ns = ["app", "common", "lang", "settings", "shortcuts", "errors"] as const
export const defaultNS = "app" as const
3 changes: 3 additions & 0 deletions apps/renderer/src/@types/default-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import common_fi from "../../../../locales/common/fi.json"
import common_fr from "../../../../locales/common/fr.json"
import common_it from "../../../../locales/common/it.json"
import common_ja from "../../../../locales/common/ja.json"
import common_ko from "../../../../locales/common/ko.json"
import common_pt from "../../../../locales/common/pt.json"
import common_ru from "../../../../locales/common/ru.json"
import common_zhCN from "../../../../locales/common/zh-CN.json"
Expand All @@ -31,6 +32,7 @@ import lang_fi from "../../../../locales/lang/fi.json"
import lang_fr from "../../../../locales/lang/fr.json"
import lang_it from "../../../../locales/lang/it.json"
import lang_ja from "../../../../locales/lang/ja.json"
import lang_ko from "../../../../locales/lang/ko.json"
import lang_pt from "../../../../locales/lang/pt.json"
import lang_ru from "../../../../locales/lang/ru.json"
import lang_zhCN from "../../../../locales/lang/zh-CN.json"
Expand Down Expand Up @@ -75,4 +77,5 @@ export const defaultResources = {
"ar-IQ": { lang: lang_ariq, common: common_ariq },
"ar-KW": { lang: lang_arkw, common: common_arkw },
"ar-TN": { lang: lang_artn, common: common_artn },
ko: { lang: lang_ko, common: common_ko },
}
5 changes: 1 addition & 4 deletions apps/renderer/src/components/feed-certification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ export const FeedCertification = ({
<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<i
className={cn(
"i-mgc-certificate-cute-fi ml-1.5 size-4 shrink-0 text-amber-500",
className,
)}
className={cn("i-mgc-certificate-cute-fi ml-1.5 shrink-0 text-amber-500", className)}
/>
</TooltipTrigger>

Expand Down
18 changes: 10 additions & 8 deletions apps/renderer/src/components/feed-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Avatar, AvatarFallback, AvatarImage } from "@radix-ui/react-avatar"
import { m } from "framer-motion"
import type { ReactNode } from "react"
import { forwardRef, useMemo } from "react"

Expand Down Expand Up @@ -145,7 +146,7 @@ export function FeedIcon({

ImageElement = (
<PlatformIcon url={siteUrl} style={sizeStyle} className={cn("center mr-2", className)}>
<img style={sizeStyle} />
<m.img style={sizeStyle} initial={{ opacity: 0 }} animate={{ opacity: 1 }} />
</PlatformIcon>
)
break
Expand All @@ -158,7 +159,12 @@ export function FeedIcon({
})
ImageElement = (
<PlatformIcon url={image} style={sizeStyle} className={cn("center mr-2", className)}>
<img className={cn("mr-2", className)} style={sizeStyle} />
<m.img
className={cn("mr-2", className)}
style={sizeStyle}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
/>
</PlatformIcon>
)
break
Expand Down Expand Up @@ -207,11 +213,7 @@ export function FeedIcon({
if (fallback && !!finalSrc) {
return (
<Avatar className="shrink-0">
<AvatarImage
className="rounded-sm object-cover duration-200 animate-in fade-in-0"
asChild
src={finalSrc}
>
<AvatarImage className="rounded-sm object-cover" asChild src={finalSrc}>
{ImageElement}
</AvatarImage>
<AvatarFallback asChild>{fallbackIcon}</AvatarFallback>
Expand All @@ -224,7 +226,7 @@ export function FeedIcon({
// Else
return (
<Avatar className="shrink-0">
<AvatarImage className="duration-200 animate-in fade-in-0" asChild src={finalSrc}>
<AvatarImage asChild src={finalSrc}>
{ImageElement}
</AvatarImage>
<AvatarFallback>
Expand Down
Loading

0 comments on commit e2ba869

Please sign in to comment.