OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Toast
Oliver Günther1db4ea08040e
diff --git a/frontend/src/global_styles/content/_toast.lsg b/frontend/src/global_styles/content/_toast.lsgdeleted file mode 100644index 3b56d51cded..00000000000--- a/frontend/src/global_styles/content/_toast.lsg+++ /dev/null@@ -1,127 +0,0 @@-# Notifications--```-<div class="op-toast">- <div class="op-toast--content">- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quia laudantium ea delectus incidunt accusantium repudiandae deserunt excepturi non esse vero distinctio et reprehenderit, cupiditate quidem consectetur rerum iste magnam voluptatibus.</p>- </div>-</div>-```--## Info--```-<div class="op-toast -info">- <div class="op-toast--content">- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quia laudantium ea delectus incidunt accusantium repudiandae deserunt excepturi non esse vero distinctio et reprehenderit, cupiditate quidem consectetur rerum iste magnam voluptatibus.</p>- </div>-</div>-```--## Error--```-<div class="op-toast -error">- <a href="#" title="close" class="op-toast--close icon-context icon-close"></a>- <div class="op-toast--content">- <p>An error occurred, here are the facts:</p>- <ul>- <li>Fact 1: You made a mistake</li>- <li>Fact 2: You <em>really</em> made a mistake</li>- <li>Fact 3: You <strong>should fix it</strong></li>- </ul>- <button class="button">continue editing</button>- </div>-</div>-```--## Warning--```-<div class="op-toast -warning">- <a href="#" title="close" class="op-toast--close icon-context icon-close"></a>- <div class="op-toast--content">- <p>This is a warning. You may ignore it, but bad things might happen.</p>- </div>-</div>-```--## Success--```-<div class="op-toast -success">- <a href="#" title="close" class="op-toast--close icon-context icon-close"></a>- <div class="op-toast--content">- <p>Successful update. <a href="#">A link to the past</a></p>- </div>-</div>-```--## Stackable---```-<div class="controls">- <button class="button stuck-message" id="test-notifier">click</button>-</div>-<div class="op-toast--wrapper">- <div class="op-toast--casing"></div>-</div>--<script type="text\template" id="warning-message-zx00x">- <div class="op-toast -warning">- <a href="#" class="op-toast--close">×</a>- <div class="op-toast--content">- <p>This is a warning. You may ignore it, but bad things might happen. toasterNo {{number}}</p>- </div>- </div>-</script>-```--## Upload toasters--### Upload progress--```-<div class="op-toast -upload">- <div class="op-toast--content">- <span>Uploading files...</span>- <ul class="op-toast--uploads">- <op-toasters-upload-progress>- <li>- <span class="filename">Awesome_Landscape.png</span>- <progress max="100" value="70">70%</progress>- </li>- </op-toasters-upload-progress>- </ul>- </div>-</div>-```---### Upload progress done--```-<div class="op-toast -upload">- <div class="op-toast--content">- <span>Uploading files...</span>- <div>- <div>- <ul class="op-toast--uploads">- <op-toasters-upload-progress>- <li>- <span class="filename">Awesome_Landscape.png</span>- <span class="upload-completed"><i class="icon-checkmark -success"></i></span>- </li>- <li>- <span class="filename">Awesome_Landscape2.png</span>- <span class="upload-completed"><i class="icon-close -error"></i></span>- <p class="op-toast--notice -error">Something went wrong!...</p>- </li>- </op-toasters-upload-progress>- </ul>- </div>- </div>- </div>-</div>-```diff --git a/spec/components/previews/toast_preview.rb b/spec/components/previews/toast_preview.rbnew file mode 100644index 00000000000..09a52c56537--- /dev/null+++ b/spec/components/previews/toast_preview.rb@@ -0,0 +1,12 @@+# @logical_path OpenProject+class ToastPreview < Lookbook::Preview+ def info; end++ def warning; end++ def error; end++ def success; end++ def upload; end+enddiff --git a/spec/components/previews/toast_preview/error.html.erb b/spec/components/previews/toast_preview/error.html.erbnew file mode 100644index 00000000000..6488775a157--- /dev/null+++ b/spec/components/previews/toast_preview/error.html.erb@@ -0,0 +1,12 @@+<div class="op-toast -error">+ <a href="#" title="close" class="op-toast--close icon-context icon-close"></a>+ <div class="op-toast--content">+ <p>An error occurred, here are the facts:</p>+ <ul>+ <li>Fact 1: You made a mistake</li>+ <li>Fact 2: You <em>really</em> made a mistake</li>+ <li>Fact 3: You <strong>should fix it</strong></li>+ </ul>+ <button class="button">continue editing</button>+ </div>+</div>diff --git a/spec/components/previews/toast_preview/info.html.erb b/spec/components/previews/toast_preview/info.html.erbnew file mode 100644index 00000000000..355d3509f36--- /dev/null+++ b/spec/components/previews/toast_preview/info.html.erb@@ -0,0 +1,5 @@+<div class="op-toast -info">+ <div class="op-toast--content">+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quia laudantium ea delectus incidunt accusantium repudiandae deserunt excepturi non esse vero distinctio et reprehenderit, cupiditate quidem consectetur rerum iste magnam voluptatibus.</p>+ </div>+</div>diff --git a/spec/components/previews/toast_preview/success.html.erb b/spec/components/previews/toast_preview/success.html.erbnew file mode 100644index 00000000000..a2e6292cb60--- /dev/null+++ b/spec/components/previews/toast_preview/success.html.erb@@ -0,0 +1,6 @@+<div class="op-toast -success">+ <a href="#" title="close" class="op-toast--close icon-context icon-close"></a>+ <div class="op-toast--content">+ <p>Successful update. <a href="#">A link to the past</a></p>+ </div>+</div>diff --git a/spec/components/previews/toast_preview/upload.html.erb b/spec/components/previews/toast_preview/upload.html.erbnew file mode 100644index 00000000000..156fa25a9a5--- /dev/null+++ b/spec/components/previews/toast_preview/upload.html.erb@@ -0,0 +1,42 @@+<h3>In progress</h3>+<hr/>++<div class="op-toast -upload">+ <div class="op-toast--content">+ <span>Uploading files...</span>+ <ul class="op-toast--uploads">+ <op-toasters-upload-progress>+ <li>+ <span class="filename">Awesome_Landscape.png</span>+ <progress max="100" value="70">70%</progress>+ </li>+ </op-toasters-upload-progress>+ </ul>+ </div>+</div>++<h3>Uplaod progress done</h3>+<hr/>++<div class="op-toast -upload">+ <div class="op-toast--content">+ <span>Uploading files...</span>+ <div>+ <div>+ <ul class="op-toast--uploads">+ <op-toasters-upload-progress>+ <li>+ <span class="filename">Awesome_Landscape.png</span>+ <span class="upload-completed"><i class="icon-checkmark -success"></i></span>+ </li>+ <li>+ <span class="filename">Awesome_Landscape2.png</span>+ <span class="upload-completed"><i class="icon-close -error"></i></span>+ <p class="op-toast--notice -error">Something went wrong!...</p>+ </li>+ </op-toasters-upload-progress>+ </ul>+ </div>+ </div>+ </div>+</div>diff --git a/spec/components/previews/toast_preview/warning.html.erb b/spec/components/previews/toast_preview/warning.html.erbnew file mode 100644index 00000000000..10b399e3782--- /dev/null+++ b/spec/components/previews/toast_preview/warning.html.erb@@ -0,0 +1,6 @@+<div class="op-toast -warning">+ <a href="#" title="close" class="op-toast--close icon-context icon-close"></a>+ <div class="op-toast--content">+ <p>This is a warning. You may ignore it, but bad things might happen.</p>+ </div>+</div>