Skip to content

Commit

Permalink
fix: deployments node version and last didroom-components (#70)
Browse files Browse the repository at this point in the history
* fix: deployments node version

* chores: update to last didroom components

* fix: use event for back button in header
  • Loading branch information
phoebus-84 authored Sep 10, 2024
1 parent 272cd19 commit e256fd1
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_alpha_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.8.1
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Setup Node.js 18
uses: actions/setup-node@v4
with:
node-version: 20.8.1
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
/>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@didroom/components@1.29.1/dist/didroom-components/didroom-components.esm.js"
src="https://cdn.jsdelivr.net/npm/@didroom/components@1.29.3/dist/didroom-components/didroom-components.esm.js"
></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@didroom/components@1.29.1/dist/didroom-components/didroom-components.css"
href="https://cdn.jsdelivr.net/npm/@didroom/components@1.29.3/dist/didroom-components/didroom-components.css"
/>
</svelte:head>

Expand Down
24 changes: 14 additions & 10 deletions src/routes/[[lang]]/(protected)/(tabs)/profile/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
const gotoLanguageSettings = () => goto('/languages');
const gotoAccountSettings = () => goto('/user-settings');
</script>

<d-tab-page tab="profile" title={m.Profile()} settings>
Expand All @@ -40,19 +41,22 @@
</div>
<div slot="settings">
<d-settings-menu
accountSettings={m.Account_Settings()}
securityAndAuthentication={m.Security_and_Authentication()}
notificationsSettings={m.Notifications_Settings()}
account-settings={m.Account_Settings()}
security-and-authentication={m.Security_and_Authentication()}
notifications-settings={m.Notifications_Settings()}
languages={m.Languages()}
support={m.Support()}
privacyPolicy={m.Privacy_Policy()}
logOut={m.Log_Out()}
privacy-policy={m.Privacy_Policy()}
log-out={m.Log_Out()}
{version}
developedBy={m.Developed_by_Forkbomb()}
{logoutCB}
{gotoLanguageSettings}
{gotoAccountSettings}
{openAppSettings}
developed-by={m.Developed_by_Forkbomb()}
on:accountSettingsClick={() => goto('/user-settings')}
on:languageSettingsClick={() => {
console.log("pppp")
goto('/languages')
}}
on:appSettingsClick={() => openAppSettings()}
on:logoutClick={() => goto('/logout')}
/>
</div>
<div class="pb-24" />
Expand Down
2 changes: 1 addition & 1 deletion src/routes/[[lang]]/(protected)/[id]/verify/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
}
</script>

<d-header back-button backFunction={() => goto('/home')}>{m.VERIFICATION_QR()}</d-header>
<d-header back-button on:backButtonClick={() => goto('/home')}>{m.VERIFICATION_QR()}</d-header>
<ion-content fullscreen class="ion-padding">
<div class="flex flex-col justify-center gap-8 text-center">
<d-text size="xl">Ask holders to scan this QR using their Wallet</d-text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
</script>

<d-header back-button backFunction={back}>Verification</d-header>
<d-header back-button on:backButtonClick={back}>Verification</d-header>
<ion-content class="ion-padding">
<d-feedback {...feedback} />
<div class="flex w-full flex-row items-start justify-around">
Expand Down
16 changes: 9 additions & 7 deletions src/routes/[[lang]]/(protected)/languages/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { setLanguagePreference } from '$lib/preferences/lang';
import { availableLanguageTags } from '$paraglide/runtime';
const back = () => goto('/profile');
const recordLanguages = {
en: 'English',
es: 'Español',
Expand All @@ -12,10 +13,15 @@
it: 'Italiano'
};
$: activeLanguage = i18n.getLanguageFromUrl($page.url);
const back = () => goto('/profile')
function handleLanguageChange(language: 'en' | 'it') {
setLanguagePreference(language).then(() => {
activeLanguage = language;
window.location.replace(`/${language}/languages`);
});
}
</script>

<d-header back-button backFunction={back}>
<d-header back-button on:backButtonClick={back}>
{m.Languages()}
</d-header>

Expand All @@ -33,11 +39,7 @@
{:else}
<button
class="border-b-stroke flex h-16 w-full items-center justify-between gap-2.5 rounded-lg border-b border-solid px-5 py-8"
on:click={async () => {
await setLanguagePreference(language);
activeLanguage = language;
window.location.replace(`/${language}/languages`);
}}
on:click={() => handleLanguageChange(language)}
>
<span class="flex items-center self-stretch">
{recordLanguages[language]}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/[[lang]]/(protected)/user-settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
let name = form.fields.name?.value;
</script>

<d-header back-button backFunction={() => window.history.back()}>User Settings</d-header>
<d-header back-button on:backButtonClick={() => window.history.back()}>User Settings</d-header>
<d-loading {loading}> </d-loading>

<div class="ion-padding flex w-full flex-col items-center gap-6">
Expand Down

0 comments on commit e256fd1

Please sign in to comment.