diff --git a/src/styles/components/helptour.scss b/src/styles/components/helptour.scss index e32ade3d..f7ee8d57 100644 --- a/src/styles/components/helptour.scss +++ b/src/styles/components/helptour.scss @@ -26,10 +26,10 @@ $darken-tour-opacity: .4; .helptour { .tourControl { - top: initial; - bottom: 10px; - left: 10px; - max-width: none; + text-align: center; + hr { + margin: 10px 0; + } } .in { display: block; diff --git a/static/js/directives/helptour.js b/static/js/directives/helptour.js index d1a2095b..4941af78 100644 --- a/static/js/directives/helptour.js +++ b/static/js/directives/helptour.js @@ -28,8 +28,6 @@ define(['jquery', 'angular', 'text!partials/helpoverlay.html', 'text!partials/he var isToggled = false; var displayTime = 12000; var shown = localStorage.getItem('mediastream-helptour'); - var timeoutAutoStepsIn = []; - var timeoutAutoStepsOut = []; var menus = {}; var backupLayout = null; var tourLayout = { @@ -155,52 +153,13 @@ define(['jquery', 'angular', 'text!partials/helpoverlay.html', 'text!partials/he toggleTargetMenu(); $($scope.steps[$scope.currentIndex]).addClass('in'); }; - var autoStep = function(i, elem, startIndex) { - var inTime = startIndex ? displayTime * (i - startIndex) : displayTime * i; - var outTime = startIndex ? displayTime * ((i + 1) - startIndex) : displayTime * (i + 1); - timeoutAutoStepsIn[i] = $timeout(function() { - inStep(i); - }, inTime, true); - timeoutAutoStepsOut[i] = $timeout(function() { - if ($scope.steps.length === i + 1) { - $scope.togglePause(); - } else { - outStep(); - } - }, outTime, true); - }; - var autoTour = function(startIndex) { - if (!angular.isNumber(startIndex)) { - startIndex = 0; - // start again from the beginning and ensure window is hidden - } else if ($scope.currentIndex > $scope.steps.length - 2) { - outStep(); - startIndex = 0; - } else { - outStep(); - } - $scope.steps.each(function(i, x) { - if (i >= startIndex) { - autoStep(i, x, startIndex); - } - }); - }; - var manualTour = function() { - timeoutAutoStepsIn.forEach(function(promise) { - $timeout.cancel(promise); - }); - timeoutAutoStepsOut.forEach(function(promise) { - $timeout.cancel(promise); - }); - }; var initTour = function() { backupLayout = angular.extend({}, $scope.layout); menus.initRoomLayout(); - autoTour(); + $scope.startTour(); }; var reset = function() { outStep(); - $scope.tourPaused = false; $scope.currentIndex = null; $scope.layout = angular.extend($scope.layout, backupLayout); }; @@ -217,48 +176,23 @@ define(['jquery', 'angular', 'text!partials/helpoverlay.html', 'text!partials/he size: 'sm' }); }; - $scope.tourPaused = false; $scope.currentIndex = null; - $scope.stepBeginning = function() { - if (!$scope.tourPaused) { - $scope.togglePause(); + $scope.startTour = function() { + if ($scope.currentIndex === $scope.steps.length - 1) { + outStep(); + $scope.currentIndex = 0; } - outStep(); inStep(0); }; $scope.stepBackward = function() { - if (!$scope.tourPaused) { - $scope.togglePause(); - } outStep(); inStep($scope.currentIndex - 1); }; $scope.stepForward = function() { - if (!$scope.tourPaused) { - $scope.togglePause(); - } outStep(); inStep($scope.currentIndex + 1); }; - $scope.stepEnd = function() { - if (!$scope.tourPaused) { - $scope.togglePause(); - } - outStep(); - inStep($scope.steps.length - 1); - }; - $scope.togglePause = function() { - $scope.tourPaused = !$scope.tourPaused; - if ($scope.tourPaused) { - manualTour(); - } else { - autoTour($scope.currentIndex + 1); - } - }; $scope.exitTour = function() { - if (!$scope.tourPaused) { - manualTour(); - } reset(); }; $scope.$on('showHelpTour', function() { diff --git a/static/partials/helpoverlay.html b/static/partials/helpoverlay.html index 59a42661..d48daa94 100644 --- a/static/partials/helpoverlay.html +++ b/static/partials/helpoverlay.html @@ -5,18 +5,10 @@

{{_('A room')}}{{_('Window %d of %d', currentIndex + 1, steps.length)}}

{{_('Place to meet people(buddy). Change rooms here and easily send friends a room link with the social media links provided. Not all room names are available and certain characters are automatically removed.')}} -
-
-
- - -
-
- - - - -
+
+
+ +
@@ -25,18 +17,10 @@

{{_('Buddy List')}}{{_('Window %d of %d', currentIndex + 1, steps.length)}}

{{_('List of all buddys in the same room and saved contacts.')}} -
-
-
- - -
-
- - - - -
+
+
+ +
@@ -45,18 +29,10 @@

{{_('A buddy')}}{{_('Window %d of %d', currentIndex + 1, steps.length)}}

{{_('An individual in the same room. If someone is in the same room, a buddy card will be shown. Simply hover over the card to callout chat/call actions. If a star appears next to a buddy comment, the buddy is logged in. When the star is filled the buddy is a contact. Click the star to add a buddy as a contact or remove a contact.')}} -
-
-
- - -
-
- - - - -
+
+
+ +
@@ -65,18 +41,10 @@

{{_('Chat sessions')}}{{_('Window %d of %d', currentIndex + 1, steps.length)}}

{{_('Group and individual chat sessions. Chat with everyone in a room or chat individually. In group chats you are able to share files and your current location. In individual chats you are also able to start a video call.')}} -
-
-
- - -
-
- - - - -
+
+
+ +
@@ -85,18 +53,10 @@

{{_('Settings')}}{{_('Window %d of %d', currentIndex + 1, steps.length)}}

{{_('Choose a name, upload a picture, signin, and customize you experience.')}} -
-
-
- - -
-
- - - - -
+
+
+ +
@@ -106,18 +66,10 @@

{{_('Media permission')}}{{_('Window %d of %d', currentIndex + 1, steps.length)}}

{{_('Everytime a call is made or recieved a permission window from the browser will show up like this. To make a call you must accept, otherwise the browser cannot use your wecam and video to make a call. This is a security and privacy precaution.')}} -
-
-
- - -
-
- - - - -
+
+
+ +
@@ -126,7 +78,7 @@
{{_('Welcome to spreed-webrtc! Start calling and chatting now.')}} - +