dashboard-core/theme/dbd-soft-ui/views/guilds.ejs

98 lines
3.9 KiB
Text
Raw Normal View History

2023-06-19 14:21:58 +05:00
<!DOCTYPE html>
<html lang="en">
<head>
2023-06-22 19:36:52 +05:00
<%- include('partials/preloader.ejs', {now:'manage'}) %>
2023-06-19 14:21:58 +05:00
2023-06-22 19:36:52 +05:00
<link rel="stylesheet" href="/css/dashboard/guilds.css">
<%- themeConfig?.customHtml %>
2023-06-19 14:21:58 +05:00
</head>
<body class="g-sidenav-show bg-gray-100" id="scroll">
<%- include('partials/preload.ejs') %>
<%- include('partials/sidebar.ejs', {config: config, now:'manage'}) %>
<div class="main-content position-relative bg-gray-100 max-height-vh-100 h-100">
2023-06-22 19:36:52 +05:00
<%- include('partials/navbar.ejs', {now:'manage'}) %>
<div class="container-fluid py-4" style="padding-bottom: 0px !important;">
<div class="row">
<div class="col-12" id="divtable">
<div class="card mb-4">
<div class="card-header pb-0" style="text-align: center;">
<h2 class="mb-1">
Your servers
</h2>
<p class="mb-0 font-weight-bold text-sm">
Select the server you want to configure
</p>
</div>
<div class="card-body px-0 pt-0 pb-2">
<div style="margin-bottom: 35px; margin-top: 0px; text-align: center;">
<% for(var i in req.session.guilds) { %>
<% if((req.session.guilds[i].permissions & 0x0400) == 0x0400){ %>
2023-06-22 19:36:52 +05:00
<% if(bot.guilds.cache.get(req.session.guilds[i].id)){
const guild = bot.guilds.cache.get(req.session.guilds[i].id);
let icon;
2023-06-19 14:21:58 +05:00
2023-06-22 19:36:52 +05:00
if (!guild.iconURL()) icon = themeConfig?.icons?.noGuildIcon;
else icon = guild.iconURL() + "?size=256";
%>
<a oncontextmenu="window.location='/guild/<%- guild.id %>'; return false;"
onclick="window.location='/settings/<%- guild.id %>'">
<div max="20" scale="110" perspective="400" class="_82d1"
data-guildname="<%- guild.name %>"
style="background-image: url(&quot;<%- icon %>&quot;);"></div>
</a>
<% } } } %>
</div>
<div class="_4204" style="margin-bottom: 35px; text-align: center;">
<% for (var i in req.session.guilds){ %>
2023-07-02 00:12:02 +05:00
<% if((req.session.guilds[i].permissions & 0x20) == 0x20 || (req.session.guilds[i].permissions & 0x08) == 0x08){ %>
2023-06-22 19:36:52 +05:00
<%
if(!bot.guilds.cache.get(req.session.guilds[i].id)){
let icon = `https://cdn.discordapp.com/icons/${req.session.guilds[i].id}/${req.session.guilds[i].icon}.png`;
const friendlyName = req.session.guilds[i].name.replace('`', '');
if (!req.session.guilds[i].icon) icon = themeConfig.icons.noGuildIcon;
else icon = icon + "?size=256"
%>
<!--href="../invite?g=<%- req.session.guilds[i].id %>"-->
2023-07-02 01:44:21 +05:00
<a onclick="const newWindow = window.open(`/invite?g=<%- req.session.guilds[i].id %>`, 'Add bot to guild', 'scrollbars=no, resizable=no, status=no, location=no, toolbar=no, menubar=no, width=500, height=800'); checkRefresh()">
2023-06-22 19:36:52 +05:00
<div max="20" scale="110" perspective="700" class="_82d1"
data-guildname="<%- req.session.guilds[i].name %>"
style="background-image: url(&quot;<%- icon %>&quot;); filter: grayscale(1);"></div>
</a>
2023-06-19 14:21:58 +05:00
2023-06-22 19:36:52 +05:00
<% } } } %>
<script>
function checkRefresh() {
setInterval(() => {
if (newWindow.closed) location.reload();
}, 500);
}
</script>
</div>
</div>
</div>
</div>
<%- include('partials/footer.ejs') %>
</div>
</div>
<!-- Core JS Files -->
<script src="../assets/js/core/popper.min.js"></script>
<script src="../assets/js/core/bootstrap.min.js"></script>
<script src="../assets/js/plugins/perfect-scrollbar.min.js"></script>
<script src="../assets/js/plugins/smooth-scrollbar.min.js"></script>
<script>
var win = navigator.platform.indexOf('Win') > -1;
if (win && document.querySelector('#sidenav-scrollbar')) {
var options = {
damping: '0.5'
}
Scrollbar.init(document.querySelector('#sidenav-scrollbar'), options);
}
</script>
<!-- Control Center for Soft Dashboard: parallax effects, scripts for the example pages etc -->
<%- include('partials/scripts.ejs', {now: "guilds"}) %>
2023-06-19 14:21:58 +05:00
</body>
</html>