From 66d0463c81eacd98db04b38dd7139d1bdec6c19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Eorkell=20M=C3=A1ni=20=C3=9Eorkelsson?= Date: Tue, 17 Sep 2024 14:29:08 +0000 Subject: [PATCH 1/6] chore(license-service): Disable cache when not prod (#16036) * chore: init * chore: console --- libs/services/license/src/lib/licenseCache.provider.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/services/license/src/lib/licenseCache.provider.ts b/libs/services/license/src/lib/licenseCache.provider.ts index aee2a04eca46..254fcaa38cf5 100644 --- a/libs/services/license/src/lib/licenseCache.provider.ts +++ b/libs/services/license/src/lib/licenseCache.provider.ts @@ -9,12 +9,16 @@ export const LICENSE_SERVICE_CACHE_MANAGER_PROVIDER = export const LicenseCacheProvider: FactoryProvider = { provide: LICENSE_SERVICE_CACHE_MANAGER_PROVIDER, scope: LazyDuringDevScope, - useFactory: (licenseServiceConfig: ConfigType) => - createRedisCacheManager({ + useFactory: (licenseServiceConfig: ConfigType) => { + if (process.env.NODE_ENV !== 'production') { + return undefined + } + return createRedisCacheManager({ name: 'license_service_cache_manager', nodes: licenseServiceConfig.redis.nodes, ssl: licenseServiceConfig.redis.ssl, ttl: licenseServiceConfig.redis.cacheTtl, - }), + }) + }, inject: [LicenseConfig.KEY], } From 323fd5691d9ad37e33b7b31f51830b25c38babf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAnar=20Vestmann?= <43557895+RunarVestmann@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:01:02 +0000 Subject: [PATCH 2/6] fix(web): Pension Calculator - Remove space in translation string keys (#16037) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../SocialInsuranceAdministration/translationStrings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts b/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts index 84752d10a013..7050d578e080 100644 --- a/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts +++ b/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts @@ -843,12 +843,12 @@ export const translationStrings = defineMessages({ defaultMessage: 'Meðlag', description: 'Niðurstöðuskjár, Meðlag', }, - 'REIKNH.PERSAFSLMINNA ': { + 'REIKNH.PERSAFSLMINNA': { id: 'web.pensionCalculator:REIKNH.PERSAFSLMINNA', defaultMessage: 'Persónuafsláttur', description: 'Niðurstöðuskjár, Persónuafsláttur minna', }, - 'REIKNH.SAMANBBOTAFLOKKUR ': { + 'REIKNH.SAMANBBOTAFLOKKUR': { id: 'web.pensionCalculator:REIKNH.SAMANBBOTAFLOKKUR', defaultMessage: 'Samanburðarbótaflokkur við eldra kerfi', description: 'Niðurstöðuskjár, Samanburðarbótaflokkur við eldra kerfi ', From 43a8006ace926ac7ddc723c45321d290d240228e Mon Sep 17 00:00:00 2001 From: mannipje <135017126+mannipje@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:32:18 +0000 Subject: [PATCH 3/6] feat(web): Add default header for HMS organization (#16028) * Add default header for HMS organization * Reorder return from getThemeConfig --- .../Wrapper/OrganizationWrapper.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx b/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx index a3d50ebb3d0c..610a1adccc19 100644 --- a/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx +++ b/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx @@ -183,6 +183,10 @@ export const getThemeConfig = ( ? 'organization' : 'default' + if (lightThemes.includes(theme ?? '') || usingDefaultHeader) { + return { themeConfig: { footerVersion } } + } + if (blueberryThemes.includes(theme ?? '')) return { themeConfig: { @@ -191,7 +195,6 @@ export const getThemeConfig = ( footerVersion, }, } - if (darkThemes.includes(theme ?? '')) { return { themeConfig: { @@ -202,10 +205,6 @@ export const getThemeConfig = ( } } - if (lightThemes.includes(theme ?? '') || usingDefaultHeader) { - return { themeConfig: { footerVersion } } - } - return { themeConfig: { headerColorScheme: 'white', @@ -479,13 +478,20 @@ export const OrganizationHeader: React.FC< /> ) case 'hms': - return ( + return n('usingDefaultHeader', false) ? ( + + ) : ( ) - case 'rikissaksoknari': return ( Date: Wed, 18 Sep 2024 10:18:01 +0000 Subject: [PATCH 4/6] fix: add back in feature flag check for passkeys on logout (#16047) --- apps/native/app/src/stores/auth-store.ts | 40 +++++++++++++++--------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/apps/native/app/src/stores/auth-store.ts b/apps/native/app/src/stores/auth-store.ts index f9693962a082..83e21a4d5ddf 100644 --- a/apps/native/app/src/stores/auth-store.ts +++ b/apps/native/app/src/stores/auth-store.ts @@ -68,21 +68,32 @@ const getAppAuthConfig = () => { } } -const clearPasskey = async () => { +const clearPasskey = async (userNationalId?: string) => { // Clear passkey if exists - preferencesStore.setState({ - hasCreatedPasskey: false, - hasOnboardedPasskeys: false, - lastUsedPasskey: 0, - }) - - const client = await getApolloClientAsync() - try { - await client.mutate({ - mutation: DeletePasskeyDocument, + const isPasskeyEnabled = await featureFlagClient?.getValueAsync( + 'isPasskeyEnabled', + false, + userNationalId ? { identifier: userNationalId } : undefined, + ) + + if (isPasskeyEnabled) { + preferencesStore.setState({ + hasCreatedPasskey: false, + hasOnboardedPasskeys: false, + lastUsedPasskey: 0, }) - } catch (e) { - console.error('Failed to delete passkey', e) + + const client = await getApolloClientAsync() + try { + await client.mutate< + DeletePasskeyMutation, + DeletePasskeyMutationVariables + >({ + mutation: DeletePasskeyDocument, + }) + } catch (e) { + console.error('Failed to delete passkey', e) + } } } @@ -188,7 +199,8 @@ export const authStore = create((set, get) => ({ notificationsStore.getState().reset() // Clear passkey if exists - await clearPasskey() + const userNationalId = get().userInfo?.nationalId + await clearPasskey(userNationalId) const appAuthConfig = getAppAuthConfig() // eslint-disable-next-line @typescript-eslint/no-non-null-assertion From 560a5c13f8184863dd07ee7ddffd656b9de468f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9E=C3=B3rey=20J=C3=B3na?= Date: Wed, 18 Sep 2024 10:27:46 +0000 Subject: [PATCH 5/6] chore(native-app): bump version to 1.4.2 (#16041) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/native/app/android/app/build.gradle | 2 +- apps/native/app/ios/IslandApp/Info.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/native/app/android/app/build.gradle b/apps/native/app/android/app/build.gradle index bcdf28ccfabb..c7e8ce717a86 100644 --- a/apps/native/app/android/app/build.gradle +++ b/apps/native/app/android/app/build.gradle @@ -103,7 +103,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode getMyVersionCode(143) - versionName "1.4.1" + versionName "1.4.2" manifestPlaceholders = [ appAuthRedirectScheme: "is.island.app" // project.config.get("BUNDLE_ID_ANDROID") ] diff --git a/apps/native/app/ios/IslandApp/Info.plist b/apps/native/app/ios/IslandApp/Info.plist index 24d36d07c197..bc7ae29607a2 100644 --- a/apps/native/app/ios/IslandApp/Info.plist +++ b/apps/native/app/ios/IslandApp/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.1 + 1.4.2 CFBundleSignature ???? CFBundleURLTypes From 825530d55ff55a3a67c8dcf9dfce3fd2bbde1b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9E=C3=B3rey=20J=C3=B3na?= Date: Wed, 18 Sep 2024 10:35:03 +0000 Subject: [PATCH 6/6] fix(native-app): use replace instead of replaceAll (#16049) * fix: use replace instead of replaceAll * fix: add missing px suffix * fix: update regex --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../app/src/screens/document-detail/document-detail.tsx | 4 ++-- .../app/src/screens/vehicles/components/vehicle-item.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/native/app/src/screens/document-detail/document-detail.tsx b/apps/native/app/src/screens/document-detail/document-detail.tsx index e88c3deae612..0dbd13a225f1 100644 --- a/apps/native/app/src/screens/document-detail/document-detail.tsx +++ b/apps/native/app/src/screens/document-detail/document-detail.tsx @@ -45,7 +45,7 @@ const PdfWrapper = styled.View` flex: 1; background-color: ${dynamicColor('background')}; ` -const regexForBr = /
*\\?>/g +const regexForBr = //gi // Styles for html documents const useHtmlStyles = () => { @@ -377,7 +377,7 @@ export const DocumentDetailScreen: NavigationFunctionComponent<{ html: Document.content?.value ? // Removing all
tags to fix a bug in react-native that renders
with too much vertical space // https://github.com/facebook/react-native/issues/32062 - `${htmlStyles}${Document.content?.value.replaceAll( + `${htmlStyles}${Document.content?.value.replace( regexForBr, '', )}` diff --git a/apps/native/app/src/screens/vehicles/components/vehicle-item.tsx b/apps/native/app/src/screens/vehicles/components/vehicle-item.tsx index 0ac33169fe71..100dc377366b 100644 --- a/apps/native/app/src/screens/vehicles/components/vehicle-item.tsx +++ b/apps/native/app/src/screens/vehicles/components/vehicle-item.tsx @@ -15,7 +15,7 @@ type VehicleListItem = NonNullable< >[0] const Cell = styled(TouchableHighlight)` - margin-bottom: ${({ theme }) => theme.spacing[2]}; + margin-bottom: ${({ theme }) => theme.spacing[2]}px; border-radius: ${({ theme }) => theme.border.radius.extraLarge}; `