Skip to content

Commit

Permalink
Merge pull request #58 from MarcinOrlowski/flip-fix-57
Browse files Browse the repository at this point in the history
Flip handling fix. Closes #57
  • Loading branch information
MarcinOrlowski authored Feb 20, 2023
2 parents da2f349 + 38a1d4f commit 30d7c55
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 238 deletions.
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
* 1.6.4 (2023-02-20)
* Fixed incorrect handling of multiple `{flip}` entries placed in the same line in template markup [#57].

* 1.6.3 (2022-09-02)
* Fixed layout config control buttons being rendered in unusable form [#35]
* Fixed layout config control buttons being rendered in unusable form [#35].

* 1.6.2 (2021-12-12)
* Fixed broken calendar view.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,5 @@ kquitapp5 plasmashell ; kstart5 plasmashell

## License ##

* Written and copyrighted &copy;2020-2022 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
* Written and copyrighted &copy;2020-2023 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
* Weekday Grid widget is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
4 changes: 3 additions & 1 deletion artwork/screenshot.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
plasmoidviewer window width: 774 px
# Screenshots params

Made using plasmoidviewer window with width: 774 px
103 changes: 0 additions & 103 deletions bin/common.sh

This file was deleted.

61 changes: 0 additions & 61 deletions bin/configure.sh

This file was deleted.

50 changes: 0 additions & 50 deletions bin/release.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/contents/js/DateTimeFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* DateTimeFormatter - JS helper library
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/datetimeformatter
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/AboutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Weekday Grid widget for KDE
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/weekday-plasmoid
*/
Expand Down
9 changes: 4 additions & 5 deletions src/contents/ui/HtmlClock.qml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* HTML Clock Plasmoid
*
* Configurable HTML styled clock plasmoid.
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down Expand Up @@ -84,14 +82,15 @@ ColumnLayout {
}

function handleFlip(text) {
var reg = new RegExp('\{flip(:(.+)){2}\}', 'g')
var reg = new RegExp('\{flip:(.+?):(.+?)\}', 'gi')
var matches = text.match(reg)
if (matches !== null) {
var even = (new Date()).getSeconds() % 2
var valReg = new RegExp('^\{flip:(.+):(.+)\}$', '')
var valReg = new RegExp('^\{flip:(.+?):(.+?)\}$', 'i')
matches.forEach(function (val, idx) {
var valMatch = val.match(valReg)
text = text.replace(val, valMatch[even ? 1 : 2])
// console.log(`XXXXX val: ${val}, 1: ${valMatch[1]}, 2: ${valMatch[2]}`)
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/NotificationManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/UpdateChecker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/config/Calendar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2021 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/config/General.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/config/Layout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/config/LayoutSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/config/Tooltip.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/lib/ClickableLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Weekday Grid widget for KDE
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/weekday-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/lib/CopyButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/lib/CopyrightLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Weekday Grid widget for KDE
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/weekday-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/lib/FontSelector.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Weekday Grid widget for KDE
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/weekday-plasmoid
*/
Expand Down
2 changes: 1 addition & 1 deletion src/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* HTML Clock Plasmoid
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2020-2022 Marcin Orlowski
* @copyright 2020-2023 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link https://github.com/MarcinOrlowski/html-clock-plasmoid
*/
Expand Down
Loading

0 comments on commit 30d7c55

Please sign in to comment.