Skip to content

Commit

Permalink
refactor: minor adjustment to github integration UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sgfost committed Oct 26, 2024
1 parent a812066 commit 4d4ddc9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
20 changes: 12 additions & 8 deletions django/library/jinja2/library/codebases/releases/retrieve.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,13 @@
<div class="card-body">
<div class="section mb-0">
<div>
<b class="card-title">Github Integration</b>
<span class="badge bg-gray">beta</span>
</div>
<div class="card-text pt-0 mb-3">
<a class="small" href="/github/" target="_blank">
<i class="fas fa-question-circle"></i> What is this?
</a>
<b class="card-title">
<i class="fab fa-github"></i>
Github Integration
</b>
<sup class="badge bg-gray"><small>beta</small></sup>
</div>

{% if codebase.git_mirror %}
{% if codebase.git_mirror.remote_url %}
<div class="d-flex align-items-center">
Expand Down Expand Up @@ -336,6 +335,11 @@
</div>
{% endif %}
{% endif %}
<div class="card-text">
<a class="small" href="/github/" target="_blank">
<i class="fas fa-question-circle"></i> What is this?
</a>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -624,6 +628,6 @@
{{ vite_asset("apps/release_download.ts") }}
{% if has_change_perm %}
{{ vite_asset("apps/release_regenerate_share_uuid.ts") }}
{{ vite_asset("apps/github_mirror.ts") }}
{{ vite_asset("apps/github_integration.ts") }}
{% endif %}
{% endblock %}
File renamed without changes.
8 changes: 6 additions & 2 deletions frontend/src/components/GithubMirrorModal.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<div>
<button class="btn btn-sm btn-secondary my-1 w-100" rel="nofollow" @click="modal?.show()">
<i class="fab fa-github"></i>
<button
class="btn btn-sm btn-outline-secondary w-100-with-icon my-1"
rel="nofollow"
@click="modal?.show()"
>
<i class="icon-left fas fa-arrow-up"></i>
Mirror on Github
</button>
<BootstrapModal
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/scss/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ a.anchor {
}
}

.w-100-with-icon {
width: 100%;
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;

.icon-left {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
margin-left: 0.5rem;
}
}

.btn-group-xs > .btn,
.btn-xs {
padding: 0.25rem 0.4rem;
Expand Down

0 comments on commit 4d4ddc9

Please sign in to comment.