Skip to content

Commit f6a8c83

Browse files
authored
feat: support calendar (#56)
* chore: modified title sync * chore: replace console.log to console.debug * feat: add FullCalendar dependencies and improve code organization * chore: update view name bugs * chore: support no date row * chore: layout by created time and modified time * chore: adjust time * chore: pnpm install * chore: fix something
1 parent ef00175 commit f6a8c83

File tree

133 files changed

+7538
-1591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+7538
-1591
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"typescript.tsdk": "node_modules/typescript/lib",
3+
"cursor.ai.language": "en",
4+
"cursor.commitMessage.language": "english",
5+
"locale": "en-US",
36
"editor.rulers": [
47
120
58
],

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
"@emotion/react": "^11.10.6",
4242
"@emotion/styled": "^11.10.6",
4343
"@floating-ui/react": "^0.26.27",
44+
"@fullcalendar/core": "^6.1.19",
45+
"@fullcalendar/daygrid": "^6.1.19",
46+
"@fullcalendar/interaction": "^6.1.19",
47+
"@fullcalendar/multimonth": "^6.1.19",
48+
"@fullcalendar/react": "^6.1.19",
49+
"@fullcalendar/timegrid": "^6.1.19",
4450
"@jest/globals": "^29.7.0",
4551
"@mui/icons-material": "^5.11.11",
4652
"@mui/material": "^6.0.0",

pnpm-lock.yaml

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/create-symlink.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (!fs.existsSync(fullTargetPath)) {
2828

2929
if (fs.existsSync(fullTargetPath)) {
3030
// unlink existing symlink
31-
console.log(chalk.yellow(`unlinking existing symlink: `) + chalk.blue(`${fullTargetPath}`));
31+
console.debug(chalk.yellow(`unlinking existing symlink: `) + chalk.blue(`${fullTargetPath}`));
3232
fs.unlinkSync(fullTargetPath);
3333
}
3434

@@ -38,6 +38,6 @@ fs.symlink(fullSourcePath, fullTargetPath, 'junction', (err) => {
3838
console.error(chalk.red(`error creating symlink: ${err.message}`));
3939
process.exit(1);
4040
}
41-
console.log(chalk.green(`symlink created: `) + chalk.blue(`${fullSourcePath}`) + ' -> ' + chalk.blue(`${fullTargetPath}`));
41+
console.debug(chalk.green(`symlink created: `) + chalk.blue(`${fullSourcePath}`) + ' -> ' + chalk.blue(`${fullTargetPath}`));
4242

4343
});

scripts/generateTailwindColors.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ fs.writeFileSync(tailwindConfigFilePath, tailwindColorTemplate, 'utf-8');
5858
const tailwindShadowFilePath = path.join(__dirname, '../tailwind/box-shadow.cjs');
5959
fs.writeFileSync(tailwindShadowFilePath, tailwindShadowTemplate, 'utf-8');
6060

61-
console.log('Tailwind CSS colors configuration generated successfully.');
61+
console.debug('Tailwind CSS colors configuration generated successfully.');

scripts/generate_af_icons.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const main = () => {
5858
const categories = processSvgFiles(iconsDirPath);
5959
const outputFilePath = path.join(iconsDirPath, 'icons.json');
6060
outputJson(categories, outputFilePath);
61-
console.log(`JSON data has been written to ${outputFilePath}`);
61+
console.debug(`JSON data has been written to ${outputFilePath}`);
6262
};
6363

6464
main();

scripts/merge-coverage.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fs.copyFileSync(path.join(__dirname, '../coverage/merged/coverage-final.json'),
2929

3030
// Generate final merged report
3131
execSync('nyc report --reporter=html --reporter=text-summary --report-dir=coverage/merged --temp-dir=coverage/.nyc_output', { stdio: 'inherit' });
32-
console.log(`Merged coverage report written to coverage/merged`);
32+
console.debug(`Merged coverage report written to coverage/merged`);
3333

3434

3535

scripts/system-token/convert-tokens.cjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path');
55
function ensureDirectoryExists (dirPath) {
66
if (!fs.existsSync(dirPath)) {
77
fs.mkdirSync(dirPath, { recursive: true });
8-
console.log(`Created directory: ${dirPath}`);
8+
console.debug(`Created directory: ${dirPath}`);
99
}
1010
}
1111

@@ -219,7 +219,7 @@ function convertDesignTokens (primitiveFilePath, semanticFilePath, outputFilePat
219219

220220
// Write file
221221
fs.writeFileSync(outputFilePath, css, 'utf8');
222-
console.log(`CSS variables written to ${outputFilePath}`);
222+
console.debug(`CSS variables written to ${outputFilePath}`);
223223

224224
return { variableNames };
225225
}
@@ -237,7 +237,7 @@ ensureDirectoryExists(cssOutputDir);
237237
ensureDirectoryExists(tailwindOutputDir);
238238

239239
// Execute conversion
240-
console.log('Converting design tokens to CSS variables...');
240+
console.debug('Converting design tokens to CSS variables...');
241241

242242
// Collect all variable names
243243
let allVariableNames = [];
@@ -261,9 +261,9 @@ const darkResult = convertDesignTokens(
261261
// Dark theme variables are the same as light theme, no need to merge
262262

263263
// Generate Tailwind color configuration
264-
console.log('Generating Tailwind color configuration with CSS variable references...');
264+
console.debug('Generating Tailwind color configuration with CSS variable references...');
265265
const tailwindColors = createTailwindColorsFromVariables(allVariableNames);
266266
fs.writeFileSync(path.join(tailwindOutputDir, 'new-colors.cjs'), tailwindColors);
267-
console.log(`Tailwind colors written to ${path.join(tailwindOutputDir, 'new-colors.cjs')}`);
267+
console.debug(`Tailwind colors written to ${path.join(tailwindOutputDir, 'new-colors.cjs')}`);
268268

269-
console.log('Conversion completed successfully!');
269+
console.debug('Conversion completed successfully!');

src/@types/translations/en.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@
342342
"lightMode": "Switch to Light mode",
343343
"darkMode": "Switch to Dark mode",
344344
"openAsPage": "Open as a Page",
345+
"openEvent": "Open event",
345346
"addNewRow": "Add a new row",
346347
"openMenu": "Click to open menu",
347348
"dragRow": "Drag to reorder the row",
@@ -1608,7 +1609,8 @@
16081609
"action": "Action",
16091610
"add": "Click add to below",
16101611
"drag": "Drag to move",
1611-
"deleteRowPrompt": "Are you sure you want to delete {{count}} rows? This action cannot be undone.",
1612+
"deleteRowPrompt_one": "Are you sure you want to delete {{count}} row? This action cannot be undone.",
1613+
"deleteRowPrompt_many": "Are you sure you want to delete {{count}} rows? This action cannot be undone.",
16121614
"deleteCardPrompt": "Are you sure you want to delete this card? This action cannot be undone.",
16131615
"dragAndClick": "Drag to move, click to open menu",
16141616
"insertRecordAbove": "Insert record above",
@@ -2201,18 +2203,24 @@
22012203
"menuName": "Calendar",
22022204
"defaultNewCalendarTitle": "Untitled",
22032205
"newEventButtonTooltip": "Add a new event",
2206+
"deleteEvent": "Delete event",
2207+
"addEventOn": "Add event on",
2208+
"more": "{{num}}+ more",
22042209
"navigation": {
22052210
"today": "Today",
22062211
"jumpToday": "Jump to Today",
2207-
"previousMonth": "Previous Month",
2208-
"nextMonth": "Next Month",
2212+
"previous": "Previous {{view}}",
2213+
"next": "Next {{view}}",
22092214
"views": {
22102215
"day": "Day",
22112216
"week": "Week",
22122217
"month": "Month",
22132218
"year": "Year"
22142219
}
22152220
},
2221+
"week": "Week",
2222+
"month": "Month",
2223+
"multiMonth": "Multi-month",
22162224
"mobileEventScreen": {
22172225
"emptyTitle": "No events yet",
22182226
"emptyBody": "Press the plus button to create an event on this day."
@@ -2232,7 +2240,8 @@
22322240
"unscheduledEventsTitle": "Unscheduled events",
22332241
"clickToAdd": "Click to add to the calendar",
22342242
"name": "Calendar settings",
2235-
"clickToOpen": "Click to open the record"
2243+
"clickToOpen": "Click to open the record",
2244+
"noDatePopoverTitle": "Drag or click to assign a date"
22362245
},
22372246
"referencedCalendarPrefix": "View of",
22382247
"quickJumpYear": "Jump to",

src/application/awareness/selector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export function useRemoteSelectionsSelector(awareness?: Awareness) {
9292
timestamp: state.timestamp,
9393
});
9494
} else {
95-
console.log(`🎯 No selection found for client ${clientId}`);
95+
console.debug(`🎯 No selection found for client ${clientId}`);
9696
}
9797
});
9898

@@ -120,7 +120,7 @@ export function useRemoteSelectionsSelector(awareness?: Awareness) {
120120
};
121121
});
122122

123-
console.log('🎯 Final cursors array:', result);
123+
console.debug('🎯 Final cursors array:', result);
124124
return result;
125125
}, [cursors, editor]);
126126

0 commit comments

Comments
 (0)