Skip to content

Commit

Permalink
Merge pull request Dashticz#835 from lokonli/imprAutoSwipe
Browse files Browse the repository at this point in the history
Improved auto swipe behavior
  • Loading branch information
lokonli authored Apr 14, 2021
2 parents 214db18 + ad23250 commit fbf8732
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 46 deletions.
16 changes: 8 additions & 8 deletions docs/dashticzconfiguration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ Config parameters
| ``0`` = Swipe by touch disabled
| ``1`` = Swipe by touch enabled
* - auto_swipe_back_to
- | when no activity, swipe back to the selected page
| ``1..100`` = page number
- | when no activity, swipe back to the selected page. Also see :ref:`autoswipe`
| ``1..100`` = page number (default: 1)
* - auto_swipe_back_after
- | The amount of seconds after which Dashticz will swipe back to the default page, as defined by ``auto_swipe_back_to``
| ``0`` = No auto swiping back (default)
| ``1..9999`` = Swipe back after <value> seconds
- | The amount of seconds after which Dashticz will start with auto swipe/auto slide. Also see :ref:`autoswipe`
| ``0`` = No auto swiping (default)
| ``1..9999`` = Start auto swipe back after <value> seconds the last screen touch/mouse activity.
* - auto_slide_pages
- | Loop all pages and change page every x (min. 5) seconds,
| set ``config['auto_swipe_back_after'] = 0``. Also see screen parameter ``auto_slide_page``
| ``false`` = No auto slide (default)
- | Loop all pages and change page every x seconds,
| set ``config['auto_swipe_back_to'] = 0``. Also see :ref:`autoswipe`
| ``0`` = Auto slide is disabled. (=default)
| ``1..9999`` = Auto slide to the next page every <value> second
* - slide_effect
- | Control which Screenslider effect you prefer
Expand Down
16 changes: 12 additions & 4 deletions docs/releasenotes/releasenotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ For Dashticz's **master** version Release Notes go to: https://dashticz.readthed
Recent changes
---------------

v3.8.1 Beta (14-4-2021)
-----------------------

Enhancements
~~~~~~~~~~~~

* Change in auto swipe behavior. See :ref:`autoswipe`.

v3.8.0 Beta (10-4-2021)
-----------------------

Enhancements
~~~~~~~~~~~~

* Auto slide timer configurable per screen via screen parameter ``auto_slide_page``


v3.8 Master (9-4-2021)
Expand All @@ -25,10 +37,6 @@ See the upgrade instructions at v3.7.2 below.
v3.7.7 Beta (8-4-2021)
------------------------

Enhancements
~~~~~~~~~~~~

* Auto slide timer configurable per screen via screen parameter ``auto_slide_page``

Fixes
~~~~~~
Expand Down
23 changes: 23 additions & 0 deletions docs/screens.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,29 @@ The following config settings are applicable to the standby screen:
| Enter the url for adjusting the brightness when exiting stand-by mode

.. _autoswipe:

Auto swipe, auto slide
~~~~~~~~~~~~~~~~~~~~~~~

Two auto swipe modes exist

1. Auto swipe back to a specific screen (default)
2. Auto slide to the next screen

The 'swipe back' mode is selected by setting ``config['auto_swipe_back_after']`` to non zero.
The 'next screen' mode is selected by setting ``config['auto_slide_pages']`` to non zero.

The initial delay before starting 'next screen' mode, can be set via ``config['auto_swipe_back_after']``.

The default timeout which is used for each screen in 'next screen' mode can be defined by ``config['auto_slide_pages']``.
However, you can overrule this for each screen by adding the ``auto_slide_page`` parameter to the screen block.
In case the screen parameter ``auto_slide_page`` is 0 , then this screen will be skipped during auto slide.

All timeouts (auto_swipe_back_after, auto_slide_pages, auto_slide_page) are defined in seconds.

The auto swipe countdown timer will reset after mouse moves and screen touches.

Styling
-------

Expand Down
83 changes: 52 additions & 31 deletions js/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ var defaultSettings = {
slide_effect: 'slide',
hide_mediaplayer: 0,
auto_swipe_back_to: 1,
auto_slide_pages: 0,
start_page: 1,
auto_positioning: 1,
use_favorites: 0,
Expand All @@ -822,7 +823,7 @@ var defaultSettings = {
vertical_scroll: 2,
enable_swiper: 2,
swiper_touch_move: 1,
auto_swipe_back_after: 10,
auto_swipe_back_after: 0,
standby_after: 0,
selector_instead_of_buttons: 0,
default_news_url: 'http://www.nu.nl/rss/algemeen',
Expand Down
5 changes: 3 additions & 2 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"version": "3.8.0",
"version": "3.8.1",
"branch": "beta",
"last_changes": "Auto slide page parameter per screen",
"last_changes": "Improved auto slide behavior",
"changelog" : {
"3.8.0": "Auto slide page parameter per screen",
"3.8": "Master version"
}
}

0 comments on commit fbf8732

Please sign in to comment.