This commit is contained in:
lda committed 2025-05-26 06:55:19 +07:00
1 parent 6a74253339
commit 1a2582a8a8
7 files changed
+16 -13

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>cal app</title>
<link rel="stylesheet" href="/src/style.css"/>
<link rel="stylesheet" href="/src/style.css" />
<script type="module" src="/src/main.js" defer></script>
</head>
+6 -4
View File
@@ -1,4 +1,8 @@
import { Calendar, EventApi, EventHoveringArg } from "@fullcalendar/core";
import {
Calendar,
EventHoveringArg,
EventSourceInput,
} from "@fullcalendar/core";
import iCalendarPlugin from "@fullcalendar/icalendar";
import rrulePlugin from "@fullcalendar/rrule";
import listPlugin from "@fullcalendar/list";
@@ -81,9 +85,7 @@ export const getCalendarInstance = (): Calendar | null => {
return calendar;
};
const init_ics_source = (
url: string
): { url: string; format: string; color: string } => {
const init_ics_source = (url: string): EventSourceInput => {
return {
url: url,
format: "ics",
-1
View File
@@ -4,7 +4,6 @@ const backend_url = getElementById<HTMLInputElement>("be_url");
const excludedRegexInput = getElementById<HTMLInputElement>("regex_exc");
const includeRegexInput = getElementById<HTMLInputElement>("regex_inc");
export function getFormParams(): Record<string, string> {
const params = {
url: backend_url.value,
-4
View File
@@ -9,10 +9,6 @@ import { getElementById } from "./utils";
import { manageUrl } from "./queryHandler";
import { getFormParams, toggleFormVisibility } from "./formHandler";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-icons/font/bootstrap-icons.css";
import "tippy.js/dist/tippy.css";
const text_field = getElementById<HTMLInputElement>("ics_file");
const confirm_button = getElementById<HTMLButtonElement>("ics_run");
const add_button = getElementById<HTMLButtonElement>("ics_add");
-1
View File
@@ -12,7 +12,6 @@ export function queryCustomUrl(
return constructUrl(baseUrl, params);
}
/**
* Manages the URL based on the selected mode (manual or proxy) and validates it.
* @param mode - The selected mode ('manual' or 'args').
+5 -1
View File
@@ -3,6 +3,10 @@
Custom styles for calendar app
*/
@import "bootstrap/dist/css/bootstrap.css";
@import "bootstrap-icons/font/bootstrap-icons.css";
@import "tippy.js/dist/tippy.css";
body {
/* font-family: system-ui, sans-serif; */
background: #f8f9fa !important; /* cant be used since overriden */
@@ -12,4 +16,4 @@ body {
justify-content: center;
align-items: center;
min-height: 100vh;
}
}
+4 -1
View File
@@ -23,7 +23,10 @@ export function escapeHtml(text: string): string {
*/
export function linkify(text: string): string {
const escapedText = escapeHtml(text);
return escapedText.replace(/(https?:\/\/\S+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>');
return escapedText.replace(
/(https?:\/\/\S+)/g,
'<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>'
);
}
/**