Skip to content

Commit

Permalink
Merge branch 'blt-tomato' of https://github.com/nikhil25803/BLT into …
Browse files Browse the repository at this point in the history
…blt-tomato
  • Loading branch information
nikhil25803 committed Jul 11, 2024
2 parents 4d241e6 + 5daa030 commit d0e3958
Show file tree
Hide file tree
Showing 11 changed files with 541 additions and 678 deletions.
26 changes: 13 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tweepy = "^4.8.0"
Unidecode = "^1.3.8"
user-agents = "^2.2.0"
whitenoise = "^6.7.0"
django-debug-toolbar = "^4.4.5"
django-debug-toolbar = "^4.4.6"
selenium = "^4.22.0"
pylibmc = "^1.6.1"
psycopg2-binary = "^2.9.9"
Expand Down Expand Up @@ -63,18 +63,18 @@ django-filter = "^22.1"
webdriver-manager = "^4.0.1"
pillow = "^10.4.0"
chromedriver-autoinstaller = "^0.6.4"
sentry-sdk = "^2.7.1"
sentry-sdk = "^2.9.0"
bitcash = "^1.0.2"
pydantic = "^2.7.3"
pydantic_core = "^2.18.4"
langchain = "^0.2.1"
langchain-community = "^0.2.1"
langchain-core = "^0.2.11"
langchain-core = "^0.2.13"
langchain-openai = "^0.1.14"
unstructured = "^0.14.4"
Markdown = "^3.6"
faiss-cpu = "^1.8.0"
openai = "^1.35.10"
openai = "^1.35.13"
psutil = "^5.9.8"

[tool.poetry.group.dev.dependencies]
Expand Down
Binary file added website/static/gif/loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions website/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
content="{% block keywords %}{% env 'PROJECT_NAME' %}, bug, tracking, company, easy{% endblock keywords %}">
<meta name="author" content="">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap"
rel="stylesheet">
<meta property="og:title"
content="{% block og_title %}{% env 'PROJECT_NAME' %}{% endblock og_title %}" />
<meta property="og:image"
Expand All @@ -34,8 +32,6 @@
<meta property="og:type" content="website" />
{% endblock metaTags %}
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap"
rel="stylesheet">
<link href="{% static 'vendor/bootstrap/css/bootstrap.css' %}"
rel="stylesheet">
<link href="{% static 'css/style.css' %}" rel="stylesheet">
Expand Down
149 changes: 149 additions & 0 deletions website/templates/includes/_like_dislike_share.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,121 @@
</ul>
</div>
<span class="max-sm:hidden">{% include "./_like_dislike_widget.html" with device="desktop" %}</span>
{% comment %} list of flags modal {% endcomment %}
<div id="flag-modal"
class="hidden relative z-10"
aria-labelledby="modal-title"
role="dialog"
aria-modal="true">
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
aria-hidden="true"></div>
<div class="fixed inset-0 z-10 w-screen overflow-y-auto">
<div class="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
<div class="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 max-sm:w-full lg:w-[30vw] ">
<div class="bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start lg:w-full">
<div class="mt-3 sm:ml-4 sm:mt-0 sm:text-left lg:w-full">
<div class="mt-2">
<h3>Flagged by:</h3>
<br>
<p class="text-xl">
<table class="table-auto w-full border-spacing-52">
<tbody>
{% for usr in flagers %}
<tr class="shadow-lg m-3 w-full rounded">
{% if usr.user.socialaccount_set.all.0.get_avatar_url %}
<td>
<img src="{{ usr.user.socialaccount_set.all.0.get_avatar_url }}"
height="50px"
width="50px"
alt="{{ usr.user.username }}">
</td>
{% else %}
<td>
<img src="{% gravatar_url usr.user.email 50 %}"
height="50px"
width="50px"
alt="{{ usr.user.username }}">
</td>
{% endif %}
<td>
&nbsp; <a href="{% url 'profile' slug=usr.user.username %}">{{ usr.user.username }}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
<button type="button"
class="mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-xl font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto"
id="close-flag">Close</button>
</div>
</div>
</div>
</div>
</div>
<div id="like-modal"
class="hidden relative z-10"
aria-labelledby="modal-title"
role="dialog"
aria-modal="true">
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
aria-hidden="true"></div>
<div class="fixed inset-0 z-10 w-screen overflow-y-auto">
<div class="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
<div class="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 max-sm:w-full lg:w-[30vw] ">
<div class="bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4">
<div class="sm:flex sm:items-start lg:w-full">
<div class="mt-3 sm:ml-4 sm:mt-0 sm:text-left lg:w-full">
<div class="mt-2">
<h3>Liked By:</h3>
<br>
<p class="text-xl">
<table class="table-auto w-full border-spacing-52">
<tbody>
{% for usr in likers %}
<tr class="shadow-lg m-3 w-full rounded">
{% if usr.user.socialaccount_set.all.0.get_avatar_url %}
<td>
<img src="{{ usr.user.socialaccount_set.all.0.get_avatar_url }}"
height="50px"
width="50px"
alt="{{ usr.user.username }}">
</td>
{% else %}
<td>
<img src="{% gravatar_url usr.user.email 50 %}"
height="50px"
width="50px"
alt="{{ usr.user.username }}">
</td>
{% endif %}
<td>
&nbsp; <a href="{% url 'profile' slug=usr.user.username %}">{{ usr.user.username }}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
<button type="button"
class="mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-xl font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto"
id="close-like">Close</button>
</div>
</div>
</div>
</div>
</div>
<script>
function copyClipboard() {
var textToCopy = "Bug Found on @{{ object.domain_title }} - {{ object.description }} Report: https://{% env 'FQDN' %}/issue/{{ object.id }}";
Expand Down Expand Up @@ -258,3 +373,37 @@
});
});
</script>
<script>
function subscribe_domain(){
$.ajax({
type: 'GET',
url: '/domain/{{ object.domain.id }}/subscribe/',
data: {},
success: function (data) {
window.location.reload();

// if (data === "SUBSCRIBED"){
// $("#subscribe_domain_btn").text("Unsubscribe");
// $.notify("Subscribed!", {
// style: "custom",
// className: "success"
// });
// }

// else if (data === "UNSUBSCRIBED"){
// $("#subscribe_domain_btn").text("Subscribe");
// $.notify("Unsubscribed!", {
// style: "custom",
// className: "success"
// });
// }
},
error: function () {
$.notify("Some error occurred!", {
style: "custom",
className: "danger"
});
}
})
}
</script>
9 changes: 4 additions & 5 deletions website/templates/includes/_like_dislike_widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,13 @@
target="_blank"
rel="noopener noreferrer"
class="rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] !bg-white border-black-2 text-[1.1rem] leading-4 p-4">Tweet &nbsp;<i class="fa-brands fa-x-twitter fa-lg"></i></a>
<a {% if github_link != "empty" %} target="_blank" href="{{ github_link }}" {% else %} href="#" {% if request.user.is_superuser or request.user == object.user and github_link == "empty" %}onclick="createIssue()" name="{{ object.pk }}" id="create_issue"{% endif %}
{% endif %}
<a {% if github_link != "empty" %} target="_blank" href="{{ github_link }}" {% else %} onclick="createIssue()" name="{{ object.pk }}" id="create_issue" {% endif %}
rel="noopener noreferrer"
class="rounded-2xl border-[1px] shadow-sm mb-3 cursor-pointer relative transform-[0] font-medium text-[#3e3446] !bg-white border-black-2 text-[1.1rem] max-sm:text-[1rem] leading-4 p-4 hover:!text-[#3e3446]">
{% if request.user.is_superuser or request.user == object.user and github_link == "empty" %}
Create Issue
{% else %}
{% if github_link != "empty" %}
GitHub Link
{% else %}
Create Issue
{% endif %}
&nbsp;<i class="fas fa-external-link fa-lg"></i></a>
<button onclick="copyClipboard()"
Expand Down
54 changes: 54 additions & 0 deletions website/templates/includes/issue_left_info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<div class="w-[70%] max-sm:w-[100%]">
<div class="px-10 mt-5">
<h3 class="font-[ubuntu] text-[17px] p-3 my-2 font-semibold">Screenshots</h3>
<div id="image-slider" class="splide">
<div class="splide__track">
<ul class="splide__list">
{% if object.screenshot %}
<li class="splide__slide">
<a href="{{ object.screenshot.url }}"
target="_blank"
class="flex align-middle justify-center"
rel="noopener noreferrer">
<img src="{{ object.screenshot.url }}"
class="rounded-lg"
alt="issue screenshot"
data-lightbox="image"
height="auto"
width="auto">
</a>
</li>
<br>
<br>
{% else %}
{% for screenshot in screenshots %}
<li class="splide__slide">
<a href="{{ screenshot.image.url }}"
target="_blank"
class="flex align-middle justify-center"
rel="noopener noreferrer">
<img src="{{ screenshot.image.url }}"
class="rounded-lg"
alt="issue screenshot"
data-lightbox="image"
height="auto"
width="auto">
</a>
</li>
<br>
<br>
{% endfor %}
{% endif %}
</ul>
</div>
</div>
</div>
<div class="px-10 mt-5 border-b-2 border-[#584ac080]">
{% if object.markdown_description %}
<h3 class="font-[ubuntu] text-[16px] lg:text-[20px] p-3 my-2 font-semibold">Issue Description</h3>
<p class="ml-3 text-justify text-[12px] lg:text-[14px] lg:w-11/12"
id="bug_report">{{ object.markdown_description }}</p>
{% endif %}
</div>
<div class="px-10 rounded-lg bg-white">{% include "comments2.html" %}</div>
</div>
Loading

0 comments on commit d0e3958

Please sign in to comment.