Merge pull request #235 from donetick/eslint3

ran npx prettier -w .
This commit is contained in:
Mohamad Tarbin
2026-08-16 15:38:12 -04:00
committed by GitHub
18 changed files with 72 additions and 73 deletions

View File

@@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Use Node.js 20 - name: Use Node.js 20
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20.x
cache: 'npm' cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm i run: npm i
- run: npm run build - run: npm run build
- run: npm run lint:ci - run: npm run lint:ci

View File

@@ -12,15 +12,16 @@ Builds and (optionally) uploads signed Android and iOS release artifacts from th
Common flags on `release.sh`: Common flags on `release.sh`:
| Flag | Effect | | Flag | Effect |
|---|---| | --------------------- | ----------------------------------------------------- |
| `--android` / `--ios` | Build only one platform | | `--android` / `--ios` | Build only one platform |
| `--bump minor\|major` | Bump type (default: `patch`) | | `--bump minor\|major` | Bump type (default: `patch`) |
| `--skip-bump` | Build with the current version, don't bump | | `--skip-bump` | Build with the current version, don't bump |
| `--upload` | Upload after building | | `--upload` | Upload after building |
| `--track TRACK` | Play Store track for `--upload` (default: `internal`) | | `--track TRACK` | Play Store track for `--upload` (default: `internal`) |
Outputs: Outputs:
- Android: `android/app/build/outputs/bundle/release/app-release.aab` - Android: `android/app/build/outputs/bundle/release/app-release.aab`
- iOS: `build/ios/Donetick.ipa` - iOS: `build/ios/Donetick.ipa`
@@ -36,15 +37,15 @@ Outputs:
All secrets live in Vaultwarden (`https://www.bitwarden.com`) as Secure Notes, named exactly as below: All secrets live in Vaultwarden (`https://www.bitwarden.com`) as Secure Notes, named exactly as below:
| Vault item name | Written to | Encoding | | Vault item name | Written to | Encoding |
|---|---|---| | ------------------------------------ | ----------------------------------------------- | -------- |
| Donetick Google Services Android | `android/app/google-services.json` | raw | | Donetick Google Services Android | `android/app/google-services.json` | raw |
| Donetick Android Keystore | `android/app/release/donetick.jks` | base64 | | Donetick Android Keystore | `android/app/release/donetick.jks` | base64 |
| Donetick Keystore Password | (used inline for `android/keystore.properties`) | raw | | Donetick Keystore Password | (used inline for `android/keystore.properties`) | raw |
| Donetick Google Play Service Account | `android/play-service-account.json` | raw | | Donetick Google Play Service Account | `android/play-service-account.json` | raw |
| Donetick Google Services iOS | `ios/App/App/GoogleService-Info.plist` | raw | | Donetick Google Services iOS | `ios/App/App/GoogleService-Info.plist` | raw |
| Donetick App Store Connect Key | `ios/AuthKey_84F695CDQ3.p8` | base64 | | Donetick App Store Connect Key | `ios/AuthKey_84F695CDQ3.p8` | base64 |
| Donetick Env Production | `.env.production` | raw | | Donetick Env Production | `.env.production` | raw |
None of these files are committed to git — all covered by `.gitignore`. None of these files are committed to git — all covered by `.gitignore`.
@@ -57,6 +58,7 @@ The App target uses **manual signing for Release**, not Automatic. This was a de
- `fastlane/Fastfile`'s `ios release` lane passes explicit `export_options: { signingStyle: "manual", provisioningProfiles: {...} }` to `build_app` — do **not** switch this back to `-allowProvisioningUpdates`/automatic without a good reason, it re-triggers the ambiguous cert selection. - `fastlane/Fastfile`'s `ios release` lane passes explicit `export_options: { signingStyle: "manual", provisioningProfiles: {...} }` to `build_app` — do **not** switch this back to `-allowProvisioningUpdates`/automatic without a good reason, it re-triggers the ambiguous cert selection.
**If you ever add/change an entitlement** (new Capability in Signing & Capabilities, e.g. a new permission), the existing provisioning profile becomes stale and exports will fail with an error like `"App.app" requires a provisioning profile with the X feature`. Fix: **If you ever add/change an entitlement** (new Capability in Signing & Capabilities, e.g. a new permission), the existing provisioning profile becomes stale and exports will fail with an error like `"App.app" requires a provisioning profile with the X feature`. Fix:
1. developer.apple.com → Identifiers → `com.donetick.app` → confirm the new capability is checked 1. developer.apple.com → Identifiers → `com.donetick.app` → confirm the new capability is checked
2. developer.apple.com → Profiles → find `Donetick App Store(fastline)` → regenerate it → download 2. developer.apple.com → Profiles → find `Donetick App Store(fastline)` → regenerate it → download
3. Install it locally: get its UUID (`security cms -D -i <file>.mobileprovision | plutil -extract UUID xml1 -o - -`) and copy to `~/Library/MobileDevice/Provisioning Profiles/<uuid>.mobileprovision` 3. Install it locally: get its UUID (`security cms -D -i <file>.mobileprovision | plutil -extract UUID xml1 -o - -`) and copy to `~/Library/MobileDevice/Provisioning Profiles/<uuid>.mobileprovision`

View File

@@ -21,17 +21,13 @@
{ {
"minApi": 28, "minApi": 28,
"maxApi": 30, "maxApi": 30,
"baselineProfiles": [ "baselineProfiles": ["baselineProfiles/1/app-release.dm"]
"baselineProfiles/1/app-release.dm"
]
}, },
{ {
"minApi": 31, "minApi": 31,
"maxApi": 2147483647, "maxApi": 2147483647,
"baselineProfiles": [ "baselineProfiles": ["baselineProfiles/0/app-release.dm"]
"baselineProfiles/0/app-release.dm"
]
} }
], ],
"minSdkVersionForDexing": 28 "minSdkVersionForDexing": 28
} }

View File

@@ -1 +1 @@
{"version":1,"sessions":{}} { "version": 1, "sessions": {} }

View File

@@ -1,7 +1,7 @@
# Crowdin configuration for Donetick # Crowdin configuration for Donetick
# See: https://support.crowdin.com/configuration-file/ # See: https://support.crowdin.com/configuration-file/
project_id: "donetick" project_id: 'donetick'
api_token_env: CROWDIN_API_TOKEN api_token_env: CROWDIN_API_TOKEN
preserve_hierarchy: true preserve_hierarchy: true

View File

@@ -31,8 +31,7 @@ Build a signed, App Store-ready .ipa
Upload the built .ipa to TestFlight Upload the built .ipa to TestFlight
---- ---
## Android ## Android
@@ -60,7 +59,7 @@ Build a signed release .apk (for sideloading/testing)
Upload the built .aab to the Play Store (internal testing track by default) Upload the built .aab to the Play Store (internal testing track by default)
---- ---
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

View File

@@ -4,4 +4,4 @@
"capacitor": {} "capacitor": {}
}, },
"type": "custom" "type": "custom"
} }

View File

@@ -11,4 +11,4 @@
"author": "xcode", "author": "xcode",
"version": 1 "version": 1
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"info" : { "info": {
"version" : 1, "version": 1,
"author" : "xcode" "author": "xcode"
} }
} }

View File

@@ -53,4 +53,4 @@
"version": 1, "version": 1,
"author": "xcode" "author": "xcode"
} }
} }

View File

@@ -8,4 +8,4 @@
} }
] ]
} }
} }

View File

@@ -492,4 +492,3 @@
} }
} }
} }

View File

@@ -72,4 +72,4 @@
"delete": "删除会话" "delete": "删除会话"
} }
} }
} }

View File

@@ -28,7 +28,7 @@ import { useTranslation } from 'react-i18next'
function MyComponent() { function MyComponent() {
const { t } = useTranslation('settings') // or 'common', 'chores' const { t } = useTranslation('settings') // or 'common', 'chores'
return <h1>{t('title')}</h1> return <h1>{t('title')}</h1>
} }
``` ```
@@ -40,9 +40,9 @@ import { useLocalization } from '@/contexts/LocalizationContext'
function MyComponent() { function MyComponent() {
const { formatDate, formatDateTime, formatRelative } = useLocalization() const { formatDate, formatDateTime, formatRelative } = useLocalization()
const date = new Date() const date = new Date()
return ( return (
<div> <div>
<p>Date: {formatDate(date)}</p> <p>Date: {formatDate(date)}</p>
@@ -59,19 +59,10 @@ function MyComponent() {
import { useLocalization } from '@/contexts/LocalizationContext' import { useLocalization } from '@/contexts/LocalizationContext'
function MyComponent() { function MyComponent() {
const { const { language, setLanguage, dateFormat, setDateFormat, isRTL } =
language, useLocalization()
setLanguage,
dateFormat, return <div dir={isRTL ? 'rtl' : 'ltr'}>Current language: {language}</div>
setDateFormat,
isRTL
} = useLocalization()
return (
<div dir={isRTL ? 'rtl' : 'ltr'}>
Current language: {language}
</div>
)
} }
``` ```
@@ -90,6 +81,7 @@ function MyComponent() {
## RTL Support ## RTL Support
Languages in the `RTL_LANGUAGES` array automatically get: Languages in the `RTL_LANGUAGES` array automatically get:
- `dir="rtl"` on the document - `dir="rtl"` on the document
- RTL-specific CSS styles - RTL-specific CSS styles
- Proper text alignment - Proper text alignment
@@ -99,6 +91,7 @@ Currently supported RTL languages: Arabic (ar), Hebrew (he), Persian (fa), Urdu
## Date Format Preferences ## Date Format Preferences
Users can choose from: Users can choose from:
- MM/DD/YYYY (US) - MM/DD/YYYY (US)
- DD/MM/YYYY (Europe) - DD/MM/YYYY (Europe)
- YYYY-MM-DD (ISO) - YYYY-MM-DD (ISO)
@@ -113,5 +106,6 @@ Users can choose from:
## First Day of Week ## First Day of Week
Users can choose: Users can choose:
- Sunday - Sunday
- Monday - Monday

View File

@@ -30,8 +30,6 @@ html {
border-radius: 4px; border-radius: 4px;
} }
/* Prevent iOS Safari from auto-zooming on input focus (triggered when font-size < 16px) */ /* Prevent iOS Safari from auto-zooming on input focus (triggered when font-size < 16px) */
@supports (-webkit-touch-callout: none) { @supports (-webkit-touch-callout: none) {
input, input,

View File

@@ -82,11 +82,15 @@
/* Height utilities that account for safe areas */ /* Height utilities that account for safe areas */
.min-h-screen-safe { .min-h-screen-safe {
min-height: calc(100vh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom)); min-height: calc(
100vh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom)
);
} }
.h-screen-safe { .h-screen-safe {
height: calc(100vh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom)); height: calc(
100vh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom)
);
} }
/* Top positioning that accounts for safe area */ /* Top positioning that accounts for safe area */

View File

@@ -57,11 +57,14 @@
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
background-color: var(--joy-palette-neutral-softBg, #f0f4f8); background-color: var(--joy-palette-neutral-softBg, #f0f4f8);
transition: box-shadow 0.15s ease, background-color 0.15s ease; transition:
box-shadow 0.15s ease,
background-color 0.15s ease;
} }
.quill-root:focus-within { .quill-root:focus-within {
box-shadow: 0 0 0 1px var(--joy-palette-primary-outlinedBorder, rgba(11, 107, 203, 0.15)); box-shadow: 0 0 0 1px
var(--joy-palette-primary-outlinedBorder, rgba(11, 107, 203, 0.15));
} }
.quill-root:hover:not(:focus-within) { .quill-root:hover:not(:focus-within) {
@@ -70,7 +73,8 @@
.quill-root .ql-toolbar.ql-snow { .quill-root .ql-toolbar.ql-snow {
border: none; border: none;
border-bottom: 1px solid var(--joy-palette-neutral-softActiveBg, rgba(99, 107, 116, 0.16)); border-bottom: 1px solid
var(--joy-palette-neutral-softActiveBg, rgba(99, 107, 116, 0.16));
border-radius: 0; border-radius: 0;
background: transparent; background: transparent;
box-shadow: none; box-shadow: none;

View File

@@ -93,11 +93,14 @@
border: none; border: none;
background-color: var(--joy-palette-neutral-softBg, #f0f4f8); background-color: var(--joy-palette-neutral-softBg, #f0f4f8);
overflow: auto; overflow: auto;
transition: box-shadow 0.15s ease, background-color 0.15s ease; transition:
box-shadow 0.15s ease,
background-color 0.15s ease;
} }
.task-input:focus-within { .task-input:focus-within {
box-shadow: 0 0 0 2px var(--joy-palette-primary-outlinedBorder, rgba(11, 107, 203, 0.15)); box-shadow: 0 0 0 2px
var(--joy-palette-primary-outlinedBorder, rgba(11, 107, 203, 0.15));
} }
.task-input:hover:not(:focus-within) { .task-input:hover:not(:focus-within) {