diff --git a/package.json b/package.json index 9f80f28..96f6017 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "test": "echo \"Error: no test specified\" && exit 1", "tailwind": "npx tailwindcss -i ./src/client/public/css/main.css -o ./src/client/public/css/tailwind.css", "build": "./scripts/build.sh", + "migrate": "./scripts/migrate.sh", "dev": "nodemon -r tsconfig-paths/register ./src/app.ts", "start": "node dist/app.js" }, diff --git a/src/client/public/css/tailwind.css b/src/client/public/css/tailwind.css index c2139db..556c0b8 100644 --- a/src/client/public/css/tailwind.css +++ b/src/client/public/css/tailwind.css @@ -689,6 +689,10 @@ video { --tw-shadow: 0 0 #0000; } +.form-checkbox { + border-radius: 0px; +} + .form-radio { border-radius: 100%; } @@ -713,6 +717,18 @@ video { background-repeat: no-repeat; } +.form-checkbox:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); +} + +@media (forced-colors: active) { + .form-checkbox:checked { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + .form-radio:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); } @@ -730,6 +746,28 @@ video { background-color: currentColor; } +.form-checkbox:indeterminate { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; +} + +@media (forced-colors: active) { + .form-checkbox:indeterminate { + -webkit-appearance: auto; + -moz-appearance: auto; + appearance: auto; + } +} + +.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus { + border-color: transparent; + background-color: currentColor; +} + .sr-only { position: absolute; width: 1px; @@ -921,6 +959,10 @@ video { margin-bottom: 0.5rem; } +.mb-8 { + margin-bottom: 2rem; +} + .me-1 { margin-inline-end: 0.25rem; } @@ -933,6 +975,10 @@ video { margin-inline-end: 1.25rem; } +.me-auto { + margin-inline-end: auto; +} + .ml-2 { margin-left: 0.5rem; } @@ -1140,6 +1186,10 @@ video { max-height: 100%; } +.min-h-\[100vh\] { + min-height: 100vh; +} + .min-h-\[400px\] { min-height: 400px; } @@ -1212,6 +1262,10 @@ video { min-width: 100%; } +.max-w-\[28rem\] { + max-width: 28rem; +} + .max-w-\[300px\] { max-width: 300px; } @@ -1445,6 +1499,10 @@ video { overflow-x: hidden; } +.overflow-y-hidden { + overflow-y: hidden; +} + .truncate { overflow: hidden; text-overflow: ellipsis; @@ -1818,6 +1876,11 @@ video { line-height: 2rem; } +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + .text-4xl { font-size: 2.25rem; line-height: 2.5rem; @@ -1827,6 +1890,10 @@ video { font-size: 12px; } +.text-\[6rem\] { + font-size: 6rem; +} + .text-base { font-size: 1rem; line-height: 1.5rem; @@ -2934,6 +3001,10 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); } + .sm\:p-5 { + padding: 1.25rem; + } + .sm\:p-6 { padding: 1.5rem; } @@ -3025,10 +3096,6 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te padding: 1.5rem; } - .md\:p-8 { - padding: 2rem; - } - .md\:py-0 { padding-top: 0px; padding-bottom: 0px; @@ -3316,6 +3383,11 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te color: rgb(212 212 212 / var(--tw-text-opacity, 1)); } +.dark\:hover\:text-neutral-400:hover:where(.dark, .dark *) { + --tw-text-opacity: 1; + color: rgb(163 163 163 / var(--tw-text-opacity, 1)); +} + .dark\:hover\:text-neutral-500:hover:where(.dark, .dark *) { --tw-text-opacity: 1; color: rgb(115 115 115 / var(--tw-text-opacity, 1)); @@ -3346,6 +3418,11 @@ hs-accordion-toggle w-full text-start flex items-center gap-x-3.5 py-2 px-2.5 te color: rgb(212 212 212 / var(--tw-text-opacity, 1)); } +.dark\:focus\:text-neutral-400:focus:where(.dark, .dark *) { + --tw-text-opacity: 1; + color: rgb(163 163 163 / var(--tw-text-opacity, 1)); +} + .dark\:focus\:text-neutral-500:focus:where(.dark, .dark *) { --tw-text-opacity: 1; color: rgb(115 115 115 / var(--tw-text-opacity, 1)); diff --git a/src/client/public/js/guild/subscriptions.js b/src/client/public/js/guild/subscriptions.js index 9a9beea..14f60da 100644 --- a/src/client/public/js/guild/subscriptions.js +++ b/src/client/public/js/guild/subscriptions.js @@ -31,7 +31,7 @@ const formatTimestamp = timestamp => { // otherwise show the year return now - d < 31536000000 ? `${d.getDate()} ${d.toLocaleString("en-GB", { month: "short" })}, ${d.getHours().toString().padStart(2, "0")}:${d.getMinutes().toString().padStart(2, "0")}` - : `${d.getDate()} ${d.toLocaleString("en-GB", { month: "short" })}, ${d.getFullYear()}`; + : `${d.getDate()} ${d.toLocaleString("en-GB", { month: "short" })} ${d.getFullYear()}`; } const defineTable = () => { @@ -88,7 +88,7 @@ const defineTable = () => {
@@ -102,11 +102,11 @@ const defineTable = () => { data: "name", orderable: true, searchable: true, - render: (data, type, row) => { + render: data => { return ` - ${row.name} + ${data} `; @@ -118,11 +118,11 @@ const defineTable = () => { data: "url", orderable: true, searchable: true, - render: (data, type, row) => { + render: data => { return ` - - ${row.url} + + ${data} `; @@ -136,7 +136,9 @@ const defineTable = () => { searchable: false, render: (data, type, row) => { return ` - + + ${data.length} channels + `; } }, diff --git a/src/client/views/guild/subscriptions.ejs b/src/client/views/guild/subscriptions.ejs index 4f9d883..2ebd55b 100644 --- a/src/client/views/guild/subscriptions.ejs +++ b/src/client/views/guild/subscriptions.ejs @@ -2,6 +2,14 @@ <%- include("guildHeader") -%> +
+
+ Subscriptions + Filters + Style +
+
+
@@ -15,7 +23,7 @@