Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firstrun video polishing #227

Merged
merged 2 commits into from
Dec 22, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added img/Nextcloud.mp4
Binary file not shown.
2 changes: 1 addition & 1 deletion js/firstrunwizard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/firstrunwizard.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ protected function registerScripts() {
if ($config->getUserValue($user->getUID(), 'firstrunwizard', 'show', '1') !== '0') {
\OC_Util::addScript('firstrunwizard', 'activate');

/** @var IInitialStateService $initialState */
$initialState = $server->query(IInitialStateService::class);
$initialState->provideLazyInitialState('firstrunwizard', 'hasVideo', function () use ($server) {
$userHome = $server->getUserFolder();
return $userHome->nodeExists('/Nextcloud intro.mp4');
});

$jobList = $this->getContainer()->getServer()->getJobList();
$jobList->add('OCA\FirstRunWizard\Notification\BackgroundJob', ['uid' => $userSession->getUser()->getUID()]);
}
$appHint->sendAppHintNotifications();

/** @var IInitialStateService $initialState */
$initialState = $server->query(IInitialStateService::class);
$initialState->provideLazyInitialState('firstrunwizard', 'hasVideo', function () use ($server) {
// currently unused but let's keep this for now as it might be used later for theming
return true;
});
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export default {
data() {
return {
showModal: false,
withIntro: false,
withIntro: true,
hasVideo,
slides: [],
currentSlide: 0,
Expand Down Expand Up @@ -416,7 +416,7 @@ export default {
console.error('Failed to load slides')
}
},
async open(withIntro = false) {
async open(withIntro = true) {
await this.loadStaticSlides()
this.withIntro = withIntro
this.showModal = true
Expand Down
4 changes: 2 additions & 2 deletions src/components/IntroVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
</template>

<script>
import { generateFilePath, generateRemoteUrl } from '@nextcloud/router'
import { generateFilePath } from '@nextcloud/router'

export default {
name: 'IntroVideo',
data() {
return {
videoMp4: generateRemoteUrl('webdav') + 'Nextcloud%20intro.mp4',
videoMp4: generateFilePath('firstrunwizard', 'img', 'Nextcloud.mp4'),
videoWebm: generateFilePath('firstrunwizard', 'img', 'Nextcloud.webm'),
}
},
Expand Down