-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update remember-the-date extension (#14151)
* Update remember-the-date extension - Add new command - Initial commit * Update CHANGELOG.md and optimise images --------- Co-authored-by: raycastbot <bot@raycast.com>
- Loading branch information
1 parent
b9b1257
commit c08fd92
Showing
9 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { updateCommandMetadata } from "@raycast/api"; | ||
import { getFormattedList } from "./list"; | ||
import moment from "moment"; | ||
|
||
export default async function UpNext() { | ||
const datesList = await getFormattedList(); | ||
const nextDate = datesList[0]?.items?.[0]; | ||
|
||
let subtitle = "No upcoming dates"; | ||
|
||
if (nextDate) { | ||
const untilNextDate = `${ | ||
nextDate.name.length > 15 ? nextDate.name.substring(0, 15) + "..." : nextDate.name | ||
} ${moment(nextDate.date).fromNow()}`; | ||
subtitle = untilNextDate; | ||
} | ||
|
||
updateCommandMetadata({ | ||
subtitle, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters