mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Make toast support preventDuplicates (#31501)
make preventDuplicates default to true, users get a clear UI feedback and know that "a new message appears". Fixes: https://github.com/go-gitea/gitea/issues/26651 --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -182,15 +182,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1>Toast</h1>
|
||||
<div>
|
||||
<button class="ui button" id="info-toast">Show Info Toast</button>
|
||||
<button class="ui button" id="warning-toast">Show Warning Toast</button>
|
||||
<button class="ui button" id="error-toast">Show Error Toast</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1>ComboMarkdownEditor</h1>
|
||||
<div>ps: no JS code attached, so just a layout</div>
|
||||
@@ -201,7 +192,5 @@
|
||||
<div>
|
||||
<button class="{{if true}}tw-bg-red{{end}} tw-p-5 tw-border tw-rounded hover:tw-bg-blue active:tw-bg-yellow">Button</button>
|
||||
</div>
|
||||
|
||||
<script src="{{AssetUrlPrefix}}/js/devtest.js?v={{AssetVersion}}"></script>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
15
templates/devtest/toast.tmpl
Normal file
15
templates/devtest/toast.tmpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{{template "base/head" .}}
|
||||
|
||||
<div>
|
||||
<h1>Toast</h1>
|
||||
<div>
|
||||
<button class="ui button toast-test-button" data-toast-level="info" data-toast-message="test info">Show Info Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="warning" data-toast-message="test warning">Show Warning Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="error" data-toast-message="test error">Show Error Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="error" data-toast-message="very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong message">Show Error Toast (long)</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{AssetUrlPrefix}}/js/devtest.js?v={{AssetVersion}}"></script>
|
||||
|
||||
{{template "base/footer" .}}
|
Reference in New Issue
Block a user