Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css/firstrunwizard-style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/firstrunwizard-about.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-DWPJOU1j.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-DKjyRKQe-BOPnIq6D.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-DfQpeuDm.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as u}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";import{s as i}from"./index-DfQpeuDm.chunk.mjs";document.addEventListener("DOMContentLoaded",function(){const e=()=>document.querySelector("#firstrunwizard_about"),t=()=>{e().addEventListener("click",async function(o){o.stopPropagation(),o.preventDefault();const n=document.querySelector('[aria-controls="header-menu-user-menu"]')??void 0,{open:r}=await u(async()=>{const{open:a}=await import("./main-DWPJOU1j.chunk.mjs");return{open:a}},__vite__mapDeps([0,1,2]),import.meta.url);r(n),OC.hideMenus(()=>!1)})};e()?t():i("core:user-menu:mounted",t)});
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-DvW484YT.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-DKjyRKQe-BOPnIq6D.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-DfQpeuDm.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as u}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";import{s as i}from"./index-DfQpeuDm.chunk.mjs";document.addEventListener("DOMContentLoaded",function(){const e=()=>document.querySelector("#firstrunwizard_about"),t=()=>{e().addEventListener("click",async function(o){o.stopPropagation(),o.preventDefault();const n=document.querySelector('[aria-controls="header-menu-user-menu"]')??void 0,{open:r}=await u(async()=>{const{open:a}=await import("./main-DvW484YT.chunk.mjs");return{open:a}},__vite__mapDeps([0,1,2]),import.meta.url);r(n),OC.hideMenus(()=>!1)})};e()?t():i("core:user-menu:mounted",t)});
//# sourceMappingURL=firstrunwizard-about.mjs.map
4 changes: 2 additions & 2 deletions js/firstrunwizard-activate.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-DWPJOU1j.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-DKjyRKQe-BOPnIq6D.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-DfQpeuDm.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as t}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";document.addEventListener("DOMContentLoaded",async function(){(await t(()=>import("./main-DWPJOU1j.chunk.mjs"),__vite__mapDeps([0,1,2]),import.meta.url)).open()});
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-DvW484YT.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-DKjyRKQe-BOPnIq6D.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-DfQpeuDm.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as t}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";document.addEventListener("DOMContentLoaded",async function(){(await t(()=>import("./main-DvW484YT.chunk.mjs"),__vite__mapDeps([0,1,2]),import.meta.url)).open()});
//# sourceMappingURL=firstrunwizard-activate.mjs.map
13 changes: 0 additions & 13 deletions js/main-DWPJOU1j.chunk.mjs

This file was deleted.

13 changes: 13 additions & 0 deletions js/main-DvW484YT.chunk.mjs

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/components/SlideShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<!-- Back button on mobile if not first page -->
<NcButton
v-if="!isFirstPage && isMobile"
v-if="!isFirstPage"
:aria-label="t('firstrunwizard', 'Go to previous page')"
:class="$style.button_back"
variant="tertiary-no-background"
Expand Down Expand Up @@ -77,7 +77,6 @@ import type { IPage } from '../pages.ts'
import { mdiArrowLeft, mdiArrowRight, mdiClose } from '@mdi/js'
import { translate as t } from '@nextcloud/l10n'
import { imagePath } from '@nextcloud/router'
import { useIsSmallMobile } from '@nextcloud/vue/composables/useIsMobile'
import { computed, ref, useCssModule, watch } from 'vue'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'
Expand All @@ -91,8 +90,6 @@ const emit = defineEmits<{
(e: 'update:current-index', index: number): void
}>()

const isMobile = useIsSmallMobile()

/**
* True if the transition effect should be reversed (e.g. going back)
*/
Expand Down
32 changes: 10 additions & 22 deletions src/views/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
size="normal"
no-close
:dark="!isMobile"
:has-next
:has-previous
:set-return-focus
@close="close"
@next="currentPage += 1"
Expand All @@ -33,12 +31,15 @@ import axios from '@nextcloud/axios'
import { loadState } from '@nextcloud/initial-state'
import { generateUrl } from '@nextcloud/router'
import { useIsSmallMobile } from '@nextcloud/vue/composables/useIsMobile'
import { computed, ref, watchEffect } from 'vue'
import { ref, watchEffect } from 'vue'
import NcModal from '@nextcloud/vue/components/NcModal'
import IntroAnimation from '../components/pages/IntroAnimation.vue'
import SlideShow from '../components/SlideShow.vue'
import pages from '../pages.ts'

// Exposes open and close functions from the component
defineExpose({ open, close })

const isMobile = useIsSmallMobile()
/** This is set to true in case the user already received the wizard but Nextcloud was updated to show the changelog only */
const showChangelogOnly = loadState<boolean>('firstrunwizard', 'changelogOnly', false)
Expand All @@ -49,16 +50,12 @@ const showModal = ref(false)
const currentPage = ref<number | null>(null)
const setReturnFocus = ref<HTMLElement | SVGElement | string>()

/**
* If the "previous" button of the modal should be shown
* Disable on mobile and only show if there is a previous page (the intro animation does not count)
*/
const hasPrevious = computed(() => !isMobile.value && currentPage.value !== null && currentPage.value > 0)
/**
* If the "next" button of the modal should be shown
* Disable on mobile and only show if there is a next page
*/
const hasNext = computed(() => !isMobile.value && currentPage.value !== null && currentPage.value < (pages.length - 1))
// If the current page index is set to -1 then close the modal
watchEffect(() => {
if (currentPage.value === -1) {
close()
}
})

/**
* Open the first run wizard modal
Expand All @@ -81,15 +78,6 @@ function close() {
// Important: Do not show again automatically
axios.delete(generateUrl('/apps/firstrunwizard/wizard'))
}
// Exposes open and close functions from the component
defineExpose({ open, close })

// If the current page index is set to -1 then close the modal
watchEffect(() => {
if (currentPage.value === -1) {
close()
}
})
</script>

<style lang="scss">
Expand Down
Loading