Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quite a few users have posted questions on our Discord channel or have sent emails about things we already have a video explainer for. Going forward, we will identify places in Scrite where users may need to know about such videos the most and suggest them to watch it.
- Loading branch information
Showing
13 changed files
with
288 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) TERIFLIX Entertainment Spaces Pvt. Ltd. Bengaluru | ||
** Author: Prashanth N Udupa (prashanth.udupa@teriflix.com) | ||
** | ||
** This code is distributed under GPL v3. Complete text of the license | ||
** can be found here: https://www.gnu.org/licenses/gpl-3.0.txt | ||
** | ||
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
** | ||
****************************************************************************/ | ||
|
||
import QtQuick 2.15 | ||
import io.scrite.components 1.0 | ||
|
||
QtObject { | ||
property string tipName | ||
property var helpTip: Scrite.user.helpTips[tipName] | ||
property bool tipShown: helpNotificationSettings.isTipShown(tipName) | ||
property bool enabled: true | ||
|
||
Notification.title: helpTip ? helpTip.title : "" | ||
Notification.image: helpTip ? helpTip.image.url : "" | ||
Notification.active: enabled && helpTip && !tipShown | ||
Notification.text: helpTip ? helpTip.text : "" | ||
Notification.autoClose: false | ||
Notification.buttons: { | ||
var ret = [] | ||
if(helpTip) | ||
helpTip.buttons.forEach( (item) => { | ||
ret.push(item.text) | ||
}) | ||
return ret | ||
} | ||
Notification.onImageClicked: { | ||
if(helpTip) { | ||
if(helpTip.image.action !== "$dismiss") | ||
Qt.openUrlExternally(helpTip.image.action) | ||
markTipAsShown() | ||
} | ||
} | ||
|
||
Notification.onButtonClicked: (buttonIndex) => { | ||
if(helpTip) { | ||
const button = helpTip.buttons[buttonIndex] | ||
if(button.action !== "$dismiss") | ||
Qt.openUrlExternally(button.action) | ||
} | ||
|
||
markTipAsShown() | ||
} | ||
|
||
function markTipAsShown() { | ||
helpNotificationSettings.markTipAsShown(tipName) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.