diff --git a/Resources/PostBuild.ps1 b/Resources/PostBuild.ps1 index 02c756b0..03fd9026 100644 --- a/Resources/PostBuild.ps1 +++ b/Resources/PostBuild.ps1 @@ -135,7 +135,7 @@ try{ foreach($path in $imports){ $text = [IO.File]::ReadAllText($path) - $text = [Regex]::Replace($text, '#import "(.*)"', { + $text = [Regex]::Replace($text, '#import "(.*?)"', { $importPath = Join-Path $importFolder ($args[0].Groups[1].Value.Trim()) $importStr = [IO.File]::ReadAllText($importPath).TrimEnd() diff --git a/Resources/Scripts/imports/markup/introduction.html b/Resources/Scripts/imports/markup/introduction.html new file mode 100644 index 00000000..fd3283ad --- /dev/null +++ b/Resources/Scripts/imports/markup/introduction.html @@ -0,0 +1,26 @@ +<div id="td-introduction-modal" class="ovl scroll-v scroll-styled-v"> + <div class="mdl is-inverted-dark"> + <header class="mdl-header"> + <h3 class="mdl-header-title">Welcome to TweetDuck</h3> + <a href="#" class="mdl-dismiss link-normal-dark"><i class="icon icon-close"></i></a> + </header> + <div class="mdl-inner"> + <div class="mdl-content"> + <p>Thank you for downloading TweetDuck!</p> + <p><a id="td-introduction-follow" href="#">Follow @TryMyAwesomeApp</a> for latest news and updates about the app.</p> + <div class="main-menu"></div> + <p><strong>Right-click anywhere</strong> or click <strong>Settings – TweetDuck</strong> in the left panel to open the main menu. You can also right-click links, tweets, images and videos, and desktop notifications to access their respective context menus.</p> + <p>Click <strong>Show Guide</strong> to see awesome features TweetDuck offers, or view the guide later by going to <strong>About TweetDuck</strong> and clicking the help button on top.</p> + </div> + <footer class="txt-right"> + <div class="anondata"> + <input id="td-anonymous-data" type="checkbox" checked> + <label for="td-anonymous-data">Send anonymous usage data</label> + <label> (<a href="https://github.com/chylex/TweetDuck/wiki/Send-anonymous-data" rel="nofollow">learn more</a>)</label> + </div> + <button class="Button--primary" data-guide><span class="label">Show Guide</span></button> + <button class="Button--secondary"><span class="label">Close</span></button> + </footer> + </div> + </div> +</div> diff --git a/Resources/Scripts/introduction.js b/Resources/Scripts/introduction.js index 91083074..249a62ee 100644 --- a/Resources/Scripts/introduction.js +++ b/Resources/Scripts/introduction.js @@ -1,34 +1,7 @@ (function($, $TD){ $(document).one("TD.ready", function(){ let css = $(`<style>#import "styles/introduction.css"</style>`).appendTo(document.head); - - let ele = $(` -<div id="td-introduction-modal" class="ovl scroll-v scroll-styled-v"> - <div class="mdl is-inverted-dark"> - <header class="mdl-header"> - <h3 class="mdl-header-title">Welcome to TweetDuck</h3> - <a href="#" class="mdl-dismiss link-normal-dark"><i class="icon icon-close"></i></a> - </header> - <div class="mdl-inner"> - <div class="mdl-content"> - <p>Thank you for downloading TweetDuck!</p> - <p><a id="td-introduction-follow" href="#">Follow @TryMyAwesomeApp</a> for latest news and updates about the app.</p> - <div class="main-menu"></div> - <p><strong>Right-click anywhere</strong> or click <strong>Settings – TweetDuck</strong> in the left panel to open the main menu. You can also right-click links, tweets, images and videos, and desktop notifications to access their respective context menus.</p> - <p>Click <strong>Show Guide</strong> to see awesome features TweetDuck offers, or view the guide later by going to <strong>About TweetDuck</strong> and clicking the help button on top.</p> - </div> - <footer class="txt-right"> - <div class="anondata"> - <input id="td-anonymous-data" type="checkbox" checked> - <label for="td-anonymous-data">Send anonymous usage data</label> - <label> (<a href="https://github.com/chylex/TweetDuck/wiki/Send-anonymous-data" rel="nofollow">learn more</a>)</label> - </div> - <button class="Button--primary" data-guide><span class="label">Show Guide</span></button> - <button class="Button--secondary"><span class="label">Close</span</button> - </footer> - </div> - </div> -</div>`).appendTo(".js-app"); + let ele = $(`#import "markup/introduction.html"`).appendTo(".js-app"); let tdUser = null; let loadTweetDuckUser = (onSuccess, onError) => {