-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add time in note title #317
base: main
Are you sure you want to change the base?
Conversation
src/calendars/FullNoteCalendar.ts
Outdated
import { EditableCalendar, EditableEventResponse } from "./EditableCalendar"; | ||
|
||
const basenameFromEvent = (event: OFCEvent): string => { | ||
switch (event.type) { | ||
case undefined: | ||
case "single": | ||
if (isRangeTimeData(event)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use something like
if (this.plugin.settings.timeInNoteTitle && isRangeTimeData(event)) {
But this.plugin.settings
is not valid from here and I don't know how to access to that value in this place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davish I need help with this part. How would you check that setting from the FullNoteCalendar class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can pass the boolean timeInNoteTitle
as an argument to the FullNoteCalendar
constructor. When the calendar is registered in main.ts
. I don't think there's a way right now to get access to "global" settings, but you could make it a per-calendar setting that lives as part of the CalendarInfo
type for local
calendars.
Thanks for contributing @jartigag! It seems like this PR is still a work in progress, so I'm converting it to a draft for now. Feel free to mark it as ready for review whenever. |
Hi again, @davish! I made it work, but one thing isn't ready yet: the property "timeInNoteTitle" isn't written in data.json... I have to write it manually like this:
What is it missing? |
Hi!
In first place, thank you for your plugin. It's really useful for me!
In second place, it's my first contribution in Typescript so sorry for my lack of knowledge.
I would like to enable a new setting needed to create an event with the same event title in the same day.
It would be just a boolean setting that says "Format note title as <YYYY-MM-DD> <HHDD> <Event title>.md"