One Calendar is a privacy-first calendar web app built with Next.js. It has modern security features, including e2ee, password-protected sharing, and self-destructing share links 📅 calendar.xyehr.cn
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(sidebar): avoid render-loop when syncing selected date

+154 -147
+11 -4
components/app/sidebar/sidebar.tsx
··· 10 10 import { Input } from "@/components/ui/input" 11 11 import { Label } from "@/components/ui/label" 12 12 import { Plus, X, Edit2 } from "lucide-react" 13 - import { useState, type CSSProperties } from "react" 13 + import { useEffect, useState, type CSSProperties } from "react" 14 14 import { cn } from "@/lib/utils" 15 15 import { toast } from "sonner" 16 16 import Image from "next/image" ··· 102 102 } 103 103 const deleteCategoryEventsLabel = t.deleteCategoryEvents || "同时删除此分类下的所有日程" 104 104 105 - if (selectedDate && (!localSelectedDate || selectedDate.getTime() !== localSelectedDate.getTime())) { 106 - setLocalSelectedDate(selectedDate) 107 - } 105 + useEffect(() => { 106 + if (selectedDate) { 107 + setLocalSelectedDate((prev) => { 108 + if (!prev || prev.getTime() !== selectedDate.getTime()) { 109 + return selectedDate 110 + } 111 + return prev 112 + }) 113 + } 114 + }, [selectedDate]) 108 115 109 116 const addCategory = () => { 110 117 if (newCategoryName.trim()) {
+3 -3
locales/bn.json
··· 458 458 "sidebarCalendarWeekdaysShort": [ 459 459 "রবি", 460 460 "সোম", 461 - "মঙ্গল", 461 + "মং", 462 462 "বুধ", 463 - "বৃহস্পতি", 464 - "শুক্র", 463 + "বৃহ", 464 + "শুক", 465 465 "শনি" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [
+7 -7
locales/fr.json
··· 456 456 "colorAmber": "Ambre", 457 457 "colorTeal": "Turquoise", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "dim.", 460 - "lun.", 461 - "mar.", 462 - "mer.", 463 - "jeu.", 464 - "ven.", 465 - "sam." 459 + "dim", 460 + "lun", 461 + "mar", 462 + "mer", 463 + "jeu", 464 + "ven", 465 + "sam" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "janvier",
+2 -2
locales/hi.json
··· 458 458 "sidebarCalendarWeekdaysShort": [ 459 459 "रवि", 460 460 "सोम", 461 - "मंगल", 461 + "मंग", 462 462 "बुध", 463 463 "गुरु", 464 - "शुक्र", 464 + "शुक", 465 465 "शनि" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [
+7 -7
locales/is.json
··· 456 456 "colorAmber": "Rafgulur", 457 457 "colorTeal": "Blágrænn", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "sun.", 460 - "mán.", 461 - "þri.", 462 - "mið.", 463 - "fim.", 464 - "fös.", 465 - "lau." 459 + "sun", 460 + "mán", 461 + "þri", 462 + "mið", 463 + "fim", 464 + "fös", 465 + "lau" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "janúar",
+7 -7
locales/lv.json
··· 456 456 "colorAmber": "Dzintara", 457 457 "colorTeal": "Zilganzaļa", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "Svētd.", 460 - "Pirmd.", 461 - "Otrd.", 462 - "Trešd.", 463 - "Ceturtd.", 464 - "Piektd.", 465 - "Sestd." 459 + "Svē", 460 + "Pir", 461 + "Otr", 462 + "Tre", 463 + "Cet", 464 + "Pie", 465 + "Ses" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "janvāris",
+7 -7
locales/mk.json
··· 456 456 "colorAmber": "Килибарна", 457 457 "colorTeal": "Тиркизна", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "нед.", 460 - "пон.", 461 - "вто.", 462 - "сре.", 463 - "чет.", 464 - "пет.", 465 - "саб." 459 + "нед", 460 + "пон", 461 + "вто", 462 + "сре", 463 + "чет", 464 + "пет", 465 + "саб" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "јануари",
+7 -7
locales/nb.json
··· 456 456 "colorAmber": "Rav", 457 457 "colorTeal": "Blågrønn", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "søn.", 460 - "man.", 461 - "tir.", 462 - "ons.", 463 - "tor.", 464 - "fre.", 465 - "lør." 459 + "søn", 460 + "man", 461 + "tir", 462 + "ons", 463 + "tor", 464 + "fre", 465 + "lør" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "januar",
+7 -7
locales/pl.json
··· 456 456 "colorAmber": "Bursztynowy", 457 457 "colorTeal": "Turkusowy", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "niedz.", 460 - "pon.", 461 - "wt.", 462 - "śr.", 463 - "czw.", 464 - "pt.", 465 - "sob." 459 + "nie", 460 + "pon", 461 + "wt", 462 + "śr", 463 + "czw", 464 + "pt", 465 + "sob" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "styczeń",
+7 -7
locales/pt.json
··· 456 456 "colorAmber": "Âmbar", 457 457 "colorTeal": "Verde-azulado", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "dom.", 460 - "seg.", 461 - "ter.", 462 - "qua.", 463 - "qui.", 464 - "sex.", 465 - "sáb." 459 + "dom", 460 + "seg", 461 + "ter", 462 + "qua", 463 + "qui", 464 + "sex", 465 + "sáb" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "janeiro",
+6 -6
locales/ro.json
··· 456 456 "colorAmber": "Chihlimbar", 457 457 "colorTeal": "Turcoaz", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "dum.", 460 - "lun.", 461 - "mar.", 462 - "mie.", 459 + "dum", 460 + "lun", 461 + "mar", 462 + "mie", 463 463 "joi", 464 - "vin.", 465 - "sâm." 464 + "vin", 465 + "sâm" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "ianuarie",
+7 -7
locales/sl.json
··· 456 456 "colorAmber": "Jantarna", 457 457 "colorTeal": "Modrozelena", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "ned.", 460 - "pon.", 461 - "tor.", 462 - "sre.", 463 - "čet.", 464 - "pet.", 465 - "sob." 459 + "ned", 460 + "pon", 461 + "tor", 462 + "sre", 463 + "čet", 464 + "pet", 465 + "sob" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "januar",
+1 -1
locales/sv.json
··· 460 460 "mån", 461 461 "tis", 462 462 "ons", 463 - "tors", 463 + "tor", 464 464 "fre", 465 465 "lör" 466 466 ],
+7 -7
locales/sw.json
··· 456 456 "colorAmber": "Rangi ya kaharabu", 457 457 "colorTeal": "Samawati-kijani", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "Jumapili", 460 - "Jumatatu", 461 - "Jumanne", 462 - "Jumatano", 463 - "Alhamisi", 464 - "Ijumaa", 465 - "Jumamosi" 459 + "Jpl", 460 + "Jtt", 461 + "Jnn", 462 + "Jtn", 463 + "Alh", 464 + "Iju", 465 + "Jms" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "Januari",
+7 -7
locales/th.json
··· 456 456 "colorAmber": "สีอำพัน", 457 457 "colorTeal": "สีเขียวน้ำทะเล", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "อา.", 460 - "จ.", 461 - "อ.", 462 - "พ.", 463 - "พฤ.", 464 - "ศ.", 465 - "ส." 459 + "อา", 460 + "จ", 461 + "อ", 462 + "พ", 463 + "พฤ", 464 + "ศ", 465 + "ส" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "มกราคม",
+6 -6
locales/vi.json
··· 457 457 "colorTeal": "Xanh mòng két", 458 458 "sidebarCalendarWeekdaysShort": [ 459 459 "CN", 460 - "Th 2", 461 - "Th 3", 462 - "Th 4", 463 - "Th 5", 464 - "Th 6", 465 - "Th 7" 460 + "Th2", 461 + "Th3", 462 + "Th4", 463 + "Th5", 464 + "Th6", 465 + "Th7" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "Tháng 1",
+14 -14
locales/yue.json
··· 479 479 "12月" 480 480 ], 481 481 "sidebarCalendarMonthYearFormat": "{{year}}年{{month}}", 482 - "editCategory": "编辑分类", 483 - "categoryUpdated": "分类已更新", 484 - "deleteCloudConfirmTitle": "删除云端备份数据", 485 - "deleteCloudConfirmDescription": "此操作会永久删除你的加密云端备份。请输入 DELETE CLOUD DATA 以继续。", 486 - "confirmDeleteData": "确认删除数据", 487 - "countdownIcon": "图标", 488 - "countdownSearchIcon": "搜索图标", 489 - "countdownAdded": "倒数日已添加", 490 - "countdownUpdated": "倒数日已更新", 491 - "countdownDeleted": "倒数日已删除", 482 + "editCategory": "編輯分類", 483 + "categoryUpdated": "分類已更新", 484 + "deleteCloudConfirmTitle": "刪除雲端備份數據", 485 + "deleteCloudConfirmDescription": "呢個操作會永久刪除你嘅加密雲端備份。請輸入 DELETE CLOUD DATA 嚟繼續。", 486 + "confirmDeleteData": "確認刪除數據", 487 + "countdownIcon": "圖示", 488 + "countdownSearchIcon": "搜尋圖示", 489 + "countdownAdded": "倒數日已新增", 490 + "countdownUpdated": "倒數日已更新", 491 + "countdownDeleted": "倒數日已刪除", 492 492 "toastPosition": "通知位置", 493 493 "toastPositionBottomLeft": "左下", 494 494 "toastPositionBottomCenter": "中下", 495 495 "toastPositionBottomRight": "右下", 496 - "countdownDaysAgo": "天前", 497 - "deleteCategoryEvents": "同时删除此分类下的全部日程", 498 - "categoryDeletedWithEvents": "分类及其全部日程已删除", 499 - "importToCalendarCategory": "导入到日历分类", 496 + "countdownDaysAgo": "日前", 497 + "deleteCategoryEvents": "同時刪除呢個分類底下嘅全部日程", 498 + "categoryDeletedWithEvents": "分類同其全部日程已刪除", 499 + "importToCalendarCategory": "匯入到日曆分類", 500 500 "status": "狀態", 501 501 "feedback": "回饋", 502 502 "privacy": "私隱",
+20 -20
locales/zh-HK.json
··· 456 456 "colorAmber": "琥珀色", 457 457 "colorTeal": "藍綠色", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "週日", 460 - "週一", 461 - "週二", 462 - "週三", 463 - "週四", 464 - "週五", 465 - "週六" 459 + "日", 460 + "一", 461 + "二", 462 + "三", 463 + "四", 464 + "五", 465 + "六" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "1月", ··· 479 479 "12月" 480 480 ], 481 481 "sidebarCalendarMonthYearFormat": "{{year}}年{{month}}", 482 - "editCategory": "编辑分类", 483 - "categoryUpdated": "分类已更新", 484 - "deleteCloudConfirmTitle": "删除云端备份数据", 485 - "deleteCloudConfirmDescription": "此操作会永久删除你的加密云端备份。请输入 DELETE CLOUD DATA 以继续。", 486 - "confirmDeleteData": "确认删除数据", 487 - "countdownIcon": "图标", 488 - "countdownSearchIcon": "搜索图标", 489 - "countdownAdded": "倒数日已添加", 490 - "countdownUpdated": "倒数日已更新", 491 - "countdownDeleted": "倒数日已删除", 482 + "editCategory": "編輯分類", 483 + "categoryUpdated": "分類已更新", 484 + "deleteCloudConfirmTitle": "刪除雲端備份數據", 485 + "deleteCloudConfirmDescription": "此操作會永久刪除你的加密雲端備份。請輸入 DELETE CLOUD DATA 以繼續。", 486 + "confirmDeleteData": "確認刪除數據", 487 + "countdownIcon": "圖示", 488 + "countdownSearchIcon": "搜尋圖示", 489 + "countdownAdded": "倒數日已新增", 490 + "countdownUpdated": "倒數日已更新", 491 + "countdownDeleted": "倒數日已刪除", 492 492 "toastPosition": "通知位置", 493 493 "toastPositionBottomLeft": "左下", 494 494 "toastPositionBottomCenter": "中下", 495 495 "toastPositionBottomRight": "右下", 496 496 "countdownDaysAgo": "天前", 497 - "deleteCategoryEvents": "同时删除此分类下的全部日程", 498 - "categoryDeletedWithEvents": "分类及其全部日程已删除", 499 - "importToCalendarCategory": "导入到日历分类", 497 + "deleteCategoryEvents": "同時刪除此分類下的全部日程", 498 + "categoryDeletedWithEvents": "分類及其全部日程已刪除", 499 + "importToCalendarCategory": "匯入到日曆分類", 500 500 "status": "狀態", 501 501 "feedback": "回饋", 502 502 "privacy": "私隱",
+21 -21
locales/zh-TW.json
··· 456 456 "colorAmber": "琥珀色", 457 457 "colorTeal": "藍綠色", 458 458 "sidebarCalendarWeekdaysShort": [ 459 - "週日", 460 - "週一", 461 - "週二", 462 - "週三", 463 - "週四", 464 - "週五", 465 - "週六" 459 + "日", 460 + "一", 461 + "二", 462 + "三", 463 + "四", 464 + "五", 465 + "六" 466 466 ], 467 467 "sidebarCalendarMonthsLong": [ 468 468 "1月", ··· 479 479 "12月" 480 480 ], 481 481 "sidebarCalendarMonthYearFormat": "{{year}}年{{month}}", 482 - "editCategory": "编辑分类", 483 - "categoryUpdated": "分类已更新", 484 - "deleteCloudConfirmTitle": "删除云端备份数据", 485 - "deleteCloudConfirmDescription": "此操作会永久删除你的加密云端备份。请输入 DELETE CLOUD DATA 以继续。", 486 - "confirmDeleteData": "确认删除数据", 487 - "countdownIcon": "图标", 488 - "countdownSearchIcon": "搜索图标", 489 - "countdownAdded": "倒数日已添加", 490 - "countdownUpdated": "倒数日已更新", 491 - "countdownDeleted": "倒数日已删除", 482 + "editCategory": "編輯分類", 483 + "categoryUpdated": "分類已更新", 484 + "deleteCloudConfirmTitle": "刪除雲端備份資料", 485 + "deleteCloudConfirmDescription": "此操作會永久刪除您的加密雲端備份。請輸入 DELETE CLOUD DATA 以繼續。", 486 + "confirmDeleteData": "確認刪除資料", 487 + "countdownIcon": "圖示", 488 + "countdownSearchIcon": "搜尋圖示", 489 + "countdownAdded": "倒數日已新增", 490 + "countdownUpdated": "倒數日已更新", 491 + "countdownDeleted": "倒數日已刪除", 492 492 "toastPosition": "通知位置", 493 493 "toastPositionBottomLeft": "左下", 494 494 "toastPositionBottomCenter": "中下", 495 495 "toastPositionBottomRight": "右下", 496 496 "countdownDaysAgo": "天前", 497 - "deleteCategoryEvents": "同时删除此分类下的全部日程", 498 - "categoryDeletedWithEvents": "分类及其全部日程已删除", 499 - "importToCalendarCategory": "导入到日历分类", 497 + "deleteCategoryEvents": "同時刪除此分類下的全部行程", 498 + "categoryDeletedWithEvents": "分類及其全部行程已刪除", 499 + "importToCalendarCategory": "匯入到行事曆分類", 500 500 "status": "狀態", 501 501 "feedback": "回饋", 502 - "privacy": "隱私", 502 + "privacy": "隱私權", 503 503 "tos": "服務條款" 504 504 }