-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(onboarding): Add setup steps to onboarding (#291)
* feat: Add progress bar * feat(onboarding): Start adding new onboarding pages with settings * refactor(progress): Update progress bar colours * feat: Add onboarding page and header components * feat: Implement onboarding with settings pages * chore(i18n): Update Hungarian translations
- Loading branch information
Showing
13 changed files
with
248 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup lang="ts"> | ||
const props = defineProps({ | ||
progress: { | ||
type: Number, | ||
default: 1.0, | ||
validator: (value: number) => value >= 0.0 && value <= 1.0 | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="rounded-full h-2 bg-surface-variant dark:bg-surface-darkvariant overflow-hidden ring-1 ring-inset ring-surface-onlight ring-opacity-10 dark:ring-surface-ondark dark:ring-opacity-25"> | ||
<div class="rounded-full bg-primary dark:bg-primary-dark w-full h-full transition-all" :style="{ 'translate': `-${100 - 100 * props.progress}% 0` }" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup lang="ts"> | ||
const props = defineProps({ | ||
text: { | ||
type: String, | ||
required: true | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="px-6 py-3 flex gap-2 text-lg flex-row justify-center items-center"> | ||
<slot /> | ||
<span v-text="props.text" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class="overflow-auto px-6 py-2 flex flex-col justify-start items-center gap-2 -mx-6"> | ||
<slot /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script setup lang="ts"> | ||
import { LanguageIcon } from 'vue-tabler-icons' | ||
import OnboardingPage from './onboardingPage.vue' | ||
import OnboardingHeader from './onboardingHeader.vue' | ||
import OptionGroup from '~~/components/base/optionGroup.vue' | ||
import { useSettings } from '~~/stores/settings' | ||
const settingsStore = useSettings() | ||
</script> | ||
|
||
<template> | ||
<OnboardingPage> | ||
<div class="py-3 flex gap-2 text-3xl flex-col md:flex-row justify-center items-center"> | ||
<img class="w-10" src="/favicon.svg" role="note"> | ||
<span v-text="$t('tutorials.onboarding.pages.0.title')" /> | ||
</div> | ||
|
||
<div class="text-center -mt-3 mb-4" v-text="$t('tutorials.onboarding.pages.0.onboarding_invite')" /> | ||
|
||
<OnboardingHeader :text="$t('tutorials.onboarding.pages.0.heading')"> | ||
<LanguageIcon :size="42" /> | ||
</OnboardingHeader> | ||
|
||
<OptionGroup | ||
class="w-full" | ||
:choices="$languages" | ||
:value="settingsStore.lang" | ||
:override-text="{ title: $languages, description: {} }" | ||
@input="(newLang) => { settingsStore.lang = newLang }" | ||
/> | ||
</OnboardingPage> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script setup lang="ts"> | ||
import { ClockPlayIcon } from 'vue-tabler-icons' | ||
import OptionGroup from '~~/components/base/optionGroup.vue' | ||
import { useSettings } from '~~/stores/settings'; | ||
const settingsStore = useSettings() | ||
</script> | ||
|
||
<template> | ||
<div class="h-96 flex flex-col justify-start items-center gap-2"> | ||
<div class="px-6 py-3 flex gap-2 text-lg flex-row justify-center items-center"> | ||
<ClockPlayIcon :size="42" /> | ||
Set your timer | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { ClockPlayIcon } from 'vue-tabler-icons' | ||
import OnboardingPage from './onboardingPage.vue' | ||
import OnboardingHeader from './onboardingHeader.vue' | ||
import OptionGroup from '~~/components/base/optionGroup.vue' | ||
import { useSettings } from '~~/stores/settings' | ||
const settingsStore = useSettings() | ||
</script> | ||
|
||
<template> | ||
<OnboardingPage> | ||
<OnboardingHeader :text="$t('tutorials.onboarding.pages.1.heading')"> | ||
<ClockPlayIcon :size="42" /> | ||
</OnboardingHeader> | ||
|
||
<div class="text-center -mt-3 mb-4" v-text="$t('tutorials.onboarding.pages.1.text')" /> | ||
|
||
<OptionGroup :value="settingsStore.getActiveSchedulePreset" :choices="{ 'default': 'default', 'easy': 'easy', 'advanced': 'advanced', 'workaholic': 'workaholic' }" class="w-full" translation-key="timerpreset" @input="(selectedPreset) => { settingsStore.applyPreset(selectedPreset) }" /> | ||
</OnboardingPage> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script setup lang="ts"> | ||
import { BrightnessDownIcon, DeviceWatchIcon } from 'vue-tabler-icons' | ||
import OnboardingPage from './onboardingPage.vue' | ||
import OnboardingHeader from './onboardingHeader.vue' | ||
import OptionGroup from '~~/components/base/optionGroup.vue' | ||
import { TimerType, useSettings } from '~~/stores/settings' | ||
const settingsStore = useSettings() | ||
const currentTheme = computed(() => settingsStore.visuals.darkMode ? 'dark' : 'light') | ||
const currentTimer = computed(() => settingsStore.currentTimer as string) | ||
</script> | ||
|
||
<template> | ||
<OnboardingPage> | ||
<OnboardingHeader :text="$t('tutorials.onboarding.pages.2.theme.heading')"> | ||
<BrightnessDownIcon :size="42" /> | ||
</OnboardingHeader> | ||
|
||
<OptionGroup :value="currentTheme" :choices="{ 'light': 'Light', 'dark': 'Dark' }" translation-key="tutorials.onboarding.pages.2.theme.options" class="w-full" @input="(newValue) => settingsStore.visuals.darkMode = (newValue === 'dark')" /> | ||
|
||
<OnboardingHeader :text="$t('tutorials.onboarding.pages.2.display.heading')"> | ||
<DeviceWatchIcon :size="42" /> | ||
</OnboardingHeader> | ||
|
||
<OptionGroup :value="currentTimer" :choices="{ 'traditional': 'Traditional', 'approximate': 'Approximate', 'percentage': 'Percentage' }" translation-key="settings.values.currentTimer" class="w-full" @input="(newValue) => settingsStore.currentTimer = newValue as TimerType" /> | ||
</OnboardingPage> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script setup lang="ts"> | ||
import OptionGroup from '~~/components/base/optionGroup.vue' | ||
</script> | ||
|
||
<template> | ||
<div class="h-96 flex flex-col"> | ||
<OptionGroup :choices="{'pomodoro': 'Pomodoro', 'short': 'Short times'}" :value="'short'" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup lang="ts"> | ||
import { InfoCircleIcon } from 'vue-tabler-icons' | ||
import OnboardingHeader from './onboardingHeader.vue' | ||
import OnboardingPage from './onboardingPage.vue' | ||
</script> | ||
|
||
<template> | ||
<OnboardingPage> | ||
<OnboardingHeader :text="$t('tutorials.onboarding.pages.3.heading')"> | ||
<InfoCircleIcon :size="42" /> | ||
</OnboardingHeader> | ||
|
||
<div class="text-center" v-text="$t('tutorials.onboarding.pages.3.text')" /> | ||
</OnboardingPage> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup lang="ts"> | ||
import { HeartHandshakeIcon } from 'vue-tabler-icons' | ||
import OnboardingHeader from './onboardingHeader.vue' | ||
import OnboardingPage from './onboardingPage.vue' | ||
</script> | ||
|
||
<template> | ||
<OnboardingPage> | ||
<OnboardingHeader :text="$t('tutorials.onboarding.pages.support.heading')"> | ||
<HeartHandshakeIcon :size="42" /> | ||
</OnboardingHeader> | ||
|
||
<div class="text-center" v-text="$t('tutorials.onboarding.pages.support.text')" /> | ||
|
||
<div class="text-center" v-text="$t('tutorials.onboarding.pages.support.hint')" /> | ||
</OnboardingPage> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters