mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 17:26:24 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a2cf911ce1 | |||
| 7a66a54e66 | |||
| 748434fc47 | |||
| 618f070675 | |||
| dacf19b4d5 | |||
| 103631d5fc |
@@ -102,61 +102,21 @@ object TrekBilling {
|
||||
return offers.firstOrNull { it.offerId == null } ?: offers.firstOrNull()
|
||||
}
|
||||
|
||||
/** Play returns eligible offers. The named offer must be configured with Play's new-customer eligibility. */
|
||||
private fun trialOffer(product: ProductDetails): ProductDetails.SubscriptionOfferDetails? {
|
||||
val base = baseOffer(product)?.takeIf { it.offerId == null } ?: return null
|
||||
val recurring = base.pricingPhases.pricingPhaseList.singleOrNull() ?: return null
|
||||
return product.subscriptionOfferDetails?.firstOrNull { offer ->
|
||||
offer.offerId == TRIAL_OFFER_ID && offer.basePlanId == base.basePlanId &&
|
||||
isSevenDayTrial(offer.pricingPhases.pricingPhaseList, recurring)
|
||||
}
|
||||
}
|
||||
|
||||
private fun isSevenDayTrial(
|
||||
phases: List<ProductDetails.PricingPhase>,
|
||||
recurring: ProductDetails.PricingPhase,
|
||||
): Boolean {
|
||||
if (phases.size != 2) return false
|
||||
val (trial, renewal) = phases
|
||||
val once = trial.recurrenceMode == ProductDetails.RecurrenceMode.NON_RECURRING ||
|
||||
(trial.recurrenceMode == ProductDetails.RecurrenceMode.FINITE_RECURRING && trial.billingCycleCount == 1)
|
||||
return once && trial.priceAmountMicros == 0L && trial.billingPeriod in listOf("P1W", "P7D") &&
|
||||
renewal.recurrenceMode == ProductDetails.RecurrenceMode.INFINITE_RECURRING &&
|
||||
renewal.billingPeriod == recurring.billingPeriod && renewal.priceAmountMicros == recurring.priceAmountMicros &&
|
||||
renewal.priceCurrencyCode == recurring.priceCurrencyCode
|
||||
}
|
||||
|
||||
fun products(context: Context, call: PluginCall) {
|
||||
val ids = call.getArray("ids")?.toList<String>().orEmpty()
|
||||
ready(context) { ok ->
|
||||
val result = JSObject().put("sandbox", BuildConfig.DEBUG)
|
||||
if (!ok || ids.isEmpty()) return@ready call.resolve(result.put("products", JSArray()))
|
||||
if (!ok) return@ready call.resolve(result.put("products", JSArray()))
|
||||
details(context, ids) { found ->
|
||||
val candidates = found.filter { trialOffer(it) != null }.map { it.productId }.toSet()
|
||||
if (candidates.isEmpty()) {
|
||||
call.resolve(result.put("products", productList(found, emptySet())))
|
||||
return@details
|
||||
}
|
||||
val params = QueryPurchasesParams.newBuilder().setProductType(BillingClient.ProductType.SUBS).build()
|
||||
client(context).queryPurchasesAsync(params) { status, purchases ->
|
||||
val eligible = status.responseCode == BillingClient.BillingResponseCode.OK && purchases.none { purchase ->
|
||||
purchase.products.any { it.startsWith(PREFIX) }
|
||||
}
|
||||
call.resolve(result.put("products", productList(found, if (eligible) candidates else emptySet())))
|
||||
}
|
||||
val list = JSArray()
|
||||
for (product in found) displayPrice(product)?.let { list.put(JSObject().put("id", product.productId).put("displayPrice", it)) }
|
||||
call.resolve(result.put("products", list))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun productList(products: List<ProductDetails>, freeTrials: Set<String>): JSArray = JSArray().apply {
|
||||
for (product in products) displayPrice(product)?.let { price ->
|
||||
put(JSObject().put("id", product.productId).put("displayPrice", price).put("freeTrial", product.productId in freeTrials))
|
||||
}
|
||||
}
|
||||
|
||||
fun purchase(activity: Activity, call: PluginCall) {
|
||||
val id = call.getString("productId") ?: return call.reject("productId is required")
|
||||
val trialRenewalPrice = call.getString("trialRenewalPrice")
|
||||
ready(activity) { ok ->
|
||||
if (!ok) return@ready call.resolve(JSObject().put("kind", "failed"))
|
||||
// One subscription per Google account: a second plan would run beside the first.
|
||||
@@ -166,28 +126,19 @@ object TrekBilling {
|
||||
client(activity).queryPurchasesAsync(params) { result, purchases ->
|
||||
val held = if (result.responseCode == BillingClient.BillingResponseCode.OK) newest(purchases, PREFIX) else null
|
||||
when {
|
||||
held?.isAcknowledged == true -> call.resolve(JSObject().put("kind", "subscribed"))
|
||||
held != null -> call.resolve(receipt(held).put("kind", "bought"))
|
||||
trialRenewalPrice != null && result.responseCode != BillingClient.BillingResponseCode.OK ->
|
||||
call.resolve(JSObject().put("kind", "offer-changed"))
|
||||
purchases.any { p -> p.purchaseState == Purchase.PurchaseState.PENDING && p.products.any { it.startsWith(PREFIX) } } ->
|
||||
call.resolve(JSObject().put("kind", "pending"))
|
||||
else -> launchPurchase(activity, call, id, trialRenewalPrice)
|
||||
held == null -> launchPurchase(activity, call, id)
|
||||
held.isAcknowledged -> call.resolve(JSObject().put("kind", "subscribed"))
|
||||
else -> call.resolve(receipt(held).put("kind", "bought"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun launchPurchase(activity: Activity, call: PluginCall, id: String, trialRenewalPrice: String?) {
|
||||
private fun launchPurchase(activity: Activity, call: PluginCall, id: String) {
|
||||
details(activity, listOf(id)) { found ->
|
||||
val product = found.firstOrNull()
|
||||
val offer = product?.let { listed ->
|
||||
if (trialRenewalPrice == null) baseOffer(listed)
|
||||
else trialOffer(listed)?.takeIf { displayPrice(listed) == trialRenewalPrice }
|
||||
}
|
||||
if (product == null || offer == null) {
|
||||
return@details call.resolve(JSObject().put("kind", if (trialRenewalPrice != null) "offer-changed" else "failed"))
|
||||
}
|
||||
val offer = product?.let(::baseOffer)
|
||||
if (product == null || offer == null) return@details call.resolve(JSObject().put("kind", "failed"))
|
||||
pendingPurchase?.resolve(JSObject().put("kind", "cancelled"))
|
||||
pendingPurchase = call
|
||||
pendingProduct = id
|
||||
@@ -324,7 +275,6 @@ object TrekBilling {
|
||||
newest(purchases.filter { !it.isAcknowledged }, prefix)
|
||||
|
||||
private const val PREFIX = "cloud."
|
||||
private const val TRIAL_OFFER_ID = "trek-trial-7-days"
|
||||
|
||||
internal fun newest(purchases: List<Purchase>, prefix: String): Purchase? = purchases
|
||||
.filter { p -> p.purchaseState == Purchase.PurchaseState.PURCHASED && p.products.any { it.startsWith(prefix) } }
|
||||
|
||||
@@ -688,40 +688,14 @@ extension TrekShellPlugin {
|
||||
let ids = call.getArray("ids", String.self) ?? []
|
||||
Task {
|
||||
let sandbox = await Self.buysInSandbox()
|
||||
guard !ids.isEmpty, AppStore.canMakePayments, let products = try? await Product.products(for: ids) else {
|
||||
guard AppStore.canMakePayments, let products = try? await Product.products(for: ids) else {
|
||||
call.resolve(["products": [], "sandbox": sandbox])
|
||||
return
|
||||
}
|
||||
var canStartTrial = false
|
||||
if products.contains(where: Self.hasSevenDayFreeTrial) {
|
||||
canStartTrial = await TrekStore.currentEntitlement(prefix: "cloud.") == nil
|
||||
}
|
||||
var groupEligibility: [String: Bool] = [:]
|
||||
var rows: [[String: Any]] = []
|
||||
for product in products {
|
||||
var freeTrial = false
|
||||
if canStartTrial, Self.hasSevenDayFreeTrial(product), let subscription = product.subscription {
|
||||
let group = subscription.subscriptionGroupID
|
||||
if let cached = groupEligibility[group] {
|
||||
freeTrial = cached
|
||||
} else {
|
||||
freeTrial = await subscription.isEligibleForIntroOffer
|
||||
groupEligibility[group] = freeTrial
|
||||
}
|
||||
}
|
||||
rows.append(["id": product.id, "displayPrice": product.displayPrice, "freeTrial": freeTrial])
|
||||
}
|
||||
call.resolve(["products": rows, "sandbox": sandbox])
|
||||
call.resolve(["products": products.map { ["id": $0.id, "displayPrice": $0.displayPrice] }, "sandbox": sandbox])
|
||||
}
|
||||
}
|
||||
|
||||
private static func hasSevenDayFreeTrial(_ product: Product) -> Bool {
|
||||
guard let offer = product.subscription?.introductoryOffer,
|
||||
offer.paymentMode == .freeTrial, offer.price == 0, offer.periodCount == 1 else { return false }
|
||||
return (offer.period.unit == .week && offer.period.value == 1)
|
||||
|| (offer.period.unit == .day && offer.period.value == 7)
|
||||
}
|
||||
|
||||
/// Whether this build buys in the App Store sandbox: TestFlight, App Review and
|
||||
/// Xcode builds do, and while TREK Cloud's orders are closed only they may buy.
|
||||
/// The signed app transaction names its environment; the receipt's file name,
|
||||
@@ -752,7 +726,6 @@ extension TrekShellPlugin {
|
||||
call.reject("productId is required")
|
||||
return
|
||||
}
|
||||
let trialRenewalPrice = call.getString("trialRenewalPrice")
|
||||
Task {
|
||||
// One subscription per Apple ID: another plan would change it, not add one.
|
||||
// A held one that was delivered stops the purchase here. One that was paid
|
||||
@@ -767,18 +740,9 @@ extension TrekShellPlugin {
|
||||
}
|
||||
do {
|
||||
guard let product = try await Product.products(for: [id]).first else {
|
||||
call.resolve(["kind": trialRenewalPrice == nil ? "failed" : "offer-changed"])
|
||||
call.resolve(["kind": "failed"])
|
||||
return
|
||||
}
|
||||
if let trialRenewalPrice {
|
||||
guard product.displayPrice == trialRenewalPrice, Self.hasSevenDayFreeTrial(product),
|
||||
let subscription = product.subscription,
|
||||
await subscription.isEligibleForIntroOffer else {
|
||||
call.resolve(["kind": "offer-changed"])
|
||||
return
|
||||
}
|
||||
}
|
||||
// StoreKit applies an eligible introductory offer in its purchase sheet.
|
||||
switch try await product.purchase() {
|
||||
case .success(let verification):
|
||||
guard case .verified(let transaction) = verification else {
|
||||
|
||||
+130
-167
@@ -7,15 +7,8 @@ import { PASSWORD_MIN_LENGTH, passwordProblem, passwordRuleStates } from '../../
|
||||
import logoWhite from '../public/logo-light.svg'; // #fff wordmark, for the landscape
|
||||
import { pageUnderStatusBar } from '../src/native/appBoot';
|
||||
import { AUTH_GATE_NAMES, canSignInInApp, type AuthGate } from '../src/native/authGate';
|
||||
import {
|
||||
isNewCloudPlan,
|
||||
matchesPurchaseAgreement,
|
||||
opensSoon,
|
||||
planForUnclaimedPurchase,
|
||||
refundedBeforeOpening,
|
||||
type CloudPurchaseAgreement,
|
||||
} from '../src/native/cloudOrders';
|
||||
import { fakeIapClient, getIapClient, productIdFor, type IapProduct, type Purchase } from '../src/native/iap';
|
||||
import { isNewCloudPlan, opensSoon, planForUnclaimedPurchase, refundedBeforeOpening } from '../src/native/cloudOrders';
|
||||
import { fakeIapClient, getIapClient, productIdFor, type Purchase } from '../src/native/iap';
|
||||
import {
|
||||
APP_STORE_SUBSCRIPTIONS_URL,
|
||||
AUTH_PROXY_DOCS_URL,
|
||||
@@ -158,11 +151,12 @@ const I = {
|
||||
globe: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20',
|
||||
image:
|
||||
'M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zM21 15l-5-5L5 21',
|
||||
spark: 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z',
|
||||
mail: 'M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zM3 7l9 6 9-6',
|
||||
people:
|
||||
'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75',
|
||||
shield: 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10',
|
||||
check: 'M20 6 9 17l-5-5',
|
||||
cross: 'M6 6l12 12M18 6 6 18',
|
||||
lock: 'M6 11h12a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zM8 11V8a4 4 0 0 1 8 0v3',
|
||||
key: 'M7.5 20a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM10.7 12.3 21 2M16 7l3 3M14 9l2 2',
|
||||
alert: 'M12 21.5a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19zM12 7.5v5.5M12 16.5h.01',
|
||||
@@ -321,8 +315,7 @@ function showWelcome(opts: { back?: boolean } = {}): void {
|
||||
const perk = (glyph: string, title: string, sub: string) =>
|
||||
el('div', {}, el('i', {}, icon(glyph, 17)), el('span', {}, el('b', {}, title), el('small', {}, sub)));
|
||||
|
||||
const trial = el('span', { className: 'trial-badge', hidden: true }, t('native.trial.badge'));
|
||||
const discover = el('button', { type: 'button', className: 'cta discover' }, t('native.welcome.discover'), trial);
|
||||
const discover = el('button', { type: 'button', className: 'cta' }, t('native.welcome.discover'));
|
||||
discover.addEventListener('click', () => {
|
||||
void tap();
|
||||
showPlans();
|
||||
@@ -333,7 +326,7 @@ function showWelcome(opts: { back?: boolean } = {}): void {
|
||||
showConnect();
|
||||
});
|
||||
|
||||
const screen = show(
|
||||
show(
|
||||
'welcome',
|
||||
WELCOME_CAMERA,
|
||||
{
|
||||
@@ -358,9 +351,6 @@ function showWelcome(opts: { back?: boolean } = {}): void {
|
||||
},
|
||||
opts
|
||||
);
|
||||
void availableWelcomeTrial().then((available) => {
|
||||
if (screen.node.isConnected) trial.hidden = !available;
|
||||
});
|
||||
}
|
||||
|
||||
// ── Connect (address) ───────────────────────────────────────────────────────
|
||||
@@ -674,7 +664,7 @@ interface CloudPlan {
|
||||
yearlyCents?: number;
|
||||
currency?: 'EUR' | 'USD';
|
||||
aiDocuments: number;
|
||||
aiDocumentLimit?: number | null;
|
||||
aiDocumentLimit?: 0 | null;
|
||||
aiAssistant?: 'planned' | 'included' | 'unavailable';
|
||||
bookingMailImport?: boolean;
|
||||
storageGb: number;
|
||||
@@ -691,24 +681,24 @@ const SAMPLE_PLANS: CloudPlan[] = [
|
||||
{
|
||||
id: 'start',
|
||||
name: 'Start',
|
||||
monthlyCents: 599,
|
||||
monthlyCents: 499,
|
||||
yearlyCents: 4899,
|
||||
currency: 'USD',
|
||||
aiDocuments: 0,
|
||||
aiDocumentLimit: 0,
|
||||
storageGb: 50,
|
||||
storageGb: 200,
|
||||
},
|
||||
{
|
||||
id: 'plus',
|
||||
name: 'Plus',
|
||||
monthlyCents: 1199,
|
||||
monthlyCents: 999,
|
||||
yearlyCents: 9900,
|
||||
currency: 'USD',
|
||||
aiDocuments: 100,
|
||||
aiDocumentLimit: null,
|
||||
aiAssistant: 'included',
|
||||
aiAssistant: 'planned',
|
||||
bookingMailImport: true,
|
||||
storageGb: 50,
|
||||
storageGb: 200,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -716,8 +706,6 @@ interface CloudPlans {
|
||||
plans: CloudPlan[];
|
||||
/** Orders are closed: only a test build may buy, and the store charges it nothing. */
|
||||
closed: boolean;
|
||||
/** Only the live catalogue's explicit opening permits customer trial advertising. */
|
||||
open?: boolean;
|
||||
}
|
||||
|
||||
async function fetchPlans(): Promise<CloudPlans | null> {
|
||||
@@ -726,8 +714,7 @@ async function fetchPlans(): Promise<CloudPlans | null> {
|
||||
const data = typeof res.data === 'string' ? JSON.parse(res.data) : res.data;
|
||||
const body = (data ?? {}) as { plans?: CloudPlan[]; ordering?: string };
|
||||
const plans = Array.isArray(body.plans) ? body.plans.filter((plan) => isNewCloudPlan(plan.id)) : [];
|
||||
if (plans.length)
|
||||
return { plans, closed: body.ordering === 'closed', open: res.status === 200 && body.ordering === 'open' };
|
||||
if (plans.length) return { plans, closed: body.ordering === 'closed' };
|
||||
} catch {
|
||||
// Fall through to the preview fallback.
|
||||
}
|
||||
@@ -743,44 +730,22 @@ async function fetchPlans(): Promise<CloudPlans | null> {
|
||||
*/
|
||||
interface Offer {
|
||||
canBuy: boolean;
|
||||
storeProducts: Map<string, IapProduct> | null;
|
||||
canShowTrial: boolean;
|
||||
storePrices: Map<string, string> | null;
|
||||
/** Orders are closed and this is no test build: the plans show, nothing is for sale yet. */
|
||||
opensSoon: boolean;
|
||||
}
|
||||
|
||||
function offerFor(
|
||||
offer: Offer,
|
||||
plan: CloudPlan,
|
||||
interval: 'month' | 'year'
|
||||
): { label: string; buyable: boolean; freeTrial: boolean } {
|
||||
if (!offer.canBuy) return { label: '', buyable: false, freeTrial: false };
|
||||
function offerFor(offer: Offer, plan: CloudPlan, interval: 'month' | 'year'): { label: string; buyable: boolean } {
|
||||
if (!offer.canBuy) return { label: '', buyable: false };
|
||||
if (iap !== fakeIapClient) {
|
||||
const product = offer.storeProducts?.get(productIdFor(plan.id, interval));
|
||||
const label = product?.displayPrice ?? '';
|
||||
return {
|
||||
label,
|
||||
buyable: label !== '',
|
||||
freeTrial: label !== '' && offer.canShowTrial && product?.freeTrial === true,
|
||||
};
|
||||
const label = offer.storePrices?.get(productIdFor(plan.id, interval)) ?? '';
|
||||
return { label, buyable: label !== '' };
|
||||
}
|
||||
const cents = interval === 'year' ? plan.yearlyCents : plan.monthlyCents;
|
||||
const currency = plan.currency ?? 'EUR';
|
||||
const label =
|
||||
typeof cents === 'number' ? new Intl.NumberFormat(locale, { style: 'currency', currency }).format(cents / 100) : '';
|
||||
return { label, buyable: label !== '', freeTrial: false };
|
||||
}
|
||||
|
||||
function storeIds(plans: CloudPlan[]): string[] {
|
||||
return plans.flatMap((p) => [productIdFor(p.id, 'month'), productIdFor(p.id, 'year')]);
|
||||
}
|
||||
|
||||
async function availableWelcomeTrial(): Promise<boolean> {
|
||||
if (iap === fakeIapClient || !(await iapReady)) return false;
|
||||
const list = await fetchPlans();
|
||||
if (!list?.open) return false;
|
||||
const products = await iap.products(storeIds(list.plans));
|
||||
return Array.from(products.values()).some((product) => product.freeTrial && product.displayPrice !== '');
|
||||
return { label, buyable: label !== '' };
|
||||
}
|
||||
|
||||
async function loadOffer(list: CloudPlans): Promise<Offer> {
|
||||
@@ -790,61 +755,39 @@ async function loadOffer(list: CloudPlans): Promise<Offer> {
|
||||
const sandbox = list.closed && !onPlay ? await iap.isSandbox().catch(() => false) : false;
|
||||
const soon = opensSoon({ available, closed: list.closed, sandbox, onPlay });
|
||||
const canBuy = available && !soon;
|
||||
if (!canBuy || iap === fakeIapClient) return { canBuy, storeProducts: null, canShowTrial: false, opensSoon: soon };
|
||||
return {
|
||||
canBuy,
|
||||
storeProducts: await iap.products(storeIds(list.plans)),
|
||||
canShowTrial: list.open === true,
|
||||
opensSoon: soon,
|
||||
};
|
||||
if (!canBuy || iap === fakeIapClient) return { canBuy, storePrices: null, opensSoon: soon };
|
||||
const ids = list.plans.flatMap((p) => [productIdFor(p.id, 'month'), productIdFor(p.id, 'year')]);
|
||||
return { canBuy, storePrices: await iap.prices(ids), opensSoon: soon };
|
||||
}
|
||||
|
||||
function planFeatures(plan: CloudPlan): HTMLLIElement[] {
|
||||
const row = (label: string, value: string, glyph: string, unavailable = false) =>
|
||||
el(
|
||||
'li',
|
||||
{ className: unavailable ? 'spec off' : 'spec' },
|
||||
el('i', {}, icon(glyph, 16)),
|
||||
el('b', {}, label),
|
||||
el('bdi', {}, value)
|
||||
);
|
||||
const feature = (label: string, included: boolean) =>
|
||||
row(
|
||||
label,
|
||||
t(included ? 'native.plans.included' : 'native.plans.notIncluded'),
|
||||
included ? I.check : I.cross,
|
||||
!included
|
||||
);
|
||||
/** The plan the picker starts on and marks: the smallest one with AI documents, the one most trips want. */
|
||||
function recommendedPlan(plans: CloudPlan[]): CloudPlan | undefined {
|
||||
return plans.find((p) => p.aiDocuments > 0) ?? plans[0];
|
||||
}
|
||||
|
||||
const storage = plan.storageGb >= 1000 ? `${count(plan.storageGb / 1000)} TB` : `${count(plan.storageGb)} GB`;
|
||||
const aiDocuments = plan.aiDocumentLimit === null || (plan.aiDocumentLimit ?? plan.aiDocuments) > 0;
|
||||
return [
|
||||
row(t('native.plans.storage'), storage, I.image),
|
||||
feature(t('native.plans.aiLabel'), aiDocuments),
|
||||
feature(t('native.plans.assistant'), plan.aiAssistant === 'included'),
|
||||
feature(t('native.plans.mailImport'), plan.bookingMailImport === true),
|
||||
row(t('native.plans.unlimitedSub'), t('native.plans.unlimited'), I.people),
|
||||
];
|
||||
/** The kind of trip each plan is for: a weekend away, a round trip, a long journey, the whole world. */
|
||||
const TRIPS: Record<string, { titleKey: string; textKey: string }> = {
|
||||
start: { titleKey: 'native.trip.start.title', textKey: 'native.trip.start.text' },
|
||||
basis: { titleKey: 'native.trip.basis.title', textKey: 'native.trip.basis.text' },
|
||||
plus: { titleKey: 'native.trip.plus.title', textKey: 'native.trip.plus.text' },
|
||||
pro: { titleKey: 'native.trip.pro.title', textKey: 'native.trip.pro.text' },
|
||||
};
|
||||
/** A plan's trip, its title and one line; a plan the app does not know keeps its own name. */
|
||||
function tripOf(plan: CloudPlan): { title: string; text: string } {
|
||||
const trip = TRIPS[plan.id];
|
||||
return trip ? { title: t(trip.titleKey), text: t(trip.textKey) } : { title: plan.name, text: '' };
|
||||
}
|
||||
|
||||
function per(interval: 'month' | 'year'): string {
|
||||
return interval === 'year' ? t('native.plans.perYear') : t('native.plans.perMonth');
|
||||
}
|
||||
|
||||
function trialPrice(price: string, interval: 'month' | 'year'): string {
|
||||
return t('native.trial.price', { price, period: per(interval) });
|
||||
}
|
||||
|
||||
function trialCancellation(): string {
|
||||
return t(onPlay ? 'native.trial.cancelPlay' : 'native.trial.cancelApple');
|
||||
}
|
||||
|
||||
/** The restore button of the plans on screen, which redeems a payment that cleared later. */
|
||||
let resumeRestore: (() => void) | null = null;
|
||||
let watchingTransactions = false;
|
||||
/** Where the camera stood on the plan chosen last, for the screens that follow it. */
|
||||
let chosenCamera: Camera = cameraForPlan(1);
|
||||
/** Restore a choice when returning from setup. A fresh entry opens Plus. */
|
||||
/** The plan chosen last, so coming back to the plans finds it still chosen. */
|
||||
let chosenPlanId: string | null = null;
|
||||
let chosenInterval: 'month' | 'year' = 'month';
|
||||
|
||||
@@ -909,11 +852,14 @@ function restoreButton(plans: CloudPlan[]): HTMLButtonElement {
|
||||
function showPlans(opts: { back?: boolean } = {}): void {
|
||||
let interval: 'month' | 'year' = chosenInterval;
|
||||
let plans: CloudPlan[] = [];
|
||||
let offer: Offer = { canBuy: false, storeProducts: null, canShowTrial: false, opensSoon: false };
|
||||
let offer: Offer = { canBuy: false, storePrices: null, opensSoon: false };
|
||||
let selectedId: string | null = null;
|
||||
|
||||
const tiers = el('div', { className: 'tiers', role: 'radiogroup', hidden: true });
|
||||
tiers.setAttribute('aria-label', t('native.plans.title'));
|
||||
const title = el('h1', {});
|
||||
const text = el('p', {});
|
||||
const trip = el('div', { className: 'trip' }, title, text);
|
||||
|
||||
const monthBtn = el('button', { type: 'button', role: 'radio' }, t('native.plans.monthly'));
|
||||
const yearBtn = el('button', { type: 'button', role: 'radio' }, t('native.plans.yearly'));
|
||||
@@ -930,20 +876,18 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
const pricePer = el('span', {});
|
||||
const price = el('div', { className: 'price' }, priceValue, pricePer);
|
||||
const equals = el('div', { className: 'equals' });
|
||||
const trial = el('p', { className: 'trial-price', hidden: true });
|
||||
const pricebox = el('div', { className: 'pricebox' }, cycle, price, equals, trial);
|
||||
const specs = el('ul', { className: 'specs', role: 'list' });
|
||||
const pricebox = el('div', { className: 'pricebox' }, cycle, price, equals);
|
||||
const specs = el('div', { className: 'specs' });
|
||||
const foot = el('div', { className: 'pad', hidden: true });
|
||||
const legal = el('p', { className: 'legal' });
|
||||
|
||||
const loading = el('div', { className: 'loading' }, el('span', { className: 'spin' }));
|
||||
const details = el('div', { className: 'stack', hidden: true }, pricebox, specs);
|
||||
const details = el('div', { className: 'stack', hidden: true }, trip, pricebox, specs);
|
||||
const choose = el('button', { type: 'button', className: 'cta', hidden: true });
|
||||
const dock = el('div', { className: 'dock' }, choose);
|
||||
|
||||
const screen = show(
|
||||
'plain',
|
||||
opts.back ? chosenCamera : cameraForPlan(1),
|
||||
chosenCamera,
|
||||
{
|
||||
back: () => showWelcome({ back: true }),
|
||||
content: [el('div', { className: 'pad lift' }, tiers, loading, details), foot, dock],
|
||||
@@ -990,11 +934,20 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
yearBtn.setAttribute('aria-checked', String(interval === 'year'));
|
||||
cycle.dataset.year = String(interval === 'year');
|
||||
|
||||
const { label, buyable, freeTrial } = interval === 'month' ? month : year;
|
||||
// An introductory offer states the free period and renewal price together.
|
||||
price.hidden = !label || freeTrial;
|
||||
const { title: tripTitle, text: tripText } = tripOf(plan);
|
||||
const recommended = recommendedPlan(plans)?.id === plan.id;
|
||||
title.replaceChildren(
|
||||
tripTitle,
|
||||
...(recommended ? [el('span', { className: 'badge' }, t('native.plans.recommended'))] : [])
|
||||
);
|
||||
text.textContent = tripText;
|
||||
text.hidden = !tripText;
|
||||
|
||||
const { label, buyable } = interval === 'month' ? month : year;
|
||||
// No price yet (orders not open): the plan shows without one rather than with an empty one.
|
||||
price.hidden = !label;
|
||||
pricePer.textContent = per(interval);
|
||||
if (label && !freeTrial) paintPrice(label, animate);
|
||||
if (label) paintPrice(label, animate);
|
||||
|
||||
// Without a price in either period (orders not open yet) the switch would choose between nothing.
|
||||
pricebox.hidden = !month.label && !year.label;
|
||||
@@ -1002,23 +955,59 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
yearBtn.disabled = !year.label;
|
||||
const yearAmount = amountIn(year.label);
|
||||
equals.textContent =
|
||||
!label || !year.label || freeTrial
|
||||
!label || !year.label
|
||||
? ''
|
||||
: interval === 'month'
|
||||
? t('native.plans.yearlyIs', { price: year.label })
|
||||
: yearAmount
|
||||
? t('native.plans.monthlyIs', { price: yearAmount.render(yearAmount.value / 12) })
|
||||
: '';
|
||||
trial.hidden = !freeTrial;
|
||||
trial.textContent = freeTrial ? trialPrice(label, interval) : '';
|
||||
legal.textContent = freeTrial
|
||||
? trialCancellation()
|
||||
: t(onPlay ? 'native.plans.legalAndroid' : 'native.plans.legal');
|
||||
|
||||
specs.replaceChildren(...planFeatures(plan));
|
||||
const gb = plan.storageGb >= 1000 ? `${count(plan.storageGb / 1000)} TB` : `${count(plan.storageGb)} GB`;
|
||||
const notIncluded = t('native.plans.aiNone');
|
||||
const included = t('native.plans.included');
|
||||
const assistant = plan.aiAssistant === 'included';
|
||||
const tile = (glyph: string, big: string, small: string, off = false) =>
|
||||
el(
|
||||
'span',
|
||||
{ className: off ? 'spec off' : 'spec' },
|
||||
el('i', {}, icon(glyph, 17)),
|
||||
el('span', {}, el('b', {}, big), el('small', {}, small))
|
||||
);
|
||||
specs.replaceChildren(
|
||||
tile(I.image, gb, t('native.plans.storageFairUse')),
|
||||
plan.aiDocuments > 0
|
||||
? tile(
|
||||
I.spark,
|
||||
plan.aiDocumentLimit === null
|
||||
? t('native.plans.unlimited')
|
||||
: t('native.plans.aiPerMonth', { n: count(plan.aiDocuments) }),
|
||||
t('native.plans.aiLabel')
|
||||
)
|
||||
: tile(I.spark, notIncluded, t('native.plans.aiLabel'), true),
|
||||
tile(
|
||||
I.spark,
|
||||
assistant ? included : plan.aiAssistant === 'planned' ? t('native.plans.planned') : notIncluded,
|
||||
t('native.plans.assistant'),
|
||||
!assistant
|
||||
),
|
||||
tile(
|
||||
I.mail,
|
||||
plan.bookingMailImport ? included : notIncluded,
|
||||
t('native.plans.mailImport'),
|
||||
!plan.bookingMailImport
|
||||
),
|
||||
el(
|
||||
'span',
|
||||
{ className: 'spec wide' },
|
||||
el('i', {}, icon(I.people, 17)),
|
||||
el('span', {}, el('b', {}, t('native.plans.unlimited')), el('small', {}, t('native.plans.unlimitedSub'))),
|
||||
el('em', {}, t('native.plans.inEveryPlan'))
|
||||
)
|
||||
);
|
||||
|
||||
choose.hidden = !buyable;
|
||||
choose.textContent = t('native.plans.choose', { plan: plan.name });
|
||||
choose.textContent = t('native.plans.choose', { trip: tripTitle });
|
||||
chosenCamera = cameraForPlan(index);
|
||||
chosenPlanId = plan.id;
|
||||
chosenInterval = interval;
|
||||
@@ -1053,7 +1042,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
showSubscribed();
|
||||
return;
|
||||
}
|
||||
showClaim(plan, selectedInterval, price.label, { freeTrial: price.freeTrial });
|
||||
showClaim(plan, selectedInterval, price.label);
|
||||
});
|
||||
|
||||
const load = async () => {
|
||||
@@ -1071,9 +1060,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
}
|
||||
offer = await loadOffer(list);
|
||||
plans = list.plans;
|
||||
const previousId = opts.back ? chosenPlanId : null;
|
||||
selectedId =
|
||||
plans.find((p) => p.id === previousId)?.id ?? plans.find((p) => p.id === 'plus')?.id ?? plans[0]?.id ?? null;
|
||||
selectedId = plans.find((p) => p.id === chosenPlanId)?.id ?? recommendedPlan(plans)?.id ?? null;
|
||||
tiers.replaceChildren(
|
||||
...plans.map((p) => {
|
||||
const b = el('button', { type: 'button', role: 'radio', dataset: { plan: p.id } }, p.name);
|
||||
@@ -1096,7 +1083,7 @@ function showPlans(opts: { back?: boolean } = {}): void {
|
||||
);
|
||||
} else {
|
||||
foot.replaceChildren(
|
||||
legal,
|
||||
el('p', { className: 'legal' }, t(onPlay ? 'native.plans.legalAndroid' : 'native.plans.legal')),
|
||||
el(
|
||||
'div',
|
||||
{ className: 'legal-links' },
|
||||
@@ -1133,7 +1120,11 @@ async function slugStatus(slug: string): Promise<SlugStatus> {
|
||||
* (terms § 2 (1a), § 327h BGB), as the control plane words and versions it. The
|
||||
* app shows the server's text, never its own, and sends back the version it showed.
|
||||
*/
|
||||
async function fetchConsent(): Promise<CloudPurchaseAgreement | null> {
|
||||
interface DeviationsConsent {
|
||||
version: string;
|
||||
text: string;
|
||||
}
|
||||
async function fetchConsent(): Promise<DeviationsConsent | null> {
|
||||
try {
|
||||
const res = await CapacitorHttp.get({
|
||||
url: `${CLOUD_URL}/api/iap/consent`,
|
||||
@@ -1204,7 +1195,7 @@ function showClaim(
|
||||
plan: Pick<CloudPlan, 'id' | 'name'>,
|
||||
interval: 'month' | 'year',
|
||||
priceLabel: string,
|
||||
opts: { back?: boolean; bought?: Purchase; freeTrial?: boolean } = {}
|
||||
opts: { back?: boolean; bought?: Purchase } = {}
|
||||
): void {
|
||||
/** A purchase that went through but whose redeem did not: a retry redeems it again instead of buying twice. */
|
||||
let bought: Purchase | null = opts.bought ?? null;
|
||||
@@ -1288,7 +1279,7 @@ function showClaim(
|
||||
};
|
||||
|
||||
// The § 327h agreement, asked on its own before anything is bought.
|
||||
let consent: CloudPurchaseAgreement | null = null;
|
||||
let consent: DeviationsConsent | null = null;
|
||||
const consentBox = el('input', { type: 'checkbox' });
|
||||
const consentText = el('span', { className: 'consent-text' }, t('native.claim.consentLoading'));
|
||||
const consentField = el(
|
||||
@@ -1297,26 +1288,19 @@ function showClaim(
|
||||
consentBox,
|
||||
el('span', {}, el('strong', {}, t('native.claim.consentTitle')), consentText)
|
||||
);
|
||||
const showConsent = (current: CloudPurchaseAgreement | null): void => {
|
||||
consent = current;
|
||||
const loadConsent = async (): Promise<DeviationsConsent | null> => {
|
||||
consentBox.checked = false;
|
||||
consentBox.disabled = consent === null;
|
||||
consentText.textContent = consent ? consent.text : t('native.claim.consentUnavailable');
|
||||
};
|
||||
const loadConsent = async (): Promise<CloudPurchaseAgreement | null> => {
|
||||
consentBox.disabled = true;
|
||||
consentText.textContent = t('native.claim.consentLoading');
|
||||
showConsent(await fetchConsent());
|
||||
consent = await fetchConsent();
|
||||
consentBox.disabled = consent === null;
|
||||
consentText.textContent = consent ? consent.text : t('native.claim.consentUnavailable');
|
||||
return consent;
|
||||
};
|
||||
void loadConsent();
|
||||
|
||||
const subscribeLabel = () =>
|
||||
bought
|
||||
? t('native.claim.completeSetup')
|
||||
: opts.freeTrial
|
||||
? t('native.trial.badge')
|
||||
: t('native.claim.subscribe', { price: priceLabel });
|
||||
bought ? t('native.claim.completeSetup') : t('native.claim.subscribe', { price: priceLabel });
|
||||
const submit = el('button', { type: 'button', className: 'cta' }, subscribeLabel());
|
||||
// What is about to be bought, so nobody pays for a plan they did not mean.
|
||||
const change = el('button', { type: 'button' }, t('native.claim.change'));
|
||||
@@ -1324,25 +1308,19 @@ function showClaim(
|
||||
void tap();
|
||||
showPlans({ back: true });
|
||||
});
|
||||
const planPrice = !priceLabel
|
||||
? null
|
||||
: opts.freeTrial
|
||||
? el('small', {}, trialPrice(priceLabel, interval))
|
||||
: el('small', { dir: 'ltr' }, `${priceLabel} ${per(interval)}`);
|
||||
const planRow = el(
|
||||
'div',
|
||||
{ className: 'plan-row' },
|
||||
el('span', {}, el('b', {}, plan.name), ...(planPrice ? [planPrice] : [])),
|
||||
el(
|
||||
'span',
|
||||
{},
|
||||
el('b', {}, plan.name),
|
||||
...(priceLabel ? [el('small', { dir: 'ltr' }, `${priceLabel} ${per(interval)}`)] : [])
|
||||
),
|
||||
// A purchase already made is not a choice any more.
|
||||
...(bought ? [] : [change])
|
||||
);
|
||||
const error = notice('');
|
||||
const checkoutDock = el(
|
||||
'div',
|
||||
{ className: 'dock' },
|
||||
submit,
|
||||
el('p', { className: 'fine' }, opts.freeTrial ? trialCancellation() : t('native.claim.renews'))
|
||||
);
|
||||
const form = el(
|
||||
'form',
|
||||
{ className: 'pad form', noValidate: true },
|
||||
@@ -1369,7 +1347,10 @@ function showClaim(
|
||||
{
|
||||
back: () => showPlans({ back: true }),
|
||||
overlay: [card.node],
|
||||
content: [form, checkoutDock],
|
||||
content: [
|
||||
form,
|
||||
el('div', { className: 'dock' }, submit, el('p', { className: 'fine' }, t('native.claim.renews'))),
|
||||
],
|
||||
},
|
||||
opts
|
||||
);
|
||||
@@ -1459,8 +1440,7 @@ function showClaim(
|
||||
consentBox.focus();
|
||||
return;
|
||||
}
|
||||
const acceptedConsent = consent;
|
||||
const consentVersion = acceptedConsent?.version ?? null;
|
||||
const consentVersion = consent ? consent.version : null;
|
||||
|
||||
void tap(ImpactStyle.Medium);
|
||||
// The purchase sheet and the progress want the whole screen, not the keyboard.
|
||||
@@ -1480,24 +1460,7 @@ function showClaim(
|
||||
};
|
||||
|
||||
if (!bought) {
|
||||
const currentConsent = await fetchConsent();
|
||||
if (!form.isConnected) return;
|
||||
if (!matchesPurchaseAgreement(acceptedConsent, currentConsent)) {
|
||||
restore();
|
||||
showConsent(currentConsent);
|
||||
setNotice(error, t(currentConsent ? 'native.claim.consentRequired' : 'native.claim.consentUnavailable'));
|
||||
if (currentConsent) consentBox.focus();
|
||||
return;
|
||||
}
|
||||
const trialRenewalPrice = opts.freeTrial ? priceLabel : undefined;
|
||||
const outcome = await iap.purchase(productIdFor(plan.id, interval), trialRenewalPrice);
|
||||
if (outcome.kind === 'offer-changed') {
|
||||
restore();
|
||||
planPrice?.remove();
|
||||
checkoutDock.hidden = true;
|
||||
setNotice(error, t('native.trial.changed'));
|
||||
return;
|
||||
}
|
||||
const outcome = await iap.purchase(productIdFor(plan.id, interval));
|
||||
if (outcome.kind === 'cancelled') {
|
||||
restore();
|
||||
setNotice(error, t('native.claim.cancelled'));
|
||||
|
||||
@@ -320,14 +320,14 @@ input {
|
||||
overflow: hidden;
|
||||
background: var(--sea);
|
||||
margin-bottom: -1px;
|
||||
height: max(calc(var(--safe-top) + 68px), min(252px, 30svh));
|
||||
height: min(300px, 36svh);
|
||||
}
|
||||
.hero.tall {
|
||||
height: min(320px, 38svh);
|
||||
}
|
||||
.hero.welcome {
|
||||
height: min(352px, 42svh);
|
||||
min-height: 236px;
|
||||
height: min(376px, 44.5svh);
|
||||
min-height: 250px;
|
||||
}
|
||||
.hero .scenery {
|
||||
position: absolute;
|
||||
@@ -529,7 +529,7 @@ input {
|
||||
}
|
||||
.push {
|
||||
flex: 1;
|
||||
min-height: clamp(10px, 2svh, 16px);
|
||||
min-height: 0;
|
||||
}
|
||||
h1 {
|
||||
margin: 0;
|
||||
@@ -628,39 +628,6 @@ h1 {
|
||||
font: 700 17px var(--text-face);
|
||||
box-shadow: 0 14px 28px -14px rgba(17, 24, 39, 0.55);
|
||||
}
|
||||
.discover {
|
||||
position: relative;
|
||||
padding-inline: 16px;
|
||||
}
|
||||
.trial-badge,
|
||||
.trial-price {
|
||||
border: 1px solid #bee3d7;
|
||||
background: #e7f6ef;
|
||||
color: #195247;
|
||||
}
|
||||
.trial-badge {
|
||||
position: absolute;
|
||||
inset-block-start: 0;
|
||||
inset-inline: 0;
|
||||
inline-size: max-content;
|
||||
max-inline-size: calc(100% - 20px);
|
||||
margin-inline: auto;
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
box-shadow: 0 2px 6px #11182720;
|
||||
font: 700 11px/1.4 var(--text-face);
|
||||
transform: translateY(calc(-100% + 6px));
|
||||
}
|
||||
.trial-price {
|
||||
margin: 8px 6px 0;
|
||||
padding: 10px 6px;
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 1.4;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.cta2 {
|
||||
min-height: 52px;
|
||||
background: #fff;
|
||||
@@ -748,6 +715,33 @@ h1 {
|
||||
color: var(--ink);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
.trip {
|
||||
min-width: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.trip h1 {
|
||||
font-size: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.trip p {
|
||||
margin: 6px 0 0;
|
||||
color: var(--text);
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.badge {
|
||||
font-family: var(--text-face);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: var(--dark);
|
||||
color: #fff;
|
||||
}
|
||||
.pricebox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -829,52 +823,64 @@ h1 {
|
||||
display: none;
|
||||
}
|
||||
.specs {
|
||||
margin: 0;
|
||||
padding: 0 12px;
|
||||
list-style: none;
|
||||
border-radius: 16px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
.spec {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
padding: 10px 12px;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 0 1px var(--line);
|
||||
}
|
||||
.spec {
|
||||
display: grid;
|
||||
grid-template-columns: 28px minmax(0, 1.6fr) minmax(0, 1fr);
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 44px;
|
||||
padding-block: 8px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.spec + .spec {
|
||||
border-block-start: 1px solid var(--line-soft);
|
||||
}
|
||||
.spec i {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
flex: none;
|
||||
border-radius: 10px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: var(--sand);
|
||||
color: var(--dark);
|
||||
}
|
||||
.spec b {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 1.35;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.spec bdi {
|
||||
justify-self: end;
|
||||
text-align: end;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 1.35;
|
||||
}
|
||||
.spec.off {
|
||||
color: #626672;
|
||||
.spec small {
|
||||
display: block;
|
||||
font-size: 11.5px;
|
||||
color: var(--muted);
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.spec.off i {
|
||||
background: #f0f1f3;
|
||||
color: inherit;
|
||||
color: var(--faint);
|
||||
}
|
||||
.spec.off b {
|
||||
color: var(--muted);
|
||||
}
|
||||
.spec.wide {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.spec.wide em {
|
||||
margin-inline-start: auto;
|
||||
font-style: normal;
|
||||
font-size: 11.5px;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
background: var(--sand);
|
||||
padding: 4px 9px;
|
||||
border-radius: 999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.legal {
|
||||
margin: 2px 0 0;
|
||||
|
||||
@@ -521,6 +521,7 @@ export default function TripFormModal({
|
||||
{t('dashboard.tripTitle')} <span className="text-danger">*</span>
|
||||
</label>
|
||||
<input
|
||||
data-initial-focus={(!embedded && canEditTrip) || undefined}
|
||||
type="text"
|
||||
value={formData.title}
|
||||
onChange={(e) => canEditTrip && update('title', e.target.value)}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
isNewCloudPlan,
|
||||
matchesPurchaseAgreement,
|
||||
opensSoon,
|
||||
planForUnclaimedPurchase,
|
||||
refundedBeforeOpening,
|
||||
} from './cloudOrders';
|
||||
import { isNewCloudPlan, opensSoon, planForUnclaimedPurchase, refundedBeforeOpening } from './cloudOrders';
|
||||
|
||||
describe('opensSoon', () => {
|
||||
const base = { available: true, closed: true, sandbox: false, onPlay: false };
|
||||
@@ -41,15 +35,6 @@ describe('refundedBeforeOpening', () => {
|
||||
});
|
||||
|
||||
describe('Cloud catalog and purchase recovery', () => {
|
||||
it('only carries the accepted agreement into a new purchase if the current version and text still match', () => {
|
||||
const accepted = { version: '2026-12-01', text: 'Agreed changes' };
|
||||
expect(matchesPurchaseAgreement(accepted, { ...accepted })).toBe(true);
|
||||
expect(matchesPurchaseAgreement(accepted, null)).toBe(false);
|
||||
expect(matchesPurchaseAgreement(null, accepted)).toBe(false);
|
||||
expect(matchesPurchaseAgreement(accepted, { ...accepted, version: '2026-12-02' })).toBe(false);
|
||||
expect(matchesPurchaseAgreement(accepted, { ...accepted, text: 'Changed conditions' })).toBe(false);
|
||||
});
|
||||
|
||||
it('only offers Start and Plus even when the server still lists retired plans', () => {
|
||||
expect(['start', 'basis', 'plus', 'pro'].filter(isNewCloudPlan)).toEqual(['start', 'plus']);
|
||||
});
|
||||
|
||||
@@ -29,21 +29,6 @@ export function isNewCloudPlan(id: string): boolean {
|
||||
return id === 'start' || id === 'plus';
|
||||
}
|
||||
|
||||
export interface CloudPurchaseAgreement {
|
||||
version: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
/** Recheck the agreement before opening the store sheet. No agreement means no new purchase. */
|
||||
export function matchesPurchaseAgreement(
|
||||
accepted: CloudPurchaseAgreement | null,
|
||||
current: CloudPurchaseAgreement | null
|
||||
): boolean {
|
||||
return (
|
||||
accepted !== null && current !== null && accepted.version === current.version && accepted.text === current.text
|
||||
);
|
||||
}
|
||||
|
||||
const PLAN_NAMES: Record<string, string> = { start: 'Start', basis: 'Basis', plus: 'Plus', pro: 'Pro' };
|
||||
|
||||
/** A verified purchase can predate the current offer and still need its instance set up. */
|
||||
|
||||
@@ -84,22 +84,15 @@ describe('native client', () => {
|
||||
expect(await fakeIapClient.isSandbox()).toBe(true);
|
||||
});
|
||||
|
||||
it('maps the regular price and explicitly confirmed trial by product', async () => {
|
||||
shell.storeProducts.mockResolvedValue({
|
||||
products: [
|
||||
{ id: 'cloud.plus.monthly', displayPrice: '9,99 €', freeTrial: true },
|
||||
{ id: 'cloud.start.monthly', displayPrice: '4,99 €' },
|
||||
],
|
||||
});
|
||||
const ids = ['cloud.plus.monthly', 'cloud.start.monthly', 'cloud.plus.yearly'];
|
||||
const products = await nativeIapClient.products(ids);
|
||||
expect(shell.storeProducts).toHaveBeenCalledWith({ ids });
|
||||
expect(products.get('cloud.plus.monthly')).toEqual({ displayPrice: '9,99 €', freeTrial: true });
|
||||
expect(products.get('cloud.start.monthly')).toEqual({ displayPrice: '4,99 €', freeTrial: false });
|
||||
expect(products.has('cloud.plus.yearly')).toBe(false);
|
||||
it('maps the store price strings by product', async () => {
|
||||
shell.storeProducts.mockResolvedValue({ products: [{ id: 'cloud.plus.monthly', displayPrice: '9,99 €' }] });
|
||||
const prices = await nativeIapClient.prices(['cloud.plus.monthly', 'cloud.pro.monthly']);
|
||||
expect(shell.storeProducts).toHaveBeenCalledWith({ ids: ['cloud.plus.monthly', 'cloud.pro.monthly'] });
|
||||
expect(prices.get('cloud.plus.monthly')).toBe('9,99 €');
|
||||
expect(prices.has('cloud.pro.monthly')).toBe(false);
|
||||
|
||||
shell.storeProducts.mockRejectedValue(new Error('down'));
|
||||
expect((await nativeIapClient.products(['cloud.plus.monthly'])).size).toBe(0);
|
||||
expect((await nativeIapClient.prices(['cloud.plus.monthly'])).size).toBe(0);
|
||||
});
|
||||
|
||||
it('turns a bought transaction into a receipt', async () => {
|
||||
@@ -131,15 +124,6 @@ describe('native client', () => {
|
||||
expect(await nativeIapClient.held()).toBe(false);
|
||||
});
|
||||
|
||||
it('asks the store to preserve an advertised trial and reports a changed offer without retrying as paid', async () => {
|
||||
shell.storePurchase.mockResolvedValue({ kind: 'offer-changed' });
|
||||
expect(await nativeIapClient.purchase('cloud.plus.monthly', '9,99 €')).toEqual({ kind: 'offer-changed' });
|
||||
expect(shell.storePurchase).toHaveBeenCalledExactlyOnceWith({
|
||||
productId: 'cloud.plus.monthly',
|
||||
trialRenewalPrice: '9,99 €',
|
||||
});
|
||||
});
|
||||
|
||||
it('a build without storeHeld counts as holding nothing; the purchase still guards', async () => {
|
||||
shell.storeHeld.mockRejectedValue(new Error('not implemented'));
|
||||
expect(await nativeIapClient.held()).toBe(false);
|
||||
|
||||
+11
-22
@@ -38,23 +38,17 @@ type PurchaseOutcome =
|
||||
| { kind: 'cancelled' }
|
||||
| { kind: 'pending' }
|
||||
| { kind: 'failed' }
|
||||
| { kind: 'offer-changed' }
|
||||
| { kind: 'subscribed' };
|
||||
|
||||
export interface IapProduct {
|
||||
displayPrice: string;
|
||||
/** The store confirms an eligible first week at no charge. */
|
||||
freeTrial: boolean;
|
||||
}
|
||||
|
||||
export interface IapClient {
|
||||
/** Whether this build can take a payment. */
|
||||
isAvailable(): Promise<boolean>;
|
||||
/**
|
||||
* Store pricing and offer eligibility by product id. A missing product cannot
|
||||
* be bought. Empty for the fake, whose prices come from the plan list.
|
||||
* The store's own price strings by product id, in the buyer's currency. A
|
||||
* product missing from the map cannot be bought here. Empty for the fake, whose
|
||||
* prices come from the plan list.
|
||||
*/
|
||||
products(productIds: string[]): Promise<Map<string, IapProduct>>;
|
||||
prices(productIds: string[]): Promise<Map<string, string>>;
|
||||
/** A test build (TestFlight, App Review), whose purchases cost nothing and may go ahead before the opening. */
|
||||
isSandbox(): Promise<boolean>;
|
||||
/**
|
||||
@@ -64,7 +58,7 @@ export interface IapClient {
|
||||
*/
|
||||
held(): Promise<boolean>;
|
||||
/** Runs the platform's purchase sheet for a product and resolves with what became of it. */
|
||||
purchase(productId: string, trialRenewalPrice?: string): Promise<PurchaseOutcome>;
|
||||
purchase(productId: string): Promise<PurchaseOutcome>;
|
||||
/** Tells the store a purchase was delivered, once its instance exists. */
|
||||
finish(purchase: Purchase): Promise<void>;
|
||||
/** The subscription this store account already holds, for a reinstall or a new device. */
|
||||
@@ -100,7 +94,7 @@ export const fakeIapClient: IapClient = {
|
||||
async isAvailable() {
|
||||
return true;
|
||||
},
|
||||
async products() {
|
||||
async prices() {
|
||||
return new Map();
|
||||
},
|
||||
async isSandbox() {
|
||||
@@ -157,10 +151,10 @@ export const nativeIapClient: IapClient = {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async products(productIds) {
|
||||
async prices(productIds) {
|
||||
try {
|
||||
const { products } = await TrekShell.storeProducts({ ids: productIds });
|
||||
return new Map(products.map((p) => [p.id, { displayPrice: p.displayPrice, freeTrial: p.freeTrial === true }]));
|
||||
return new Map(products.map((p) => [p.id, p.displayPrice]));
|
||||
} catch {
|
||||
return new Map();
|
||||
}
|
||||
@@ -172,9 +166,9 @@ export const nativeIapClient: IapClient = {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async purchase(productId, trialRenewalPrice) {
|
||||
async purchase(productId) {
|
||||
try {
|
||||
const result = await TrekShell.storePurchase({ productId, ...(trialRenewalPrice ? { trialRenewalPrice } : {}) });
|
||||
const result = await TrekShell.storePurchase({ productId });
|
||||
const receipt = result.jws ?? result.purchaseToken;
|
||||
if (result.kind === 'bought' && receipt && result.transactionId) {
|
||||
return {
|
||||
@@ -187,12 +181,7 @@ export const nativeIapClient: IapClient = {
|
||||
},
|
||||
};
|
||||
}
|
||||
if (
|
||||
result.kind === 'cancelled' ||
|
||||
result.kind === 'pending' ||
|
||||
result.kind === 'subscribed' ||
|
||||
result.kind === 'offer-changed'
|
||||
) {
|
||||
if (result.kind === 'cancelled' || result.kind === 'pending' || result.kind === 'subscribed') {
|
||||
return { kind: result.kind };
|
||||
}
|
||||
return { kind: 'failed' };
|
||||
|
||||
@@ -128,14 +128,14 @@ export interface TrekShellPlugin {
|
||||
/** Feature storeKit (iOS) or playBilling (Android): the store's price strings for the products it knows. */
|
||||
storeProducts(options: {
|
||||
ids: string[];
|
||||
}): Promise<{ products: { id: string; displayPrice: string; freeTrial?: boolean }[]; sandbox?: boolean }>;
|
||||
}): Promise<{ products: { id: string; displayPrice: string }[]; sandbox?: boolean }>;
|
||||
/**
|
||||
* The purchase sheet. Set when bought: on iOS `jws`, the signed transaction; on
|
||||
* Android `purchaseToken`, which the control plane verifies with Google Play.
|
||||
*/
|
||||
storePurchase(options: { productId: string; trialRenewalPrice?: string }): Promise<{
|
||||
storePurchase(options: { productId: string }): Promise<{
|
||||
/** `subscribed`: this store account already holds a delivered subscription, so nothing was bought. */
|
||||
kind: 'bought' | 'cancelled' | 'pending' | 'failed' | 'subscribed' | 'offer-changed';
|
||||
kind: 'bought' | 'cancelled' | 'pending' | 'failed' | 'subscribed';
|
||||
jws?: string;
|
||||
purchaseToken?: string;
|
||||
productId?: string;
|
||||
|
||||
@@ -42,8 +42,17 @@ beforeEach(() => {
|
||||
|
||||
afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
function mockFinePointer() {
|
||||
const matchMedia = window.matchMedia.bind(window);
|
||||
vi.stubGlobal('matchMedia', (query: string) => {
|
||||
const result = matchMedia(query);
|
||||
return query === '(pointer: fine)' ? { ...result, matches: true } : result;
|
||||
});
|
||||
}
|
||||
|
||||
describe('DashboardPage', () => {
|
||||
describe('FE-PAGE-DASH-001: Unauthenticated user is redirected', () => {
|
||||
it('does not render dashboard content when not authenticated', () => {
|
||||
@@ -100,7 +109,8 @@ describe('DashboardPage', () => {
|
||||
});
|
||||
|
||||
describe('FE-PAGE-DASH-005: Create Trip button opens TripFormModal', () => {
|
||||
it('clicking New Trip button opens the trip form modal', async () => {
|
||||
it.each(['mouse', 'touch'])('PR-3305: opening the trip form sets the right focus for %s', async (pointer) => {
|
||||
if (pointer === 'mouse') mockFinePointer();
|
||||
const user = userEvent.setup();
|
||||
render(<DashboardPage />);
|
||||
|
||||
@@ -110,10 +120,9 @@ describe('DashboardPage', () => {
|
||||
|
||||
await user.click(screen.getAllByRole('button', { name: /new trip/i })[0]);
|
||||
|
||||
// TripFormModal opens — "Create New Trip" appears in heading and submit button
|
||||
await waitFor(() => {
|
||||
expect(screen.getAllByText(/create new trip/i).length).toBeGreaterThan(0);
|
||||
});
|
||||
const dialog = await screen.findByRole('dialog', { name: 'Create New Trip' });
|
||||
const target = pointer === 'mouse' ? within(dialog).getByPlaceholderText(/summer in japan/i) : dialog;
|
||||
expect(target).toHaveFocus();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -253,7 +262,8 @@ describe('DashboardPage', () => {
|
||||
});
|
||||
|
||||
describe('FE-PAGE-DASH-012: Edit trip opens form with pre-filled data', () => {
|
||||
it('clicking edit on a trip card opens TripFormModal with trip title pre-filled', async () => {
|
||||
it('PR-3305: focuses the prefilled title when editing a trip', async () => {
|
||||
mockFinePointer();
|
||||
const user = userEvent.setup();
|
||||
render(<DashboardPage />);
|
||||
|
||||
@@ -266,7 +276,7 @@ describe('DashboardPage', () => {
|
||||
|
||||
await waitFor(() => {
|
||||
const titleInput = screen.getByDisplayValue('Paris Adventure');
|
||||
expect(titleInput).toBeInTheDocument();
|
||||
expect(titleInput).toHaveFocus();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,14 +9,9 @@ import ForgotPasswordPage from './ForgotPasswordPage'
|
||||
// forgotPassword/useForgotPassword.test.ts). The hook is mocked so the form,
|
||||
// the sent screen and the SMTP hint can each be rendered on demand.
|
||||
|
||||
const mocks = vi.hoisted(() => ({ forgot: {} as Record<string, unknown>, native: false }))
|
||||
const mocks = vi.hoisted(() => ({ forgot: {} as Record<string, unknown> }))
|
||||
|
||||
vi.mock('./forgotPassword/useForgotPassword', () => ({ useForgotPassword: () => mocks.forgot }))
|
||||
vi.mock('../native/platform', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('../native/platform')>()),
|
||||
isNativeApp: () => mocks.native,
|
||||
}))
|
||||
vi.mock('../../native-shell/scenery', () => ({ startScenery: vi.fn(), cameraForPlan: () => [0, 0] }))
|
||||
|
||||
const navigate = vi.fn((_to: string) => {})
|
||||
const setEmail = vi.fn((_v: string) => {})
|
||||
@@ -37,7 +32,6 @@ function setForgot(over: Record<string, unknown> = {}) {
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
mocks.native = false
|
||||
setForgot()
|
||||
})
|
||||
|
||||
@@ -130,28 +124,4 @@ describe('ForgotPasswordPage', () => {
|
||||
expect(screen.getByRole('heading', { name: 'Check your email' })).toBeInTheDocument()
|
||||
expect(screen.getByText(/console/i)).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('keeps the SMTP warning visible throughout native password recovery', () => {
|
||||
mocks.native = true
|
||||
setForgot({ smtpConfigured: false })
|
||||
const { rerender } = render(<ForgotPasswordPage />)
|
||||
|
||||
expect(screen.getByRole('main')).toHaveClass('al-body')
|
||||
expect(screen.getByRole('textbox', { name: 'Email' })).toHaveAttribute('autocomplete', 'email')
|
||||
expect(screen.getByText(/hasn't configured SMTP/i)).toBeVisible()
|
||||
|
||||
setForgot({ smtpConfigured: false, submitted: true })
|
||||
rerender(<ForgotPasswordPage />)
|
||||
expect(screen.getByText(/hasn't configured SMTP/i)).toBeVisible()
|
||||
expect(screen.queryByRole('heading', { name: 'Check your email' })).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('lets a native user try again after a requester-wide rate limit', () => {
|
||||
mocks.native = true
|
||||
setForgot({ submitted: true, deliveryIssue: 'rateLimit' })
|
||||
render(<ForgotPasswordPage />)
|
||||
|
||||
expect(screen.getByRole('alert')).toHaveTextContent('Too many attempts')
|
||||
expect(screen.getByRole('button', { name: 'Send reset link' })).toBeEnabled()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import React, { ChangeEvent } from 'react'
|
||||
import { Mail, ArrowLeft, CheckCircle2, Terminal } from 'lucide-react'
|
||||
import { useTranslation } from '../i18n'
|
||||
import { isNativeApp } from '../native/platform'
|
||||
import AppForgotPassword from './forgotPassword/AppForgotPassword'
|
||||
import { useForgotPassword } from './forgotPassword/useForgotPassword'
|
||||
|
||||
const inputBase: React.CSSProperties = {
|
||||
@@ -15,9 +13,7 @@ const inputBase: React.CSSProperties = {
|
||||
function ForgotPasswordPage() {
|
||||
const { t } = useTranslation()
|
||||
// Page = wiring container: form state, the SMTP probe and submit live in the hook.
|
||||
const forgot = useForgotPassword()
|
||||
const { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit } = forgot
|
||||
if (isNativeApp()) return <AppForgotPassword forgot={forgot} />
|
||||
const { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit } = useForgotPassword()
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
|
||||
@@ -9,14 +9,9 @@ import ResetPasswordPage from './ResetPasswordPage'
|
||||
// resetPassword/useResetPassword.test.ts). The hook is mocked so the success,
|
||||
// broken-link, password and MFA screens can each be rendered directly.
|
||||
|
||||
const mocks = vi.hoisted(() => ({ reset: {} as Record<string, unknown>, native: false }))
|
||||
const mocks = vi.hoisted(() => ({ reset: {} as Record<string, unknown> }))
|
||||
|
||||
vi.mock('./resetPassword/useResetPassword', () => ({ useResetPassword: () => mocks.reset }))
|
||||
vi.mock('../native/platform', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('../native/platform')>()),
|
||||
isNativeApp: () => mocks.native,
|
||||
}))
|
||||
vi.mock('../../native-shell/scenery', () => ({ startScenery: vi.fn(), cameraForPlan: () => [0, 0] }))
|
||||
|
||||
const navigate = vi.fn((_to: string) => {})
|
||||
const setPw = vi.fn((_v: string) => {})
|
||||
@@ -48,35 +43,10 @@ function setReset(over: Record<string, unknown> = {}) {
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
mocks.native = false
|
||||
setReset()
|
||||
})
|
||||
|
||||
describe('ResetPasswordPage', () => {
|
||||
it('announces reset errors and supports backup codes on the native screen', () => {
|
||||
mocks.native = true
|
||||
setReset({ mfaRequired: true, error: 'The security code was rejected' })
|
||||
render(<ResetPasswordPage />)
|
||||
|
||||
expect(screen.getByRole('main')).toHaveClass('al-body')
|
||||
expect(screen.getByRole('alert')).toHaveTextContent('The security code was rejected')
|
||||
const code = screen.getByRole('textbox', { name: '2FA code' })
|
||||
expect(code).toHaveAttribute('autocomplete', 'one-time-code')
|
||||
fireEvent.change(code, { target: { value: 'ABCD-EFGH' } })
|
||||
expect(setMfaCode).toHaveBeenCalledWith('ABCD-EFGH')
|
||||
})
|
||||
|
||||
it('lets the native user request another link when the server rejects the current one', () => {
|
||||
mocks.native = true
|
||||
setReset({ linkInvalid: true })
|
||||
render(<ResetPasswordPage />)
|
||||
|
||||
expect(screen.getByRole('heading', { name: 'Invalid reset link' })).toBeVisible()
|
||||
expect(screen.queryByLabelText('New password')).not.toBeInTheDocument()
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Send reset link' }))
|
||||
expect(navigate).toHaveBeenCalledWith('/forgot-password')
|
||||
})
|
||||
|
||||
it('FE-PAGE-RESETUI-001: renders the password form for a valid token', () => {
|
||||
setReset()
|
||||
render(<ResetPasswordPage />)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import React, { ChangeEvent } from 'react'
|
||||
import { Lock, KeyRound, CheckCircle2, AlertTriangle, Eye, EyeOff } from 'lucide-react'
|
||||
import { useTranslation } from '../i18n'
|
||||
import { isNativeApp } from '../native/platform'
|
||||
import AppResetPassword from './resetPassword/AppResetPassword'
|
||||
import { useResetPassword } from './resetPassword/useResetPassword'
|
||||
import PasswordChecklist from '../components/shared/PasswordChecklist'
|
||||
|
||||
@@ -16,14 +14,12 @@ const inputBase: React.CSSProperties = {
|
||||
function ResetPasswordPage() {
|
||||
const { t } = useTranslation()
|
||||
// Page = wiring container: token, form state, validation + submit live in the hook.
|
||||
const reset = useResetPassword()
|
||||
const {
|
||||
navigate, token, linkInvalid,
|
||||
navigate, token,
|
||||
pw, setPw, pw2, setPw2, showPw, setShowPw,
|
||||
mfaCode, setMfaCode, mfaRequired, error, success, isLoading,
|
||||
handleSubmit,
|
||||
} = reset
|
||||
if (isNativeApp()) return <AppResetPassword reset={reset} />
|
||||
} = useResetPassword()
|
||||
|
||||
const shell = (inner: React.ReactNode) => (
|
||||
<div style={{
|
||||
@@ -61,7 +57,7 @@ function ResetPasswordPage() {
|
||||
)
|
||||
}
|
||||
|
||||
if (!token || linkInvalid) {
|
||||
if (!token) {
|
||||
return shell(
|
||||
<div style={{ textAlign: 'center', padding: '12px 0' }}>
|
||||
<div style={{
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
import { CheckCircle2 } from 'lucide-react';
|
||||
import { useTranslation } from '../../i18n';
|
||||
import { AppAuthScreen, Field, Notice } from '../login/AppAuthScreen';
|
||||
import type { useForgotPassword } from './useForgotPassword';
|
||||
|
||||
export default function AppForgotPassword({ forgot }: { forgot: ReturnType<typeof useForgotPassword> }) {
|
||||
const { t } = useTranslation();
|
||||
const back = () => void forgot.navigate('/login');
|
||||
const smtpOff = forgot.smtpConfigured === false;
|
||||
const smtpNotice = smtpOff && <Notice tone="warn">{t('login.forgotPasswordSmtpHintOff')}</Notice>;
|
||||
|
||||
return (
|
||||
<AppAuthScreen>
|
||||
{forgot.submitted && !forgot.deliveryIssue ? (
|
||||
<div className="al-form">
|
||||
<div className="al-recovery-feedback" role="status">
|
||||
{!smtpOff && <CheckCircle2 className="al-recovery-icon" size={28} aria-hidden="true" />}
|
||||
<h1 className="al-title">{t(smtpOff ? 'login.forgotPasswordTitle' : 'login.forgotPasswordSentTitle')}</h1>
|
||||
{!smtpOff && <p className="al-sub">{t('login.forgotPasswordSentBody')}</p>}
|
||||
</div>
|
||||
{smtpNotice}
|
||||
<button type="button" className="al-cta" onClick={back}>
|
||||
{t('login.backToLogin')}
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<form className="al-form" onSubmit={(event) => void forgot.handleSubmit(event)}>
|
||||
<h1 className="al-title">{t('login.forgotPasswordTitle')}</h1>
|
||||
<p className="al-sub">{t('login.forgotPasswordBody')}</p>
|
||||
{smtpNotice}
|
||||
{forgot.deliveryIssue && (
|
||||
<Notice>
|
||||
{t(forgot.deliveryIssue === 'rateLimit' ? 'common.tooManyAttempts' : 'native.connect.errorUnreachable')}
|
||||
</Notice>
|
||||
)}
|
||||
<Field
|
||||
label={t('common.email')}
|
||||
name="email"
|
||||
type="email"
|
||||
autoComplete="email"
|
||||
autoCapitalize="none"
|
||||
enterKeyHint="send"
|
||||
value={forgot.email}
|
||||
onChange={(event) => forgot.setEmail(event.target.value)}
|
||||
placeholder={t('login.emailPlaceholder')}
|
||||
required
|
||||
/>
|
||||
<button type="submit" className="al-cta" disabled={forgot.isLoading}>
|
||||
{forgot.isLoading && <span className="al-spin" aria-hidden="true" />}
|
||||
{forgot.isLoading ? t('common.loading') : t('login.forgotPasswordSubmit')}
|
||||
</button>
|
||||
</form>
|
||||
<button type="button" className="al-forgot" onClick={back}>
|
||||
{t('login.backToLogin')}
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</AppAuthScreen>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// FE-PAGE-FORGOT-001 to FE-PAGE-FORGOT-008
|
||||
import { act, renderHook, waitFor } from '@testing-library/react';
|
||||
import { AxiosError } from 'axios';
|
||||
import type { FormEvent } from 'react';
|
||||
import { authApi } from '../../api/client';
|
||||
import { useForgotPassword } from './useForgotPassword';
|
||||
@@ -73,18 +72,6 @@ describe('useForgotPassword', () => {
|
||||
await act(() => result.current.handleSubmit(submitEvent()));
|
||||
|
||||
expect(result.current.submitted).toBe(true);
|
||||
expect(result.current.deliveryIssue).toBeNull();
|
||||
});
|
||||
|
||||
it('distinguishes a lost connection without revealing information about the address', async () => {
|
||||
vi.mocked(authApi.forgotPassword).mockRejectedValueOnce(new AxiosError('Lost connection', 'ERR_NETWORK'));
|
||||
const { result } = renderHook(() => useForgotPassword());
|
||||
|
||||
await act(() => result.current.handleSubmit(submitEvent()));
|
||||
expect(result.current.deliveryIssue).toBe('connection');
|
||||
|
||||
await act(() => result.current.handleSubmit(submitEvent()));
|
||||
expect(result.current.deliveryIssue).toBeNull();
|
||||
});
|
||||
|
||||
it('FE-PAGE-FORGOT-007: ignores a second submit while the first is in flight', async () => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { useState, useEffect, type FormEvent } from 'react'
|
||||
import { useNavigate } from 'react-router'
|
||||
import { isAxiosError } from 'axios'
|
||||
import { authApi } from '../../api/client'
|
||||
|
||||
/**
|
||||
@@ -15,7 +14,6 @@ export function useForgotPassword() {
|
||||
const [submitted, setSubmitted] = useState(false)
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const [smtpConfigured, setSmtpConfigured] = useState<boolean | null>(null)
|
||||
const [deliveryIssue, setDeliveryIssue] = useState<'connection' | 'rateLimit' | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
// Probe whether SMTP is configured so we can warn the user up-front that the
|
||||
@@ -31,21 +29,15 @@ export function useForgotPassword() {
|
||||
const handleSubmit = async (e: FormEvent) => {
|
||||
e.preventDefault()
|
||||
if (isLoading) return
|
||||
setDeliveryIssue(null)
|
||||
setIsLoading(true)
|
||||
try {
|
||||
await authApi.forgotPassword({ email: email.trim() })
|
||||
} catch (error) {
|
||||
// These errors apply to the connection or requester, not to the mailbox.
|
||||
// Keep every other outcome indistinguishable from an accepted request.
|
||||
if (isAxiosError(error)) {
|
||||
if (error.response?.status === 429) setDeliveryIssue('rateLimit')
|
||||
else if (!error.response) setDeliveryIssue('connection')
|
||||
}
|
||||
} catch {
|
||||
// Enumeration-safe: success UX regardless of server outcome.
|
||||
}
|
||||
setSubmitted(true)
|
||||
setIsLoading(false)
|
||||
}
|
||||
|
||||
return { navigate, email, setEmail, submitted, isLoading, smtpConfigured, deliveryIssue, handleSubmit }
|
||||
return { navigate, email, setEmail, submitted, isLoading, smtpConfigured, handleSubmit }
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
import { AlertCircle, Globe, Lock } from 'lucide-react';
|
||||
import { useEffect, useRef, type InputHTMLAttributes, type ReactNode } from 'react';
|
||||
import { useNativeServer } from '../../components/Settings/useNativeServer';
|
||||
import { useTranslation } from '../../i18n';
|
||||
import { lightStatusBarIcons } from '../../native/appBoot';
|
||||
import { reportNativeFailure } from '../../native/reportFailure';
|
||||
import './appLogin.css';
|
||||
|
||||
export function AppAuthScreen({ children, leaving }: { children: ReactNode; leaving?: boolean }) {
|
||||
useEffect(() => lightStatusBarIcons(), []);
|
||||
return (
|
||||
<div className={leaving ? 'app-login al-leaving' : 'app-login'}>
|
||||
<AppAuthHero />
|
||||
<main className="al-body">{children}</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function AppAuthHero() {
|
||||
const { t } = useTranslation();
|
||||
const { host, changeServer } = useNativeServer();
|
||||
const hero = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const box = hero.current;
|
||||
if (!box) return;
|
||||
let cancelled = false;
|
||||
// Keep the landscape in the position where the address screen leaves it.
|
||||
void import('../../../native-shell/scenery')
|
||||
.then(({ startScenery, cameraForPlan }) => {
|
||||
if (!cancelled) startScenery(box, { frame: 320, camera: cameraForPlan(1), haze: false });
|
||||
})
|
||||
.catch(reportNativeFailure);
|
||||
return () => {
|
||||
cancelled = true;
|
||||
box.querySelector('canvas.scenery')?.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="al-hero" ref={hero}>
|
||||
<img className="al-logo" src="/logo-light.svg" alt="TREK" />
|
||||
{host && (
|
||||
<div className="al-card">
|
||||
<div className="al-card-text">
|
||||
<small>
|
||||
<Lock size={12} strokeWidth={2.6} aria-hidden="true" />
|
||||
{t('native.connect.yourTrek')}
|
||||
</small>
|
||||
<div className="al-host" dir="ltr">
|
||||
<Globe size={17} aria-hidden="true" />
|
||||
<span>{host}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" className="al-change" onClick={changeServer} aria-label={t('native.changeServer')}>
|
||||
{t('common.change')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function Notice({ tone, children }: { tone?: 'warn'; children: ReactNode }) {
|
||||
return (
|
||||
<div className={tone ? `al-notice ${tone}` : 'al-notice'} role={tone ? 'status' : 'alert'}>
|
||||
<AlertCircle size={18} aria-hidden="true" />
|
||||
<div>{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function Field({
|
||||
label,
|
||||
after,
|
||||
...input
|
||||
}: { label: string; after?: ReactNode } & InputHTMLAttributes<HTMLInputElement>) {
|
||||
return (
|
||||
<div className={after ? 'al-fld-wrap with-after' : 'al-fld-wrap'}>
|
||||
<label className="al-fld">
|
||||
<span className="al-lab">{label}</span>
|
||||
<input {...input} />
|
||||
</label>
|
||||
{after && <span className="al-after">{after}</span>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
import { Eye, EyeOff, Fingerprint, Shield } from 'lucide-react';
|
||||
import { AlertCircle, Eye, EyeOff, Fingerprint, Globe, Lock, Shield } from 'lucide-react';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import ToggleSwitch from '../../components/Settings/ToggleSwitch';
|
||||
import { useNativeServer } from '../../components/Settings/useNativeServer';
|
||||
import PasswordChecklist from '../../components/shared/PasswordChecklist';
|
||||
import { useTranslation } from '../../i18n';
|
||||
import { AppAuthScreen, Field, Notice } from './AppAuthScreen';
|
||||
import { lightStatusBarIcons } from '../../native/appBoot';
|
||||
import { reportNativeFailure } from '../../native/reportFailure';
|
||||
import './appLogin.css';
|
||||
import { heading as headingOf, oidcLoginHref, oidcOnlyHref, submitLabel, type LoginStep } from './loginModel';
|
||||
import { mfaCodeInputProps } from './mfaCodeInput';
|
||||
import { IDP_LOGIN_URL, type useLogin } from './useLogin';
|
||||
@@ -18,10 +22,14 @@ type Login = ReturnType<typeof useLogin>;
|
||||
* (the device decides, see useLogin) differ.
|
||||
*/
|
||||
export default function AppLogin({ login }: { login: Login }) {
|
||||
useEffect(() => lightStatusBarIcons(), []);
|
||||
return (
|
||||
<AppAuthScreen leaving={login.showTakeoff}>
|
||||
<AppLoginContent login={login} />
|
||||
</AppAuthScreen>
|
||||
<div className={login.showTakeoff ? 'app-login al-leaving' : 'app-login'}>
|
||||
<AppLoginHero />
|
||||
<main className="al-body">
|
||||
<AppLoginContent login={login} />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,6 +59,85 @@ function AppLoginContent({ login }: { login: Login }) {
|
||||
return <Credentials login={login} />;
|
||||
}
|
||||
|
||||
/** The landscape of the address screen, with the server this screen signs in to. */
|
||||
function AppLoginHero() {
|
||||
const { t } = useTranslation();
|
||||
const { host, changeServer } = useNativeServer();
|
||||
const hero = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const box = hero.current;
|
||||
if (!box) return;
|
||||
let cancelled = false;
|
||||
// The same camera the address screen ends on, so the picture holds still
|
||||
// across the change of screens. The scene stops drawing once its canvas
|
||||
// has left the page.
|
||||
void import('../../../native-shell/scenery')
|
||||
.then(({ startScenery, cameraForPlan }) => {
|
||||
if (!cancelled) startScenery(box, { frame: 320, camera: cameraForPlan(1), haze: false });
|
||||
})
|
||||
// Without the landscape the box keeps its plain sea colour.
|
||||
.catch(reportNativeFailure);
|
||||
return () => {
|
||||
cancelled = true;
|
||||
box.querySelector('canvas.scenery')?.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="al-hero" ref={hero}>
|
||||
<img className="al-logo" src="/logo-light.svg" alt="TREK" />
|
||||
{host && (
|
||||
<div className="al-card">
|
||||
<div className="al-card-text">
|
||||
<small>
|
||||
<Lock size={12} strokeWidth={2.6} aria-hidden="true" />
|
||||
{t('native.connect.yourTrek')}
|
||||
</small>
|
||||
<div className="al-host" dir="ltr">
|
||||
<Globe size={17} aria-hidden="true" />
|
||||
<span>{host}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" className="al-change" onClick={changeServer} aria-label={t('native.changeServer')}>
|
||||
{t('common.change')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Notice({ tone, children }: { tone?: 'warn'; children: React.ReactNode }) {
|
||||
return (
|
||||
<div className={tone ? `al-notice ${tone}` : 'al-notice'} role={tone ? undefined : 'alert'}>
|
||||
<AlertCircle size={18} aria-hidden="true" />
|
||||
<div>{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A field on a white card, the label above the input, as on the address screen.
|
||||
* A control beside the input (the password's eye) sits outside the label, so
|
||||
* the label names the input alone.
|
||||
*/
|
||||
function Field({
|
||||
label,
|
||||
after,
|
||||
...input
|
||||
}: { label: string; after?: React.ReactNode } & React.InputHTMLAttributes<HTMLInputElement>) {
|
||||
return (
|
||||
<div className={after ? 'al-fld-wrap with-after' : 'al-fld-wrap'}>
|
||||
<label className="al-fld">
|
||||
<span className="al-lab">{label}</span>
|
||||
<input {...input} />
|
||||
</label>
|
||||
{after && <span className="al-after">{after}</span>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function OidcOnly({ login }: { login: Login }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* The sign-in and password recovery screens inside the iOS and Android app. The sign-in is the
|
||||
* The sign-in screen inside the iOS and Android app (AppLogin.tsx). It is the
|
||||
* next screen after the app's own address screen (native-shell/), so it wears
|
||||
* that screen's look: the same landscape on top, the same glass card with the
|
||||
* server on it, the same type, fields and buttons on the same warm page. The
|
||||
@@ -295,14 +295,6 @@
|
||||
line-height: 1.5;
|
||||
color: var(--al-text);
|
||||
}
|
||||
.al-recovery-feedback {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
justify-items: start;
|
||||
}
|
||||
.al-recovery-icon {
|
||||
color: var(--al-good);
|
||||
}
|
||||
|
||||
/* A field on a white card: the label above, the input below it. */
|
||||
.al-fld {
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
import { CheckCircle2, Eye, EyeOff } from 'lucide-react';
|
||||
import PasswordChecklist from '../../components/shared/PasswordChecklist';
|
||||
import { useTranslation } from '../../i18n';
|
||||
import { AppAuthScreen, Field, Notice } from '../login/AppAuthScreen';
|
||||
import { mfaCodeInputProps } from '../login/mfaCodeInput';
|
||||
import type { useResetPassword } from './useResetPassword';
|
||||
|
||||
type Reset = ReturnType<typeof useResetPassword>;
|
||||
|
||||
export default function AppResetPassword({ reset }: { reset: Reset }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<AppAuthScreen>
|
||||
{reset.success ? (
|
||||
<div className="al-form">
|
||||
<div className="al-recovery-feedback" role="status">
|
||||
<CheckCircle2 className="al-recovery-icon" size={28} aria-hidden="true" />
|
||||
<h1 className="al-title">{t('login.resetPasswordSuccessTitle')}</h1>
|
||||
<p className="al-sub">{t('login.resetPasswordSuccessBody')}</p>
|
||||
</div>
|
||||
<button type="button" className="al-cta" onClick={() => void reset.navigate('/login')}>
|
||||
{t('login.signIn')}
|
||||
</button>
|
||||
</div>
|
||||
) : !reset.token || reset.linkInvalid ? (
|
||||
<div className="al-form">
|
||||
<h1 className="al-title">{t('login.resetPasswordInvalidLink')}</h1>
|
||||
<Notice>{t('login.resetPasswordInvalidLinkBody')}</Notice>
|
||||
<button type="button" className="al-cta" onClick={() => void reset.navigate('/forgot-password')}>
|
||||
{t('login.forgotPasswordSubmit')}
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<ResetForm reset={reset} />
|
||||
)}
|
||||
</AppAuthScreen>
|
||||
);
|
||||
}
|
||||
|
||||
function ResetForm({ reset }: { reset: Reset }) {
|
||||
const { t } = useTranslation();
|
||||
const inputType = reset.showPw ? 'text' : 'password';
|
||||
const title = reset.mfaRequired ? t('login.mfaTitle') : t('login.resetPasswordTitle');
|
||||
const action = reset.mfaRequired ? t('login.resetPasswordVerify') : t('login.resetPasswordSubmit');
|
||||
return (
|
||||
<form className="al-form" onSubmit={(event) => void reset.handleSubmit(event)}>
|
||||
<h1 className="al-title">{title}</h1>
|
||||
<p className="al-sub">{t(reset.mfaRequired ? 'login.resetPasswordMfaBody' : 'login.resetPasswordBody')}</p>
|
||||
{reset.error && <Notice>{reset.error}</Notice>}
|
||||
{reset.mfaRequired ? (
|
||||
<Field
|
||||
label={t('login.mfaCode')}
|
||||
{...mfaCodeInputProps(reset.mfaCode, reset.setMfaCode, t('login.mfaPlaceholder'))}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<Field
|
||||
label={t('login.newPassword')}
|
||||
type={inputType}
|
||||
name="new-password"
|
||||
autoComplete="new-password"
|
||||
value={reset.pw}
|
||||
onChange={(event) => reset.setPw(event.target.value)}
|
||||
required
|
||||
after={
|
||||
<button
|
||||
type="button"
|
||||
className="al-eye"
|
||||
aria-label={t('native.claim.showPassword')}
|
||||
aria-pressed={reset.showPw}
|
||||
onClick={() => reset.setShowPw((visible) => !visible)}
|
||||
>
|
||||
{reset.showPw ? <EyeOff size={18} aria-hidden="true" /> : <Eye size={18} aria-hidden="true" />}
|
||||
</button>
|
||||
}
|
||||
/>
|
||||
<PasswordChecklist password={reset.pw} className="al-check" tone="light" />
|
||||
<Field
|
||||
label={t('login.confirmPassword')}
|
||||
type={inputType}
|
||||
name="confirm-password"
|
||||
autoComplete="new-password"
|
||||
value={reset.pw2}
|
||||
onChange={(event) => reset.setPw2(event.target.value)}
|
||||
required
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<button type="submit" className="al-cta" disabled={reset.isLoading}>
|
||||
{reset.isLoading && <span className="al-spin" aria-hidden="true" />}
|
||||
{reset.isLoading ? t('common.loading') : action}
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -132,32 +132,6 @@ describe('useResetPassword', () => {
|
||||
expect(result.current.success).toBe(false);
|
||||
});
|
||||
|
||||
it.each([
|
||||
'Invalid or expired reset link',
|
||||
'This reset link has already been used',
|
||||
'Reset link has expired. Please request a new one.',
|
||||
])('stops retrying a link refused by the server (%s)', async (error) => {
|
||||
vi.mocked(authApi.resetPassword).mockResolvedValueOnce({ mfa_required: true } as never);
|
||||
vi.mocked(authApi.resetPassword).mockRejectedValueOnce({ response: { data: { error } } });
|
||||
const { result, rerender } = renderHook(() => useResetPassword());
|
||||
|
||||
await submit(result, 'Longenough1!');
|
||||
act(() => result.current.setMfaCode('123456'));
|
||||
await act(() => result.current.handleSubmit(submitEvent()));
|
||||
|
||||
expect(result.current.linkInvalid).toBe(true);
|
||||
expect(result.current.pw).toBe('');
|
||||
expect(result.current.pw2).toBe('');
|
||||
expect(result.current.mfaCode).toBe('');
|
||||
expect(result.current.mfaRequired).toBe(false);
|
||||
await act(() => result.current.handleSubmit(submitEvent()));
|
||||
expect(authApi.resetPassword).toHaveBeenCalledTimes(2);
|
||||
|
||||
search = new URLSearchParams('token=fresh-link');
|
||||
rerender();
|
||||
expect(result.current.linkInvalid).toBe(false);
|
||||
});
|
||||
|
||||
it('FE-PAGE-RESET-011: surfaces a plain Error message as-is', async () => {
|
||||
vi.mocked(authApi.resetPassword).mockRejectedValueOnce(new Error('Network Error'));
|
||||
const { result } = renderHook(() => useResetPassword());
|
||||
|
||||
@@ -5,17 +5,11 @@ import { getApiErrorMessage } from '../../types'
|
||||
import { useTranslation } from '../../i18n'
|
||||
import { passwordErrorKey } from '../../utils/passwordError'
|
||||
|
||||
// Published TREK servers report these refusals as messages, without an error code.
|
||||
const unusableLinkErrors = new Set([
|
||||
'Invalid or expired reset link',
|
||||
'This reset link has already been used',
|
||||
'Reset link has expired. Please request a new one.',
|
||||
])
|
||||
|
||||
/**
|
||||
* Reset-password data hook — owns the token lookup, the form state, the
|
||||
* client-side validation and the submit (incl. the MFA step-up branch).
|
||||
* ResetPasswordPage is a pure wiring container.
|
||||
* ResetPasswordPage is a pure wiring container. Behaviour is identical to the
|
||||
* previous in-component logic.
|
||||
*/
|
||||
export function useResetPassword() {
|
||||
const { t } = useTranslation()
|
||||
@@ -29,10 +23,8 @@ export function useResetPassword() {
|
||||
const [mfaCode, setMfaCode] = useState('')
|
||||
const [mfaRequired, setMfaRequired] = useState(false)
|
||||
const [error, setError] = useState('')
|
||||
const [unusableToken, setUnusableToken] = useState<string | null>(null)
|
||||
const [success, setSuccess] = useState(false)
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
const linkInvalid = unusableToken === token
|
||||
|
||||
useEffect(() => {
|
||||
if (!token) setError(t('login.resetPasswordInvalidLink'))
|
||||
@@ -42,7 +34,7 @@ export function useResetPassword() {
|
||||
e.preventDefault()
|
||||
if (isLoading) return
|
||||
setError('')
|
||||
if (!token || linkInvalid) return
|
||||
if (!token) return
|
||||
const weak = passwordErrorKey(pw)
|
||||
if (weak) { setError(t(weak)); return }
|
||||
if (pw !== pw2) { setError(t('login.passwordsDontMatch')); return }
|
||||
@@ -62,23 +54,13 @@ export function useResetPassword() {
|
||||
setSuccess(true)
|
||||
}
|
||||
} catch (err) {
|
||||
const message = getApiErrorMessage(err, t('login.resetPasswordFailed'))
|
||||
if (unusableLinkErrors.has(message)) {
|
||||
setUnusableToken(token)
|
||||
setPw('')
|
||||
setPw2('')
|
||||
setShowPw(false)
|
||||
setMfaCode('')
|
||||
setMfaRequired(false)
|
||||
} else {
|
||||
setError(message)
|
||||
}
|
||||
setError(getApiErrorMessage(err, t('login.resetPasswordFailed')))
|
||||
}
|
||||
setIsLoading(false)
|
||||
}
|
||||
|
||||
return {
|
||||
navigate, token, linkInvalid,
|
||||
navigate, token,
|
||||
pw, setPw, pw2, setPw2, showPw, setShowPw,
|
||||
mfaCode, setMfaCode, mfaRequired, error, success, isLoading,
|
||||
handleSubmit,
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
import { fireEvent, waitFor } from '@testing-library/react';
|
||||
import { afterEach, expect, it, vi } from 'vitest';
|
||||
|
||||
const mocks = vi.hoisted(() => ({
|
||||
agreement: vi.fn(),
|
||||
purchase: vi.fn().mockResolvedValue({ kind: 'cancelled' }),
|
||||
}));
|
||||
|
||||
vi.mock('@capacitor/app', () => ({ App: { addListener: vi.fn() } }));
|
||||
vi.mock('@capacitor/core', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('@capacitor/core')>()),
|
||||
CapacitorHttp: { get: mocks.agreement },
|
||||
}));
|
||||
vi.mock('@capacitor/splash-screen', () => ({ SplashScreen: { hide: vi.fn().mockResolvedValue(undefined) } }));
|
||||
vi.mock('../../../native-shell/scenery', () => ({
|
||||
WELCOME_CAMERA: [0, 0],
|
||||
cameraForPlan: () => [0, 0],
|
||||
startScenery: () => null,
|
||||
}));
|
||||
vi.mock('../../../src/native/trekShell', () => ({
|
||||
TrekShell: {
|
||||
getServer: vi.fn().mockResolvedValue({ url: null }),
|
||||
requestServer: vi.fn(async ({ url }: { url: string }) => ({
|
||||
status: 200,
|
||||
url,
|
||||
data:
|
||||
new URL(url).pathname === '/api/plans'
|
||||
? {
|
||||
ordering: 'open',
|
||||
plans: [{ id: 'plus', name: 'Plus', storageGb: 50, aiDocumentLimit: null }],
|
||||
}
|
||||
: { available: true },
|
||||
})),
|
||||
},
|
||||
}));
|
||||
vi.mock('../../../src/native/iap', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('../../../src/native/iap')>()),
|
||||
getIapClient: () => ({
|
||||
isAvailable: async () => true,
|
||||
products: async () => new Map([['cloud.plus.monthly', { displayPrice: '$11.99', freeTrial: true }]]),
|
||||
held: async () => false,
|
||||
onTransaction: vi.fn(),
|
||||
unfinished: async () => null,
|
||||
purchase: mocks.purchase,
|
||||
}),
|
||||
}));
|
||||
|
||||
const agreement = { status: 200, data: { version: '2026-12-01', deviations: 'First agreement' } };
|
||||
|
||||
function element<T extends HTMLElement>(selector: string): T {
|
||||
const found = document.querySelector<T>(selector);
|
||||
if (!found) throw new Error(`The app did not show ${selector}`);
|
||||
return found;
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllGlobals();
|
||||
document.body.replaceChildren();
|
||||
});
|
||||
|
||||
it('keeps the store closed for a withdrawn agreement and asks again when the version changes', async () => {
|
||||
vi.stubGlobal('matchMedia', () => ({ matches: false, addEventListener: vi.fn() }));
|
||||
vi.stubGlobal('cancelAnimationFrame', vi.fn());
|
||||
document.body.append(Object.assign(document.createElement('main'), { id: 'shell' }));
|
||||
const changed = { status: 200, data: { version: '2026-12-02', deviations: 'Updated agreement' } };
|
||||
mocks.agreement
|
||||
.mockResolvedValueOnce(agreement)
|
||||
.mockResolvedValueOnce({ status: 503, data: { code: 'ordering-closed' } })
|
||||
.mockResolvedValueOnce(agreement)
|
||||
.mockResolvedValue(changed);
|
||||
|
||||
await import('../../../native-shell/main');
|
||||
await waitFor(() => expect(element<HTMLElement>('.trial-badge').hidden).toBe(false));
|
||||
fireEvent.click(element('button.discover'));
|
||||
await waitFor(() => expect(element<HTMLButtonElement>('.dock button.cta').hidden).toBe(false));
|
||||
fireEvent.click(element('.dock button.cta'));
|
||||
|
||||
const consent = await waitFor(() => {
|
||||
expect(element('.consent-text').textContent).toBe(agreement.data.deviations);
|
||||
return element<HTMLInputElement>('.consent input');
|
||||
});
|
||||
fireEvent.input(element('.form input[type="text"]'), { target: { value: 'sample-journey' } });
|
||||
fireEvent.input(element('.form input[type="email"]'), { target: { value: 'buyer@example.invalid' } });
|
||||
fireEvent.input(element('.form input[type="password"]'), { target: { value: 'Training#Pass123' } });
|
||||
const submit = element<HTMLButtonElement>('.dock button.cta');
|
||||
fireEvent.click(consent);
|
||||
fireEvent.click(submit);
|
||||
await waitFor(() => {
|
||||
expect(consent.disabled).toBe(true);
|
||||
expect(consent.checked).toBe(false);
|
||||
});
|
||||
expect(mocks.purchase).not.toHaveBeenCalled();
|
||||
|
||||
fireEvent.click(submit);
|
||||
await waitFor(() => expect(element('.consent-text').textContent).toBe(agreement.data.deviations));
|
||||
fireEvent.click(consent);
|
||||
fireEvent.click(submit);
|
||||
await waitFor(() => expect(element('.consent-text').textContent).toBe(changed.data.deviations));
|
||||
expect(consent.checked).toBe(false);
|
||||
expect(mocks.purchase).not.toHaveBeenCalled();
|
||||
|
||||
fireEvent.click(consent);
|
||||
fireEvent.click(submit);
|
||||
await waitFor(() => expect(mocks.purchase).toHaveBeenCalledExactlyOnceWith('cloud.plus.monthly', '$11.99'));
|
||||
});
|
||||
@@ -9,7 +9,7 @@
|
||||
"src/db/repositories/CollabPollVotes.repository.ts": 1,
|
||||
"src/db/repositories/DawarichConnections.repository.ts": 4,
|
||||
"src/db/repositories/DawarichVisitSuggestions.repository.ts": 4,
|
||||
"src/db/repositories/DayAccommodations.repository.ts": 12,
|
||||
"src/db/repositories/DayAccommodations.repository.ts": 11,
|
||||
"src/db/repositories/DayAssignments.repository.ts": 20,
|
||||
"src/db/repositories/DayNotes.repository.ts": 6,
|
||||
"src/db/repositories/Days.repository.ts": 7,
|
||||
@@ -28,7 +28,7 @@
|
||||
"src/db/repositories/PushSubscriptions.repository.ts": 1,
|
||||
"src/db/repositories/ReservationDayPositions.repository.ts": 1,
|
||||
"src/db/repositories/ReservationEndpoints.repository.ts": 5,
|
||||
"src/db/repositories/Reservations.repository.ts": 14,
|
||||
"src/db/repositories/Reservations.repository.ts": 13,
|
||||
"src/db/repositories/ReservationTravelers.repository.ts": 2,
|
||||
"src/db/repositories/RoadtripDayBoundaries.repository.ts": 3,
|
||||
"src/db/repositories/RoadtripDayTracks.repository.ts": 1,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"scripts/db-call-graph.mjs": 1036,
|
||||
"scripts/generate-entities.ts": 2259,
|
||||
"src/db/repositories/Places.repository.ts": 1432,
|
||||
"src/db/repositories/Reservations.repository.ts": 1550,
|
||||
"src/db/repositories/Reservations.repository.ts": 1538,
|
||||
"src/db/repositories/Trips.repository.ts": 1120,
|
||||
"src/db/repositories/Users.repository.ts": 1403,
|
||||
"src/nest/atlas/atlas.service.ts": 1166,
|
||||
@@ -15,6 +15,6 @@
|
||||
"src/nest/places/places.service.ts": 1517,
|
||||
"src/nest/plugins/plugin-runtime.service.ts": 1458,
|
||||
"src/nest/plugins/runtime/plugin-sdk.ts": 1093,
|
||||
"src/nest/reservations/reservations.service.ts": 1163,
|
||||
"src/nest/reservations/reservations.service.ts": 1159,
|
||||
"src/nest/vacay/vacay.service.ts": 1393
|
||||
}
|
||||
|
||||
@@ -121,13 +121,8 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
.execute('run');
|
||||
}
|
||||
|
||||
/** RS30/RS43 — `UPDATE day_accommodations SET confirmation = COALESCE(?, confirmation) WHERE id = ?`. */
|
||||
async patchConfirmation(id: number, confirmation: string | null): Promise<void> {
|
||||
const platform = this.getEntityManager().getPlatform();
|
||||
await this.qb()
|
||||
.update({ confirmation: coalesceOverride(platform, confirmation, 'confirmation') })
|
||||
.where({ id })
|
||||
.execute('run');
|
||||
await this.nativeUpdate({ id }, { confirmation });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,14 +154,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
return row?.check_in;
|
||||
}
|
||||
|
||||
/**
|
||||
* RS39 — `UPDATE day_accommodations SET place_id = ?, start_day_id = ?,
|
||||
* end_day_id = ?, check_in = ?, check_out = ?, confirmation = ? WHERE id =
|
||||
* ?`. Six columns (no `check_in_end`/`notes`, unlike `AccommodationsService
|
||||
* .moveStay`'s own write) — the caller's already-decided values, written
|
||||
* verbatim (the `PlacesRepository.updatePlace`/PL11 precedent: no SQL-side
|
||||
* COALESCE here, the legacy statement itself has none for these columns).
|
||||
*/
|
||||
/** An omitted confirmation leaves the stay's existing reference in place. */
|
||||
async updateFromBooking(
|
||||
id: number,
|
||||
write: {
|
||||
@@ -175,7 +163,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
end_day_id: number;
|
||||
check_in: string | null;
|
||||
check_out: string | null;
|
||||
confirmation: string | null;
|
||||
confirmation?: string | null;
|
||||
},
|
||||
): Promise<void> {
|
||||
await this.nativeUpdate(
|
||||
@@ -186,7 +174,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
endDay: write.end_day_id,
|
||||
check_in: write.check_in,
|
||||
check_out: write.check_out,
|
||||
confirmation: write.confirmation,
|
||||
...(write.confirmation !== undefined ? { confirmation: write.confirmation } : {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -343,7 +331,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
check_in: string | null;
|
||||
check_in_end: string | null;
|
||||
check_out: string | null;
|
||||
confirmation: string | null;
|
||||
confirmation?: string | null;
|
||||
notes: string | null;
|
||||
},
|
||||
): Promise<void> {
|
||||
@@ -356,7 +344,7 @@ export class DayAccommodationsRepository extends TrekRepository<DayAccommodation
|
||||
check_in: write.check_in,
|
||||
check_in_end: write.check_in_end,
|
||||
check_out: write.check_out,
|
||||
confirmation: write.confirmation,
|
||||
...(write.confirmation !== undefined ? { confirmation: write.confirmation } : {}),
|
||||
notes: write.notes,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Reservations } from '../entities/Reservations.entity';
|
||||
import { DayAssignments } from '../entities/DayAssignments.entity';
|
||||
import { Days } from '../entities/Days.entity';
|
||||
import { coalesceOverride, columnRef, dayDistance, isCalendarDate } from '../dialect/sql-functions';
|
||||
import { columnRef, dayDistance, isCalendarDate } from '../dialect/sql-functions';
|
||||
import { concatKysely, startsWithIsoDateKysely, substringKysely } from '../dialect/kysely-functions';
|
||||
import { accommodationIdMatches, reservationStayIs } from './_shared/reservation-accommodation';
|
||||
import { publicReservationExpr, publicStayExists, type ReservationVisibilityKyselyDB } from './_shared/reservation-visibility';
|
||||
@@ -663,24 +663,14 @@ export class ReservationsRepository extends TrekRepository<Reservations> {
|
||||
// Reservations repositories where a read belongs there").
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* AC33 (`AccommodationsService.createAccommodation`) — `INSERT INTO
|
||||
* reservations (trip_id, day_id, title, reservation_time, location,
|
||||
* confirmation_number, notes, status, type, accommodation_id, metadata)
|
||||
* VALUES (?, ?, ?, ?, ?, ?, ?, 'confirmed', 'hotel', ?, ?)` — the
|
||||
* auto-created partner hotel booking. `status`/`type` literals, `location`
|
||||
* always `null` (matching the legacy statement exactly — it never binds a
|
||||
* value there). `accommodation_id: string` — R2: the caller stringifies
|
||||
* the new stay's numeric id (`String(newId)`) the same way `insertReservation`'s
|
||||
* own `accommodation_id` caller already does, so SQLite's TEXT-affinity
|
||||
* storage is identical to the legacy raw bind of the bare number.
|
||||
*/
|
||||
/** The partner hotel booking created with a stay. The caller decides its initial status. */
|
||||
async insertHotelPartner(input: {
|
||||
trip_id: number | string;
|
||||
day_id: number;
|
||||
title: string;
|
||||
reservation_time: string | null;
|
||||
confirmation_number: string | null;
|
||||
status: 'pending' | 'confirmed';
|
||||
notes: string | null;
|
||||
accommodation_id: string;
|
||||
metadata: string | null;
|
||||
@@ -693,8 +683,7 @@ export class ReservationsRepository extends TrekRepository<Reservations> {
|
||||
location: null,
|
||||
confirmation_number: input.confirmation_number,
|
||||
notes: input.notes,
|
||||
// A stay without a confirmation number is not a confirmed booking yet.
|
||||
status: input.confirmation_number ? 'confirmed' : 'pending',
|
||||
status: input.status,
|
||||
type: 'hotel',
|
||||
accommodation_id: input.accommodation_id,
|
||||
metadata: input.metadata,
|
||||
@@ -719,24 +708,23 @@ export class ReservationsRepository extends TrekRepository<Reservations> {
|
||||
return rows as { id: number; metadata: string | null }[];
|
||||
}
|
||||
|
||||
/**
|
||||
* AC38 (`AccommodationsService.updateAccommodation`) — `UPDATE
|
||||
* reservations SET metadata = ?, confirmation_number = COALESCE(?,
|
||||
* confirmation_number) WHERE id = ?`. Runs AFTER `updateAccommodation`'s
|
||||
* own transaction commits (§18.6 — R5 class, flagged not fixed).
|
||||
* `coalesceOverride` for the value-side COALESCE — the bound `?` FIRST,
|
||||
* the column the fallback, so the new value wins
|
||||
* (`DayAccommodationsRepository.patchConfirmation`'s precedent).
|
||||
*/
|
||||
async setMetadataAndConfirmation(id: number, metadata: string, confirmation: string | null): Promise<void> {
|
||||
const platform = this.getEntityManager().getPlatform();
|
||||
await this.qb()
|
||||
.update({
|
||||
/** Clearing a reference reopens a confirmed booking that actually held a reference. */
|
||||
async setMetadataAndConfirmation(id: number, metadata: string, confirmation?: string | null): Promise<void> {
|
||||
await this.kysely<Pick<DB, 'reservations'>>()
|
||||
.updateTable('reservations')
|
||||
.set((eb) => ({
|
||||
metadata,
|
||||
confirmation_number: coalesceOverride(platform, confirmation, 'confirmation_number'),
|
||||
})
|
||||
.where({ id })
|
||||
.execute('run');
|
||||
confirmation_number: confirmation,
|
||||
status: confirmation === null
|
||||
? eb.case()
|
||||
.when(eb.and([eb('status', '=', 'confirmed'), eb('confirmation_number', '!=', '')]))
|
||||
.then('pending')
|
||||
.else(eb.ref('status'))
|
||||
.end()
|
||||
: undefined,
|
||||
}))
|
||||
.where('id', '=', id)
|
||||
.execute();
|
||||
}
|
||||
|
||||
/** A pending hotel booking turns confirmed once its stay gets a confirmation number; other statuses stay. */
|
||||
|
||||
@@ -258,7 +258,7 @@ export class AccommodationsMcp {
|
||||
check_in: z.string().max(10).optional(),
|
||||
check_in_end: z.string().max(10).optional().describe('Check-in window end time e.g. "20:00"'),
|
||||
check_out: z.string().max(10).optional(),
|
||||
confirmation: z.string().max(100).optional(),
|
||||
confirmation: z.string().max(100).nullable().optional().describe('Booking reference, or null to clear it'),
|
||||
notes: z.string().max(1000).optional(),
|
||||
},
|
||||
annotations: TOOL_ANNOTATIONS_WRITE,
|
||||
@@ -285,7 +285,7 @@ export class AccommodationsMcp {
|
||||
check_in?: string;
|
||||
check_in_end?: string;
|
||||
check_out?: string;
|
||||
confirmation?: string;
|
||||
confirmation?: string | null;
|
||||
notes?: string;
|
||||
},
|
||||
ctx: McpContext,
|
||||
|
||||
@@ -89,7 +89,7 @@ export class AccommodationsRpc {
|
||||
check_in?: string;
|
||||
check_in_end?: string;
|
||||
check_out?: string;
|
||||
confirmation?: string;
|
||||
confirmation?: string | null;
|
||||
notes?: string;
|
||||
};
|
||||
// The input is open: a ref is read like a plugin RPC id, so '0x1' or 1.5 is BAD_PARAMS, not bound.
|
||||
|
||||
@@ -112,6 +112,13 @@ const stayNotFound = () => new DomainError(404, 'Accommodation not found', { mcp
|
||||
|
||||
const STAY_REFS = ['place_id', 'start_day_id', 'end_day_id'] as const;
|
||||
|
||||
function looksLikeBookingReference(confirmation: string | null | undefined): boolean {
|
||||
if (!confirmation) return false;
|
||||
const compact = confirmation.toLowerCase().replace(/[./_ -]/g, '');
|
||||
if (compact === 'tbd' || compact === 'na' || compact === 'notbookedyet') return false;
|
||||
return /^[\p{L}\p{N}]+(?:[./_-][\p{L}\p{N}]+)*$/u.test(confirmation) || /^\p{N}+(?: +\p{N}+)+$/u.test(confirmation);
|
||||
}
|
||||
|
||||
/**
|
||||
* The place and day refs of a stay write, each read with toRowId; an absent one
|
||||
* stays absent. A value it refuses ('0x1', '1e0', 1.5) is a 400 in the words the
|
||||
@@ -137,7 +144,7 @@ export interface CreateAccommodationData {
|
||||
check_in?: string;
|
||||
check_in_end?: string;
|
||||
check_out?: string;
|
||||
confirmation?: string;
|
||||
confirmation?: string | null;
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
@@ -778,6 +785,7 @@ export class AccommodationsService {
|
||||
|
||||
async createAccommodation(tripId: string | number, data: CreateAccommodationData) {
|
||||
const { place_id, start_day_id, end_day_id, check_in, check_in_end, check_out, confirmation, notes } = data;
|
||||
const reference = confirmation?.trim() || null;
|
||||
|
||||
// The stay, its partner hotel reservation and the day stop it implies are one
|
||||
// logical write, and an atomic one, so a failed insert halfway can't leave an orphan.
|
||||
@@ -791,7 +799,7 @@ export class AccommodationsService {
|
||||
check_in: check_in || null,
|
||||
check_in_end: check_in_end || null,
|
||||
check_out: check_out || null,
|
||||
confirmation: confirmation || null,
|
||||
confirmation: reference,
|
||||
notes: notes || null,
|
||||
});
|
||||
|
||||
@@ -810,7 +818,8 @@ export class AccommodationsService {
|
||||
day_id: start_day_id,
|
||||
title: placeName,
|
||||
reservation_time: startDayDate || null,
|
||||
confirmation_number: confirmation || null,
|
||||
confirmation_number: reference,
|
||||
status: looksLikeBookingReference(reference) ? 'confirmed' : 'pending',
|
||||
notes: notes || null,
|
||||
accommodation_id: legacyBoundIntegerText(newId),
|
||||
metadata: Object.keys(meta).length > 0 ? encodeJson(RESERVATION_METADATA, meta) : null,
|
||||
@@ -832,14 +841,14 @@ export class AccommodationsService {
|
||||
return await this.dayAccommodationsRepo.findInTrip(idNum, tripIdNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a stay's times and confirmation number onto one linked booking. A number
|
||||
* also confirms the booking when it was still pending, and that has to come after
|
||||
* the write, so both steps stay together here for each booking.
|
||||
*/
|
||||
private async syncLinkedReservation(id: number, metadata: string, confirmation: string | null): Promise<void> {
|
||||
private async syncLinkedReservation(
|
||||
id: number,
|
||||
metadata: string,
|
||||
confirmation: string | null | undefined,
|
||||
shouldConfirm: boolean,
|
||||
): Promise<void> {
|
||||
await this.reservationsRepo.setMetadataAndConfirmation(id, metadata, confirmation);
|
||||
if (confirmation) await this.reservationsRepo.confirmIfPending(id);
|
||||
if (shouldConfirm) await this.reservationsRepo.confirmIfPending(id);
|
||||
}
|
||||
|
||||
async updateAccommodation(
|
||||
@@ -852,7 +861,7 @@ export class AccommodationsService {
|
||||
check_in?: string;
|
||||
check_in_end?: string;
|
||||
check_out?: string;
|
||||
confirmation?: string;
|
||||
confirmation?: string | null;
|
||||
notes?: string;
|
||||
},
|
||||
) {
|
||||
@@ -862,7 +871,9 @@ export class AccommodationsService {
|
||||
const newCheckIn = fields.check_in !== undefined ? fields.check_in : existing.check_in;
|
||||
const newCheckInEnd = fields.check_in_end !== undefined ? fields.check_in_end : existing.check_in_end;
|
||||
const newCheckOut = fields.check_out !== undefined ? fields.check_out : existing.check_out;
|
||||
const newConfirmation = fields.confirmation !== undefined ? fields.confirmation : existing.confirmation;
|
||||
const confirmation = fields.confirmation === undefined ? undefined : fields.confirmation?.trim() || null;
|
||||
// Saving a stay form can resend its current reference. Mirror it without overriding the chosen status.
|
||||
const shouldConfirm = looksLikeBookingReference(confirmation) && confirmation !== existing.confirmation?.trim();
|
||||
const newNotes = fields.notes !== undefined ? fields.notes : existing.notes;
|
||||
|
||||
// The stay row, the day stop that mirrors it and the linked bookings' times all
|
||||
@@ -879,7 +890,7 @@ export class AccommodationsService {
|
||||
check_in: newCheckIn,
|
||||
check_in_end: newCheckInEnd,
|
||||
check_out: newCheckOut,
|
||||
confirmation: newConfirmation,
|
||||
confirmation,
|
||||
notes: newNotes,
|
||||
});
|
||||
const moved = await this.remirrorStay(existing.id, newPlaceId, newStartDayId, newCheckIn, {
|
||||
@@ -896,7 +907,7 @@ export class AccommodationsService {
|
||||
if (newCheckIn) meta.check_in_time = newCheckIn;
|
||||
if (newCheckInEnd) meta.check_in_end_time = newCheckInEnd;
|
||||
if (newCheckOut) meta.check_out_time = newCheckOut;
|
||||
await this.syncLinkedReservation(res.id, encodeJson(RESERVATION_METADATA, meta), newConfirmation || null);
|
||||
await this.syncLinkedReservation(res.id, encodeJson(RESERVATION_METADATA, meta), confirmation, shouldConfirm);
|
||||
}
|
||||
return moved;
|
||||
});
|
||||
|
||||
@@ -35,6 +35,8 @@ import {
|
||||
type TrekCard,
|
||||
} from '@trek/shared';
|
||||
|
||||
import { isDeepStrictEqual } from 'node:util';
|
||||
|
||||
type ToolArgs = Record<string, unknown>;
|
||||
|
||||
/**
|
||||
@@ -139,6 +141,7 @@ interface AgentOutcome {
|
||||
}
|
||||
|
||||
const TOO_MANY_CHANGES = `Too many changes in one step: propose at most ${MAX_WRITES_PER_STEP} at once.`;
|
||||
const CHANGE_ALREADY_PROPOSED = 'This exact change is already waiting for approval.';
|
||||
const TOO_MANY_LOOKUPS = `Too many lookups in one step: make at most ${MAX_READS_PER_STEP} at once.`;
|
||||
|
||||
/** What a step collects while its calls run: its parts, and the weather its lookups found. */
|
||||
@@ -495,7 +498,9 @@ async function runCalls(turn: Turn, calls: AiToolCall[], collected: StepParts):
|
||||
const unknownPlace = 'error' in prepared ? null : placeIdRefusal(call.name, prepared.args, turn.knownPlaceIds);
|
||||
if (unknownPlace) prepared = { error: unknownPlace };
|
||||
if (kind === 'write' && !('error' in prepared)) {
|
||||
const refused = await deps.refusalOf?.(call.name, prepared.args);
|
||||
const { args } = prepared;
|
||||
const duplicate = held.some((change) => change.toolName === call.name && isDeepStrictEqual(change.args, args));
|
||||
const refused = duplicate ? CHANGE_ALREADY_PROPOSED : await deps.refusalOf?.(call.name, args);
|
||||
if (refused) prepared = { error: refused };
|
||||
}
|
||||
if (kind === 'read' && !('error' in prepared)) reads += 1;
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface CreateAccommodation {
|
||||
end_day_id?: number;
|
||||
check_in?: string;
|
||||
check_out?: string;
|
||||
confirmation?: string;
|
||||
confirmation?: string | null;
|
||||
}
|
||||
|
||||
export interface CreateReservationData extends ReservationOrigin {
|
||||
@@ -58,7 +58,7 @@ export interface UpdateReservationData {
|
||||
reservation_time?: string;
|
||||
reservation_end_time?: string;
|
||||
location?: string;
|
||||
confirmation_number?: string;
|
||||
confirmation_number?: string | null;
|
||||
notes?: string;
|
||||
url?: string;
|
||||
day_id?: number | null;
|
||||
|
||||
@@ -438,7 +438,7 @@ export class ReservationsMcp {
|
||||
reservation_end_time: z.string().optional().describe('When it ends. Ignored for hotels, whose span is the check-in/check-out days.'),
|
||||
url: urlField,
|
||||
location: z.string().max(500).optional(),
|
||||
confirmation_number: z.string().max(100).optional(),
|
||||
confirmation_number: z.string().max(100).nullable().optional().describe('Booking reference, or null to clear it'),
|
||||
notes: z.string().max(1000).optional(),
|
||||
status: z.enum(RESERVATION_STATUSES).optional().describe('Reservation status: "pending", "confirmed", or "cancelled"'),
|
||||
place_id: idSchema.nullable().optional().describe('Link to a place (use for hotel type), or null to unlink'),
|
||||
@@ -451,7 +451,7 @@ export class ReservationsMcp {
|
||||
{ tripId, reservationId, title, type, reservation_time, reservation_end_time, url, location, confirmation_number, notes, status, place_id, assignment_id }: {
|
||||
tripId: number; reservationId: number; title?: string;
|
||||
type?: BookingType;
|
||||
reservation_time?: string; reservation_end_time?: string; url?: string; location?: string; confirmation_number?: string; notes?: string;
|
||||
reservation_time?: string; reservation_end_time?: string; url?: string; location?: string; confirmation_number?: string | null; notes?: string;
|
||||
status?: ReservationStatus; place_id?: number | null; assignment_id?: number | null;
|
||||
},
|
||||
ctx: McpContext,
|
||||
|
||||
@@ -824,10 +824,14 @@ export class ReservationsService {
|
||||
if (!accExists) resolvedAccId = null;
|
||||
}
|
||||
const hadStay = Boolean(resolvedAccId);
|
||||
const referenceOrNull = (value: string | null | undefined) =>
|
||||
typeof value === 'string' && !value.trim() ? null : value;
|
||||
let bookingConfirmation = referenceOrNull(confirmation_number);
|
||||
if (type === 'hotel' && create_accommodation) {
|
||||
const { place_id: accPlaceId, start_day_id, end_day_id, check_in, check_out, confirmation: accConf } = create_accommodation;
|
||||
if (start_day_id && end_day_id) {
|
||||
await this.requireResolvableStay(create_accommodation);
|
||||
const stayConfirmation = bookingConfirmation === undefined ? referenceOrNull(accConf) : bookingConfirmation;
|
||||
if (resolvedAccId) {
|
||||
const resolvedAccIdNum = accIdForRead(resolvedAccId)!;
|
||||
const priorCheckIn = await this.dayAccommodationsRepo.getCheckIn(resolvedAccIdNum);
|
||||
@@ -837,11 +841,9 @@ export class ReservationsService {
|
||||
end_day_id,
|
||||
check_in: check_in || null,
|
||||
check_out: check_out || null,
|
||||
confirmation: accConf || confirmation_number || null,
|
||||
confirmation: stayConfirmation,
|
||||
});
|
||||
// The stay just moved. Its stop moves with it, or it is left sitting on a
|
||||
// day nobody sleeps there any more, hidden from the day list because it
|
||||
// still carries this booking's id and stranded in the middle of the drive.
|
||||
// Carry the booking's day stop to the stay's new dates and place.
|
||||
stayMirror = await this.accommodations.moveStayStop(resolvedAccIdNum, accPlaceId || null, start_day_id, check_in, {
|
||||
checkInChanged: (check_in || null) !== (priorCheckIn ?? null),
|
||||
});
|
||||
@@ -853,10 +855,11 @@ export class ReservationsService {
|
||||
end_day_id,
|
||||
check_in: check_in || null,
|
||||
check_out: check_out || null,
|
||||
confirmation: accConf || confirmation_number || null,
|
||||
confirmation: stayConfirmation === undefined ? current.confirmation_number ?? null : stayConfirmation,
|
||||
});
|
||||
stayMirror = await this.accommodations.attachStayStop(resolvedAccId, accPlaceId, start_day_id, check_in);
|
||||
}
|
||||
if (resolvedAccId) bookingConfirmation = stayConfirmation;
|
||||
accommodationChanged = true;
|
||||
}
|
||||
}
|
||||
@@ -900,21 +903,14 @@ export class ReservationsService {
|
||||
const nextPlaceId = await this.resolvedOrNull('places', place_id !== undefined ? (place_id || null) : (current.place_id ?? null));
|
||||
const nextAssignmentId = await this.resolvedOrNull('day_assignments', assignment_id !== undefined ? (assignment_id || null) : (current.assignment_id ?? null));
|
||||
|
||||
// RS41. The `PlacesRepository.updatePlace`/PL11 precedent: the four
|
||||
// legacy `COALESCE(?, col)` keep-if-null columns (`title`/`status`/
|
||||
// `type`/`needs_review`) are resolved to their FINAL value here, in JS,
|
||||
// against the `current` pre-image this method already holds — nothing
|
||||
// else in this same transaction touches those four columns between the
|
||||
// read and this write, so `current`'s snapshot is exactly what the
|
||||
// legacy statement's own SQL-side `COALESCE` against the live row would
|
||||
// have read.
|
||||
// Resolve the update against the current row before writing.
|
||||
const idNum = this.rowIdNum(id);
|
||||
await this.reservationsRepo.updateReservation(idNum, {
|
||||
title: title || current.title,
|
||||
reservation_time: nextReservationTime,
|
||||
reservation_end_time: nextReservationEndTime,
|
||||
location: location !== undefined ? (location || null) : (current.location ?? null),
|
||||
confirmation_number: confirmation_number !== undefined ? (confirmation_number || null) : (current.confirmation_number ?? null),
|
||||
confirmation_number: bookingConfirmation !== undefined ? (bookingConfirmation || null) : (current.confirmation_number ?? null),
|
||||
notes: notes !== undefined ? (notes || null) : (current.notes ?? null),
|
||||
url: url !== undefined ? (url || null) : ((current as Reservation & { url?: string | null }).url ?? null),
|
||||
day_id: nextDayId,
|
||||
@@ -932,19 +928,19 @@ export class ReservationsService {
|
||||
await this.saveEndpoints(idNum, endpoints);
|
||||
}
|
||||
|
||||
// Sync check-in/out to accommodation if linked
|
||||
// Sync times and explicit confirmation edits to the linked stay.
|
||||
const resolvedMeta = nextMetadata !== undefined ? nextMetadata : (current.metadata ? decodeJson(RESERVATION_METADATA, current.metadata, `reservation ${idNum}`) : null);
|
||||
if (resolvedAccId && resolvedMeta) {
|
||||
const meta = decodeJson(RESERVATION_METADATA, resolvedMeta) as AccommodationTimesMeta;
|
||||
if (resolvedAccId) {
|
||||
const meta = resolvedMeta ? decodeJson(RESERVATION_METADATA, resolvedMeta) as AccommodationTimesMeta : null;
|
||||
const resolvedAccIdNum = accIdForRead(resolvedAccId)!;
|
||||
if (meta.check_in_time || meta.check_in_end_time || meta.check_out_time) {
|
||||
if (meta?.check_in_time || meta?.check_in_end_time || meta?.check_out_time) {
|
||||
await this.dayAccommodationsRepo.patchTimes(
|
||||
resolvedAccIdNum, meta.check_in_time || null, meta.check_in_end_time || null, meta.check_out_time || null,
|
||||
);
|
||||
}
|
||||
const resolvedConf = confirmation_number !== undefined ? confirmation_number : current.confirmation_number;
|
||||
if (resolvedConf) {
|
||||
await this.dayAccommodationsRepo.patchConfirmation(resolvedAccIdNum, resolvedConf);
|
||||
if (!accommodationChanged && bookingConfirmation !== undefined) {
|
||||
await this.dayAccommodationsRepo.patchConfirmation(resolvedAccIdNum, bookingConfirmation);
|
||||
accommodationChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
import { buildApp } from '../../src/bootstrap';
|
||||
import { Reservations } from '../../src/db/entities/Reservations.entity';
|
||||
import { AccommodationsService } from '../../src/nest/accommodations/accommodations.service';
|
||||
import { legacyBoundIntegerText } from '../../src/nest/common/row-id';
|
||||
import { withRequestContext } from '../../src/nest/database/request-context';
|
||||
import { ReservationsService } from '../../src/nest/reservations/reservations.service';
|
||||
import { makePlace } from '../helpers/factories/places';
|
||||
import { makeReservation } from '../helpers/factories/reservations';
|
||||
import { findRow, findRows, updateRows } from '../helpers/factories/rows';
|
||||
import { makeDay, makeTrip } from '../helpers/factories/trips';
|
||||
import { makeUser } from '../helpers/factories/users';
|
||||
import { MikroORM } from '@mikro-orm/core';
|
||||
import type { INestApplication } from '@nestjs/common';
|
||||
|
||||
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
||||
|
||||
let app: INestApplication;
|
||||
let orm: MikroORM;
|
||||
let svc: AccommodationsService;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await buildApp();
|
||||
orm = app.get(MikroORM);
|
||||
svc = app.get(AccommodationsService);
|
||||
}, 60_000);
|
||||
|
||||
afterAll(async () => {
|
||||
await app?.close();
|
||||
});
|
||||
|
||||
function linkedReservation(accommodationId: number) {
|
||||
return findRow(orm, Reservations, { accommodation_id: legacyBoundIntegerText(accommodationId) });
|
||||
}
|
||||
|
||||
function editStay(id: number, tripId: number, fields: Parameters<AccommodationsService['updateAccommodation']>[2]) {
|
||||
return withRequestContext(orm, async () => {
|
||||
const existing = await svc.getAccommodation(id, tripId);
|
||||
if (!existing) throw new Error('Stay was not found');
|
||||
return svc.updateAccommodation(id, existing, fields);
|
||||
});
|
||||
}
|
||||
|
||||
describe('Accommodation confirmation references', () => {
|
||||
async function stayForConfirmation(confirmation?: string) {
|
||||
const { user } = await makeUser(orm);
|
||||
const trip = await makeTrip(orm, user.id);
|
||||
const day = await makeDay(orm, trip.id);
|
||||
const place = await makePlace(orm, trip.id);
|
||||
const { accommodation } = await withRequestContext(orm, () =>
|
||||
svc.createAccommodation(trip.id, {
|
||||
place_id: place.id,
|
||||
start_day_id: day.id,
|
||||
end_day_id: day.id,
|
||||
confirmation,
|
||||
}),
|
||||
);
|
||||
if (!accommodation) throw new Error('Stay was not created');
|
||||
return { accommodation, trip, day, place };
|
||||
}
|
||||
|
||||
it.each(['Waiting for the hotel', 'tBd', 'N/a', 'NOT-BOOKED-YET'])(
|
||||
'ACC-3301: creates a pending booking with placeholder %s',
|
||||
async (confirmation) => {
|
||||
const { accommodation } = await stayForConfirmation(confirmation);
|
||||
|
||||
expect(accommodation.confirmation).toBe(confirmation);
|
||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
||||
confirmation_number: confirmation,
|
||||
status: 'pending',
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
it.each([
|
||||
['NOT BOOKED YET: pick a hotel', 'ABC-12345'],
|
||||
['not_booked_yet', '1234 567 890'],
|
||||
['T.B.D', 'XYZ'],
|
||||
])('ACC-3301: confirms a booking after placeholder %s is replaced with %s', async (confirmation, reference) => {
|
||||
const { accommodation, trip } = await stayForConfirmation();
|
||||
const { accommodation: updated } = await editStay(accommodation.id, trip.id, { confirmation });
|
||||
|
||||
expect(updated?.confirmation).toBe(confirmation);
|
||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
||||
confirmation_number: confirmation,
|
||||
status: 'pending',
|
||||
});
|
||||
await editStay(accommodation.id, trip.id, { confirmation: ` ${reference} ` });
|
||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
||||
confirmation_number: reference,
|
||||
status: 'confirmed',
|
||||
});
|
||||
});
|
||||
|
||||
it.each([null, '', ' \t '])(
|
||||
'ACC-3301: clearing with %j clears each booking reference and reopens its confirmation',
|
||||
async (confirmation) => {
|
||||
const { accommodation, trip } = await stayForConfirmation('ABC123');
|
||||
const accommodation_id = legacyBoundIntegerText(accommodation.id);
|
||||
await makeReservation(orm, trip.id, {
|
||||
accommodation_id,
|
||||
type: 'hotel',
|
||||
status: 'cancelled',
|
||||
confirmation_number: 'ABC123',
|
||||
});
|
||||
await makeReservation(orm, trip.id, { accommodation_id, type: 'hotel', status: 'confirmed' });
|
||||
const { accommodation: updated } = await editStay(accommodation.id, trip.id, { confirmation });
|
||||
|
||||
expect(updated?.confirmation).toBeNull();
|
||||
expect(await findRows(orm, Reservations, { accommodation_id }, { id: 'asc' })).toMatchObject([
|
||||
{ confirmation_number: null, status: 'pending' },
|
||||
{ confirmation_number: null, status: 'cancelled' },
|
||||
{ confirmation_number: null, status: 'confirmed' },
|
||||
]);
|
||||
},
|
||||
);
|
||||
|
||||
it('ACC-3301: omitting the code preserves the linked booking reference and its chosen status', async () => {
|
||||
const { accommodation, trip } = await stayForConfirmation('STAY-1');
|
||||
await updateRows(
|
||||
orm,
|
||||
Reservations,
|
||||
{ accommodation_id: legacyBoundIntegerText(accommodation.id) },
|
||||
{
|
||||
confirmation_number: 'BOOKING-1',
|
||||
status: 'pending',
|
||||
},
|
||||
);
|
||||
const { accommodation: updated } = await editStay(accommodation.id, trip.id, {
|
||||
notes: 'Late arrival',
|
||||
});
|
||||
|
||||
expect(updated?.confirmation).toBe('STAY-1');
|
||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
||||
confirmation_number: 'BOOKING-1',
|
||||
status: 'pending',
|
||||
});
|
||||
});
|
||||
|
||||
it('ACC-3301: resubmitting the same stay reference reconciles the booking while preserving its pending status', async () => {
|
||||
const { accommodation, trip } = await stayForConfirmation('STAY-1');
|
||||
await updateRows(
|
||||
orm,
|
||||
Reservations,
|
||||
{ accommodation_id: legacyBoundIntegerText(accommodation.id) },
|
||||
{
|
||||
confirmation_number: 'BOOKING-1',
|
||||
status: 'pending',
|
||||
},
|
||||
);
|
||||
await editStay(accommodation.id, trip.id, { confirmation: 'STAY-1', notes: 'Late arrival' });
|
||||
|
||||
expect(await linkedReservation(accommodation.id)).toMatchObject({
|
||||
confirmation_number: 'STAY-1',
|
||||
status: 'pending',
|
||||
});
|
||||
});
|
||||
|
||||
it('ACC-3301: explicitly clearing an empty stay clears a stale booking reference', async () => {
|
||||
const { accommodation, trip } = await stayForConfirmation();
|
||||
await updateRows(
|
||||
orm,
|
||||
Reservations,
|
||||
{ accommodation_id: legacyBoundIntegerText(accommodation.id) },
|
||||
{
|
||||
confirmation_number: 'STALE',
|
||||
status: 'confirmed',
|
||||
},
|
||||
);
|
||||
await editStay(accommodation.id, trip.id, { confirmation: null });
|
||||
|
||||
expect(await linkedReservation(accommodation.id)).toMatchObject({ confirmation_number: null, status: 'pending' });
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ nested: null, expected: null },
|
||||
{ nested: ' \t ', expected: null },
|
||||
{ nested: 'NEW-REF', expected: 'NEW-REF' },
|
||||
{ top: null, nested: 'OLD-REF', expected: null },
|
||||
{ top: 'TOP-REF', nested: null, expected: 'TOP-REF' },
|
||||
])(
|
||||
'ACC-3301: syncs the selected reference across a complete booking update (%j)',
|
||||
async ({ top, nested, expected }) => {
|
||||
const { accommodation, trip, day, place } = await stayForConfirmation('OLD-REF');
|
||||
const booking = await linkedReservation(accommodation.id);
|
||||
if (!booking) throw new Error('Booking was not found');
|
||||
const bookings = app.get(ReservationsService);
|
||||
|
||||
await withRequestContext(orm, async () => {
|
||||
const current = await bookings.getReservation(booking.id, trip.id);
|
||||
if (!current) throw new Error('Booking was not found');
|
||||
const { reservation, accommodationChanged } = await bookings.update(
|
||||
booking.id,
|
||||
trip.id,
|
||||
{
|
||||
type: 'hotel',
|
||||
status: 'confirmed',
|
||||
confirmation_number: top,
|
||||
create_accommodation: {
|
||||
place_id: place.id,
|
||||
start_day_id: day.id,
|
||||
end_day_id: day.id,
|
||||
confirmation: nested,
|
||||
},
|
||||
},
|
||||
current,
|
||||
);
|
||||
expect(accommodationChanged).toBe(true);
|
||||
expect(reservation).toMatchObject({ confirmation_number: expected, status: 'confirmed' });
|
||||
expect(await svc.getAccommodation(accommodation.id, trip.id)).toMatchObject({ confirmation: expected });
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
@@ -294,11 +294,11 @@ export const bookings: CaseGroup = {
|
||||
{
|
||||
tool: 'update_accommodation',
|
||||
needs: ['stay'],
|
||||
args: (s) => ({ tripId: s.trip.id, accommodationId: s.stay.id, notes: 'Late arrival' }),
|
||||
args: (s) => ({ tripId: s.trip.id, accommodationId: s.stay.id, confirmation: null }),
|
||||
rest: {
|
||||
method: 'put',
|
||||
path: (s) => `/api/trips/${s.trip.id}/accommodations/${s.stay.id}`,
|
||||
body: () => ({ notes: 'Late arrival' }),
|
||||
body: () => ({ confirmation: null }),
|
||||
},
|
||||
expect: ['accommodation:updated'],
|
||||
},
|
||||
@@ -352,14 +352,19 @@ export const bookings: CaseGroup = {
|
||||
{
|
||||
tool: 'update_reservation',
|
||||
needs: ['stay', 'member'],
|
||||
args: (s) => ({ tripId: s.trip.id, reservationId: s.stay.reservationId, status: 'confirmed' }),
|
||||
args: (s) => ({
|
||||
tripId: s.trip.id,
|
||||
reservationId: s.stay.reservationId,
|
||||
status: 'confirmed',
|
||||
confirmation_number: null,
|
||||
}),
|
||||
rest: {
|
||||
method: 'put',
|
||||
path: (s) => `/api/trips/${s.trip.id}/reservations/${s.stay.reservationId}`,
|
||||
body: () => ({ status: 'confirmed' }),
|
||||
body: () => ({ status: 'confirmed', confirmation_number: null }),
|
||||
},
|
||||
settle: true,
|
||||
expect: ['reservation:updated', BOOKING_NOTICE],
|
||||
expect: ['accommodation:updated', 'reservation:updated', BOOKING_NOTICE],
|
||||
},
|
||||
{
|
||||
// A hotel booking takes its stay (and the stay's stop) and its linked cost along.
|
||||
|
||||
@@ -65,6 +65,7 @@ const KINDS: Record<string, AssistantToolKind> = {
|
||||
get_weather: 'read',
|
||||
get_place_details: 'read',
|
||||
create_place: 'write',
|
||||
create_packing_item: 'write',
|
||||
open_trip_chat: 'read',
|
||||
};
|
||||
|
||||
@@ -284,6 +285,40 @@ describe('runAgentLoop', () => {
|
||||
expect(t.chunks.at(-1)).toEqual({ type: 'finish', finishReason: 'tool-calls' });
|
||||
});
|
||||
|
||||
it('holds one proposal when the model repeats the same packing item change in a step', async () => {
|
||||
const t = setup([
|
||||
[
|
||||
{
|
||||
type: 'tool-call',
|
||||
call: { id: 'first', name: 'create_packing_item', args: { name: 'Adapter', quantity: 2 } },
|
||||
},
|
||||
{
|
||||
type: 'tool-call',
|
||||
call: { id: 'repeat', name: 'create_packing_item', args: { quantity: 2, name: 'Adapter' } },
|
||||
},
|
||||
{
|
||||
type: 'tool-call',
|
||||
call: { id: 'other', name: 'create_packing_item', args: { name: 'Adapter', quantity: 3 } },
|
||||
},
|
||||
],
|
||||
]);
|
||||
|
||||
const outcome = await runAgentLoop(t.deps, t.input, t.writer, new AbortController().signal);
|
||||
|
||||
expect(outcome.end).toBe('awaiting');
|
||||
expect(t.memory.held[0].held.map((call) => call.providerCallId)).toEqual(['first', 'other']);
|
||||
expect(t.chunks.filter((chunk) => chunk.type === 'tool-approval-request')).toHaveLength(2);
|
||||
expect(t.memory.held[0].step.parts).toContainEqual({
|
||||
type: 'tool-call',
|
||||
toolCallId: 'repeat',
|
||||
toolName: 'create_packing_item',
|
||||
args: { quantity: 2, name: 'Adapter' },
|
||||
result: 'This exact change is already waiting for approval.',
|
||||
isError: true,
|
||||
});
|
||||
expect(t.tools.call).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('ASTAGT-004: more changes than a step may hold go back to the model as an error', async () => {
|
||||
const calls = Array.from({ length: MAX_WRITES_PER_STEP + 1 }, (_, i): AiChatEvent => ({
|
||||
type: 'tool-call',
|
||||
|
||||
@@ -1174,6 +1174,7 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
||||
const place = createPlace(testDb, trip.id);
|
||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||
await updateRows(orm, Reservations, { id: res.id }, { confirmation_number: 'BOOKING-1' });
|
||||
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
||||
const { reservation, accommodationChanged } = await svc.update(String(res.id), String(trip.id), {
|
||||
type: 'hotel',
|
||||
@@ -1181,7 +1182,7 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
||||
}, current);
|
||||
expect(accommodationChanged).toBe(true);
|
||||
expect(reservation.accommodation_id).not.toBeNull();
|
||||
expect(({ c: await countRows(orm, DayAccommodations, { trip: trip.id }) })).toEqual({ c: 1 });
|
||||
expect(await findRows(orm, DayAccommodations, { trip: trip.id })).toMatchObject([{ confirmation: 'BOOKING-1' }]);
|
||||
});
|
||||
|
||||
it('RESV-SVC-023: explicit update fields bind their values; empty strings null; absent fields keep current', async () => {
|
||||
@@ -1220,17 +1221,17 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
||||
expect(reservation.end_day_id).toBe(days[1].id);
|
||||
});
|
||||
|
||||
it('RESV-SVC-025: with metadata absent, the stored metadata JSON drives the accommodation sync (confirmation falls back to current)', async () => {
|
||||
it('RESV-SVC-025: stored metadata drives the accommodation time sync while ACC-3301 preserves an omitted reference', async () => {
|
||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
||||
const place = createPlace(testDb, trip.id);
|
||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id);
|
||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'STAY-REF' });
|
||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), metadata: JSON.stringify({ check_in_time: '16:00' }), confirmation_number: 'KEEP' });
|
||||
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
||||
await svc.update(String(res.id), String(trip.id), { notes: 'touch' }, current);
|
||||
const row = await findRow(orm, DayAccommodations, { id: acc.id });
|
||||
expect(row).toMatchObject({ check_in: '16:00', confirmation: 'KEEP' });
|
||||
expect(row).toMatchObject({ check_in: '16:00', confirmation: 'STAY-REF' });
|
||||
});
|
||||
|
||||
it('H1 (Plan 3h Task 7 review) — patchTimes: updating a linked reservation OVERRIDES the stay\'s existing non-null check-in/end/out — the new value wins, matching legacy COALESCE(?, col)', async () => {
|
||||
@@ -1254,22 +1255,56 @@ describe('ReservationsService — legacy branch parity (coverage of the folded c
|
||||
expect(row).toMatchObject({ check_in: '16:30', check_in_end: '11:15', check_out: '09:00' });
|
||||
});
|
||||
|
||||
it('H1 (Plan 3h Task 7 review) — patchConfirmation: updating a linked reservation OVERRIDES the stay\'s existing non-null confirmation — the new value wins, matching legacy COALESCE(?, confirmation)', async () => {
|
||||
it('H1: explicitly updating a booking reference replaces the stay reference', async () => {
|
||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
||||
const place = createPlace(testDb, trip.id);
|
||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||
// The stay already holds a DIFFERENT, non-null confirmation — if
|
||||
// `coalesceParam`'s (existing-wins) direction were used instead of
|
||||
// `coalesceOverride`'s (new-wins), the stay would keep it.
|
||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ACC-OLD' });
|
||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), metadata: JSON.stringify({}), confirmation_number: 'RES-NEW' });
|
||||
const current = (await svc.getReservation(String(res.id), String(trip.id)))!;
|
||||
await svc.update(String(res.id), String(trip.id), { notes: 'touch' }, current);
|
||||
await svc.update(String(res.id), String(trip.id), { confirmation_number: 'RES-NEW' }, current);
|
||||
const row = await findRow(orm, DayAccommodations, { id: acc.id });
|
||||
expect(row).toMatchObject({ confirmation: 'RES-NEW' });
|
||||
});
|
||||
|
||||
it('ACC-3301: clearing the booking reference clears the stay without overriding the chosen status', async () => {
|
||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
||||
const place = createPlace(testDb, trip.id);
|
||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ABC123' });
|
||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id), confirmation_number: 'ABC123' });
|
||||
const current = await svc.getReservation(String(res.id), String(trip.id));
|
||||
if (!current) throw new Error('Booking was not found');
|
||||
const { reservation, accommodationChanged } = await svc.update(String(res.id), String(trip.id), {
|
||||
confirmation_number: null, status: 'confirmed',
|
||||
}, current);
|
||||
|
||||
expect(reservation).toMatchObject({ confirmation_number: null, status: 'confirmed' });
|
||||
expect(accommodationChanged).toBe(true);
|
||||
expect(await findRow(orm, DayAccommodations, { id: acc.id })).toMatchObject({ confirmation: null });
|
||||
});
|
||||
|
||||
it('ACC-3301: a booking edit with stay details and no reference preserves the existing stay reference', async () => {
|
||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-02' });
|
||||
const place = createPlace(testDb, trip.id);
|
||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||
const acc = createDayAccommodation(testDb, trip.id, place.id, days[0].id, days[1].id, { confirmation: 'ABC123' });
|
||||
const res = createReservation(testDb, trip.id, { title: 'Hotel', type: 'hotel' });
|
||||
await updateRows(orm, Reservations, { id: res.id }, { accommodation_id: String(acc.id) });
|
||||
const current = await svc.getReservation(String(res.id), String(trip.id));
|
||||
if (!current) throw new Error('Booking was not found');
|
||||
await svc.update(String(res.id), String(trip.id), {
|
||||
type: 'hotel',
|
||||
create_accommodation: { place_id: place.id, start_day_id: days[0].id, end_day_id: days[1].id, check_in: '14:00' },
|
||||
}, current);
|
||||
|
||||
expect(await findRow(orm, DayAccommodations, { id: acc.id })).toMatchObject({
|
||||
confirmation: 'ABC123', check_in: '14:00',
|
||||
});
|
||||
});
|
||||
|
||||
it('RESV-SVC-026: resync derives the end day too, keeping the stored one when the end time is out of range', async () => {
|
||||
const { trip } = ownerTrip({ start_date: '2030-05-01', end_date: '2030-05-03' });
|
||||
const days = await findRows(orm, Days, { trip: trip.id }, { day_number: 'asc' }) as { id: number }[];
|
||||
|
||||
@@ -551,6 +551,21 @@ describe('AccommodationsRpc', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('ACC-3301: a plugin can explicitly clear the stay reference with null', async () => {
|
||||
const f = build();
|
||||
const res = await f
|
||||
.host()
|
||||
.dispatch(req('accommodations.update', { tripId: 1, accommodationId: 11, input: { confirmation: null } }), 42);
|
||||
|
||||
expect(res).toMatchObject({ k: 'res', result: { id: 11 } });
|
||||
expect(f.days.updateAccommodation).toHaveBeenCalledWith(
|
||||
11,
|
||||
{ id: 11 },
|
||||
expect.objectContaining({ confirmation: null }),
|
||||
);
|
||||
expect(events(f.realtime)).toEqual(['accommodation:updated']);
|
||||
});
|
||||
|
||||
it('BOOK-RPC-015d deleting a block without a partner cascades only its own event', async () => {
|
||||
const f = build();
|
||||
await f.host().dispatch(req('accommodations.delete', { tripId: 1, accommodationId: 11 }), 42);
|
||||
|
||||
@@ -114,6 +114,10 @@ export const NOT_PLURAL = [
|
||||
{ key: 'dawarich.duration.hours', because: 'a duration in a unit symbol (h), the same for any number' },
|
||||
{ key: 'dawarich.duration.hoursMinutes', because: 'a duration in unit symbols (h, min), the same for any number' },
|
||||
{ key: 'files.uploadErrorSize', because: 'a size limit in a unit symbol (MB), the same for any number' },
|
||||
{
|
||||
key: 'native.plans.aiPerMonth',
|
||||
because: 'a monthly document allowance before a unit ("25 / month"), always in the tens',
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'لتجنب الدفع، ألغِ الاشتراك في App Store قبل نهاية الفترة التجريبية بـ٢٤ ساعة على الأقل.',
|
||||
'native.trial.cancelPlay': 'لتجنب الدفع، ألغِ الاشتراك في Google Play قبل نهاية الفترة التجريبية.',
|
||||
'native.trial.badge': '٧ أيام مجانًا',
|
||||
'native.trial.price': '٧ أيام مجانًا، ثم {price} {period}.',
|
||||
'native.trial.changed': 'تغيّر العرض. ارجع إلى الخطط وتحقّق من السعر الحالي.',
|
||||
'native.connect.title': 'الاتصال بـ TREK',
|
||||
'native.connect.hint': 'أدخل العنوان الذي تفتح به TREK في متصفحك.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -69,6 +64,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'يُخصم المبلغ من حساب Google الخاص بك عند التأكيد. يتجدد الاشتراك تلقائيًا ما لم تلغِه قبل نهاية الفترة. يمكنك إدارته أو إلغاؤه في Google Play من الملف الشخصي، الدفعات والاشتراكات، الاشتراكات.',
|
||||
'native.plans.restoreNoneAndroid': 'لم يُعثر على اشتراك نشط في حساب Google هذا.',
|
||||
'native.plans.recommended': 'موصى به',
|
||||
'native.claim.change': 'تغيير',
|
||||
'native.claim.ruleLength': 'أحرف',
|
||||
'native.claim.ruleUpper': 'حرف كبير',
|
||||
@@ -192,17 +188,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'الصور وكتاب الصور',
|
||||
'native.welcome.photosSub': 'تبقى الذكريات مع الرحلة',
|
||||
'native.welcome.discover': 'استكشف خطط السحابة',
|
||||
'native.trip.start.title': 'رحلة نهاية الأسبوع',
|
||||
'native.trip.start.text': 'رحلات قصيرة، والتخطيط أولًا.',
|
||||
'native.trip.basis.title': 'جولة',
|
||||
'native.trip.basis.text': 'عدة محطات، والحجوزات تلقائيًا.',
|
||||
'native.trip.plus.title': 'رحلة كبيرة',
|
||||
'native.trip.plus.text': 'أسابيع في الطريق، مع المجموعة كلها.',
|
||||
'native.trip.pro.title': 'رحّالة',
|
||||
'native.trip.pro.text': 'لمن يسافر كثيرًا ولكتب الصور الكبيرة.',
|
||||
'native.plans.unlimited': 'بلا حدود',
|
||||
'native.plans.unlimitedSub': 'الرحلات ورفاق السفر',
|
||||
'native.plans.inEveryPlan': 'في كل خطة',
|
||||
'native.plans.yearlyIs': '{price} سنويًا، ألغِ في أي وقت',
|
||||
'native.plans.monthlyIs': 'أي {price} شهريًا',
|
||||
'native.plans.storage': 'التخزين',
|
||||
'native.plans.notIncluded': 'غير مشمول',
|
||||
'native.plans.storageFairUse': 'تخزين وفق الاستخدام العادل',
|
||||
'native.plans.aiPerMonth': '{n} / شهر',
|
||||
'native.plans.aiNone': 'غير مشمول',
|
||||
'native.plans.included': 'مشمول',
|
||||
'native.plans.planned': 'مخطط له',
|
||||
'native.plans.assistant': 'مساعد الذكاء الاصطناعي',
|
||||
'native.plans.mailImport': 'استيراد البريد تلقائيًا',
|
||||
'native.plans.aiLabel': 'مستندات الذكاء الاصطناعي',
|
||||
'native.plans.choose': 'اختر {plan}',
|
||||
'native.plans.choose': 'اختر {trip}',
|
||||
'native.plans.termsShort': 'شروط الاستخدام (EULA)',
|
||||
'native.plans.privacyShort': 'الخصوصية',
|
||||
'native.plans.billing': 'الدفع',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Ödəniş tutulmaması üçün sınaq bitməzdən ən azı 24 saat əvvəl App Store-da abunəliyi ləğv edin.',
|
||||
'native.trial.cancelPlay': 'Ödəniş tutulmaması üçün sınaq bitməzdən əvvəl Google Play-də abunəliyi ləğv edin.',
|
||||
'native.trial.badge': '7 gün pulsuz',
|
||||
'native.trial.price': '7 gün pulsuz, sonra {period} {price}.',
|
||||
'native.trial.changed': 'Təklif dəyişib. Tariflərə qayıdıb cari qiyməti yoxlayın.',
|
||||
'native.connect.title': 'TREK-ə qoşulun',
|
||||
'native.connect.hint': 'TREK-i brauzerdə açdığınız ünvanı daxil edin.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -71,6 +65,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Ödəniş təsdiq etdikdə Google hesabınızdan tutulur. Abunəlik dövr bitməzdən əvvəl ləğv etməsəniz avtomatik yenilənir. Onu Google Play-də Profil, Ödənişlər və abunəliklər, Abunəliklər bölməsində idarə edə və ya ləğv edə bilərsiniz.',
|
||||
'native.plans.restoreNoneAndroid': 'Bu Google hesabında aktiv abunəlik tapılmadı.',
|
||||
'native.plans.recommended': 'Tövsiyə olunur',
|
||||
'native.claim.change': 'Dəyiş',
|
||||
'native.claim.ruleLength': 'simvol',
|
||||
'native.claim.ruleUpper': 'Böyük hərf',
|
||||
@@ -198,17 +193,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotolar və foto kitab',
|
||||
'native.welcome.photosSub': 'Xatirələr səyahətlə qalır',
|
||||
'native.welcome.discover': 'Bulud planlarına baxın',
|
||||
'native.trip.start.title': 'Həftəsonu səfəri',
|
||||
'native.trip.start.text': 'Qısa səfərlər, əsasən planlaşdırma.',
|
||||
'native.trip.basis.title': 'Tur',
|
||||
'native.trip.basis.text': 'Bir neçə dayanacaq, rezervasiyalar avtomatik.',
|
||||
'native.trip.plus.title': 'Böyük səyahət',
|
||||
'native.trip.plus.text': 'Həftələrlə yolda, bütün qrupla.',
|
||||
'native.trip.pro.title': 'Dünya səyyahı',
|
||||
'native.trip.pro.text': 'Tez-tez səyahət edənlər və böyük foto kitablar üçün.',
|
||||
'native.plans.unlimited': 'Limitsiz',
|
||||
'native.plans.unlimitedSub': 'Səfərlər və yol yoldaşları',
|
||||
'native.plans.inEveryPlan': 'hər planda',
|
||||
'native.plans.yearlyIs': 'İllik {price}, istənilən vaxt ləğv edin',
|
||||
'native.plans.monthlyIs': 'Bu, ayda {price} edir',
|
||||
'native.plans.storage': 'Saxlama',
|
||||
'native.plans.notIncluded': 'Daxil deyil',
|
||||
'native.plans.storageFairUse': 'Ədalətli istifadə yaddaşı',
|
||||
'native.plans.aiPerMonth': '{n} / ay',
|
||||
'native.plans.aiNone': 'Daxil deyil',
|
||||
'native.plans.included': 'Daxildir',
|
||||
'native.plans.planned': 'Planlaşdırılır',
|
||||
'native.plans.assistant': 'Sİ köməkçisi',
|
||||
'native.plans.mailImport': 'Avtomatik e-poçt idxalı',
|
||||
'native.plans.aiLabel': 'Sİ sənədləri',
|
||||
'native.plans.choose': '{plan} seçin',
|
||||
'native.plans.choose': '{trip} seçin',
|
||||
'native.plans.termsShort': 'İstifadə şərtləri (EULA)',
|
||||
'native.plans.privacyShort': 'Məxfilik',
|
||||
'native.plans.billing': 'Ödəniş',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'Para evitar cobranças, cancele no App Store pelo menos 24 horas antes do fim do teste.',
|
||||
'native.trial.cancelPlay': 'Para evitar cobranças, cancele no Google Play antes do fim do teste.',
|
||||
'native.trial.badge': '7 dias grátis',
|
||||
'native.trial.price': '7 dias grátis, depois {price} {period}.',
|
||||
'native.trial.changed': 'A oferta mudou. Volte aos planos e confira o preço atual.',
|
||||
'native.connect.title': 'Conectar ao TREK',
|
||||
'native.connect.hint': 'Digite o endereço em que você abre o TREK no navegador.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -71,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'O pagamento é cobrado na sua conta Google ao confirmar. A assinatura é renovada automaticamente, a menos que você a cancele antes do fim do período. Gerencie ou cancele no Google Play em Perfil, Pagamentos e assinaturas, Assinaturas.',
|
||||
'native.plans.restoreNoneAndroid': 'Nenhuma assinatura ativa encontrada nesta conta Google.',
|
||||
'native.plans.recommended': 'Recomendado',
|
||||
'native.claim.change': 'Alterar',
|
||||
'native.claim.ruleLength': 'caracteres',
|
||||
'native.claim.ruleUpper': 'Maiúscula',
|
||||
@@ -199,17 +195,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotos e fotolivro',
|
||||
'native.welcome.photosSub': 'As memórias ficam com a viagem',
|
||||
'native.welcome.discover': 'Conhecer os planos na nuvem',
|
||||
'native.trip.start.title': 'Fim de semana',
|
||||
'native.trip.start.text': 'Viagens curtas, mais planejamento.',
|
||||
'native.trip.basis.title': 'Roteiro',
|
||||
'native.trip.basis.text': 'Vários destinos, reservas automáticas.',
|
||||
'native.trip.plus.title': 'Grande viagem',
|
||||
'native.trip.plus.text': 'Semanas na estrada, com o grupo todo.',
|
||||
'native.trip.pro.title': 'Viajante do mundo',
|
||||
'native.trip.pro.text': 'Para quem viaja muito e faz fotolivros grandes.',
|
||||
'native.plans.unlimited': 'Ilimitado',
|
||||
'native.plans.unlimitedSub': 'Viagens e companheiros de viagem',
|
||||
'native.plans.inEveryPlan': 'em todos os planos',
|
||||
'native.plans.yearlyIs': '{price} por ano, cancele quando quiser',
|
||||
'native.plans.monthlyIs': 'São {price} por mês',
|
||||
'native.plans.storage': 'Armazenamento',
|
||||
'native.plans.notIncluded': 'Não incluído',
|
||||
'native.plans.storageFairUse': 'Armazenamento de uso justo',
|
||||
'native.plans.aiPerMonth': '{n} / mês',
|
||||
'native.plans.aiNone': 'Não incluído',
|
||||
'native.plans.included': 'Incluído',
|
||||
'native.plans.planned': 'Planejado',
|
||||
'native.plans.assistant': 'Assistente de IA',
|
||||
'native.plans.mailImport': 'Importação automática de e-mails',
|
||||
'native.plans.aiLabel': 'Documentos de IA',
|
||||
'native.plans.choose': 'Escolher {plan}',
|
||||
'native.plans.choose': 'Escolher {trip}',
|
||||
'native.plans.termsShort': 'Termos de uso (EULA)',
|
||||
'native.plans.privacyShort': 'Privacidade',
|
||||
'native.plans.billing': 'Cobrança',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Per evitar el cobrament, cancel·la a l’App Store almenys 24 hores abans que acabi la prova.',
|
||||
'native.trial.cancelPlay': 'Per evitar el cobrament, cancel·la a Google Play abans que acabi la prova.',
|
||||
'native.trial.badge': '7 dies gratis',
|
||||
'native.trial.price': '7 dies gratis, després {price} {period}.',
|
||||
'native.trial.changed': 'L’oferta ha canviat. Torna als plans i comprova el preu actual.',
|
||||
'native.connect.title': 'Connecta amb TREK',
|
||||
'native.connect.hint': 'Introdueix l’adreça amb què obres TREK al navegador.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'El pagament es carrega al teu compte de Google en confirmar. La subscripció es renova automàticament si no la cancel·les abans que acabi el període. Gestiona-la o cancel·la-la a Google Play, a Perfil, Pagaments i subscripcions, Subscripcions.',
|
||||
'native.plans.restoreNoneAndroid': 'No s’ha trobat cap subscripció activa en aquest compte de Google.',
|
||||
'native.plans.recommended': 'Recomanat',
|
||||
'native.claim.change': 'Canvia',
|
||||
'native.claim.ruleLength': 'caràcters',
|
||||
'native.claim.ruleUpper': 'Majúscula',
|
||||
@@ -201,17 +196,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotos i fotollibre',
|
||||
'native.welcome.photosSub': 'Els records es queden amb el viatge',
|
||||
'native.welcome.discover': 'Descobreix els plans cloud',
|
||||
'native.trip.start.title': 'Escapada',
|
||||
'native.trip.start.text': 'Viatges curts, sobretot planificar.',
|
||||
'native.trip.basis.title': 'Ruta per etapes',
|
||||
'native.trip.basis.text': 'Diverses parades, reserves automàtiques.',
|
||||
'native.trip.plus.title': 'Gran viatge',
|
||||
'native.trip.plus.text': 'Setmanes de viatge, amb tot el grup.',
|
||||
'native.trip.pro.title': 'Rodamón',
|
||||
'native.trip.pro.text': 'Per a qui viatja sovint i fa fotollibres grans.',
|
||||
'native.plans.unlimited': 'Il·limitat',
|
||||
'native.plans.unlimitedSub': 'Viatges i companys de viatge',
|
||||
'native.plans.inEveryPlan': 'en tots els plans',
|
||||
'native.plans.yearlyIs': '{price} l’any, cancel·la quan vulguis',
|
||||
'native.plans.monthlyIs': 'Són {price} al mes',
|
||||
'native.plans.storage': 'Emmagatzematge',
|
||||
'native.plans.notIncluded': 'No inclòs',
|
||||
'native.plans.storageFairUse': 'Emmagatzematge d’ús raonable',
|
||||
'native.plans.aiPerMonth': '{n} / mes',
|
||||
'native.plans.aiNone': 'No inclòs',
|
||||
'native.plans.included': 'Inclòs',
|
||||
'native.plans.planned': 'Previst',
|
||||
'native.plans.assistant': 'Assistent d’IA',
|
||||
'native.plans.mailImport': 'Importació automàtica de correus',
|
||||
'native.plans.aiLabel': 'Documents IA',
|
||||
'native.plans.choose': 'Tria {plan}',
|
||||
'native.plans.choose': 'Tria {trip}',
|
||||
'native.plans.termsShort': 'Condicions d’ús (EULA)',
|
||||
'native.plans.privacyShort': 'Privadesa',
|
||||
'native.plans.billing': 'Facturació',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Platbě předejdete zrušením předplatného v App Storu nejpozději 24 hodin před koncem zkušební doby.',
|
||||
'native.trial.cancelPlay': 'Platbě předejdete zrušením předplatného na Google Play před koncem zkušební doby.',
|
||||
'native.trial.badge': '7 dní zdarma',
|
||||
'native.trial.price': '7 dní zdarma, poté {price} {period}.',
|
||||
'native.trial.changed': 'Nabídka se změnila. Vraťte se k tarifům a zkontrolujte aktuální cenu.',
|
||||
'native.connect.title': 'Připojit k TREK',
|
||||
'native.connect.hint': 'Zadejte adresu, na které otevíráte TREK v prohlížeči.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -70,6 +64,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Platba se při potvrzení strhne z vašeho účtu Google. Předplatné se automaticky obnovuje, pokud je nezrušíte před koncem období. Spravovat nebo zrušit ho můžete v Google Play v části Profil, Platby a odběry, Odběry.',
|
||||
'native.plans.restoreNoneAndroid': 'Pro tento účet Google nebylo nalezeno žádné aktivní předplatné.',
|
||||
'native.plans.recommended': 'Doporučeno',
|
||||
'native.claim.change': 'Změnit',
|
||||
'native.claim.ruleLength': 'znaků',
|
||||
'native.claim.ruleUpper': 'Velké písmeno',
|
||||
@@ -194,17 +189,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotky a fotokniha',
|
||||
'native.welcome.photosSub': 'Vzpomínky zůstávají u cesty',
|
||||
'native.welcome.discover': 'Prohlédnout cloudové tarify',
|
||||
'native.trip.start.title': 'Víkendovka',
|
||||
'native.trip.start.text': 'Krátké cesty, hlavně plánování.',
|
||||
'native.trip.basis.title': 'Okružní cesta',
|
||||
'native.trip.basis.text': 'Více míst, rezervace automaticky.',
|
||||
'native.trip.plus.title': 'Velká cesta',
|
||||
'native.trip.plus.text': 'Týdny na cestách, s celou skupinou.',
|
||||
'native.trip.pro.title': 'Světoběžník',
|
||||
'native.trip.pro.text': 'Pro časté cestovatele a velké fotoknihy.',
|
||||
'native.plans.unlimited': 'Neomezeně',
|
||||
'native.plans.unlimitedSub': 'Cesty a spolucestující',
|
||||
'native.plans.inEveryPlan': 'v každém tarifu',
|
||||
'native.plans.yearlyIs': '{price} ročně, zrušení kdykoli',
|
||||
'native.plans.monthlyIs': 'To je {price} měsíčně',
|
||||
'native.plans.storage': 'Úložiště',
|
||||
'native.plans.notIncluded': 'Není součástí',
|
||||
'native.plans.storageFairUse': 'Úložiště v režimu férového využití',
|
||||
'native.plans.aiPerMonth': '{n} / měsíc',
|
||||
'native.plans.aiNone': 'Není součástí',
|
||||
'native.plans.included': 'Součástí',
|
||||
'native.plans.planned': 'Plánováno',
|
||||
'native.plans.assistant': 'Asistent AI',
|
||||
'native.plans.mailImport': 'Automatický import e-mailů',
|
||||
'native.plans.aiLabel': 'Dokumenty AI',
|
||||
'native.plans.choose': 'Vybrat: {plan}',
|
||||
'native.plans.choose': 'Vybrat: {trip}',
|
||||
'native.plans.termsShort': 'Podmínky použití (EULA)',
|
||||
'native.plans.privacyShort': 'Soukromí',
|
||||
'native.plans.billing': 'Platba',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Kündige im App Store mindestens 24 Stunden vor Ende der Testphase, um eine Abbuchung zu vermeiden.',
|
||||
'native.trial.cancelPlay': 'Kündige bei Google Play vor Ende der Testphase, um eine Abbuchung zu vermeiden.',
|
||||
'native.trial.badge': '7 Tage kostenlos',
|
||||
'native.trial.price': '7 Tage kostenlos, danach {price} {period}.',
|
||||
'native.trial.changed': 'Das Angebot hat sich geändert. Geh zurück zur Tarifauswahl und prüfe den aktuellen Preis.',
|
||||
'native.connect.title': 'Mit TREK verbinden',
|
||||
'native.connect.hint': 'Gib die Adresse ein, unter der du TREK im Browser öffnest.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -73,6 +67,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Die Zahlung wird bei Bestätigung über dein Google-Konto abgerechnet. Das Abo verlängert sich automatisch, wenn du es nicht vor Ablauf des Zeitraums kündigst. Verwalten und kündigen kannst du es in Google Play unter Profil, Zahlungen und Abos, Abos.',
|
||||
'native.plans.restoreNoneAndroid': 'Für dieses Google-Konto wurde kein aktives Abo gefunden.',
|
||||
'native.plans.recommended': 'Empfohlen',
|
||||
'native.claim.change': 'Ändern',
|
||||
'native.claim.ruleLength': 'Zeichen',
|
||||
'native.claim.ruleUpper': 'Großbuchstabe',
|
||||
@@ -204,17 +199,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotos und Fotobuch',
|
||||
'native.welcome.photosSub': 'Die Erinnerungen bleiben bei der Reise',
|
||||
'native.welcome.discover': 'Cloud-Tarife entdecken',
|
||||
'native.trip.start.title': 'Wochenendtrip',
|
||||
'native.trip.start.text': 'Kurze Reisen, vor allem planen.',
|
||||
'native.trip.basis.title': 'Rundreise',
|
||||
'native.trip.basis.text': 'Mehrere Orte, Buchungen automatisch.',
|
||||
'native.trip.plus.title': 'Große Reise',
|
||||
'native.trip.plus.text': 'Wochenlang unterwegs, mit der ganzen Gruppe.',
|
||||
'native.trip.pro.title': 'Weltenbummler',
|
||||
'native.trip.pro.text': 'Für Vielreisende und große Fotobücher.',
|
||||
'native.plans.unlimited': 'Unbegrenzt',
|
||||
'native.plans.unlimitedSub': 'Reisen und Mitreisende',
|
||||
'native.plans.inEveryPlan': 'in jedem Tarif',
|
||||
'native.plans.yearlyIs': 'Jährlich {price}, jederzeit kündbar',
|
||||
'native.plans.monthlyIs': 'Das sind {price} im Monat',
|
||||
'native.plans.storage': 'Speicher',
|
||||
'native.plans.notIncluded': 'Nicht enthalten',
|
||||
'native.plans.storageFairUse': 'Speicher unter Fair Use',
|
||||
'native.plans.aiPerMonth': '{n} / Monat',
|
||||
'native.plans.aiNone': 'Nicht enthalten',
|
||||
'native.plans.included': 'Enthalten',
|
||||
'native.plans.planned': 'Geplant',
|
||||
'native.plans.assistant': 'KI-Assistent',
|
||||
'native.plans.mailImport': 'Auto-Mail-Import',
|
||||
'native.plans.mailImport': 'Automatischer E-Mail-Import',
|
||||
'native.plans.aiLabel': 'KI-Dokumente',
|
||||
'native.plans.choose': '{plan} wählen',
|
||||
'native.plans.choose': '{trip} wählen',
|
||||
'native.plans.termsShort': 'Nutzungsbedingungen (EULA)',
|
||||
'native.plans.privacyShort': 'Datenschutz',
|
||||
'native.plans.billing': 'Zahlweise',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'To avoid being charged, cancel in the App Store at least 24 hours before the trial ends.',
|
||||
'native.trial.cancelPlay': 'To avoid being charged, cancel in Google Play before the trial ends.',
|
||||
'native.trial.badge': '7 days free',
|
||||
'native.trial.price': '7 days free, then {price} {period}.',
|
||||
'native.trial.changed': 'The offer has changed. Go back to your plans and check the current price.',
|
||||
'native.connect.title': 'Connect to TREK',
|
||||
'native.connect.hint': 'Enter the address you open TREK at in your browser.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Payment is charged to your Google account when you confirm. The subscription renews automatically unless you cancel it before the period ends. Manage or cancel it in Google Play under Profile, Payments and subscriptions, Subscriptions.',
|
||||
'native.plans.restoreNoneAndroid': 'No active subscription found on this Google account.',
|
||||
'native.plans.recommended': 'Recommended',
|
||||
'native.claim.change': 'Change',
|
||||
'native.claim.ruleLength': 'characters',
|
||||
'native.claim.ruleUpper': 'Uppercase',
|
||||
@@ -199,17 +194,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Photos and photo book',
|
||||
'native.welcome.photosSub': 'The memories stay with the trip',
|
||||
'native.welcome.discover': 'Explore cloud plans',
|
||||
'native.trip.start.title': 'Weekend trip',
|
||||
'native.trip.start.text': 'Short trips, mostly planning.',
|
||||
'native.trip.basis.title': 'Round trip',
|
||||
'native.trip.basis.text': 'Several stops, bookings sorted automatically.',
|
||||
'native.trip.plus.title': 'Big journey',
|
||||
'native.trip.plus.text': 'Weeks on the road, with the whole group.',
|
||||
'native.trip.pro.title': 'Globetrotter',
|
||||
'native.trip.pro.text': 'For frequent travellers and big photo books.',
|
||||
'native.plans.unlimited': 'Unlimited',
|
||||
'native.plans.unlimitedSub': 'Trips and travel companions',
|
||||
'native.plans.inEveryPlan': 'in every plan',
|
||||
'native.plans.yearlyIs': 'Yearly {price}, cancel anytime',
|
||||
'native.plans.monthlyIs': 'That is {price} a month',
|
||||
'native.plans.storage': 'Storage',
|
||||
'native.plans.notIncluded': 'Not included',
|
||||
'native.plans.storageFairUse': 'Storage fair use',
|
||||
'native.plans.aiPerMonth': '{n} / month',
|
||||
'native.plans.aiNone': 'Not included',
|
||||
'native.plans.included': 'Included',
|
||||
'native.plans.planned': 'Planned',
|
||||
'native.plans.assistant': 'AI Assistant',
|
||||
'native.plans.mailImport': 'Automated Mail Import',
|
||||
'native.plans.aiLabel': 'AI documents',
|
||||
'native.plans.choose': 'Choose {plan}',
|
||||
'native.plans.choose': 'Choose {trip}',
|
||||
'native.plans.termsShort': 'Terms of Use (EULA)',
|
||||
'native.plans.privacyShort': 'Privacy',
|
||||
'native.plans.billing': 'Billing',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Para evitar el cobro, cancela en el App Store al menos 24 horas antes de que termine la prueba.',
|
||||
'native.trial.cancelPlay': 'Para evitar el cobro, cancela en Google Play antes de que termine la prueba.',
|
||||
'native.trial.badge': '7 días gratis',
|
||||
'native.trial.price': '7 días gratis, después {price} {period}.',
|
||||
'native.trial.changed': 'La oferta ha cambiado. Vuelve a los planes y consulta el precio actual.',
|
||||
'native.connect.title': 'Conectar con TREK',
|
||||
'native.connect.hint': 'Introduce la dirección con la que abres TREK en tu navegador.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'El pago se carga a tu cuenta de Google al confirmar. La suscripción se renueva automáticamente salvo que la canceles antes de que termine el periodo. Gestiónala o cancélala en Google Play, en Perfil, Pagos y suscripciones, Suscripciones.',
|
||||
'native.plans.restoreNoneAndroid': 'No se encontró ninguna suscripción activa en esta cuenta de Google.',
|
||||
'native.plans.recommended': 'Recomendado',
|
||||
'native.claim.change': 'Cambiar',
|
||||
'native.claim.ruleLength': 'caracteres',
|
||||
'native.claim.ruleUpper': 'Mayúscula',
|
||||
@@ -199,17 +194,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotos y fotolibro',
|
||||
'native.welcome.photosSub': 'Los recuerdos se quedan con el viaje',
|
||||
'native.welcome.discover': 'Descubrir los planes cloud',
|
||||
'native.trip.start.title': 'Escapada',
|
||||
'native.trip.start.text': 'Viajes cortos, sobre todo planificar.',
|
||||
'native.trip.basis.title': 'Ruta por etapas',
|
||||
'native.trip.basis.text': 'Varias paradas, reservas automáticas.',
|
||||
'native.trip.plus.title': 'Gran viaje',
|
||||
'native.trip.plus.text': 'Semanas de viaje, con todo el grupo.',
|
||||
'native.trip.pro.title': 'Trotamundos',
|
||||
'native.trip.pro.text': 'Para viajeros frecuentes y grandes fotolibros.',
|
||||
'native.plans.unlimited': 'Ilimitado',
|
||||
'native.plans.unlimitedSub': 'Viajes y compañeros de viaje',
|
||||
'native.plans.inEveryPlan': 'en todos los planes',
|
||||
'native.plans.yearlyIs': '{price} al año, cancela cuando quieras',
|
||||
'native.plans.monthlyIs': 'Son {price} al mes',
|
||||
'native.plans.storage': 'Almacenamiento',
|
||||
'native.plans.notIncluded': 'No incluido',
|
||||
'native.plans.storageFairUse': 'Almacenamiento de uso razonable',
|
||||
'native.plans.aiPerMonth': '{n} / mes',
|
||||
'native.plans.aiNone': 'No incluido',
|
||||
'native.plans.included': 'Incluido',
|
||||
'native.plans.planned': 'Previsto',
|
||||
'native.plans.assistant': 'Asistente de IA',
|
||||
'native.plans.mailImport': 'Importación automática de correo',
|
||||
'native.plans.aiLabel': 'Documentos IA',
|
||||
'native.plans.choose': 'Elegir {plan}',
|
||||
'native.plans.choose': 'Elegir {trip}',
|
||||
'native.plans.termsShort': 'Condiciones de uso (EULA)',
|
||||
'native.plans.privacyShort': 'Privacidad',
|
||||
'native.plans.billing': 'Facturación',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Makse vältimiseks tühista tellimus App Store’is vähemalt 24 tundi enne prooviperioodi lõppu.',
|
||||
'native.trial.cancelPlay': 'Makse vältimiseks tühista tellimus Google Plays enne prooviperioodi lõppu.',
|
||||
'native.trial.badge': '7 päeva tasuta',
|
||||
'native.trial.price': '7 päeva tasuta, seejärel {price} {period}.',
|
||||
'native.trial.changed': 'Pakkumine on muutunud. Mine tagasi pakettide juurde ja kontrolli praegust hinda.',
|
||||
'native.connect.title': 'Ühenda TREKiga',
|
||||
'native.connect.hint': 'Sisesta aadress, millel avad TREKi brauseris.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -71,6 +65,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
"Makse võetakse kinnitamisel sinu Google'i kontolt. Tellimus uueneb automaatselt, kui sa ei tühista seda enne perioodi lõppu. Halda või tühista seda Google Plays: Profiil, Maksed ja tellimused, Tellimused.",
|
||||
'native.plans.restoreNoneAndroid': "Selle Google'i kontoga ei leitud aktiivset tellimust.",
|
||||
'native.plans.recommended': 'Soovitatud',
|
||||
'native.claim.change': 'Muuda',
|
||||
'native.claim.ruleLength': 'märki',
|
||||
'native.claim.ruleUpper': 'Suurtäht',
|
||||
@@ -196,17 +191,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotod ja fotoraamat',
|
||||
'native.welcome.photosSub': 'Mälestused jäävad reisi juurde',
|
||||
'native.welcome.discover': 'Vaata pilvepakette',
|
||||
'native.trip.start.title': 'Nädalavahetus',
|
||||
'native.trip.start.text': 'Lühikesed reisid, peamiselt planeerimine.',
|
||||
'native.trip.basis.title': 'Ringreis',
|
||||
'native.trip.basis.text': 'Mitu peatust, broneeringud automaatselt.',
|
||||
'native.trip.plus.title': 'Suur reis',
|
||||
'native.trip.plus.text': 'Nädalaid teel, kogu seltskonnaga.',
|
||||
'native.trip.pro.title': 'Maailmarändur',
|
||||
'native.trip.pro.text': 'Sagedastele reisijatele ja suurtele fotoraamatutele.',
|
||||
'native.plans.unlimited': 'Piiramatult',
|
||||
'native.plans.unlimitedSub': 'Reisid ja kaasreisijad',
|
||||
'native.plans.inEveryPlan': 'igas paketis',
|
||||
'native.plans.yearlyIs': '{price} aastas, tühista igal ajal',
|
||||
'native.plans.monthlyIs': 'See on {price} kuus',
|
||||
'native.plans.storage': 'Salvestusruum',
|
||||
'native.plans.notIncluded': 'Ei sisaldu',
|
||||
'native.plans.storageFairUse': 'Õiglase kasutuse salvestusruum',
|
||||
'native.plans.aiPerMonth': '{n} / kuus',
|
||||
'native.plans.aiNone': 'Ei sisaldu',
|
||||
'native.plans.included': 'Sisaldub',
|
||||
'native.plans.planned': 'Plaanis',
|
||||
'native.plans.assistant': 'AI-assistent',
|
||||
'native.plans.mailImport': 'Automaatne e-kirjade import',
|
||||
'native.plans.aiLabel': 'TI-dokumendid',
|
||||
'native.plans.choose': 'Vali {plan}',
|
||||
'native.plans.choose': 'Vali {trip}',
|
||||
'native.plans.termsShort': 'Kasutustingimused (EULA)',
|
||||
'native.plans.privacyShort': 'Privaatsus',
|
||||
'native.plans.billing': 'Maksmine',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Pour éviter un paiement, résilie dans l’App Store au moins 24 heures avant la fin de l’essai.',
|
||||
'native.trial.cancelPlay': 'Pour éviter un paiement, résilie dans Google Play avant la fin de l’essai.',
|
||||
'native.trial.badge': '7 jours gratuits',
|
||||
'native.trial.price': '7 jours gratuits, puis {price} {period}.',
|
||||
'native.trial.changed': 'L’offre a changé. Reviens aux forfaits et vérifie le prix actuel.',
|
||||
'native.connect.title': 'Se connecter à TREK',
|
||||
'native.connect.hint': 'Saisissez l’adresse à laquelle vous ouvrez TREK dans votre navigateur.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -73,6 +67,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Le paiement est débité de votre compte Google lors de la confirmation. L’abonnement se renouvelle automatiquement, sauf si vous le résiliez avant la fin de la période. Gérez-le ou résiliez-le dans Google Play sous Profil, Paiements et abonnements, Abonnements.',
|
||||
'native.plans.restoreNoneAndroid': 'Aucun abonnement actif trouvé pour ce compte Google.',
|
||||
'native.plans.recommended': 'Recommandé',
|
||||
'native.claim.change': 'Modifier',
|
||||
'native.claim.ruleLength': 'caractères',
|
||||
'native.claim.ruleUpper': 'Majuscule',
|
||||
@@ -203,17 +198,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Photos et livre photo',
|
||||
'native.welcome.photosSub': 'Les souvenirs restent avec le voyage',
|
||||
'native.welcome.discover': 'Découvrir les offres cloud',
|
||||
'native.trip.start.title': 'Week-end',
|
||||
'native.trip.start.text': 'Courts séjours, surtout de la planification.',
|
||||
'native.trip.basis.title': 'Circuit',
|
||||
'native.trip.basis.text': 'Plusieurs étapes, réservations automatiques.',
|
||||
'native.trip.plus.title': 'Grand voyage',
|
||||
'native.trip.plus.text': 'Des semaines sur la route, avec tout le groupe.',
|
||||
'native.trip.pro.title': 'Globe-trotteur',
|
||||
'native.trip.pro.text': 'Pour les grands voyageurs et les grands livres photo.',
|
||||
'native.plans.unlimited': 'Illimité',
|
||||
'native.plans.unlimitedSub': 'Voyages et compagnons de voyage',
|
||||
'native.plans.inEveryPlan': 'dans chaque offre',
|
||||
'native.plans.yearlyIs': '{price} par an, résiliable à tout moment',
|
||||
'native.plans.monthlyIs': 'Soit {price} par mois',
|
||||
'native.plans.storage': 'Stockage',
|
||||
'native.plans.notIncluded': 'Non inclus',
|
||||
'native.plans.storageFairUse': 'Stockage en usage raisonnable',
|
||||
'native.plans.aiPerMonth': '{n} / mois',
|
||||
'native.plans.aiNone': 'Non inclus',
|
||||
'native.plans.included': 'Inclus',
|
||||
'native.plans.planned': 'Prévu',
|
||||
'native.plans.assistant': 'Assistant IA',
|
||||
'native.plans.mailImport': 'Import automatique des e-mails',
|
||||
'native.plans.aiLabel': 'Documents IA',
|
||||
'native.plans.choose': 'Choisir {plan}',
|
||||
'native.plans.choose': 'Choisir {trip}',
|
||||
'native.plans.termsShort': 'Conditions d’utilisation (EULA)',
|
||||
'native.plans.privacyShort': 'Confidentialité',
|
||||
'native.plans.billing': 'Facturation',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'Για να μη χρεωθείς, ακύρωσε στο App Store τουλάχιστον 24 ώρες πριν λήξει η δοκιμή.',
|
||||
'native.trial.cancelPlay': 'Για να μη χρεωθείς, ακύρωσε στο Google Play πριν λήξει η δοκιμή.',
|
||||
'native.trial.badge': '7 ημέρες δωρεάν',
|
||||
'native.trial.price': '7 ημέρες δωρεάν, μετά {price} {period}.',
|
||||
'native.trial.changed': 'Η προσφορά άλλαξε. Γύρισε στα προγράμματα και έλεγξε την τρέχουσα τιμή.',
|
||||
'native.connect.title': 'Σύνδεση στο TREK',
|
||||
'native.connect.hint': 'Πληκτρολογήστε τη διεύθυνση με την οποία ανοίγετε το TREK στο πρόγραμμα περιήγησης.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +67,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Η πληρωμή χρεώνεται στον λογαριασμό σας Google κατά την επιβεβαίωση. Η συνδρομή ανανεώνεται αυτόματα, εκτός αν την ακυρώσετε πριν λήξει η περίοδος. Διαχειριστείτε ή ακυρώστε τη στο Google Play, στο Προφίλ, Πληρωμές και συνδρομές, Συνδρομές.',
|
||||
'native.plans.restoreNoneAndroid': 'Δεν βρέθηκε ενεργή συνδρομή σε αυτόν τον λογαριασμό Google.',
|
||||
'native.plans.recommended': 'Προτείνεται',
|
||||
'native.claim.change': 'Αλλαγή',
|
||||
'native.claim.ruleLength': 'χαρακτήρες',
|
||||
'native.claim.ruleUpper': 'Κεφαλαίο',
|
||||
@@ -205,17 +201,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Φωτογραφίες και φωτοβιβλίο',
|
||||
'native.welcome.photosSub': 'Οι αναμνήσεις μένουν με το ταξίδι',
|
||||
'native.welcome.discover': 'Δείτε τα πακέτα cloud',
|
||||
'native.trip.start.title': 'Σαββατοκύριακο',
|
||||
'native.trip.start.text': 'Σύντομα ταξίδια, κυρίως σχεδιασμός.',
|
||||
'native.trip.basis.title': 'Περιήγηση',
|
||||
'native.trip.basis.text': 'Πολλοί σταθμοί, κρατήσεις αυτόματα.',
|
||||
'native.trip.plus.title': 'Μεγάλο ταξίδι',
|
||||
'native.trip.plus.text': 'Εβδομάδες στον δρόμο, με όλη την ομάδα.',
|
||||
'native.trip.pro.title': 'Κοσμογυρισμένος',
|
||||
'native.trip.pro.text': 'Για όσους ταξιδεύουν συχνά και μεγάλα φωτοβιβλία.',
|
||||
'native.plans.unlimited': 'Απεριόριστα',
|
||||
'native.plans.unlimitedSub': 'Ταξίδια και συνταξιδιώτες',
|
||||
'native.plans.inEveryPlan': 'σε κάθε πακέτο',
|
||||
'native.plans.yearlyIs': '{price} τον χρόνο, ακύρωση οποτεδήποτε',
|
||||
'native.plans.monthlyIs': 'Δηλαδή {price} τον μήνα',
|
||||
'native.plans.storage': 'Αποθήκευση',
|
||||
'native.plans.notIncluded': 'Δεν περιλαμβάνεται',
|
||||
'native.plans.storageFairUse': 'Αποθήκευση με εύλογη χρήση',
|
||||
'native.plans.aiPerMonth': '{n} / μήνα',
|
||||
'native.plans.aiNone': 'Δεν περιλαμβάνεται',
|
||||
'native.plans.included': 'Περιλαμβάνεται',
|
||||
'native.plans.planned': 'Προγραμματίζεται',
|
||||
'native.plans.assistant': 'Βοηθός AI',
|
||||
'native.plans.mailImport': 'Αυτόματη εισαγωγή email',
|
||||
'native.plans.aiLabel': 'Έγγραφα AI',
|
||||
'native.plans.choose': 'Επιλογή: {plan}',
|
||||
'native.plans.choose': 'Επιλογή: {trip}',
|
||||
'native.plans.termsShort': 'Όροι χρήσης (EULA)',
|
||||
'native.plans.privacyShort': 'Απόρρητο',
|
||||
'native.plans.billing': 'Χρέωση',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'כדי להימנע מחיוב, בטלו ב-App Store לפחות 24 שעות לפני סיום תקופת הניסיון.',
|
||||
'native.trial.cancelPlay': 'כדי להימנע מחיוב, בטלו ב-Google Play לפני סיום תקופת הניסיון.',
|
||||
'native.trial.badge': '7 ימים בחינם',
|
||||
'native.trial.price': '7 ימים בחינם, ולאחר מכן {price} {period}.',
|
||||
'native.trial.changed': 'המבצע השתנה. חזרו למסלולים ובדקו את המחיר העדכני.',
|
||||
'native.connect.title': 'התחברות ל-TREK',
|
||||
'native.connect.hint': 'הזינו את הכתובת שבה אתם פותחים את TREK בדפדפן.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -69,6 +64,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'התשלום יחויב בחשבון Google שלכם עם האישור. המינוי מתחדש אוטומטית אלא אם תבטלו אותו לפני סוף התקופה. אפשר לנהל או לבטל אותו ב-Google Play תחת פרופיל, תשלומים ומינויים, מינויים.',
|
||||
'native.plans.restoreNoneAndroid': 'לא נמצא מינוי פעיל בחשבון Google הזה.',
|
||||
'native.plans.recommended': 'מומלץ',
|
||||
'native.claim.change': 'שינוי',
|
||||
'native.claim.ruleLength': 'תווים',
|
||||
'native.claim.ruleUpper': 'אות גדולה',
|
||||
@@ -191,17 +187,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'תמונות ואלבום',
|
||||
'native.welcome.photosSub': 'הזיכרונות נשארים עם הטיול',
|
||||
'native.welcome.discover': 'גלו את חבילות הענן',
|
||||
'native.trip.start.title': 'סוף שבוע',
|
||||
'native.trip.start.text': 'טיולים קצרים, בעיקר תכנון.',
|
||||
'native.trip.basis.title': 'טיול מעגלי',
|
||||
'native.trip.basis.text': 'כמה תחנות, הזמנות אוטומטיות.',
|
||||
'native.trip.plus.title': 'מסע גדול',
|
||||
'native.trip.plus.text': 'שבועות בדרכים, עם כל הקבוצה.',
|
||||
'native.trip.pro.title': 'נווד עולמי',
|
||||
'native.trip.pro.text': 'למי שנוסע הרבה ולאלבומים גדולים.',
|
||||
'native.plans.unlimited': 'ללא הגבלה',
|
||||
'native.plans.unlimitedSub': 'טיולים ושותפים לדרך',
|
||||
'native.plans.inEveryPlan': 'בכל חבילה',
|
||||
'native.plans.yearlyIs': '{price} לשנה, ביטול בכל עת',
|
||||
'native.plans.monthlyIs': 'כלומר {price} לחודש',
|
||||
'native.plans.storage': 'אחסון',
|
||||
'native.plans.notIncluded': 'לא כלול',
|
||||
'native.plans.storageFairUse': 'אחסון בשימוש הוגן',
|
||||
'native.plans.aiPerMonth': '{n} / חודש',
|
||||
'native.plans.aiNone': 'לא כלול',
|
||||
'native.plans.included': 'כלול',
|
||||
'native.plans.planned': 'מתוכנן',
|
||||
'native.plans.assistant': 'עוזר AI',
|
||||
'native.plans.mailImport': 'ייבוא דוא״ל אוטומטי',
|
||||
'native.plans.aiLabel': 'מסמכי AI',
|
||||
'native.plans.choose': 'בחירת {plan}',
|
||||
'native.plans.choose': 'בחירת {trip}',
|
||||
'native.plans.termsShort': 'תנאי שימוש (EULA)',
|
||||
'native.plans.privacyShort': 'פרטיות',
|
||||
'native.plans.billing': 'חיוב',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'A díj elkerüléséhez mondd le az App Store-ban legalább 24 órával a próbaidő vége előtt.',
|
||||
'native.trial.cancelPlay': 'A díj elkerüléséhez mondd le a Google Playen a próbaidő vége előtt.',
|
||||
'native.trial.badge': '7 nap ingyen',
|
||||
'native.trial.price': '7 nap ingyen, utána {price} {period}.',
|
||||
'native.trial.changed': 'Az ajánlat megváltozott. Térj vissza a csomagokhoz, és ellenőrizd az aktuális árat.',
|
||||
'native.connect.title': 'Csatlakozás a TREK-hez',
|
||||
'native.connect.hint': 'Add meg azt a címet, amelyen a böngésződben megnyitod a TREK-et.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +67,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'A díjat a megerősítéskor a Google-fiókodra terheljük. Az előfizetés automatikusan megújul, ha nem mondod le az időszak vége előtt. Kezelni vagy lemondani a Google Playben tudod: Profil, Fizetések és előfizetések, Előfizetések.',
|
||||
'native.plans.restoreNoneAndroid': 'Ehhez a Google-fiókhoz nem található aktív előfizetés.',
|
||||
'native.plans.recommended': 'Ajánlott',
|
||||
'native.claim.change': 'Módosítás',
|
||||
'native.claim.ruleLength': 'karakter',
|
||||
'native.claim.ruleUpper': 'Nagybetű',
|
||||
@@ -201,17 +197,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotók és fotókönyv',
|
||||
'native.welcome.photosSub': 'Az emlékek az utazásnál maradnak',
|
||||
'native.welcome.discover': 'Felhőcsomagok felfedezése',
|
||||
'native.trip.start.title': 'Hétvégi kiruccanás',
|
||||
'native.trip.start.text': 'Rövid utak, főleg tervezés.',
|
||||
'native.trip.basis.title': 'Körutazás',
|
||||
'native.trip.basis.text': 'Több állomás, foglalások automatikusan.',
|
||||
'native.trip.plus.title': 'Nagy utazás',
|
||||
'native.trip.plus.text': 'Hetekig úton, az egész csapattal.',
|
||||
'native.trip.pro.title': 'Világjáró',
|
||||
'native.trip.pro.text': 'Gyakori utazóknak és nagy fotókönyvekhez.',
|
||||
'native.plans.unlimited': 'Korlátlan',
|
||||
'native.plans.unlimitedSub': 'Utazások és útitársak',
|
||||
'native.plans.inEveryPlan': 'minden csomagban',
|
||||
'native.plans.yearlyIs': 'Évente {price}, bármikor lemondható',
|
||||
'native.plans.monthlyIs': 'Ez havonta {price}',
|
||||
'native.plans.storage': 'Tárhely',
|
||||
'native.plans.notIncluded': 'Nem tartalmazza',
|
||||
'native.plans.storageFairUse': 'Tárhely méltányos használatra',
|
||||
'native.plans.aiPerMonth': '{n} / hó',
|
||||
'native.plans.aiNone': 'Nem tartalmazza',
|
||||
'native.plans.included': 'Tartalmazza',
|
||||
'native.plans.planned': 'Tervezett',
|
||||
'native.plans.assistant': 'MI-asszisztens',
|
||||
'native.plans.mailImport': 'Automatikus e-mail-importálás',
|
||||
'native.plans.aiLabel': 'MI-dokumentumok',
|
||||
'native.plans.choose': '{plan} választása',
|
||||
'native.plans.choose': '{trip} választása',
|
||||
'native.plans.termsShort': 'Felhasználási feltételek (EULA)',
|
||||
'native.plans.privacyShort': 'Adatvédelem',
|
||||
'native.plans.billing': 'Fizetés',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Untuk menghindari tagihan, batalkan di App Store setidaknya 24 jam sebelum masa uji coba berakhir.',
|
||||
'native.trial.cancelPlay': 'Untuk menghindari tagihan, batalkan di Google Play sebelum masa uji coba berakhir.',
|
||||
'native.trial.badge': 'Gratis 7 hari',
|
||||
'native.trial.price': 'Gratis 7 hari, lalu {price} {period}.',
|
||||
'native.trial.changed': 'Penawaran telah berubah. Kembali ke daftar paket dan periksa harga saat ini.',
|
||||
'native.connect.title': 'Hubungkan ke TREK',
|
||||
'native.connect.hint': 'Masukkan alamat yang kamu gunakan untuk membuka TREK di browser.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Pembayaran ditagihkan ke akun Google Anda saat konfirmasi. Langganan diperpanjang otomatis kecuali Anda membatalkannya sebelum periode berakhir. Kelola atau batalkan di Google Play pada Profil, Pembayaran & langganan, Langganan.',
|
||||
'native.plans.restoreNoneAndroid': 'Tidak ditemukan langganan aktif di akun Google ini.',
|
||||
'native.plans.recommended': 'Disarankan',
|
||||
'native.claim.change': 'Ubah',
|
||||
'native.claim.ruleLength': 'karakter',
|
||||
'native.claim.ruleUpper': 'Huruf besar',
|
||||
@@ -201,17 +196,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Foto dan buku foto',
|
||||
'native.welcome.photosSub': 'Kenangan tetap bersama perjalanan',
|
||||
'native.welcome.discover': 'Lihat paket cloud',
|
||||
'native.trip.start.title': 'Liburan akhir pekan',
|
||||
'native.trip.start.text': 'Perjalanan singkat, terutama merencanakan.',
|
||||
'native.trip.basis.title': 'Perjalanan keliling',
|
||||
'native.trip.basis.text': 'Beberapa tempat, pemesanan otomatis.',
|
||||
'native.trip.plus.title': 'Perjalanan besar',
|
||||
'native.trip.plus.text': 'Berminggu-minggu di jalan, bersama seluruh rombongan.',
|
||||
'native.trip.pro.title': 'Penjelajah dunia',
|
||||
'native.trip.pro.text': 'Untuk yang sering bepergian dan buku foto besar.',
|
||||
'native.plans.unlimited': 'Tanpa batas',
|
||||
'native.plans.unlimitedSub': 'Perjalanan dan teman perjalanan',
|
||||
'native.plans.inEveryPlan': 'di setiap paket',
|
||||
'native.plans.yearlyIs': '{price} per tahun, batalkan kapan saja',
|
||||
'native.plans.monthlyIs': 'Itu {price} per bulan',
|
||||
'native.plans.storage': 'Penyimpanan',
|
||||
'native.plans.notIncluded': 'Tidak disertakan',
|
||||
'native.plans.storageFairUse': 'Penyimpanan penggunaan wajar',
|
||||
'native.plans.aiPerMonth': '{n} / bulan',
|
||||
'native.plans.aiNone': 'Tidak disertakan',
|
||||
'native.plans.included': 'Disertakan',
|
||||
'native.plans.planned': 'Direncanakan',
|
||||
'native.plans.assistant': 'Asisten AI',
|
||||
'native.plans.mailImport': 'Impor email otomatis',
|
||||
'native.plans.aiLabel': 'Dokumen AI',
|
||||
'native.plans.choose': 'Pilih {plan}',
|
||||
'native.plans.choose': 'Pilih {trip}',
|
||||
'native.plans.termsShort': 'Ketentuan Penggunaan (EULA)',
|
||||
'native.plans.privacyShort': 'Privasi',
|
||||
'native.plans.billing': 'Pembayaran',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Per evitare l’addebito, annulla su App Store almeno 24 ore prima della fine della prova.',
|
||||
'native.trial.cancelPlay': 'Per evitare l’addebito, annulla su Google Play prima della fine della prova.',
|
||||
'native.trial.badge': '7 giorni gratis',
|
||||
'native.trial.price': '7 giorni gratis, poi {price} {period}.',
|
||||
'native.trial.changed': 'L’offerta è cambiata. Torna ai piani e controlla il prezzo attuale.',
|
||||
'native.connect.title': 'Connetti a TREK',
|
||||
'native.connect.hint': 'Inserisci l’indirizzo con cui apri TREK nel browser.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -73,6 +67,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Il pagamento viene addebitato sul tuo account Google alla conferma. L’abbonamento si rinnova automaticamente se non lo annulli prima della fine del periodo. Gestiscilo o annullalo in Google Play da Profilo, Pagamenti e abbonamenti, Abbonamenti.',
|
||||
'native.plans.restoreNoneAndroid': 'Nessun abbonamento attivo trovato per questo account Google.',
|
||||
'native.plans.recommended': 'Consigliato',
|
||||
'native.claim.change': 'Cambia',
|
||||
'native.claim.ruleLength': 'caratteri',
|
||||
'native.claim.ruleUpper': 'Maiuscola',
|
||||
@@ -203,17 +198,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Foto e fotolibro',
|
||||
'native.welcome.photosSub': 'I ricordi restano con il viaggio',
|
||||
'native.welcome.discover': 'Scopri i piani cloud',
|
||||
'native.trip.start.title': 'Weekend',
|
||||
'native.trip.start.text': 'Viaggi brevi, soprattutto da pianificare.',
|
||||
'native.trip.basis.title': 'Tour',
|
||||
'native.trip.basis.text': 'Più tappe, prenotazioni automatiche.',
|
||||
'native.trip.plus.title': 'Grande viaggio',
|
||||
'native.trip.plus.text': 'Settimane in viaggio, con tutto il gruppo.',
|
||||
'native.trip.pro.title': 'Giramondo',
|
||||
'native.trip.pro.text': 'Per chi viaggia spesso e per grandi fotolibri.',
|
||||
'native.plans.unlimited': 'Illimitati',
|
||||
'native.plans.unlimitedSub': 'Viaggi e compagni di viaggio',
|
||||
'native.plans.inEveryPlan': 'in ogni piano',
|
||||
'native.plans.yearlyIs': '{price} all’anno, disdici quando vuoi',
|
||||
'native.plans.monthlyIs': 'Sono {price} al mese',
|
||||
'native.plans.storage': 'Archiviazione',
|
||||
'native.plans.notIncluded': 'Non incluso',
|
||||
'native.plans.storageFairUse': 'Spazio con uso ragionevole',
|
||||
'native.plans.aiPerMonth': '{n} / mese',
|
||||
'native.plans.aiNone': 'Non incluso',
|
||||
'native.plans.included': 'Incluso',
|
||||
'native.plans.planned': 'Previsto',
|
||||
'native.plans.assistant': 'Assistente IA',
|
||||
'native.plans.mailImport': 'Importazione automatica delle e-mail',
|
||||
'native.plans.aiLabel': 'Documenti IA',
|
||||
'native.plans.choose': 'Scegli {plan}',
|
||||
'native.plans.choose': 'Scegli {trip}',
|
||||
'native.plans.termsShort': 'Condizioni d’uso (EULA)',
|
||||
'native.plans.privacyShort': 'Privacy', // same-as-en
|
||||
'native.plans.billing': 'Fatturazione',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': '請求を避けるには、無料期間が終わる24時間以上前にApp Storeで解約してください。',
|
||||
'native.trial.cancelPlay': '請求を避けるには、無料期間が終わる前にGoogle Playで解約してください。',
|
||||
'native.trial.badge': '7日間無料',
|
||||
'native.trial.price': '7日間無料。その後は{period}{price}です。',
|
||||
'native.trial.changed': 'オファーが変更されました。プラン一覧に戻り、現在の料金をご確認ください。',
|
||||
'native.connect.title': 'TREK に接続',
|
||||
'native.connect.hint': 'ブラウザで TREK を開くときのアドレスを入力してください。',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -70,6 +65,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'確認時に Google アカウントに請求されます。期間終了前に解約しない限り、サブスクリプションは自動更新されます。Google Play の[プロフィール][お支払いと定期購入][定期購入]で管理または解約できます。',
|
||||
'native.plans.restoreNoneAndroid': 'この Google アカウントには有効なサブスクリプションがありません。',
|
||||
'native.plans.recommended': 'おすすめ',
|
||||
'native.claim.change': '変更',
|
||||
'native.claim.ruleLength': '文字',
|
||||
'native.claim.ruleUpper': '大文字',
|
||||
@@ -197,17 +193,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': '写真とフォトブック',
|
||||
'native.welcome.photosSub': '思い出は旅と一緒に残ります',
|
||||
'native.welcome.discover': 'クラウドプランを見る',
|
||||
'native.trip.start.title': '週末旅行',
|
||||
'native.trip.start.text': '短い旅、計画が中心。',
|
||||
'native.trip.basis.title': '周遊旅行',
|
||||
'native.trip.basis.text': '複数の目的地、予約は自動で。',
|
||||
'native.trip.plus.title': '大旅行',
|
||||
'native.trip.plus.text': '何週間もの旅を、グループ全員で。',
|
||||
'native.trip.pro.title': '世界旅行者',
|
||||
'native.trip.pro.text': 'よく旅する人と大きなフォトブックに。',
|
||||
'native.plans.unlimited': '無制限',
|
||||
'native.plans.unlimitedSub': '旅行と同行者',
|
||||
'native.plans.inEveryPlan': 'すべてのプランで',
|
||||
'native.plans.yearlyIs': '年額 {price}、いつでも解約可能',
|
||||
'native.plans.monthlyIs': '月あたり {price}',
|
||||
'native.plans.storage': 'ストレージ',
|
||||
'native.plans.notIncluded': '対象外',
|
||||
'native.plans.storageFairUse': 'ストレージの公平利用枠',
|
||||
'native.plans.aiPerMonth': '{n} / 月',
|
||||
'native.plans.aiNone': '対象外',
|
||||
'native.plans.included': '利用可能',
|
||||
'native.plans.planned': '提供予定',
|
||||
'native.plans.assistant': 'AI アシスタント',
|
||||
'native.plans.mailImport': 'メールの自動取り込み',
|
||||
'native.plans.aiLabel': 'AI ドキュメント',
|
||||
'native.plans.choose': '{plan}を選ぶ',
|
||||
'native.plans.choose': '{trip}を選ぶ',
|
||||
'native.plans.termsShort': '利用規約 (EULA)',
|
||||
'native.plans.privacyShort': 'プライバシー',
|
||||
'native.plans.billing': 'お支払い',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': '요금이 청구되지 않으려면 체험 종료 최소 24시간 전에 App Store에서 구독을 취소하세요.',
|
||||
'native.trial.cancelPlay': '요금이 청구되지 않으려면 체험 종료 전에 Google Play에서 구독을 취소하세요.',
|
||||
'native.trial.badge': '7일 무료',
|
||||
'native.trial.price': '7일 무료 이용 후 {period} {price}가 청구됩니다.',
|
||||
'native.trial.changed': '혜택이 변경되었습니다. 요금제 목록으로 돌아가 현재 요금을 확인하세요.',
|
||||
'native.connect.title': 'TREK에 연결',
|
||||
'native.connect.hint': '브라우저에서 TREK을 여는 주소를 입력하세요.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -68,6 +63,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'확인 시 Google 계정으로 결제됩니다. 기간이 끝나기 전에 취소하지 않으면 구독이 자동으로 갱신됩니다. Google Play의 프로필, 결제 및 정기 결제, 정기 결제에서 관리하거나 취소할 수 있습니다.',
|
||||
'native.plans.restoreNoneAndroid': '이 Google 계정에서 활성 구독을 찾을 수 없습니다.',
|
||||
'native.plans.recommended': '추천',
|
||||
'native.claim.change': '변경',
|
||||
'native.claim.ruleLength': '자',
|
||||
'native.claim.ruleUpper': '대문자',
|
||||
@@ -194,17 +190,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': '사진과 포토북',
|
||||
'native.welcome.photosSub': '추억은 여행과 함께 남습니다',
|
||||
'native.welcome.discover': '클라우드 요금제 보기',
|
||||
'native.trip.start.title': '주말여행',
|
||||
'native.trip.start.text': '짧은 여행, 주로 계획.',
|
||||
'native.trip.basis.title': '순회 여행',
|
||||
'native.trip.basis.text': '여러 장소, 예약은 자동으로.',
|
||||
'native.trip.plus.title': '긴 여행',
|
||||
'native.trip.plus.text': '몇 주간의 여정, 모든 일행과 함께.',
|
||||
'native.trip.pro.title': '세계 여행자',
|
||||
'native.trip.pro.text': '자주 여행하는 분과 큰 포토북을 위해.',
|
||||
'native.plans.unlimited': '무제한',
|
||||
'native.plans.unlimitedSub': '여행과 동행자',
|
||||
'native.plans.inEveryPlan': '모든 요금제에 포함',
|
||||
'native.plans.yearlyIs': '연 {price}, 언제든 해지',
|
||||
'native.plans.monthlyIs': '월 {price}에 해당',
|
||||
'native.plans.storage': '스토리지',
|
||||
'native.plans.notIncluded': '미포함',
|
||||
'native.plans.storageFairUse': '공정 사용 저장 공간',
|
||||
'native.plans.aiPerMonth': '{n} / 월',
|
||||
'native.plans.aiNone': '미포함',
|
||||
'native.plans.included': '포함',
|
||||
'native.plans.planned': '예정',
|
||||
'native.plans.assistant': 'AI 어시스턴트',
|
||||
'native.plans.mailImport': '자동 이메일 가져오기',
|
||||
'native.plans.aiLabel': 'AI 문서',
|
||||
'native.plans.choose': '{plan} 선택',
|
||||
'native.plans.choose': '{trip} 선택',
|
||||
'native.plans.termsShort': '이용 약관 (EULA)',
|
||||
'native.plans.privacyShort': '개인정보',
|
||||
'native.plans.billing': '결제',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Wil je kosten voorkomen, zeg dan minstens 24 uur voor het einde van de proefperiode op in de App Store.',
|
||||
'native.trial.cancelPlay': 'Wil je kosten voorkomen, zeg dan vóór het einde van de proefperiode op in Google Play.',
|
||||
'native.trial.badge': '7 dagen gratis',
|
||||
'native.trial.price': '7 dagen gratis, daarna {price} {period}.',
|
||||
'native.trial.changed': 'Het aanbod is gewijzigd. Ga terug naar de abonnementen en controleer de huidige prijs.',
|
||||
'native.connect.title': 'Verbinden met TREK',
|
||||
'native.connect.hint': 'Voer het adres in waarop je TREK in je browser opent.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'De betaling wordt bij bevestiging via je Google-account in rekening gebracht. Het abonnement wordt automatisch verlengd, tenzij je het vóór het einde van de periode opzegt. Beheer of zeg het op in Google Play onder Profiel, Betalingen en abonnementen, Abonnementen.',
|
||||
'native.plans.restoreNoneAndroid': 'Geen actief abonnement gevonden voor dit Google-account.',
|
||||
'native.plans.recommended': 'Aanbevolen',
|
||||
'native.claim.change': 'Wijzigen',
|
||||
'native.claim.ruleLength': 'tekens',
|
||||
'native.claim.ruleUpper': 'Hoofdletter',
|
||||
@@ -201,17 +196,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Foto’s en fotoboek',
|
||||
'native.welcome.photosSub': 'De herinneringen blijven bij de reis',
|
||||
'native.welcome.discover': 'Cloudabonnementen bekijken',
|
||||
'native.trip.start.title': 'Weekendje weg',
|
||||
'native.trip.start.text': 'Korte reizen, vooral plannen.',
|
||||
'native.trip.basis.title': 'Rondreis',
|
||||
'native.trip.basis.text': 'Meerdere plekken, boekingen automatisch.',
|
||||
'native.trip.plus.title': 'Grote reis',
|
||||
'native.trip.plus.text': 'Weken onderweg, met de hele groep.',
|
||||
'native.trip.pro.title': 'Wereldreiziger',
|
||||
'native.trip.pro.text': 'Voor veelreizigers en grote fotoboeken.',
|
||||
'native.plans.unlimited': 'Onbeperkt',
|
||||
'native.plans.unlimitedSub': 'Reizen en medereizigers',
|
||||
'native.plans.inEveryPlan': 'in elk abonnement',
|
||||
'native.plans.yearlyIs': '{price} per jaar, altijd opzegbaar',
|
||||
'native.plans.monthlyIs': 'Dat is {price} per maand',
|
||||
'native.plans.storage': 'Opslag',
|
||||
'native.plans.notIncluded': 'Niet inbegrepen',
|
||||
'native.plans.storageFairUse': 'Opslag bij redelijk gebruik',
|
||||
'native.plans.aiPerMonth': '{n} / maand',
|
||||
'native.plans.aiNone': 'Niet inbegrepen',
|
||||
'native.plans.included': 'Inbegrepen',
|
||||
'native.plans.planned': 'Gepland',
|
||||
'native.plans.assistant': 'AI-assistent',
|
||||
'native.plans.mailImport': 'Automatische e-mailimport',
|
||||
'native.plans.aiLabel': 'AI-documenten',
|
||||
'native.plans.choose': '{plan} kiezen',
|
||||
'native.plans.choose': '{trip} kiezen',
|
||||
'native.plans.termsShort': 'Gebruiksvoorwaarden (EULA)',
|
||||
'native.plans.privacyShort': 'Privacy', // same-as-en
|
||||
'native.plans.billing': 'Betaling',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Aby uniknąć opłaty, anuluj w App Store co najmniej 24 godziny przed końcem okresu próbnego.',
|
||||
'native.trial.cancelPlay': 'Aby uniknąć opłaty, anuluj w Google Play przed końcem okresu próbnego.',
|
||||
'native.trial.badge': '7 dni za darmo',
|
||||
'native.trial.price': '7 dni za darmo, potem {price} {period}.',
|
||||
'native.trial.changed': 'Oferta się zmieniła. Wróć do planów i sprawdź aktualną cenę.',
|
||||
'native.connect.title': 'Połącz z TREK',
|
||||
'native.connect.hint': 'Wpisz adres, pod którym otwierasz TREK w przeglądarce.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Płatność zostanie pobrana z Twojego konta Google po potwierdzeniu. Subskrypcja odnawia się automatycznie, jeśli nie anulujesz jej przed końcem okresu. Zarządzaj nią lub ją anuluj w Google Play w sekcji Profil, Płatności i subskrypcje, Subskrypcje.',
|
||||
'native.plans.restoreNoneAndroid': 'Nie znaleziono aktywnej subskrypcji na tym koncie Google.',
|
||||
'native.plans.recommended': 'Polecany',
|
||||
'native.claim.change': 'Zmień',
|
||||
'native.claim.ruleLength': 'znaków',
|
||||
'native.claim.ruleUpper': 'Wielka litera',
|
||||
@@ -198,17 +193,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Zdjęcia i fotoksiążka',
|
||||
'native.welcome.photosSub': 'Wspomnienia zostają przy podróży',
|
||||
'native.welcome.discover': 'Poznaj plany w chmurze',
|
||||
'native.trip.start.title': 'Weekendowy wypad',
|
||||
'native.trip.start.text': 'Krótkie wyjazdy, głównie planowanie.',
|
||||
'native.trip.basis.title': 'Objazdówka',
|
||||
'native.trip.basis.text': 'Kilka miejsc, rezerwacje automatycznie.',
|
||||
'native.trip.plus.title': 'Wielka podróż',
|
||||
'native.trip.plus.text': 'Tygodnie w drodze, z całą grupą.',
|
||||
'native.trip.pro.title': 'Obieżyświat',
|
||||
'native.trip.pro.text': 'Dla częstych podróżników i dużych fotoksiążek.',
|
||||
'native.plans.unlimited': 'Bez limitu',
|
||||
'native.plans.unlimitedSub': 'Podróże i współtowarzysze',
|
||||
'native.plans.inEveryPlan': 'w każdym planie',
|
||||
'native.plans.yearlyIs': '{price} rocznie, rezygnacja w każdej chwili',
|
||||
'native.plans.monthlyIs': 'To {price} miesięcznie',
|
||||
'native.plans.storage': 'Magazyn',
|
||||
'native.plans.notIncluded': 'Niedostępne',
|
||||
'native.plans.storageFairUse': 'Miejsce w ramach uczciwego użytkowania',
|
||||
'native.plans.aiPerMonth': '{n} / miesiąc',
|
||||
'native.plans.aiNone': 'Niedostępne',
|
||||
'native.plans.included': 'W pakiecie',
|
||||
'native.plans.planned': 'Planowane',
|
||||
'native.plans.assistant': 'Asystent AI',
|
||||
'native.plans.mailImport': 'Automatyczny import poczty',
|
||||
'native.plans.aiLabel': 'Dokumenty AI',
|
||||
'native.plans.choose': 'Wybierz: {plan}',
|
||||
'native.plans.choose': 'Wybierz: {trip}',
|
||||
'native.plans.termsShort': 'Warunki korzystania (EULA)',
|
||||
'native.plans.privacyShort': 'Prywatność',
|
||||
'native.plans.billing': 'Rozliczenie',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Чтобы избежать списания, отмените подписку в App Store не менее чем за 24 часа до конца пробного периода.',
|
||||
'native.trial.cancelPlay': 'Чтобы избежать списания, отмените подписку в Google Play до конца пробного периода.',
|
||||
'native.trial.badge': '7 дней бесплатно',
|
||||
'native.trial.price': '7 дней бесплатно, затем {price} {period}.',
|
||||
'native.trial.changed': 'Предложение изменилось. Вернитесь к тарифам и проверьте актуальную цену.',
|
||||
'native.connect.title': 'Подключение к TREK',
|
||||
'native.connect.hint': 'Введите адрес, по которому вы открываете TREK в браузере.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Оплата списывается с вашего аккаунта Google при подтверждении. Подписка продлевается автоматически, если вы не отмените её до конца периода. Управлять ею или отменить можно в Google Play: Профиль, Платежи и подписки, Подписки.',
|
||||
'native.plans.restoreNoneAndroid': 'Для этого аккаунта Google активная подписка не найдена.',
|
||||
'native.plans.recommended': 'Рекомендуем',
|
||||
'native.claim.change': 'Изменить',
|
||||
'native.claim.ruleLength': 'символов',
|
||||
'native.claim.ruleUpper': 'Заглавная буква',
|
||||
@@ -201,17 +196,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Фото и фотокнига',
|
||||
'native.welcome.photosSub': 'Воспоминания остаются с поездкой',
|
||||
'native.welcome.discover': 'Посмотреть облачные тарифы',
|
||||
'native.trip.start.title': 'Выходные',
|
||||
'native.trip.start.text': 'Короткие поездки, в основном планирование.',
|
||||
'native.trip.basis.title': 'Тур',
|
||||
'native.trip.basis.text': 'Несколько мест, бронирования автоматически.',
|
||||
'native.trip.plus.title': 'Большое путешествие',
|
||||
'native.trip.plus.text': 'Недели в пути, всей группой.',
|
||||
'native.trip.pro.title': 'Путешественник',
|
||||
'native.trip.pro.text': 'Для тех, кто часто в пути, и больших фотокниг.',
|
||||
'native.plans.unlimited': 'Без ограничений',
|
||||
'native.plans.unlimitedSub': 'Поездки и попутчики',
|
||||
'native.plans.inEveryPlan': 'в каждом тарифе',
|
||||
'native.plans.yearlyIs': '{price} в год, отмена в любое время',
|
||||
'native.plans.monthlyIs': 'Это {price} в месяц',
|
||||
'native.plans.storage': 'Хранилище',
|
||||
'native.plans.notIncluded': 'Не включено',
|
||||
'native.plans.storageFairUse': 'Хранилище по правилам добросовестного использования',
|
||||
'native.plans.aiPerMonth': '{n} / мес.',
|
||||
'native.plans.aiNone': 'Не включено',
|
||||
'native.plans.included': 'Включено',
|
||||
'native.plans.planned': 'Планируется',
|
||||
'native.plans.assistant': 'ИИ-помощник',
|
||||
'native.plans.mailImport': 'Автоматический импорт писем',
|
||||
'native.plans.aiLabel': 'Документы ИИ',
|
||||
'native.plans.choose': 'Выбрать: {plan}',
|
||||
'native.plans.choose': 'Выбрать: {trip}',
|
||||
'native.plans.termsShort': 'Условия использования (EULA)',
|
||||
'native.plans.privacyShort': 'Конфиденциальность',
|
||||
'native.plans.billing': 'Оплата',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Poplatku predídete zrušením predplatného v App Store najneskôr 24 hodín pred koncom skúšobnej doby.',
|
||||
'native.trial.cancelPlay': 'Poplatku predídete zrušením predplatného v Google Play pred koncom skúšobnej doby.',
|
||||
'native.trial.badge': '7 dní zadarmo',
|
||||
'native.trial.price': '7 dní zadarmo, potom {price} {period}.',
|
||||
'native.trial.changed': 'Ponuka sa zmenila. Vráťte sa k plánom a skontrolujte aktuálnu cenu.',
|
||||
'native.connect.title': 'Pripojiť k TREK',
|
||||
'native.connect.hint': 'Zadajte adresu, na ktorej otvárate TREK v prehliadači.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -71,6 +65,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Platba sa pri potvrdení strhne z vášho účtu Google. Predplatné sa automaticky obnovuje, ak ho nezrušíte pred koncom obdobia. Spravovať alebo zrušiť ho môžete v Google Play v časti Profil, Platby a odbery, Odbery.',
|
||||
'native.plans.restoreNoneAndroid': 'Pre tento účet Google sa nenašlo žiadne aktívne predplatné.',
|
||||
'native.plans.recommended': 'Odporúčané',
|
||||
'native.claim.change': 'Zmeniť',
|
||||
'native.claim.ruleLength': 'znakov',
|
||||
'native.claim.ruleUpper': 'Veľké písmeno',
|
||||
@@ -196,17 +191,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotky a fotokniha',
|
||||
'native.welcome.photosSub': 'Spomienky zostávajú pri ceste',
|
||||
'native.welcome.discover': 'Pozrieť cloudové tarify',
|
||||
'native.trip.start.title': 'Víkendovka',
|
||||
'native.trip.start.text': 'Krátke cesty, hlavne plánovanie.',
|
||||
'native.trip.basis.title': 'Okružná cesta',
|
||||
'native.trip.basis.text': 'Viac miest, rezervácie automaticky.',
|
||||
'native.trip.plus.title': 'Veľká cesta',
|
||||
'native.trip.plus.text': 'Týždne na cestách, s celou skupinou.',
|
||||
'native.trip.pro.title': 'Svetobežník',
|
||||
'native.trip.pro.text': 'Pre častých cestovateľov a veľké fotoknihy.',
|
||||
'native.plans.unlimited': 'Neobmedzene',
|
||||
'native.plans.unlimitedSub': 'Cesty a spolucestujúci',
|
||||
'native.plans.inEveryPlan': 'v každom tarife',
|
||||
'native.plans.yearlyIs': '{price} ročne, zrušenie kedykoľvek',
|
||||
'native.plans.monthlyIs': 'To je {price} mesačne',
|
||||
'native.plans.storage': 'Úložisko',
|
||||
'native.plans.notIncluded': 'Nie je zahrnuté',
|
||||
'native.plans.storageFairUse': 'Úložisko v režime primeraného využitia',
|
||||
'native.plans.aiPerMonth': '{n} / mesiac',
|
||||
'native.plans.aiNone': 'Nie je zahrnuté',
|
||||
'native.plans.included': 'Zahrnuté',
|
||||
'native.plans.planned': 'Plánované',
|
||||
'native.plans.assistant': 'Asistent AI',
|
||||
'native.plans.mailImport': 'Automatický import e-mailov',
|
||||
'native.plans.aiLabel': 'Dokumenty AI',
|
||||
'native.plans.choose': 'Vybrať: {plan}',
|
||||
'native.plans.choose': 'Vybrať: {trip}',
|
||||
'native.plans.termsShort': 'Podmienky používania (EULA)',
|
||||
'native.plans.privacyShort': 'Súkromie',
|
||||
'native.plans.billing': 'Platba',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'För att undvika debitering, säg upp i App Store minst 24 timmar innan provperioden slutar.',
|
||||
'native.trial.cancelPlay': 'För att undvika debitering, säg upp i Google Play innan provperioden slutar.',
|
||||
'native.trial.badge': '7 dagar gratis',
|
||||
'native.trial.price': '7 dagar gratis, därefter {price} {period}.',
|
||||
'native.trial.changed': 'Erbjudandet har ändrats. Gå tillbaka till abonnemangen och kontrollera det aktuella priset.',
|
||||
'native.connect.title': 'Anslut till TREK',
|
||||
'native.connect.hint': 'Ange adressen du öppnar TREK på i webbläsaren.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Betalningen debiteras ditt Google-konto när du bekräftar. Prenumerationen förnyas automatiskt om du inte säger upp den innan perioden tar slut. Hantera eller säg upp den i Google Play under Profil, Betalningar och prenumerationer, Prenumerationer.',
|
||||
'native.plans.restoreNoneAndroid': 'Ingen aktiv prenumeration hittades för det här Google-kontot.',
|
||||
'native.plans.recommended': 'Rekommenderas',
|
||||
'native.claim.change': 'Ändra',
|
||||
'native.claim.ruleLength': 'tecken',
|
||||
'native.claim.ruleUpper': 'Versal',
|
||||
@@ -197,17 +192,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Bilder och fotobok',
|
||||
'native.welcome.photosSub': 'Minnena stannar hos resan',
|
||||
'native.welcome.discover': 'Utforska molnplaner',
|
||||
'native.trip.start.title': 'Weekendresa',
|
||||
'native.trip.start.text': 'Korta resor, mest planering.',
|
||||
'native.trip.basis.title': 'Rundresa',
|
||||
'native.trip.basis.text': 'Flera stopp, bokningar automatiskt.',
|
||||
'native.trip.plus.title': 'Stor resa',
|
||||
'native.trip.plus.text': 'Veckor på vägen, med hela gruppen.',
|
||||
'native.trip.pro.title': 'Världsresenär',
|
||||
'native.trip.pro.text': 'För dig som reser ofta och gör stora fotoböcker.',
|
||||
'native.plans.unlimited': 'Obegränsat',
|
||||
'native.plans.unlimitedSub': 'Resor och medresenärer',
|
||||
'native.plans.inEveryPlan': 'i varje plan',
|
||||
'native.plans.yearlyIs': '{price} per år, avsluta när du vill',
|
||||
'native.plans.monthlyIs': 'Det blir {price} i månaden',
|
||||
'native.plans.storage': 'Lagring',
|
||||
'native.plans.notIncluded': 'Ingår inte',
|
||||
'native.plans.storageFairUse': 'Lagring vid skälig användning',
|
||||
'native.plans.aiPerMonth': '{n} / månad',
|
||||
'native.plans.aiNone': 'Ingår inte',
|
||||
'native.plans.included': 'Ingår',
|
||||
'native.plans.planned': 'Planerat',
|
||||
'native.plans.assistant': 'AI-assistent',
|
||||
'native.plans.mailImport': 'Automatisk e-postimport',
|
||||
'native.plans.aiLabel': 'AI-dokument',
|
||||
'native.plans.choose': 'Välj {plan}',
|
||||
'native.plans.choose': 'Välj {trip}',
|
||||
'native.plans.termsShort': 'Användarvillkor (EULA)',
|
||||
'native.plans.privacyShort': 'Integritet',
|
||||
'native.plans.billing': 'Betalning',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'เพื่อไม่ให้ถูกเรียกเก็บเงิน ให้ยกเลิกใน App Store อย่างน้อย 24 ชั่วโมงก่อนหมดช่วงทดลองใช้ฟรี',
|
||||
'native.trial.cancelPlay': 'เพื่อไม่ให้ถูกเรียกเก็บเงิน ให้ยกเลิกใน Google Play ก่อนหมดช่วงทดลองใช้ฟรี',
|
||||
'native.trial.badge': 'ฟรี 7 วัน',
|
||||
'native.trial.price': 'ฟรี 7 วัน จากนั้น {price} {period}',
|
||||
'native.trial.changed': 'ข้อเสนอมีการเปลี่ยนแปลง โปรดกลับไปที่รายการแพ็กเกจและตรวจสอบราคาปัจจุบัน',
|
||||
'native.connect.title': 'เชื่อมต่อกับ TREK',
|
||||
'native.connect.hint': 'ป้อนที่อยู่ที่คุณใช้เปิด TREK ในเบราว์เซอร์',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -66,6 +61,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'ระบบจะเรียกเก็บเงินจากบัญชี Google ของคุณเมื่อยืนยัน การสมัครสมาชิกจะต่ออายุอัตโนมัติ เว้นแต่คุณจะยกเลิกก่อนสิ้นสุดรอบ จัดการหรือยกเลิกได้ใน Google Play ที่ โปรไฟล์ การชำระเงินและการสมัครใช้บริการ การสมัครใช้บริการ',
|
||||
'native.plans.restoreNoneAndroid': 'ไม่พบการสมัครสมาชิกที่ใช้งานอยู่ในบัญชี Google นี้',
|
||||
'native.plans.recommended': 'แนะนำ',
|
||||
'native.claim.change': 'เปลี่ยน',
|
||||
'native.claim.ruleLength': 'ตัวอักษร',
|
||||
'native.claim.ruleUpper': 'ตัวพิมพ์ใหญ่',
|
||||
@@ -185,17 +181,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'รูปภาพและโฟโต้บุ๊ก',
|
||||
'native.welcome.photosSub': 'ความทรงจำอยู่คู่กับทริป',
|
||||
'native.welcome.discover': 'ดูแพ็กเกจคลาวด์',
|
||||
'native.trip.start.title': 'ทริปสุดสัปดาห์',
|
||||
'native.trip.start.text': 'ทริปสั้น เน้นวางแผน',
|
||||
'native.trip.basis.title': 'ทริปหลายเมือง',
|
||||
'native.trip.basis.text': 'หลายจุดหมาย จองอัตโนมัติ',
|
||||
'native.trip.plus.title': 'ทริปใหญ่',
|
||||
'native.trip.plus.text': 'อยู่บนถนนหลายสัปดาห์ กับทั้งกลุ่ม',
|
||||
'native.trip.pro.title': 'นักเดินทางรอบโลก',
|
||||
'native.trip.pro.text': 'สำหรับคนเดินทางบ่อยและโฟโต้บุ๊กเล่มใหญ่',
|
||||
'native.plans.unlimited': 'ไม่จำกัด',
|
||||
'native.plans.unlimitedSub': 'ทริปและเพื่อนร่วมทาง',
|
||||
'native.plans.inEveryPlan': 'ในทุกแพ็กเกจ',
|
||||
'native.plans.yearlyIs': 'ปีละ {price} ยกเลิกได้ทุกเมื่อ',
|
||||
'native.plans.monthlyIs': 'เท่ากับเดือนละ {price}',
|
||||
'native.plans.storage': 'ที่เก็บของ',
|
||||
'native.plans.notIncluded': 'ไม่รวม',
|
||||
'native.plans.storageFairUse': 'พื้นที่เก็บข้อมูลภายใต้การใช้งานอย่างเหมาะสม',
|
||||
'native.plans.aiPerMonth': '{n} / เดือน',
|
||||
'native.plans.aiNone': 'ไม่รวม',
|
||||
'native.plans.included': 'รวมแล้ว',
|
||||
'native.plans.planned': 'อยู่ในแผน',
|
||||
'native.plans.assistant': 'ผู้ช่วย AI',
|
||||
'native.plans.mailImport': 'นำเข้าอีเมลอัตโนมัติ',
|
||||
'native.plans.aiLabel': 'เอกสาร AI',
|
||||
'native.plans.choose': 'เลือก{plan}',
|
||||
'native.plans.choose': 'เลือก{trip}',
|
||||
'native.plans.termsShort': 'ข้อกำหนดการใช้งาน (EULA)',
|
||||
'native.plans.privacyShort': 'ความเป็นส่วนตัว',
|
||||
'native.plans.billing': 'การชำระเงิน',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': 'Ücret alınmaması için deneme bitmeden en az 24 saat önce App Store’dan iptal et.',
|
||||
'native.trial.cancelPlay': 'Ücret alınmaması için deneme bitmeden önce Google Play’den iptal et.',
|
||||
'native.trial.badge': '7 gün ücretsiz',
|
||||
'native.trial.price': '7 gün ücretsiz, ardından {period} {price}.',
|
||||
'native.trial.changed': 'Teklif değişti. Planlara dönüp güncel fiyatı kontrol et.',
|
||||
'native.connect.title': 'TREK’e bağlan',
|
||||
'native.connect.hint': 'TREK’i tarayıcında açtığın adresi gir.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -70,6 +65,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
"Ödeme, onayladığınızda Google hesabınızdan tahsil edilir. Abonelik, dönem bitmeden iptal etmezseniz otomatik olarak yenilenir. Google Play'de Profil, Ödemeler ve abonelikler, Abonelikler bölümünden yönetebilir veya iptal edebilirsiniz.",
|
||||
'native.plans.restoreNoneAndroid': 'Bu Google hesabında etkin abonelik bulunamadı.',
|
||||
'native.plans.recommended': 'Önerilen',
|
||||
'native.claim.change': 'Değiştir',
|
||||
'native.claim.ruleLength': 'karakter',
|
||||
'native.claim.ruleUpper': 'Büyük harf',
|
||||
@@ -196,17 +192,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Fotoğraflar ve fotoğraf kitabı',
|
||||
'native.welcome.photosSub': 'Anılar yolculukla birlikte kalır',
|
||||
'native.welcome.discover': 'Bulut paketlerini keşfet',
|
||||
'native.trip.start.title': 'Hafta sonu kaçamağı',
|
||||
'native.trip.start.text': 'Kısa yolculuklar, çoğunlukla planlama.',
|
||||
'native.trip.basis.title': 'Tur',
|
||||
'native.trip.basis.text': 'Birkaç durak, rezervasyonlar otomatik.',
|
||||
'native.trip.plus.title': 'Büyük yolculuk',
|
||||
'native.trip.plus.text': 'Haftalarca yolda, tüm grupla.',
|
||||
'native.trip.pro.title': 'Dünya gezgini',
|
||||
'native.trip.pro.text': 'Sık seyahat edenler ve büyük fotoğraf kitapları için.',
|
||||
'native.plans.unlimited': 'Sınırsız',
|
||||
'native.plans.unlimitedSub': 'Yolculuklar ve yol arkadaşları',
|
||||
'native.plans.inEveryPlan': 'her pakette',
|
||||
'native.plans.yearlyIs': 'Yıllık {price}, istediğin zaman iptal',
|
||||
'native.plans.monthlyIs': 'Ayda {price} eder',
|
||||
'native.plans.storage': 'Depolama',
|
||||
'native.plans.notIncluded': 'Dahil değil',
|
||||
'native.plans.storageFairUse': 'Adil kullanım depolama alanı',
|
||||
'native.plans.aiPerMonth': '{n} / ay',
|
||||
'native.plans.aiNone': 'Dahil değil',
|
||||
'native.plans.included': 'Dahil',
|
||||
'native.plans.planned': 'Planlanıyor',
|
||||
'native.plans.assistant': 'Yapay zekâ asistanı',
|
||||
'native.plans.mailImport': 'Otomatik e-posta içe aktarma',
|
||||
'native.plans.aiLabel': 'Yapay zekâ belgeleri',
|
||||
'native.plans.choose': '{plan} seç',
|
||||
'native.plans.choose': '{trip} seç',
|
||||
'native.plans.termsShort': 'Kullanım Koşulları (EULA)',
|
||||
'native.plans.privacyShort': 'Gizlilik',
|
||||
'native.plans.billing': 'Ödeme',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Щоб уникнути списання, скасуйте підписку в App Store щонайменше за 24 години до кінця пробного періоду.',
|
||||
'native.trial.cancelPlay': 'Щоб уникнути списання, скасуйте підписку в Google Play до кінця пробного періоду.',
|
||||
'native.trial.badge': '7 днів безкоштовно',
|
||||
'native.trial.price': '7 днів безкоштовно, потім {price} {period}.',
|
||||
'native.trial.changed': 'Пропозиція змінилася. Поверніться до тарифів і перевірте актуальну ціну.',
|
||||
'native.connect.title': 'Підключення до TREK',
|
||||
'native.connect.hint': 'Введіть адресу, за якою ви відкриваєте TREK у браузері.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Оплата списується з вашого облікового запису Google під час підтвердження. Підписка подовжується автоматично, якщо ви не скасуєте її до кінця періоду. Керувати нею або скасувати можна в Google Play: Профіль, Платежі й підписки, Підписки.',
|
||||
'native.plans.restoreNoneAndroid': 'Для цього облікового запису Google активної підписки не знайдено.',
|
||||
'native.plans.recommended': 'Рекомендуємо',
|
||||
'native.claim.change': 'Змінити',
|
||||
'native.claim.ruleLength': 'символів',
|
||||
'native.claim.ruleUpper': 'Велика літера',
|
||||
@@ -198,17 +193,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Фото й фотокнига',
|
||||
'native.welcome.photosSub': 'Спогади залишаються з поїздкою',
|
||||
'native.welcome.discover': 'Переглянути хмарні тарифи',
|
||||
'native.trip.start.title': 'Вихідні',
|
||||
'native.trip.start.text': 'Короткі поїздки, здебільшого планування.',
|
||||
'native.trip.basis.title': 'Тур',
|
||||
'native.trip.basis.text': 'Кілька місць, бронювання автоматично.',
|
||||
'native.trip.plus.title': 'Велика подорож',
|
||||
'native.trip.plus.text': 'Тижні в дорозі, усією групою.',
|
||||
'native.trip.pro.title': 'Мандрівник',
|
||||
'native.trip.pro.text': 'Для тих, хто часто в дорозі, і великих фотокниг.',
|
||||
'native.plans.unlimited': 'Без обмежень',
|
||||
'native.plans.unlimitedSub': 'Поїздки й попутники',
|
||||
'native.plans.inEveryPlan': 'у кожному тарифі',
|
||||
'native.plans.yearlyIs': '{price} на рік, скасування будь-коли',
|
||||
'native.plans.monthlyIs': 'Це {price} на місяць',
|
||||
'native.plans.storage': 'Сховище',
|
||||
'native.plans.notIncluded': 'Не включено',
|
||||
'native.plans.storageFairUse': 'Сховище за правилами добросовісного використання',
|
||||
'native.plans.aiPerMonth': '{n} / міс.',
|
||||
'native.plans.aiNone': 'Не включено',
|
||||
'native.plans.included': 'Включено',
|
||||
'native.plans.planned': 'Заплановано',
|
||||
'native.plans.assistant': 'Асистент ШІ',
|
||||
'native.plans.mailImport': 'Автоматичний імпорт листів',
|
||||
'native.plans.aiLabel': 'Документи ШІ',
|
||||
'native.plans.choose': 'Обрати: {plan}',
|
||||
'native.plans.choose': 'Обрати: {trip}',
|
||||
'native.plans.termsShort': 'Умови використання (EULA)',
|
||||
'native.plans.privacyShort': 'Конфіденційність',
|
||||
'native.plans.billing': 'Оплата',
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple':
|
||||
'Để tránh bị tính phí, hãy hủy trong App Store ít nhất 24 giờ trước khi hết thời gian dùng thử.',
|
||||
'native.trial.cancelPlay': 'Để tránh bị tính phí, hãy hủy trong Google Play trước khi hết thời gian dùng thử.',
|
||||
'native.trial.badge': '7 ngày miễn phí',
|
||||
'native.trial.price': '7 ngày miễn phí, sau đó {price} {period}.',
|
||||
'native.trial.changed': 'Ưu đãi đã thay đổi. Hãy quay lại danh sách gói và kiểm tra giá hiện tại.',
|
||||
'native.connect.title': 'Kết nối với TREK',
|
||||
'native.connect.hint': 'Nhập địa chỉ bạn dùng để mở TREK trong trình duyệt.',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -72,6 +66,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'Khoản thanh toán được tính vào tài khoản Google của bạn khi xác nhận. Gói đăng ký tự động gia hạn trừ khi bạn hủy trước khi hết kỳ. Quản lý hoặc hủy trong Google Play tại Hồ sơ, Thanh toán và gói thuê bao, Gói thuê bao.',
|
||||
'native.plans.restoreNoneAndroid': 'Không tìm thấy gói đăng ký đang hoạt động trên tài khoản Google này.',
|
||||
'native.plans.recommended': 'Đề xuất',
|
||||
'native.claim.change': 'Đổi',
|
||||
'native.claim.ruleLength': 'ký tự',
|
||||
'native.claim.ruleUpper': 'Chữ hoa',
|
||||
@@ -198,17 +193,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': 'Ảnh và sách ảnh',
|
||||
'native.welcome.photosSub': 'Kỷ niệm ở lại cùng chuyến đi',
|
||||
'native.welcome.discover': 'Khám phá các gói cloud',
|
||||
'native.trip.start.title': 'Chuyến cuối tuần',
|
||||
'native.trip.start.text': 'Chuyến đi ngắn, chủ yếu lên kế hoạch.',
|
||||
'native.trip.basis.title': 'Chuyến đi vòng',
|
||||
'native.trip.basis.text': 'Nhiều điểm dừng, đặt chỗ tự động.',
|
||||
'native.trip.plus.title': 'Chuyến đi lớn',
|
||||
'native.trip.plus.text': 'Hàng tuần trên đường, cùng cả nhóm.',
|
||||
'native.trip.pro.title': 'Người du lịch vòng quanh thế giới',
|
||||
'native.trip.pro.text': 'Cho người hay đi và sách ảnh lớn.',
|
||||
'native.plans.unlimited': 'Không giới hạn',
|
||||
'native.plans.unlimitedSub': 'Chuyến đi và bạn đồng hành',
|
||||
'native.plans.inEveryPlan': 'trong mọi gói',
|
||||
'native.plans.yearlyIs': '{price} mỗi năm, hủy bất cứ lúc nào',
|
||||
'native.plans.monthlyIs': 'Tức là {price} mỗi tháng',
|
||||
'native.plans.storage': 'Lưu trữ',
|
||||
'native.plans.notIncluded': 'Không bao gồm',
|
||||
'native.plans.storageFairUse': 'Dung lượng theo chính sách sử dụng hợp lý',
|
||||
'native.plans.aiPerMonth': '{n} / tháng',
|
||||
'native.plans.aiNone': 'Không bao gồm',
|
||||
'native.plans.included': 'Đã bao gồm',
|
||||
'native.plans.planned': 'Dự kiến',
|
||||
'native.plans.assistant': 'Trợ lý AI',
|
||||
'native.plans.mailImport': 'Tự động nhập email',
|
||||
'native.plans.aiLabel': 'Tài liệu AI',
|
||||
'native.plans.choose': 'Chọn {plan}',
|
||||
'native.plans.choose': 'Chọn {trip}',
|
||||
'native.plans.termsShort': 'Điều khoản sử dụng (EULA)',
|
||||
'native.plans.privacyShort': 'Quyền riêng tư',
|
||||
'native.plans.billing': 'Thanh toán',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': '若要避免扣款,請在試用期結束至少 24 小時前到 App Store 取消訂閱。',
|
||||
'native.trial.cancelPlay': '若要避免扣款,請在試用期結束前到 Google Play 取消訂閱。',
|
||||
'native.trial.badge': '免費試用 7 天',
|
||||
'native.trial.price': '免費試用 7 天,之後{period} {price}。',
|
||||
'native.trial.changed': '優惠已有變更。請返回方案列表,查看目前的價格。',
|
||||
'native.connect.title': '連線到 TREK',
|
||||
'native.connect.hint': '請輸入你在瀏覽器中開啟 TREK 時使用的網址。',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -66,6 +61,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'確認後將從你的 Google 帳號扣款。除非你在期滿前取消,訂閱會自動續訂。可在 Google Play 的「個人資料」「付款和訂閱」「訂閱」中管理或取消。',
|
||||
'native.plans.restoreNoneAndroid': '此 Google 帳號沒有有效的訂閱。',
|
||||
'native.plans.recommended': '推薦',
|
||||
'native.claim.change': '更改',
|
||||
'native.claim.ruleLength': '個字元',
|
||||
'native.claim.ruleUpper': '大寫字母',
|
||||
@@ -185,17 +181,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': '照片和相簿',
|
||||
'native.welcome.photosSub': '回憶和旅程留在一起',
|
||||
'native.welcome.discover': '了解雲端方案',
|
||||
'native.trip.start.title': '週末旅行',
|
||||
'native.trip.start.text': '短途旅行,以規劃為主。',
|
||||
'native.trip.basis.title': '環狀旅行',
|
||||
'native.trip.basis.text': '多個地點,預訂自動整理。',
|
||||
'native.trip.plus.title': '長途旅行',
|
||||
'native.trip.plus.text': '數週在路上,和整個團隊一起。',
|
||||
'native.trip.pro.title': '環球旅人',
|
||||
'native.trip.pro.text': '適合常出遊的人和大型相簿。',
|
||||
'native.plans.unlimited': '無限制',
|
||||
'native.plans.unlimitedSub': '旅行和同行者',
|
||||
'native.plans.inEveryPlan': '每個方案都有',
|
||||
'native.plans.yearlyIs': '每年 {price},隨時可取消',
|
||||
'native.plans.monthlyIs': '相當於每月 {price}',
|
||||
'native.plans.storage': '儲存',
|
||||
'native.plans.notIncluded': '不包含',
|
||||
'native.plans.storageFairUse': '公平使用儲存空間',
|
||||
'native.plans.aiPerMonth': '{n} / 月',
|
||||
'native.plans.aiNone': '不包含',
|
||||
'native.plans.included': '已包含',
|
||||
'native.plans.planned': '計畫推出',
|
||||
'native.plans.assistant': 'AI 助理',
|
||||
'native.plans.mailImport': '自動郵件匯入',
|
||||
'native.plans.aiLabel': 'AI 文件',
|
||||
'native.plans.choose': '選擇{plan}',
|
||||
'native.plans.choose': '選擇{trip}',
|
||||
'native.plans.termsShort': '使用條款 (EULA)',
|
||||
'native.plans.privacyShort': '隱私',
|
||||
'native.plans.billing': '付款',
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import type { TranslationStrings } from '../types';
|
||||
|
||||
const native: TranslationStrings = {
|
||||
'native.trial.cancelApple': '若要避免扣费,请在试用期结束至少 24 小时前到 App Store 取消订阅。',
|
||||
'native.trial.cancelPlay': '若要避免扣费,请在试用期结束前到 Google Play 取消订阅。',
|
||||
'native.trial.badge': '免费试用 7 天',
|
||||
'native.trial.price': '免费试用 7 天,之后{period} {price}。',
|
||||
'native.trial.changed': '优惠已变更。请返回套餐列表,查看当前价格。',
|
||||
'native.connect.title': '连接到 TREK',
|
||||
'native.connect.hint': '请输入你在浏览器中打开 TREK 时使用的地址。',
|
||||
'native.connect.placeholder': 'https://trek.example.com',
|
||||
@@ -65,6 +60,7 @@ const native: TranslationStrings = {
|
||||
'native.plans.legalAndroid':
|
||||
'确认后将从你的 Google 账号扣款。除非你在期满前取消,订阅会自动续订。可在 Google Play 的“个人资料”“付款和订阅”“订阅”中管理或取消。',
|
||||
'native.plans.restoreNoneAndroid': '此 Google 账号没有有效订阅。',
|
||||
'native.plans.recommended': '推荐',
|
||||
'native.claim.change': '更改',
|
||||
'native.claim.ruleLength': '个字符',
|
||||
'native.claim.ruleUpper': '大写字母',
|
||||
@@ -184,17 +180,28 @@ const native: TranslationStrings = {
|
||||
'native.welcome.photosTitle': '照片和相册',
|
||||
'native.welcome.photosSub': '回忆和旅程留在一起',
|
||||
'native.welcome.discover': '了解云端方案',
|
||||
'native.trip.start.title': '周末游',
|
||||
'native.trip.start.text': '短途旅行,以规划为主。',
|
||||
'native.trip.basis.title': '环线旅行',
|
||||
'native.trip.basis.text': '多个地点,预订自动整理。',
|
||||
'native.trip.plus.title': '长途旅行',
|
||||
'native.trip.plus.text': '数周在路上,和整个团队一起。',
|
||||
'native.trip.pro.title': '环球旅行者',
|
||||
'native.trip.pro.text': '适合常出行的人和大型相册。',
|
||||
'native.plans.unlimited': '不限',
|
||||
'native.plans.unlimitedSub': '旅行和同行者',
|
||||
'native.plans.inEveryPlan': '每个方案都有',
|
||||
'native.plans.yearlyIs': '每年 {price},随时可取消',
|
||||
'native.plans.monthlyIs': '相当于每月 {price}',
|
||||
'native.plans.storage': '存储',
|
||||
'native.plans.notIncluded': '不包含',
|
||||
'native.plans.storageFairUse': '公平使用存储空间',
|
||||
'native.plans.aiPerMonth': '{n} / 月',
|
||||
'native.plans.aiNone': '不包含',
|
||||
'native.plans.included': '已包含',
|
||||
'native.plans.planned': '计划推出',
|
||||
'native.plans.assistant': 'AI 助手',
|
||||
'native.plans.mailImport': '自动邮件导入',
|
||||
'native.plans.aiLabel': 'AI 文档',
|
||||
'native.plans.choose': '选择{plan}',
|
||||
'native.plans.choose': '选择{trip}',
|
||||
'native.plans.termsShort': '使用条款 (EULA)',
|
||||
'native.plans.privacyShort': '隐私',
|
||||
'native.plans.billing': '付款',
|
||||
|
||||
@@ -315,7 +315,7 @@ export const accommodationCreateBodySchema = accommodationCreateRequestSchema.pa
|
||||
});
|
||||
export type AccommodationCreateBody = z.infer<typeof accommodationCreateBodySchema>;
|
||||
|
||||
export const accommodationUpdateRequestSchema = open;
|
||||
export const accommodationUpdateRequestSchema = open.and(accommodationCreateRequestSchema.pick({ confirmation: true }));
|
||||
export type AccommodationUpdateRequest = z.infer<typeof accommodationUpdateRequestSchema>;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user