Skip to content

Commit

Permalink
Merge pull request #227 from nextcloud/bugfix/224/video-polish
Browse files Browse the repository at this point in the history
Firstrun video polishing
  • Loading branch information
rullzer committed Dec 22, 2019
2 parents 793b15e + 3a3939c commit d9cc399
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
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

0 comments on commit d9cc399

Please sign in to comment.