Skip to content

Commit

Permalink
Merge branch 'main' into regulations-admin/ministry-and-bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Sep 18, 2024
2 parents 830ce13 + 825530d commit 9c74e01
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 31 deletions.
2 changes: 1 addition & 1 deletion apps/native/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
]
Expand Down
2 changes: 1 addition & 1 deletion apps/native/app/ios/IslandApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.1</string>
<string>1.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const PdfWrapper = styled.View`
flex: 1;
background-color: ${dynamicColor('background')};
`
const regexForBr = /<br \/>*\\?>/g
const regexForBr = /<br\s*\/>/gi

// Styles for html documents
const useHtmlStyles = () => {
Expand Down Expand Up @@ -377,7 +377,7 @@ export const DocumentDetailScreen: NavigationFunctionComponent<{
html: Document.content?.value
? // Removing all <br /> tags to fix a bug in react-native that renders <br /> with too much vertical space
// https://github.com/facebook/react-native/issues/32062
`${htmlStyles}${Document.content?.value.replaceAll(
`${htmlStyles}${Document.content?.value.replace(
regexForBr,
'',
)}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};
`

Expand Down
40 changes: 26 additions & 14 deletions apps/native/app/src/stores/auth-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<DeletePasskeyMutation, DeletePasskeyMutationVariables>({
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)
}
}
}

Expand Down Expand Up @@ -188,7 +199,8 @@ export const authStore = create<AuthStore>((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
Expand Down
20 changes: 13 additions & 7 deletions apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ export const getThemeConfig = (
? 'organization'
: 'default'

if (lightThemes.includes(theme ?? '') || usingDefaultHeader) {
return { themeConfig: { footerVersion } }
}

if (blueberryThemes.includes(theme ?? ''))
return {
themeConfig: {
Expand All @@ -191,7 +195,6 @@ export const getThemeConfig = (
footerVersion,
},
}

if (darkThemes.includes(theme ?? '')) {
return {
themeConfig: {
Expand All @@ -202,10 +205,6 @@ export const getThemeConfig = (
}
}

if (lightThemes.includes(theme ?? '') || usingDefaultHeader) {
return { themeConfig: { footerVersion } }
}

return {
themeConfig: {
headerColorScheme: 'white',
Expand Down Expand Up @@ -479,13 +478,20 @@ export const OrganizationHeader: React.FC<
/>
)
case 'hms':
return (
return n('usingDefaultHeader', false) ? (
<DefaultHeader
{...defaultProps}
image={n(
'hmsHeaderImage',
'https://images.ctfassets.net/8k0h54kbe6bj/5pAFV6h9PVzSTQgJY67rbT/3117436e3043bebf720b2f9a7e7619b8/hms-header-image.svg',
)}
/>
) : (
<HmsHeader
organizationPage={organizationPage}
logoAltText={logoAltText}
/>
)

case 'rikissaksoknari':
return (
<RikissaksoknariHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ',
Expand Down
10 changes: 7 additions & 3 deletions libs/services/license/src/lib/licenseCache.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof LicenseConfig>) =>
createRedisCacheManager({
useFactory: (licenseServiceConfig: ConfigType<typeof LicenseConfig>) => {
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],
}

0 comments on commit 9c74e01

Please sign in to comment.