Compare commits
5 Commits
b66c6f173d
...
a6dafe871b
Author | SHA1 | Date | |
---|---|---|---|
a6dafe871b | |||
c05d578116 | |||
3590f8e9ce | |||
ccbf4c538e | |||
74142fb48e |
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,5 @@
|
|||||||
.vscode/
|
.vscode/
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
config.json
|
|
||||||
dist/
|
dist/
|
||||||
*.sqlite
|
*.sqlite
|
@ -159,7 +159,7 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te
|
|||||||
py-2
|
py-2
|
||||||
px-2.5
|
px-2.5
|
||||||
text-sm
|
text-sm
|
||||||
rounded-md
|
rounded-lg
|
||||||
focus:outline-none
|
focus:outline-none
|
||||||
text-gray-800
|
text-gray-800
|
||||||
hover:bg-gray-100
|
hover:bg-gray-100
|
||||||
@ -204,7 +204,7 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te
|
|||||||
px-4
|
px-4
|
||||||
block
|
block
|
||||||
w-full
|
w-full
|
||||||
rounded-md
|
rounded-lg
|
||||||
text-sm
|
text-sm
|
||||||
disabled:opacity-50
|
disabled:opacity-50
|
||||||
disabled:pointer-events-none
|
disabled:pointer-events-none
|
||||||
@ -236,7 +236,7 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te
|
|||||||
bg-white
|
bg-white
|
||||||
border
|
border
|
||||||
border-gray-200
|
border-gray-200
|
||||||
rounded-md
|
rounded-lg
|
||||||
text-start
|
text-start
|
||||||
text-sm
|
text-sm
|
||||||
focus:outline-none
|
focus:outline-none
|
||||||
|
@ -17,6 +17,8 @@ const formatTimestamp = timestamp => {
|
|||||||
: `${d.getDate()} ${d.toLocaleString("en-GB", { month: "short" })} ${d.getFullYear()}`;
|
: `${d.getDate()} ${d.toLocaleString("en-GB", { month: "short" })} ${d.getFullYear()}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#region Table
|
||||||
|
|
||||||
const emptyTableHtml = `
|
const emptyTableHtml = `
|
||||||
<div class="max-w-md w-full min-h-[400px] flex flex-col justify-center mx-auto px-6 py-4">
|
<div class="max-w-md w-full min-h-[400px] flex flex-col justify-center mx-auto px-6 py-4">
|
||||||
<div class="flex justify-center items-center size-[46px] bg-gray-100 rounded-lg dark:bg-neutral-800">
|
<div class="flex justify-center items-center size-[46px] bg-gray-100 rounded-lg dark:bg-neutral-800">
|
||||||
@ -196,7 +198,12 @@ const defineTable = () => {
|
|||||||
searchable: false,
|
searchable: false,
|
||||||
render: (data, type, row) => {
|
render: (data, type, row) => {
|
||||||
return `
|
return `
|
||||||
|
<td class="size-px whitespace-nowrap align-top">
|
||||||
|
<div class="px-6 py-4 text-center">
|
||||||
|
<div class="inline-block rounded-md size-5 bg-red-500 mx-auto">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -225,28 +232,52 @@ const defineTable = () => {
|
|||||||
orderable: true,
|
orderable: true,
|
||||||
searchable: true,
|
searchable: true,
|
||||||
render: (data, type, row) => {
|
render: (data, type, row) => {
|
||||||
if (!row.active) {
|
|
||||||
return `
|
// TODO:
|
||||||
<div class="px-6 py-4">
|
// fix the badge icon not showing,
|
||||||
<span class="py-1 px-1.5 inline-flex items-center gap-x-1 text-xs font-medium bg-red-100 text-red-800 rounded-full dark:bg-red-500/10 dark:text-red-500">
|
// its probvably because of jquery adding a closing tag ?
|
||||||
<svg class="size-2.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
|
||||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/>
|
wrapper = $("<div>").addClass("px-6 py-4");
|
||||||
</svg>
|
badge = $("<span>").addClass("py-1 px-1.5 inline-flex items-center gap-x-1 text-xs font-medium rounded-full");
|
||||||
Inactive
|
icon = $('<svg class="size-2.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">');
|
||||||
</span>
|
label = $("<span>");
|
||||||
</div>
|
|
||||||
`;
|
if (row.active) {
|
||||||
|
badge.addClass("bg-teal-100 text-teal-800 dark:bg-teal-500/10 dark:text-teal-500");
|
||||||
|
icon.append($('<svg class="size-2.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg>'));
|
||||||
|
badge.append(icon).append(label.text("Active"));
|
||||||
}
|
}
|
||||||
return `
|
else {
|
||||||
<div class="px-6 py-4">
|
badge.addClass("bg-red-100 text-red-800 dark:bg-red-500/10 dark:text-red-500");
|
||||||
<span class="py-1 px-1.5 inline-flex items-center gap-x-1 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500">
|
icon.append('<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/>');
|
||||||
<svg class="size-2.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
badge.append(icon).append(label.text("Inactive"));
|
||||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
}
|
||||||
</svg>
|
|
||||||
Active
|
wrapper.append(badge);
|
||||||
</span>
|
return wrapper.get(0);
|
||||||
</div>
|
|
||||||
`;
|
// if (!row.active) {
|
||||||
|
// return `
|
||||||
|
// <div class="px-6 py-4">
|
||||||
|
// <span class="py-1 px-1.5 inline-flex items-center gap-x-1 text-xs font-medium bg-red-100 text-red-800 rounded-full dark:bg-red-500/10 dark:text-red-500">
|
||||||
|
// <svg class="size-2.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||||
|
// <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/>
|
||||||
|
// </svg>
|
||||||
|
// Inactive
|
||||||
|
// </span>
|
||||||
|
// </div>
|
||||||
|
// `;
|
||||||
|
// }
|
||||||
|
// return `
|
||||||
|
// <div class="px-6 py-4">
|
||||||
|
// <span class="py-1 px-1.5 inline-flex items-center gap-x-1 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500">
|
||||||
|
// <svg class="size-2.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||||
|
// <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
||||||
|
// </svg>
|
||||||
|
// Active
|
||||||
|
// </span>
|
||||||
|
// </div>
|
||||||
|
// `;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -258,6 +289,8 @@ const defineTable = () => {
|
|||||||
.on("draw", onTableSelectChange);
|
.on("draw", onTableSelectChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//#endregion Table
|
||||||
|
|
||||||
// Ensure the datatable recognises when all rows are selected, otherwise rows are only visually selected
|
// Ensure the datatable recognises when all rows are selected, otherwise rows are only visually selected
|
||||||
$("#selectAllBox").on("change", function() {
|
$("#selectAllBox").on("change", function() {
|
||||||
this.checked ? table.dataTable.rows().select() : table.dataTable.rows().deselect();
|
this.checked ? table.dataTable.rows().select() : table.dataTable.rows().deselect();
|
||||||
@ -300,8 +333,20 @@ $("input[name='filterActive']").on("change", () => {
|
|||||||
|
|
||||||
const openSubForm = () => {
|
const openSubForm = () => {
|
||||||
$("#subForm").removeClass("submitted");
|
$("#subForm").removeClass("submitted");
|
||||||
|
|
||||||
|
// Clear the form values
|
||||||
|
$("#formName").val("");
|
||||||
|
$("#formUrl").val("");
|
||||||
$("#formPublishedThreshold").val(new Date().toISOString().slice(0, 16));
|
$("#formPublishedThreshold").val(new Date().toISOString().slice(0, 16));
|
||||||
|
|
||||||
|
HSSelect.getInstance("#formStyle", true).element.setValue([]);
|
||||||
|
HSSelect.getInstance("#formChannels", true).element.setValue([]);
|
||||||
|
HSSelect.getInstance("#formFilters", true).element.setValue([]);
|
||||||
|
$("#formChannelsInput").css("width", "");
|
||||||
|
$("#formFiltersInput").css("width", "");
|
||||||
|
|
||||||
$("#formActive").prop("checked", true);
|
$("#formActive").prop("checked", true);
|
||||||
|
|
||||||
HSOverlay.open($("#subModal").get(0));
|
HSOverlay.open($("#subModal").get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,42 +1,3 @@
|
|||||||
<!-- <nav class="bg-white dark:bg-neutral-900 border dark:border-none m-4 sm:m-6 !mb-0 rounded-md">
|
|
||||||
<div class="w-full mx-auto md:flex md:flex-row md:justify-between md:items-center sm:gap-x-3 py-3 sm:py-5 px-4 sm:px-6 lg:px-8">
|
|
||||||
<div class="flex justify-between items-center gap-x-3">
|
|
||||||
<div class="grow flex items-center gap-x-4">
|
|
||||||
<% if (guild.icon) { %>
|
|
||||||
<img class="size-[60px] rounded" src="<%= guild.iconURL() %>" alt="<%= guild.name %>">
|
|
||||||
<% } else { %>
|
|
||||||
<div class="size-[60px] flex shrink-0 justify-center items-center rounded bg-neutral-100 dark:bg-neutral-800">
|
|
||||||
<span class="text-xs"><%= guild.name.split(" ").slice(0, 2).map(word => word[0].toUpperCase()).join(""); %></span>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
<div class="flex flex-col items-start">
|
|
||||||
<span class="font-semibold whitespace-nowrap text-2xl text-gray-800 dark:text-neutral-200">
|
|
||||||
<%= guild.name %>
|
|
||||||
</span>
|
|
||||||
<span class="font-mono whitespace-nowrap text-sm text-gray-500 dark:text-neutral-500">
|
|
||||||
<%= guild.id %>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="button" class="hs-collapse-toggle capitalize md:hidden py-1.5 px-2 inline-flex items-center font-medium text-xs rounded-md border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 focus:outline-none focus:bg-gray-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" data-hs-collapse="#guildScreenDropdown">
|
|
||||||
<%= !isNaN(+guildPage) ? 'Overview' : guildPage %>
|
|
||||||
<svg class="hs-dropdown-open:rotate-180 shrink-0 size-4 ms-1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div id="guildScreenDropdown" class="hs-collapse hidden overflow-hidden transition-all duration-300 basis-full grow md:block">
|
|
||||||
<div class="py-2 md:py-0 flex flex-col md:flex-row md:justify-end gap-y-2 md:gap-y-0 md:gap-x-6">
|
|
||||||
<a href="/guild/<%= guild.id %>" class="guild-header-btn <%= !isNaN(+guildPage) ? 'active' : '' %>">Overview</a>
|
|
||||||
<a href="/guild/<%= guild.id %>/subscriptions" class="guild-header-btn <%= guildPage === 'subscriptions' ? 'active' : '' %>">Subscriptions</a>
|
|
||||||
<a href="/guild/<%= guild.id %>/filters" class="guild-header-btn <%= guildPage === 'filters' ? 'active' : '' %>">Filters</a>
|
|
||||||
<a href="/guild/<%= guild.id %>/styles" class="guild-header-btn <%= guildPage === 'styles' ? 'active' : '' %>">Styles</a>
|
|
||||||
<a href="/guild/<%= guild.id %>/content" class="guild-header-btn <%= guildPage === 'content' ? 'active' : '' %>">Content</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav> -->
|
|
||||||
|
|
||||||
<!-- bg-neutral-100 dark:bg-neutral-900 -->
|
|
||||||
<div>
|
<div>
|
||||||
<div class="relative pt-5 before:w-full before:h-[200px] before:-z-10 before:top-0 before:start-0 before:absolute">
|
<div class="relative pt-5 before:w-full before:h-[200px] before:-z-10 before:top-0 before:start-0 before:absolute">
|
||||||
<div class="flex sm:items-center gap-5 p-4 sm:p-6 !pb-1">
|
<div class="flex sm:items-center gap-5 p-4 sm:p-6 !pb-1">
|
||||||
|
@ -106,39 +106,31 @@
|
|||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th scope="col" class="px-6 py-3 text-start">
|
<th scope="col" class="px-6 py-3 text-start --exclude-from-ordering">
|
||||||
<div class="flex justify-between items-center gap-x-2">
|
<div class="flex justify-between items-center gap-x-2">
|
||||||
<span class="text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-neutral-200">
|
<span class="text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-neutral-200">
|
||||||
Channels
|
Channels
|
||||||
</span>
|
</span>
|
||||||
<!-- <svg class="size-3.5 ms-1 -me-0.5 text-gray-400 dark:text-neutral-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path class="hs-datatable-ordering-desc:text-blue-600 dark:hs-datatable-ordering-desc:text-blue-500" d="m7 15 5 5 5-5"></path>
|
|
||||||
<path class="hs-datatable-ordering-asc:text-blue-600 dark:hs-datatable-ordering-asc:text-blue-500" d="m7 9 5-5 5 5"></path>
|
|
||||||
</svg> -->
|
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th scope="col" class="px-6 py-3 text-start">
|
<th scope="col" class="px-6 py-3 text-start --exclude-from-ordering">
|
||||||
<div class="flex justify-between items-center gap-x-2">
|
<div class="flex justify-between items-center gap-x-2">
|
||||||
<span class="text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-neutral-200">
|
<span class="text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-neutral-200">
|
||||||
Filters
|
Filters
|
||||||
</span>
|
</span>
|
||||||
<!-- <svg class="size-3.5 ms-1 -me-0.5 text-gray-400 dark:text-neutral-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path class="hs-datatable-ordering-desc:text-blue-600 dark:hs-datatable-ordering-desc:text-blue-500" d="m7 15 5 5 5-5"></path>
|
|
||||||
<path class="hs-datatable-ordering-asc:text-blue-600 dark:hs-datatable-ordering-asc:text-blue-500" d="m7 9 5-5 5 5"></path>
|
|
||||||
</svg> -->
|
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th scope="col" class="px-6 py-3 text-start">
|
<th scope="col" class="px-6 py-3 text-start">
|
||||||
<div class="flex justify-between items-center gap-x-2">
|
<div class="flex justify-between items-center gap-x-2 cursor-pointer">
|
||||||
<span class="text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-neutral-200">
|
<span class="text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-neutral-200">
|
||||||
Style
|
Style
|
||||||
</span>
|
</span>
|
||||||
<!-- <svg class="size-3.5 ms-1 -me-0.5 text-gray-400 dark:text-neutral-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
<svg class="size-3.5 ms-1 -me-0.5 text-gray-400 dark:text-neutral-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<path class="hs-datatable-ordering-desc:text-blue-600 dark:hs-datatable-ordering-desc:text-blue-500" d="m7 15 5 5 5-5"></path>
|
<path class="hs-datatable-ordering-desc:text-blue-600 dark:hs-datatable-ordering-desc:text-blue-500" d="m7 15 5 5 5-5"></path>
|
||||||
<path class="hs-datatable-ordering-asc:text-blue-600 dark:hs-datatable-ordering-asc:text-blue-500" d="m7 9 5-5 5 5"></path>
|
<path class="hs-datatable-ordering-asc:text-blue-600 dark:hs-datatable-ordering-asc:text-blue-500" d="m7 9 5-5 5 5"></path>
|
||||||
</svg> -->
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
@ -332,10 +324,10 @@
|
|||||||
"dropdownScope": "window",
|
"dropdownScope": "window",
|
||||||
"optionClasses": "py-2 px-4 w-full text-sm text-gray-800 cursor-pointer hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800",
|
"optionClasses": "py-2 px-4 w-full text-sm text-gray-800 cursor-pointer hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800",
|
||||||
"mode": "tags",
|
"mode": "tags",
|
||||||
"tagsInputId": "formChannelsInput",
|
"tagsInputId": "formFiltersInput",
|
||||||
"wrapperClasses": "relative ps-0.5 pe-9 min-h-[46px] flex items-center flex-wrap text-nowrap w-full border border-gray-200 rounded-lg text-start text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400",
|
"wrapperClasses": "relative ps-0.5 pe-9 min-h-[46px] flex items-center flex-wrap text-nowrap w-full border border-gray-200 rounded-lg text-start text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400",
|
||||||
"tagsItemTemplate": "<div class=\"flex flex-nowrap items-center relative z-10 bg-white border border-gray-200 rounded-lg p-1 m-1 dark:bg-neutral-900 dark:border-neutral-700 \"><div class=\"ms-1 whitespace-nowrap text-gray-800 dark:text-neutral-200 \" data-title></div><div class=\"inline-flex shrink-0 justify-center items-center size-5 ms-2 rounded-lg text-gray-800 bg-gray-200 hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-400 text-sm dark:bg-neutral-700/50 dark:hover:bg-neutral-700 dark:text-neutral-400 cursor-pointer\" data-remove><svg class=\"shrink-0 size-3\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg></div></div>",
|
"tagsItemTemplate": "<div class=\"flex flex-nowrap items-center relative z-10 bg-white border border-gray-200 rounded-lg p-1 m-1 dark:bg-neutral-900 dark:border-neutral-700 \"><div class=\"ms-1 whitespace-nowrap text-gray-800 dark:text-neutral-200 \" data-title></div><div class=\"inline-flex shrink-0 justify-center items-center size-5 ms-2 rounded-lg text-gray-800 bg-gray-200 hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-400 text-sm dark:bg-neutral-700/50 dark:hover:bg-neutral-700 dark:text-neutral-400 cursor-pointer\" data-remove><svg class=\"shrink-0 size-3\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg></div></div>",
|
||||||
"tagsInputClasses": "py-3 px-2 rounded-sm order-1 text-sm outline-none dark:bg-neutral-900 dark:placeholder-neutral-500 dark:text-neutral-400",
|
"tagsInputClasses": "py-3 px-2 rounded-lg order-1 text-sm outline-none dark:bg-neutral-900 dark:placeholder-neutral-500 dark:text-neutral-400",
|
||||||
"optionTemplate": "<div class=\"flex items-center\"><div class=\"size-8 me-2 flex shrink-0 items-center justify-center text-gray-500 dark:text-neutral-500\" data-icon></div><div><div class=\"text-sm font-semibold text-gray-800 dark:text-neutral-200 \" data-title></div><div class=\"text-xs text-gray-500 dark:text-neutral-500 \" data-description></div></div><div class=\"ms-auto\"><span class=\"hidden hs-selected:block\"><svg class=\"shrink-0 size-4 text-blue-600\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z\"/></svg></span></div></div>",
|
"optionTemplate": "<div class=\"flex items-center\"><div class=\"size-8 me-2 flex shrink-0 items-center justify-center text-gray-500 dark:text-neutral-500\" data-icon></div><div><div class=\"text-sm font-semibold text-gray-800 dark:text-neutral-200 \" data-title></div><div class=\"text-xs text-gray-500 dark:text-neutral-500 \" data-description></div></div><div class=\"ms-auto\"><span class=\"hidden hs-selected:block\"><svg class=\"shrink-0 size-4 text-blue-600\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path d=\"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z\"/></svg></span></div></div>",
|
||||||
"extraMarkup": "<div class=\"absolute top-1/2 end-3 -translate-y-1/2\"><svg class=\"shrink-0 size-3.5 text-gray-500 dark:text-neutral-500 \" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 15 5 5 5-5\"/><path d=\"m7 9 5-5 5 5\"/></svg></div>"
|
"extraMarkup": "<div class=\"absolute top-1/2 end-3 -translate-y-1/2\"><svg class=\"shrink-0 size-3.5 text-gray-500 dark:text-neutral-500 \" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 15 5 5 5-5\"/><path d=\"m7 9 5-5 5 5\"/></svg></div>"
|
||||||
}' class="hidden">
|
}' class="hidden">
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<link rel="stylesheet" href="/static/css/tailwind.css">
|
<link rel="stylesheet" href="/static/css/tailwind.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="h-screen flex justify-center items-center bg-neutral-100 dark:bg-neutral-900 text-gray-600 dark:text-gray-400 font-[Inter]">
|
<body class="h-screen flex justify-center items-center bg-neutral-100 dark:bg-neutral-900 text-gray-600 dark:text-gray-400 font-[Inter]">
|
||||||
|
|
||||||
<div class="mt-7 w-[26rem] bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-900 dark:border-neutral-700">
|
<div class="mt-7 w-[26rem] bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-900 dark:border-neutral-700">
|
||||||
<div class="p-4 sm:p-7">
|
<div class="p-4 sm:p-7">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
@ -31,30 +32,7 @@
|
|||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="container mx-auto text-center mt-64">
|
|
||||||
<div class="max-w-md mx-auto p-4 sm:p-6 space-y-4 sm:space-y-6">
|
|
||||||
<div class="mt-7 bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-900 dark:border-neutral-700">
|
|
||||||
<div class="p-4 sm:p-7">
|
|
||||||
<div class="text-center">
|
|
||||||
<h1 class="block text-2xl font-bold text-gray-800 dark:text-white">Sign in</h1>
|
|
||||||
<p class="mt-2 text-sm text-gray-600 dark:text-neutral-400">
|
|
||||||
Login is required to use Relay.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-5">
|
|
||||||
<button type="button" class="w-full py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-none focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800">
|
|
||||||
<svg class="w-4 h-auto" xmlns="http://www.w3.org/2000/svg" width="46" height="46" fill="currentColor" class="bi bi-discord" viewBox="0 0 16 16">
|
|
||||||
<path d="M13.545 2.907a13.2 13.2 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.2 12.2 0 0 0-3.658 0 8 8 0 0 0-.412-.833.05.05 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.04.04 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032q.003.022.021.037a13.3 13.3 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019q.463-.63.818-1.329a.05.05 0 0 0-.01-.059l-.018-.011a9 9 0 0 1-1.248-.595.05.05 0 0 1-.02-.066l.015-.019q.127-.095.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.05.05 0 0 1 .053.007q.121.1.248.195a.05.05 0 0 1-.004.085 8 8 0 0 1-1.249.594.05.05 0 0 0-.03.03.05.05 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.2 13.2 0 0 0 4.001-2.02.05.05 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.03.03 0 0 0-.02-.019m-8.198 7.307c-.789 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612m5.316 0c-.788 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612"/>
|
|
||||||
</svg>
|
|
||||||
Sign in with Discord
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<script src="/static/preline.js"></script>
|
<script src="/static/preline.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -66,15 +66,15 @@
|
|||||||
<!-- Sidebar Footer -->
|
<!-- Sidebar Footer -->
|
||||||
<div class="mt-auto p-2 border-t border-gray-200 dark:border-neutral-700">
|
<div class="mt-auto p-2 border-t border-gray-200 dark:border-neutral-700">
|
||||||
<div class="hs-dropdown [--strategy:absolute] [--auto-close:inside] relative w-full inline-flex">
|
<div class="hs-dropdown [--strategy:absolute] [--auto-close:inside] relative w-full inline-flex">
|
||||||
<button type="button" id="userMenu" class="w-full inline-flex shrink-0 items-center gap-x-2 p-2 text-start text-sm text-gray-800 rounded-md hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700">
|
<button type="button" id="userMenu" class="w-full inline-flex shrink-0 items-center gap-x-2 p-2 text-start text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700">
|
||||||
<img class="shrink-0 size-5 rounded-full" src="https://cdn.discordapp.com/avatars/<%= user.id %>/<%= user.avatar %>" alt="Avatar">
|
<img class="shrink-0 size-5 rounded-full" src="https://cdn.discordapp.com/avatars/<%= user.id %>/<%= user.avatar %>" alt="Avatar">
|
||||||
<%= user.username %>
|
<%= user.username %>
|
||||||
<svg class="block hs-dropdown-open:hidden ms-auto size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg>
|
<svg class="block hs-dropdown-open:hidden ms-auto size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"/></svg>
|
||||||
<svg class="hidden hs-dropdown-open:block ms-auto size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
<svg class="hidden hs-dropdown-open:block ms-auto size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="hs-dropdown-menu hs-dropdown-open:opacity-100 !mb-2 w-60 transition-[opacity,margin] duration opacity-0 hidden z-20 bg-white border border-gray-200 rounded-md shadow-lg dark:bg-neutral-900 dark:border-neutral-700" role="menu">
|
<div class="hs-dropdown-menu hs-dropdown-open:opacity-100 !mb-2 w-60 transition-[opacity,margin] duration opacity-0 hidden z-20 bg-white border border-gray-200 rounded-lg shadow-lg dark:bg-neutral-900 dark:border-neutral-700" role="menu">
|
||||||
<!-- <div class="p-1">
|
<!-- <div class="p-1">
|
||||||
<a href="#" class="flex items-center gap-x-3 py-2 px-3 rounded-md text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800">
|
<a href="#" class="flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800">
|
||||||
Settings
|
Settings
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr class="border-gray-200 dark:border-neutral-700">
|
<hr class="border-gray-200 dark:border-neutral-700">
|
||||||
<div class="p-1">
|
<div class="p-1">
|
||||||
<a href="/auth/logout" class="flex items-center gap-x-3 py-2 px-3 rounded-md text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800">
|
<a href="/auth/logout" class="flex items-center gap-x-3 py-2 px-3 rounded-lg text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800">
|
||||||
Sign out
|
Sign out
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user