Skip to content

Commit

Permalink
Plan Discarded Fix (runatlantis#3550)
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Guardian authored and ijames-gc committed Feb 13, 2024
1 parent f083ff3 commit 2a4da68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 9 additions & 5 deletions server/controllers/templates/web_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ var IndexTemplate = template.Must(template.New("index.html.tmpl").Parse(`
<script src="{{ .CleanedBasePath }}/static/js/jquery-3.5.1.min.js"></script>
<script>
$(document).ready(function () {
$("p.js-discard-success").toggle(document.URL.indexOf("discard=true") !== -1);
if (document.URL.indexOf("discard=true") !== -1) {
$("p.js-discard-success").show();
setTimeout(function() {
$("p.js-discard-success").fadeOut('slow',function(){
window.location.href = "/";
})
}, 5000); // <-- time in milliseconds
}
});
setTimeout(function() {
$("p.js-discard-success").fadeOut('slow');
}, 5000); // <-- time in milliseconds
</script>
<link rel="stylesheet" href="{{ .CleanedBasePath }}/static/css/normalize.css">
<link rel="stylesheet" href="{{ .CleanedBasePath }}/static/css/skeleton.css">
Expand Down Expand Up @@ -598,7 +602,7 @@ var GithubAppSetupTemplate = template.Must(template.New("github-app.html.tmpl").
<a title="atlantis" href="{{ .CleanedBasePath }}"><img class="hero" src="{{ .CleanedBasePath }}/static/images/atlantis-icon_512.png"/></a>
<p class="title-heading">atlantis</p>
<p class="js-discard-success"><strong>
<p class="github-app-msg"><strong>
{{ if .Target }}
Create a github app
{{ else }}
Expand Down
4 changes: 4 additions & 0 deletions server/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ tbody {
}

.js-discard-success {
font-family: monospace, monospace; font-size: 1.1em; text-align: center; display: none;
}

.github-app-msg {
font-family: monospace, monospace; font-size: 1.1em; text-align: center;
}

Expand Down

0 comments on commit 2a4da68

Please sign in to comment.