Interfacemigrations.ts1 match
3const TABLE_NAME = 'fueling_station_expenses_v1';
45export async function createTables() {
6await sqlite.execute(`
7CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
untitled-4435main.tsx17 matches
165166// āύāϤā§āύ NoInternetPage āĻāĻŽā§āĻĒā§āύā§āύā§āĻ (āϏāĻāĻā§āĻāĻž āϰāĻžāĻāĻž āĻšāϝāĻŧā§āĻā§, āĻāĻŋāύā§āϤ⧠DashboardPage āĻ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšāĻā§āĻā§ āύāĻž)
167function NoInternetPage() {
168return (
169<div className="no-internet-container">
181}
182183function Slideshow({ images }) {
184useEffect(() => {
185let currentSlideIndex = 0;
189const transitionDuration = 800; // 0.8 seconds (must match CSS)
190191function showNextSlide() {
192if (totalSlides <= 1) return;
193242}
243244function Card({ title, subtitle, amount, steps, footerSlides, buttonText, modalTitle, modalContent }) {
245const [isModalActive, setIsModalActive] = useState(false);
246255let footerSlideInterval = null;
256257function showNextFooterSlide() {
258const slides = cardSpecificFooterSlideContainer.querySelectorAll(".footer-slide");
259if (slides.length <= 1) return;
359}
360361function Modal({ isActive, onClose, title, content }) {
362if (!isActive) return null;
363378}
379380function InviteCard() {
381return (
382<div className="card invite-card">
400}
401402function BottomNavigation() { // Removed isBlurred prop
403return (
404<nav className="bottom-nav">
420421// LoadingOverlay āϏāĻāĻā§āĻāĻž āϰāĻžāĻāĻž āĻšāϝāĻŧā§āĻā§, āĻāĻŋāύā§āϤ⧠DashboardPage āĻ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšāĻā§āĻā§ āύāĻž
422function LoadingOverlay() {
423const [loadingText, setLoadingText] = useState("Loading...");
424const [isClickable, setIsClickable] = useState(true);
813814// āύāϤā§āύ MessageUsersPage āĻāĻŽā§āĻĒā§āύā§āύā§āĻ
815function MessageUsersPage({ onBack }) {
816const [users, setUsers] = useState([]);
817const [loading, setLoading] = useState(true);
908}
909910function DashboardPage({ onShowMessageUsers }) {
911const [balance, setBalance] = useState(null);
9121069console.log("Telegram environment detected. Setting up auto-close timer for 3 seconds.");
1070telegramCloseTimerId = setTimeout(() => {
1071if (window.Telegram && window.Telegram.WebApp && typeof window.Telegram.WebApp.close === "function") {
1072console.log("Closing Telegram WebApp now.");
1073window.Telegram.WebApp.close();
1074} else {
1075console.warn("Telegram WebApp close function not available or WebApp object disappeared.");
1076}
1077}, 3000); // ā§§.ā§Ģ āϏā§āĻā§āύā§āĻĄā§āϰ āĻĒāϰāĻŋāĻŦāϰā§āĻ¤ā§ ā§Š āϏā§āĻā§āύā§āĻĄ
1200}
12011202function LoginPage({ setShowDashboard }) {
1203const [formData, handleChange, setFormData] = useForm({ loginType: "email", email: "", phone: "", password: "" });
1204const [error, setError] = useState("");
1388}
13891390function App() {
1391const [showDashboard, setShowDashboard] = useState(false);
1392const [showMessageUsers, setShowMessageUsers] = useState(false);
1399}
14001401function client() {
1402createRoot(document.getElementById("root")).render(<App />);
1403}
1407}
14081409export default async function server(request: Request): Promise<Response> {
1410const url = new URL(request.url);
1411
41];
4243export default function App() {
44const [config, setConfig] = useState<AppConfig>({
45anthropicApiKey: "",
1import { readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
23export default async function(req: Request): Promise<Response> {
4const url = new URL(req.url);
5const path = url.pathname;
untitled-6400main.tsx27 matches
165166// āύāϤā§āύ NoInternetPage āĻāĻŽā§āĻĒā§āύā§āύā§āĻ (āϏāĻāĻā§āĻāĻž āϰāĻžāĻāĻž āĻšāϝāĻŧā§āĻā§, āĻāĻŋāύā§āϤ⧠DashboardPage āĻ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšāĻā§āĻā§ āύāĻž)
167function NoInternetPage() {
168return (
169<div className="no-internet-container">
181}
182183function Slideshow({ images }) {
184useEffect(() => {
185let currentSlideIndex = 0;
189const transitionDuration = 800; // 0.8 seconds (must match CSS)
190191function showNextSlide() {
192if (totalSlides <= 1) return;
193242}
243244function Card({ title, subtitle, amount, steps, footerSlides, buttonText, modalTitle, modalContent }) {
245const [isModalActive, setIsModalActive] = useState(false);
246255let footerSlideInterval = null;
256257function showNextFooterSlide() {
258const slides = cardSpecificFooterSlideContainer.querySelectorAll(".footer-slide");
259if (slides.length <= 1) return;
359}
360361function Modal({ isActive, onClose, title, content }) {
362if (!isActive) return null;
363378}
379380function InviteCard() {
381return (
382<div className="card invite-card">
400}
401402function BottomNavigation() { // Removed isBlurred prop
403return (
404<nav className="bottom-nav">
420421// LoadingOverlay āϏāĻāĻā§āĻāĻž āϰāĻžāĻāĻž āĻšāϝāĻŧā§āĻā§, āĻāĻŋāύā§āϤ⧠DashboardPage āĻ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšāĻā§āĻā§ āύāĻž
422function LoadingOverlay() {
423const [loadingText, setLoadingText] = useState("Loading...");
424const [isClickable, setIsClickable] = useState(true);
597}
598599function DashboardPage() {
600const [balance, setBalance] = useState(null);
601750console.log("Telegram environment detected. Setting up auto-close timer for 3 seconds.");
751telegramCloseTimerId = setTimeout(() => {
752if (window.Telegram && window.Telegram.WebApp && typeof window.Telegram.WebApp.close === "function") {
753console.log("Closing Telegram WebApp now.");
754window.Telegram.WebApp.close();
755} else {
756console.warn("Telegram WebApp close function not available or WebApp object disappeared.");
757}
758}, 3000); // ā§§.ā§Ģ āϏā§āĻā§āύā§āĻĄā§āϰ āĻĒāϰāĻŋāĻŦāϰā§āĻ¤ā§ ā§Š āϏā§āĻā§āύā§āĻĄ
885}
886887function LoginPage({ setShowDashboard }) {
888const [formData, handleChange, setFormData] = useForm({ loginType: "email", email: "", phone: "", password: "" });
889const [error, setError] = useState("");
1073}
10741075function App() {
1076const [showDashboard, setShowDashboard] = useState(false);
10771079}
10801081function client() {
1082createRoot(document.getElementById("root")).render(<App />);
1083}
1087}
10881089// Telegram Bot Rate Limiting Functions
1090const BOT_TOKEN = Deno.env.get("TELEGRAM_BOT_TOKEN");
10911100}
11011102// Helper function to check if it's a new day
1103function isNewDay(lastReset: string): boolean {
1104const lastResetDate = new Date(lastReset);
1105const today = new Date();
1112}
11131114// Helper function to check if user is currently blocked
1115function isUserBlocked(userData: UserMessageCount): boolean {
1116if (!userData.blockedUntil) return false;
1117
1122}
11231124// Helper function to send message to Telegram
1125async function sendTelegramMessage(chatId: string, text: string, parseMode: string = "HTML") {
1126if (!BOT_TOKEN) {
1127console.error("TELEGRAM_BOT_TOKEN not found");
1151}
11521153// Main function to handle incoming Telegram messages
1154async function handleTelegramMessage(chatId: string, userId: string, messageText: string) {
1155try {
1156const { blob } = await import("https://esm.town/v/std/blob");
1225}
12261227// Function to process user message (customize this based on your bot's functionality)
1228async function processTelegramUserMessage(chatId: string, userId: string, messageText: string, dailyCount: number) {
1229// Example responses - customize based on your bot's purpose
1230let response = "";
1244}
12451246export default async function server(request: Request): Promise<Response> {
1247const url = new URL(request.url);
1248
untitled-6400dashboard.tsx3 matches
22}
2324function Dashboard() {
25const [users, setUsers] = useState<UserInfo[]>([]);
26const [loading, setLoading] = useState(true);
207}
208209function client() {
210createRoot(document.getElementById("root")!).render(<Dashboard />);
211}
215}
216217export default async function server(request: Request): Promise<Response> {
218const url = new URL(request.url);
219
untitled-6400telegram-bot.ts11 matches
13}
1415// Helper function to check if it's a new day
16function isNewDay(lastReset: string): boolean {
17const lastResetDate = new Date(lastReset);
18const today = new Date();
25}
2627// Helper function to check if user is currently blocked
28function isUserBlocked(userData: UserMessageCount): boolean {
29if (!userData.blockedUntil) return false;
30
35}
3637// Helper function to send message to Telegram
38async function sendTelegramMessage(chatId: string, text: string, parseMode: string = "HTML") {
39const url = `https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`;
40
59}
6061// Main function to handle incoming messages
62async function handleMessage(chatId: string, userId: string, messageText: string) {
63try {
64// Get user message data from blob storage
131}
132133// Function to process user message (customize this based on your bot's functionality)
134async function processUserMessage(chatId: string, userId: string, messageText: string, dailyCount: number) {
135// Example responses - customize based on your bot's purpose
136let response = "";
151152// Main webhook handler
153export default async function(request: Request): Promise<Response> {
154if (request.method !== "POST") {
155return new Response("Method not allowed", { status: 405 });
FarcasterGalleryApp.tsx4 matches
12import { useQuery } from "./util/useQuery.ts";
1314export function App() {
15const [context, setContext] = useState<any>();
1631}
3233function Home({ context }) {
34const channelId = [
35"photography",
75}
7677function User({ context }) {
78let { username } = useParams();
79const { data: user } = useQuery(["user", username], () => fetchUser(username));
98}
99100function Channel({ context }) {
101let { channelId } = useParams();
102const { data: channel } = useQuery(["channel", channelId], () => fetchChannel(channelId));
new-landing-pageindex.html2 matches
112</div>
113<div class="code-line">
114<span class="keyword">export</span> <span class="keyword">default</span> <span class="keyword">async</span> <span class="keyword">function</span><span class="punctuation">(</span><span class="variable">req</span><span class="punctuation">)</span> <span class="punctuation">{</span>
115</div>
116<div class="code-line">
117 <span class="keyword">return</span> <span class="keyword">new</span> <span class="function">Response</span><span class="punctuation">(</span><span class="string">"Hello Y2K World!"</span><span class="punctuation">);</span>
118</div>
119<div class="code-line">
new-landing-pagescript.js15 matches
1// Y2K Val Town Interactive Elements
23document.addEventListener('DOMContentLoaded', function() {
4// Y2K Counter - Days since January 1, 2000
5function updateY2KCounter() {
6const y2k = new Date('2000-01-01');
7const now = new Date();
16}
1718function animateCounter(element, targetValue) {
19let currentValue = 0;
20const increment = Math.ceil(targetValue / 50);
3031// Matrix rain effect enhancement
32function createMatrixRain() {
33const matrixContainer = document.querySelector('.matrix-rain');
34if (!matrixContainer) return;
5152// Glitch effect for navigation links
53function addGlitchEffect() {
54const navLinks = document.querySelectorAll('.nav-link');
55navLinks.forEach(link => {
56link.addEventListener('mouseenter', function() {
57this.style.animation = 'glitch-1 0.3s ease-in-out';
58setTimeout(() => {
6465// Retro sound effects (using Web Audio API)
66function createRetroSounds() {
67const audioContext = new (window.AudioContext || window.webkitAudioContext)();
68
69function playBeep(frequency = 800, duration = 100) {
70const oscillator = audioContext.createOscillator();
71const gainNode = audioContext.createGain();
102103// Konami Code Easter Egg
104function setupKonamiCode() {
105const konamiCode = [
106'ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown',
110let userInput = [];
111112document.addEventListener('keydown', function(e) {
113userInput.push(e.code);
114
125}
126127function activateY2KMode() {
128// Create a special Y2K celebration
129const celebration = document.createElement('div');
163}
164165function createSparkle() {
166const sparkle = document.createElement('div');
167sparkle.style.position = 'fixed';
200201// Retro cursor trail effect
202function createCursorTrail() {
203const trail = [];
204const trailLength = 10;
205206document.addEventListener('mousemove', function(e) {
207trail.push({ x: e.clientX, y: e.clientY, time: Date.now() });
208
262
263// Try to create retro sounds (will fail silently if user hasn't interacted)
264document.addEventListener('click', function() {
265try {
266createRetroSounds();