feat: support in-app-purchase for iOS

This commit is contained in:
0xzio
2025-05-28 17:40:05 +08:00
parent 7791226298
commit a408c51f26
101 changed files with 466 additions and 229 deletions

View File

@@ -11,13 +11,14 @@ apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':aparajita-capacitor-dark-mode')
implementation project(':capacitor-community-safe-area')
implementation project(':capacitor-device')
implementation project(':capacitor-app')
implementation project(':capacitor-device')
implementation project(':capacitor-haptics')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation project(':capgo-capacitor-social-login')
implementation project(':revenuecat-purchases-capacitor')
implementation project(':capacitor-voice-recorder')
}

View File

@@ -7,14 +7,14 @@
"pkg": "@capacitor-community/safe-area",
"classpath": "com.getcapacitor.community.safearea.SafeAreaPlugin"
},
{
"pkg": "@capacitor/device",
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
},
{
"pkg": "@capacitor/app",
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
},
{
"pkg": "@capacitor/device",
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
},
{
"pkg": "@capacitor/haptics",
"classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
@@ -35,6 +35,10 @@
"pkg": "@capgo/capacitor-social-login",
"classpath": "ee.forgr.capacitor.social.login.SocialLoginPlugin"
},
{
"pkg": "@revenuecat/purchases-capacitor",
"classpath": "com.revenuecat.purchases.capacitor.PurchasesPlugin"
},
{
"pkg": "capacitor-voice-recorder",
"classpath": "com.tchvu3.capacitorvoicerecorder.VoiceRecorder"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -8,12 +8,12 @@ project(':aparajita-capacitor-dark-mode').projectDir = new File('../../../node_m
include ':capacitor-community-safe-area'
project(':capacitor-community-safe-area').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+safe-area@7.0.0-alpha.1_@capacitor+core@7.2.0/node_modules/@capacitor-community/safe-area/android')
include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/device/android')
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/app/android')
include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/device/android')
include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/haptics/android')
@@ -29,5 +29,8 @@ project(':capacitor-status-bar').projectDir = new File('../../../node_modules/.p
include ':capgo-capacitor-social-login'
project(':capgo-capacitor-social-login').projectDir = new File('../../../node_modules/.pnpm/@capgo+capacitor-social-login@7.5.9_@capacitor+core@7.2.0/node_modules/@capgo/capacitor-social-login/android')
include ':revenuecat-purchases-capacitor'
project(':revenuecat-purchases-capacitor').projectDir = new File('../../../node_modules/.pnpm/@revenuecat+purchases-capacitor@10.3.0_@capacitor+core@7.2.0/node_modules/@revenuecat/purchases-capacitor/android')
include ':capacitor-voice-recorder'
project(':capacitor-voice-recorder').projectDir = new File('../../../node_modules/.pnpm/capacitor-voice-recorder@7.0.5_@capacitor+core@7.2.0_@capacitor+filesystem@7.0.1_@capacitor+core@7.2.0_/node_modules/capacitor-voice-recorder/android')

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -14,6 +14,7 @@
504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
7C7985622DE7117D000C3F7F /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C7985612DE7117D000C3F7F /* StoreKit.framework */; };
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
/* End PBXBuildFile section */
@@ -28,6 +29,7 @@
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
7C4198902DD620EB0002CFA3 /* AppDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AppDebug.entitlements; sourceTree = "<group>"; };
7C7985612DE7117D000C3F7F /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
@@ -39,6 +41,7 @@
buildActionMask = 2147483647;
files = (
A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */,
7C7985622DE7117D000C3F7F /* StoreKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -48,6 +51,7 @@
27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
isa = PBXGroup;
children = (
7C7985612DE7117D000C3F7F /* StoreKit.framework */,
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
);
name = Frameworks;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1,14 +1,14 @@
{
"images": [
"images" : [
{
"idiom": "universal",
"size": "1024x1024",
"filename": "AppIcon-512@2x.png",
"platform": "ios"
"filename" : "logo-1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info": {
"author": "xcode",
"version": 1
"info" : {
"author" : "xcode",
"version" : 1
}
}
}

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -2,18 +2,18 @@
"images": [
{
"idiom": "universal",
"filename": "Default@1x~universal~anyany.png",
"scale": "1x"
"scale": "1x",
"filename": "Default@1x~universal~anyany.png"
},
{
"idiom": "universal",
"filename": "Default@2x~universal~anyany.png",
"scale": "2x"
"scale": "2x",
"filename": "Default@2x~universal~anyany.png"
},
{
"idiom": "universal",
"filename": "Default@3x~universal~anyany.png",
"scale": "3x"
"scale": "3x",
"filename": "Default@3x~universal~anyany.png"
},
{
"appearances": [
@@ -50,7 +50,7 @@
}
],
"info": {
"version": 1,
"author": "xcode"
"author": "xcode",
"version": 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -17,13 +17,14 @@
"packageClassList": [
"DarkModeNative",
"SafeAreaPlugin",
"DevicePlugin",
"AppPlugin",
"DevicePlugin",
"HapticsPlugin",
"KeyboardPlugin",
"SplashScreenPlugin",
"StatusBarPlugin",
"SocialLoginPlugin",
"PurchasesPlugin",
"VoiceRecorder"
]
}

View File

@@ -13,13 +13,14 @@ def capacitor_pods
pod 'CapacitorCordova', :path => '../../../../node_modules/.pnpm/@capacitor+ios@7.2.0_@capacitor+core@7.2.0/node_modules/@capacitor/ios'
pod 'AparajitaCapacitorDarkMode', :path => '../../../../node_modules/.pnpm/@aparajita+capacitor-dark-mode@5.0.2/node_modules/@aparajita/capacitor-dark-mode'
pod 'CapacitorCommunitySafeArea', :path => '../../../../node_modules/.pnpm/@capacitor-community+safe-area@7.0.0-alpha.1_@capacitor+core@7.2.0/node_modules/@capacitor-community/safe-area'
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/device'
pod 'CapacitorApp', :path => '../../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/app'
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/device'
pod 'CapacitorHaptics', :path => '../../../../node_modules/.pnpm/@capacitor+haptics@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../../../node_modules/.pnpm/@capacitor+keyboard@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/keyboard'
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/splash-screen'
pod 'CapacitorStatusBar', :path => '../../../../node_modules/.pnpm/@capacitor+status-bar@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/status-bar'
pod 'CapgoCapacitorSocialLogin', :path => '../../../../node_modules/.pnpm/@capgo+capacitor-social-login@7.5.9_@capacitor+core@7.2.0/node_modules/@capgo/capacitor-social-login'
pod 'RevenuecatPurchasesCapacitor', :path => '../../../../node_modules/.pnpm/@revenuecat+purchases-capacitor@10.3.0_@capacitor+core@7.2.0/node_modules/@revenuecat/purchases-capacitor'
pod 'CapacitorVoiceRecorder', :path => '../../../../node_modules/.pnpm/capacitor-voice-recorder@7.0.5_@capacitor+core@7.2.0_@capacitor+filesystem@7.0.1_@capacitor+core@7.2.0_/node_modules/capacitor-voice-recorder'
end

View File

@@ -64,6 +64,12 @@ PODS:
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
- GTMSessionFetcher/Core (3.5.0)
- PromisesObjC (2.4.0)
- PurchasesHybridCommon (13.32.0):
- RevenueCat (= 5.24.0)
- RevenueCat (5.24.0)
- RevenuecatPurchasesCapacitor (10.3.0):
- Capacitor
- PurchasesHybridCommon (= 13.32.0)
DEPENDENCIES:
- "AparajitaCapacitorDarkMode (from `../../../../node_modules/.pnpm/@aparajita+capacitor-dark-mode@5.0.2/node_modules/@aparajita/capacitor-dark-mode`)"
@@ -78,6 +84,7 @@ DEPENDENCIES:
- "CapacitorStatusBar (from `../../../../node_modules/.pnpm/@capacitor+status-bar@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/status-bar`)"
- "CapacitorVoiceRecorder (from `../../../../node_modules/.pnpm/capacitor-voice-recorder@7.0.5_@capacitor+core@7.2.0_@capacitor+filesystem@7.0.1_@capacitor+core@7.2.0_/node_modules/capacitor-voice-recorder`)"
- "CapgoCapacitorSocialLogin (from `../../../../node_modules/.pnpm/@capgo+capacitor-social-login@7.5.9_@capacitor+core@7.2.0/node_modules/@capgo/capacitor-social-login`)"
- "RevenuecatPurchasesCapacitor (from `../../../../node_modules/.pnpm/@revenuecat+purchases-capacitor@10.3.0_@capacitor+core@7.2.0/node_modules/@revenuecat/purchases-capacitor`)"
SPEC REPOS:
trunk:
@@ -93,6 +100,8 @@ SPEC REPOS:
- GTMAppAuth
- GTMSessionFetcher
- PromisesObjC
- PurchasesHybridCommon
- RevenueCat
EXTERNAL SOURCES:
AparajitaCapacitorDarkMode:
@@ -119,6 +128,8 @@ EXTERNAL SOURCES:
:path: "../../../../node_modules/.pnpm/capacitor-voice-recorder@7.0.5_@capacitor+core@7.2.0_@capacitor+filesystem@7.0.1_@capacitor+core@7.2.0_/node_modules/capacitor-voice-recorder"
CapgoCapacitorSocialLogin:
:path: "../../../../node_modules/.pnpm/@capgo+capacitor-social-login@7.5.9_@capacitor+core@7.2.0/node_modules/@capgo/capacitor-social-login"
RevenuecatPurchasesCapacitor:
:path: "../../../../node_modules/.pnpm/@revenuecat+purchases-capacitor@10.3.0_@capacitor+core@7.2.0/node_modules/@revenuecat/purchases-capacitor"
SPEC CHECKSUMS:
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
@@ -145,7 +156,10 @@ SPEC CHECKSUMS:
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PurchasesHybridCommon: 662aa1f4769ff4ef594e35adf1a5d0ad7b3d08b7
RevenueCat: 2d3639d30b8a71cbfe3d99cef8243c602793e0ec
RevenuecatPurchasesCapacitor: d2caee5c90772184b79466cfb0e25cc651b3b97c
PODFILE CHECKSUM: 4a1032ecb90ca3749b95d367cbb78fca7716d15a
PODFILE CHECKSUM: 4c72eb302d958edb3ae0ecbe751db578fd163bf7
COCOAPODS: 1.16.2

View File

@@ -22,10 +22,10 @@
"@aparajita/capacitor-dark-mode": "^5.0.2",
"@capacitor-community/safe-area": "7.0.0-alpha.1",
"@capacitor/android": "7.2.0",
"@capacitor/device": "7.0.1",
"@capacitor/app": "7.0.1",
"@capacitor/assets": "^3.0.5",
"@capacitor/core": "7.2.0",
"@capacitor/device": "7.0.1",
"@capacitor/haptics": "7.0.1",
"@capacitor/ios": "7.2.0",
"@capacitor/keyboard": "7.0.1",
@@ -58,6 +58,7 @@
"@penx/unique-id": "workspace:*",
"@penx/utils": "workspace:*",
"@penx/widgets": "workspace:*",
"@revenuecat/purchases-capacitor": "^10.3.0",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"capacitor-voice-recorder": "^7.0.5",

View File

@@ -53,6 +53,8 @@ import { useCreationId } from '@penx/hooks/useCreationId'
import { LocaleProvider } from '@penx/locales'
import { ICreationNode } from '@penx/model-type'
import { NavProvider } from './components/NavContext'
import { UpgradeDrawer } from './components/UpgradeDrawer/UpgradeDrawer'
import { initializeRevenueCat } from './lib/initializeRevenueCat'
// import { activateLocale } from './lib/activateLocale'
import { PageAllStructs } from './pages/PageAllStructs'
import { PageCreation } from './pages/PageCreation'
@@ -67,6 +69,8 @@ async function init() {
const isDark = mode.dark
initializeRevenueCat()
if (['ios', 'android'].includes(platform)) {
SafeArea.enable({
config: {
@@ -201,6 +205,7 @@ const App: React.FC = () => {
<IonApp className="">
<LocaleProvider>
<DashboardProviders>
<UpgradeDrawer />
<IonReactRouter>
<IonSplitPane contentId="main">
<Menu />

View File

@@ -0,0 +1,42 @@
import { Capacitor } from '@capacitor/core'
import { DialogTitle } from '@radix-ui/react-dialog'
import { Drawer as VaulDrawer } from 'vaul'
import { cn } from '@penx/utils'
const platform = Capacitor.getPlatform()
interface Props {
open: boolean
setOpen: (isOpen: boolean) => void
children: React.ReactNode
className?: string
}
export function Drawer({ open, setOpen, children, className }: Props) {
return (
<VaulDrawer.Root open={open} onOpenChange={setOpen}>
<VaulDrawer.Portal>
<VaulDrawer.Overlay className="fixed inset-0 bg-black/40" />
<VaulDrawer.Content
className={cn(
'bg-background text-foreground fixed bottom-0 left-0 right-0 mt-24 flex h-fit max-h-[90vh] min-h-[50vh] flex-col rounded-t-[10px] px-4 pb-6 outline-none',
platform === 'ios' && 'max-h-[80vh]',
className,
)}
style={{
// boxShadow:
// '0 -4px 12px rgba(0, 0, 0, 0.05), 0 -8px 25px rgba(0, 0, 0, 0.1),0 -16px 50px rgba(0, 0, 0, 0.1)',
filter: 'drop-shadow(0 -8px 25px rgba(0, 0, 0, 0.15))',
}}
>
<div
aria-hidden
className="bg-foreground/30 mx-auto mb-4 mt-2 h-1 w-10 shrink-0 rounded-full"
/>
<DialogTitle className="hidden"></DialogTitle>
{children}
</VaulDrawer.Content>
</VaulDrawer.Portal>
</VaulDrawer.Root>
)
}

View File

@@ -14,6 +14,7 @@ import { cn } from '@penx/utils'
import { AreaList } from './AreaList'
// import { AreasPopover } from './AreasPopover'
import { MobileModeToggle } from './MobileModeToggle'
import { useUpgradeDrawer } from './UpgradeDrawer/useUpgradeDrawer'
const platform = Capacitor.getPlatform()
@@ -21,6 +22,7 @@ const Menu: React.FC = () => {
const { setMenu } = useMobileMenu()
const { isLoading } = useSession()
const menu = useRef<HTMLIonMenuElement>(null)
const { setIsOpen } = useUpgradeDrawer()
useEffect(() => {
setMenu(menu)
@@ -60,6 +62,13 @@ const Menu: React.FC = () => {
<div className="relative z-10 flex items-center justify-between">
<MobileModeToggle />
<LangSwitcher />
{/* <Button
onClick={() => {
setIsOpen(true)
}}
>
Upgrade
</Button> */}
<ProfileButton
loginButton={
<Button

View File

@@ -2,9 +2,8 @@
import React, { useRef, useState } from 'react'
import { SearchIcon } from 'lucide-react'
import { Drawer } from 'vaul'
import { Button } from '@penx/uikit/button'
import { DialogDescription, DialogTitle } from '@penx/uikit/dialog'
import { Drawer } from '../Drawer'
import { SearchPanel } from './SearchPanel'
export function SearchButton() {
@@ -20,22 +19,9 @@ export function SearchButton() {
<SearchIcon size={24} />
</Button>
<Drawer.Root open={visible} onOpenChange={setVisible}>
<Drawer.Portal>
<Drawer.Overlay className="fixed inset-0 bg-black/40" />
<Drawer.Content className="bg-background text-foreground fixed bottom-0 left-0 right-0 flex max-h-[95vh] min-h-[95vh] flex-col rounded-t-[10px] px-0 pb-0 outline-none">
<div
aria-hidden
className="bg-foreground/30 mx-auto mb-4 mt-2 h-1 w-10 flex-shrink-0 rounded-full"
/>
<DialogTitle className="hidden">
<DialogDescription />
</DialogTitle>
<SearchPanel setVisible={setVisible} />
</Drawer.Content>
</Drawer.Portal>
</Drawer.Root>
<Drawer open={visible} setOpen={setVisible}>
<SearchPanel setVisible={setVisible} />
</Drawer>
</>
)
}

View File

@@ -0,0 +1,47 @@
'use client'
import React, { useMemo, useState } from 'react'
import { Capacitor } from '@capacitor/core'
import { SocialLogin } from '@capgo/capacitor-social-login'
import { LOG_LEVEL, Purchases } from '@revenuecat/purchases-capacitor'
import { useQuery } from '@tanstack/react-query'
import { set } from 'idb-keyval'
import { appEmitter } from '@penx/emitter'
import { localDB } from '@penx/local-db'
import { queryClient } from '@penx/query-client'
import { useSession } from '@penx/session'
import { MobileGoogleLoginInfo } from '@penx/types'
import { Button } from '@penx/uikit/button'
import { IconGoogle } from '@penx/uikit/IconGoogle'
import { LoadingDots } from '@penx/uikit/loading-dots'
interface Props {}
const platform = Capacitor.getPlatform()
export function PlanList({}: Props) {
const { isLoading, data } = useQuery({
queryKey: ['plans'],
queryFn: async () => {
try {
const offerings = await Purchases.getOfferings()
if (offerings.current !== null) {
const availablePackages = offerings.current.availablePackages
return availablePackages
} else {
return []
}
} catch (error) {
return []
}
},
})
if (isLoading) return null
return (
<div>
<div>Hello</div>
<div>{JSON.stringify(data, null, 2)}</div>
</div>
)
}

View File

@@ -25,7 +25,7 @@ export const StructTypeSelect = ({ className }: Props) => {
>
<div
className={cn(
'text-foreground/40 flex cursor-pointer items-center justify-center px-1',
'text-foreground/40 flex shrink-0 cursor-pointer items-center justify-center px-1',
!struct && 'text-foreground font-bold',
)}
onClick={() => {
@@ -39,7 +39,7 @@ export const StructTypeSelect = ({ className }: Props) => {
<div
key={item.id}
className={cn(
'text-foreground/40 flex flex-1 cursor-pointer items-center justify-center px-2',
'text-foreground/40 flex flex-1 shrink-0 cursor-pointer items-center justify-center px-2',
struct?.id == item.id && 'text-foreground font-bold',
)}
onClick={() => {

View File

@@ -0,0 +1,78 @@
'use client'
import { useState } from 'react'
import { Trans } from '@lingui/react/macro'
import { CheckIcon } from 'lucide-react'
import { Button } from '@penx/uikit/ui/button'
import { cn } from '@penx/utils'
import { Drawer } from '../Drawer'
import { useUpgradeDrawer } from './useUpgradeDrawer'
interface Props {}
export function UpgradeDrawer({}: Props) {
const { isOpen, setIsOpen } = useUpgradeDrawer()
const [isMonthly, setIsMonthly] = useState(true)
return (
<Drawer open={isOpen} setOpen={setIsOpen} className="min-h-[80vh]">
<div className="flex flex-1 flex-col gap-4">
<div className="text-foreground flex items-center justify-center gap-2 text-3xl font-bold">
<span>PenX</span>
<span className="bg-brand rounded-lg px-2 py-0.5 text-xl text-white">
PRO
</span>
</div>
<div className="flex-1 text-base"></div>
<div className="bg-foreground/5 flex flex-col gap-2 rounded-xl p-4">
<BenefitItem>Instant cloud sync</BenefitItem>
<BenefitItem>Unlimited number of notes</BenefitItem>
<BenefitItem>20GB storage</BenefitItem>
<BenefitItem>Unlimit devices</BenefitItem>
<BenefitItem>Create own digital garden</BenefitItem>
</div>
<div
className={cn(
'border-foreground/20 flex items-center justify-between rounded-xl border-2 p-4',
isMonthly && 'border-foreground',
)}
onClick={() => setIsMonthly(true)}
>
<div>Pro monthly</div>
<div className="flex items-center">
<span className="mr-1 text-3xl font-bold">$10</span>/ month
</div>
</div>
<div
className={cn(
'border-foreground/20 flex items-center justify-between rounded-xl border-2 p-4',
!isMonthly && 'border-foreground',
)}
onClick={() => setIsMonthly(false)}
>
<div>Pro yearly</div>
<div className="flex items-center">
<span className="mr-1 text-3xl font-bold">$90</span>/ year
</div>
</div>
<div className="flex justify-center">
<Button size="lg" className="rounded-full">
<Trans>Subscribe now</Trans>
</Button>
</div>
</div>
</Drawer>
)
}
function BenefitItem({ children }: { children: React.ReactNode }) {
return (
<div className="flex shrink-0 items-center gap-2">
<CheckIcon className="text-green-500" size={16} />
<div className={cn('text-foreground/')}>{children}</div>
</div>
)
}

View File

@@ -0,0 +1,10 @@
'use client'
import { atom, useAtom } from 'jotai'
const upgradeDrawerAtom = atom<boolean>(false)
export function useUpgradeDrawer() {
const [isOpen, setIsOpen] = useAtom(upgradeDrawerAtom)
return { isOpen, setIsOpen }
}

View File

@@ -1,17 +0,0 @@
import classNames from 'classnames'
const Card = ({
children,
className,
}: {
children: React.ReactElement[]
className: string
}) => (
<div className={classNames('max-w-xl', className)}>
<div className="rounded-b-xl bg-white shadow-md dark:bg-black">
{children}
</div>
</div>
)
export default Card

View File

@@ -0,0 +1,18 @@
import { Capacitor } from '@capacitor/core'
import { LOG_LEVEL, Purchases } from '@revenuecat/purchases-capacitor'
export async function initializeRevenueCat() {
try {
await Purchases.setLogLevel({ level: LOG_LEVEL.DEBUG })
if (Capacitor.getPlatform() === 'ios') {
await Purchases.configure({
apiKey: 'appl_CioLamReqEDMuGMBQXyHhPjELYv',
})
}
console.log('RevenueCat inited')
} catch (error) {
console.error('RevenueCat init fail:', error)
}
}

View File

@@ -0,0 +1,50 @@
import React from 'react'
import { LoginContent } from '@/components/Profile/LoginContent'
import { LoginForm } from '@/components/Profile/LoginForm'
import { RegisterForm } from '@/components/Profile/RegisterForm'
import { Capacitor } from '@capacitor/core'
import {
IonBackButton,
IonButton,
IonButtons,
IonContent,
IonFooter,
IonHeader,
IonNavLink,
IonTitle,
IonToolbar,
} from '@ionic/react'
import { useAuthStatus } from '@penx/hooks/useAuthStatus'
const platform = Capacitor.getPlatform()
export function PagePlan() {
return (
<>
<IonHeader
className={platform === 'android' ? 'safe-area' : ''}
style={{
boxShadow: '0 0 0 rgba(0, 0, 0, 0)',
}}
>
<IonToolbar
className="toolbar"
style={{
'--border-width': 0,
// borderBottom: scrolled ? '1px solid #eeee' : 'none',
// borderBottom: 'none',
// border: 'none',
}}
>
<IonButtons slot="start">
<IonBackButton color="dark" text=""></IonBackButton>
</IonButtons>
<IonTitle>Plan</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent fullscreen class="ion-padding content">
<LoginContent />
</IonContent>
</>
)
}

View File

@@ -31,16 +31,21 @@ export class AppService {
inited = false
async init(session: SessionData) {
// console.log('========session:', session)
console.log('=======app=session:', session)
store.app.setAppLoading(true)
// store.app.setAppLoading(false)
// return
try {
const site = await this.getInitialSite(session)
const site = await this.getInitialSite(session)
console.log('============site:', site)
await this.initStore(site)
this.inited = true
await this.initStore(site)
this.inited = true
} catch (error) {
console.log('init error=====>>>:', error)
}
}
private async getInitialSite(session: SessionData): Promise<ISiteNode> {

View File

@@ -73,7 +73,7 @@ export function PlanItem({
function BenefitItem({ benefit }: { benefit: Benefit }) {
return (
<div className="flex shrink-0 items-center gap-2">
{benefit.ok && <Check className="text-green-500" size={16} />}
{benefit.ok && <CheckIcon className="text-green-500" size={16} />}
{!benefit.ok && <XIcon className="text-foreground/40" size={16} />}
<div
className={cn(

View File

@@ -25,4 +25,5 @@ export enum NetworkNames {
BASE = 'BASE',
}
export const SHAPE_URL = process.env.NEXT_PUBLIC_SYNC_URL!
export const SHAPE_URL =
process.env.NEXT_PUBLIC_SYNC_URL! || 'https://sync.penx.io/api/shape-proxy'

View File

@@ -18,6 +18,7 @@ export type AppEvent = {
ROUTE_TO_STRUCT: any
ROUTE_TO_ALL_STRUCTS: any
ROUTE_TO_LOGIN: any
ROUTE_TO_UPGRADE: any
}
export const appEmitter = mitt<AppEvent>()

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr ""
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr ""
@@ -137,7 +133,7 @@ msgstr ""
msgid "Creation counts"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr ""
@@ -221,7 +217,7 @@ msgstr ""
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr ""
@@ -229,7 +225,7 @@ msgstr ""
msgid "High"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr ""
@@ -256,12 +252,12 @@ msgstr ""
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr ""
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr ""
@@ -445,8 +441,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr ""
@@ -478,7 +474,11 @@ msgstr ""
msgid "Structs"
msgstr ""
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr ""
@@ -536,10 +536,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr ""
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr ""

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr "About"
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr "Access control"
@@ -137,7 +133,7 @@ msgstr "Created date"
msgid "Creation counts"
msgstr "Creation counts"
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr "Dashboard"
@@ -221,7 +217,7 @@ msgstr "Gate this post, config who can read this post."
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr "Google login"
@@ -229,7 +225,7 @@ msgstr "Google login"
msgid "High"
msgstr "High"
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr "Home"
@@ -256,12 +252,12 @@ msgstr "Local backup"
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr "Log in"
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr "Log out"
@@ -445,8 +441,8 @@ msgstr "Save"
msgid "Search"
msgstr "Search"
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr "Settings"
@@ -478,7 +474,11 @@ msgstr "Struct marketplace"
msgid "Structs"
msgstr "Structs"
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr "Subscribe now"
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr "Support"
@@ -528,7 +528,7 @@ msgstr "Updated successfully!"
msgid "Upgrade"
msgstr "Upgrade"
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr "Upgrade to Pro"
@@ -536,10 +536,6 @@ msgstr "Upgrade to Pro"
msgid "URL"
msgstr "URL"
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr "Visit my site"
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr "Voice"

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr ""
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr ""
@@ -137,7 +133,7 @@ msgstr ""
msgid "Creation counts"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr ""
@@ -221,7 +217,7 @@ msgstr ""
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr ""
@@ -229,7 +225,7 @@ msgstr ""
msgid "High"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr ""
@@ -256,12 +252,12 @@ msgstr ""
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr ""
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr ""
@@ -445,8 +441,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr ""
@@ -478,7 +474,11 @@ msgstr ""
msgid "Structs"
msgstr ""
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr ""
@@ -536,10 +536,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr ""
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr ""

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr ""
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr ""
@@ -137,7 +133,7 @@ msgstr ""
msgid "Creation counts"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr ""
@@ -221,7 +217,7 @@ msgstr ""
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr ""
@@ -229,7 +225,7 @@ msgstr ""
msgid "High"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr ""
@@ -256,12 +252,12 @@ msgstr ""
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr ""
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr ""
@@ -445,8 +441,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr ""
@@ -478,7 +474,11 @@ msgstr ""
msgid "Structs"
msgstr ""
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr ""
@@ -536,10 +536,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr ""
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr ""

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr ""
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr ""
@@ -137,7 +133,7 @@ msgstr ""
msgid "Creation counts"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr ""
@@ -221,7 +217,7 @@ msgstr ""
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr ""
@@ -229,7 +225,7 @@ msgstr ""
msgid "High"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr ""
@@ -256,12 +252,12 @@ msgstr ""
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr ""
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr ""
@@ -445,8 +441,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr ""
@@ -478,7 +474,11 @@ msgstr ""
msgid "Structs"
msgstr ""
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr ""
@@ -536,10 +536,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr ""
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr ""

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr ""
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr ""
@@ -137,7 +133,7 @@ msgstr ""
msgid "Creation counts"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr ""
@@ -221,7 +217,7 @@ msgstr ""
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr ""
@@ -229,7 +225,7 @@ msgstr ""
msgid "High"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr ""
@@ -256,12 +252,12 @@ msgstr ""
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr ""
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr ""
@@ -445,8 +441,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr ""
@@ -478,7 +474,11 @@ msgstr ""
msgid "Structs"
msgstr ""
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr ""
@@ -536,10 +536,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr ""
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr ""

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr ""
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr ""
@@ -137,7 +133,7 @@ msgstr ""
msgid "Creation counts"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr ""
@@ -221,7 +217,7 @@ msgstr ""
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr ""
@@ -229,7 +225,7 @@ msgstr ""
msgid "High"
msgstr ""
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr ""
@@ -256,12 +252,12 @@ msgstr ""
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr ""
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr ""
@@ -445,8 +441,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr ""
@@ -478,7 +474,11 @@ msgstr ""
msgid "Structs"
msgstr ""
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr ""
@@ -536,10 +536,6 @@ msgstr ""
msgid "URL"
msgstr ""
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr ""
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr ""

View File

@@ -13,10 +13,6 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
#: packages/components/src/AreaDialog/AreaForm.tsx:219
msgid "About"
msgstr "关于"
#: packages/components/src/Creation/PublishDialog/PublishForm.tsx:115
msgid "Access control"
msgstr "访问控制"
@@ -137,7 +133,7 @@ msgstr "创建日期"
msgid "Creation counts"
msgstr "创作数量"
#: packages/components/src/Profile/ProfilePopover.tsx:109
#: packages/components/src/Profile/ProfilePopover.tsx:108
#: packages/components/src/Profile/Profile.tsx:58
msgid "Dashboard"
msgstr "仪表板"
@@ -221,7 +217,7 @@ msgstr "设置这篇文章的访问权限,配置谁可以阅读这篇文章。
#: apps/mobile/src/components/Profile/GoogleLoginButton.tsx:69
#: apps/extension/components/Login.tsx:51
#: packages/widgets/src/GoogleOauthButton.tsx:71
#: packages/widgets/src/GoogleOauthButton.tsx:70
msgid "Google login"
msgstr "Google 登录"
@@ -229,7 +225,7 @@ msgstr "Google 登录"
msgid "High"
msgstr "高"
#: packages/components/src/Profile/ProfilePopover.tsx:91
#: packages/components/src/Profile/ProfilePopover.tsx:90
msgid "Home"
msgstr "首页"
@@ -256,12 +252,12 @@ msgstr "本地备份"
#: apps/mobile/src/components/Profile/LoginForm.tsx:122
#: packages/widgets/src/LoginDialog/RegisterForm.tsx:133
#: packages/widgets/src/LoginDialog/LoginForm.tsx:119
#: packages/components/src/ProfileButton.tsx:120
#: packages/components/src/ProfileButton.tsx:118
msgid "Log in"
msgstr "登录"
#: packages/components/src/ProfileButton.tsx:254
#: packages/components/src/Profile/ProfilePopover.tsx:153
#: packages/components/src/ProfileButton.tsx:252
#: packages/components/src/Profile/ProfilePopover.tsx:152
msgid "Log out"
msgstr "退出登录"
@@ -445,8 +441,8 @@ msgstr "保存"
msgid "Search"
msgstr "搜索"
#: packages/components/src/ProfileButton.tsx:206
#: packages/components/src/Profile/ProfilePopover.tsx:126
#: packages/components/src/ProfileButton.tsx:204
#: packages/components/src/Profile/ProfilePopover.tsx:125
#: packages/components/src/AreasPopover/AreaMenu.tsx:84
msgid "Settings"
msgstr "设置"
@@ -478,7 +474,11 @@ msgstr "结构体市场"
msgid "Structs"
msgstr "结构体"
#: packages/components/src/ProfileButton.tsx:233
#: apps/mobile/src/components/UpgradeDrawer/UpgradeDrawer.tsx:59
msgid "Subscribe now"
msgstr ""
#: packages/components/src/ProfileButton.tsx:232
msgid "Support"
msgstr "支持"
@@ -528,7 +528,7 @@ msgstr "更新成功!"
msgid "Upgrade"
msgstr "升级"
#: packages/components/src/ProfileButton.tsx:224
#: packages/components/src/ProfileButton.tsx:223
msgid "Upgrade to Pro"
msgstr "升级到专业版"
@@ -536,10 +536,6 @@ msgstr "升级到专业版"
msgid "URL"
msgstr "网址"
#: packages/components/src/Sidebar/VisitSiteButton.tsx:39
msgid "Visit my site"
msgstr "访问我的站点"
#: packages/libs/src/getDefaultStructs.ts:270
msgid "Voice"
msgstr "语音"

View File

@@ -1,10 +1,4 @@
import { get } from 'idb-keyval'
import {
ACTIVE_SITE,
IPFS_GATEWAY,
IPFS_UPLOAD_URL,
STATIC_URL,
} from '@penx/constants'
import { ISite } from '@penx/model-type/ISite'
import { calculateSHA256FromFile } from '@penx/utils/calculateSHA256FromFile'

View File

@@ -1,10 +1,4 @@
import { get } from 'idb-keyval'
import {
ACTIVE_SITE,
IPFS_GATEWAY,
IPFS_UPLOAD_URL,
STATIC_URL,
} from '@penx/constants'
import { ISite } from '@penx/model-type/ISite'
import { calculateSHA256FromFile } from '@penx/utils/calculateSHA256FromFile'

18
pnpm-lock.yaml generated
View File

@@ -1220,6 +1220,9 @@ importers:
'@penx/widgets':
specifier: workspace:*
version: link:../../packages/widgets
'@revenuecat/purchases-capacitor':
specifier: ^10.3.0
version: 10.3.0(@capacitor/core@7.2.0)
'@types/react-router':
specifier: ^5.1.20
version: 5.1.20
@@ -5265,6 +5268,14 @@ packages:
'@remirror/core-constants@3.0.0':
resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==}
'@revenuecat/purchases-capacitor@10.3.0':
resolution: {integrity: sha512-gJblBlaz5r2BgvAg3O7xBEQG+WU1QbH7jBNglAe9hHVTGiPF4hepGnKMaTMfDj1M+VMkCM80vul5oUtZLDJENg==}
peerDependencies:
'@capacitor/core': '>=7.0.0'
'@revenuecat/purchases-typescript-internal-esm@13.32.0':
resolution: {integrity: sha512-14ru8Kj2uI9xHtsCutnNH6P8JhZ8mgEOiFTfGMLesL8lvfrFim2qdnCBvuCBmdbtcOecUGV6308mWgbLADy8SQ==}
'@rollup/rollup-android-arm-eabi@4.40.2':
resolution: {integrity: sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==}
cpu: [arm]
@@ -19699,6 +19710,13 @@ snapshots:
'@remirror/core-constants@3.0.0': {}
'@revenuecat/purchases-capacitor@10.3.0(@capacitor/core@7.2.0)':
dependencies:
'@capacitor/core': 7.2.0
'@revenuecat/purchases-typescript-internal-esm': 13.32.0
'@revenuecat/purchases-typescript-internal-esm@13.32.0': {}
'@rollup/rollup-android-arm-eabi@4.40.2':
optional: true

Some files were not shown because too many files have changed in this diff Show More