Compare commits

...
15 changed files with 73 additions and 22 deletions
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.121](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/clipper
## [1.1.120](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/clipper
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/clipper",
"description": "Web clipper browser extension for Standard Notes",
"version": "1.1.120",
"version": "1.1.121",
"private": true,
"scripts": {
"build-mv2": "yarn clean && webpack --config ./webpack.config.prod.js",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.108.52](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/desktop
## [3.108.51](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/desktop
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@standardnotes/desktop",
"main": "./app/dist/index.js",
"version": "3.108.51",
"version": "3.108.52",
"license": "AGPL-3.0-or-later",
"author": "Standard Notes.",
"private": true,
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.56.32](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/mobile
## [3.56.31](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/mobile
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/mobile",
"version": "3.56.31",
"version": "3.56.32",
"author": "Standard Notes.",
"private": true,
"license": "AGPL-3.0-or-later",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.404](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/releases
## [1.4.403](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/releases
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/releases",
"version": "1.4.403",
"version": "1.4.404",
"license": "AGPL-3.0-or-later",
"main": "dist/releases.json",
"types": "dist/index.d.ts",
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.167.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/web
## [3.167.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)
**Note:** Version bump only for package @standardnotes/web
+11
View File
@@ -1,5 +1,16 @@
{
"versions": [
{
"version": "3.167.19",
"title": "[3.167.19](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)",
"date": null,
"body": "**Note:** Version bump only for package @standardnotes/web",
"parsed": {
"_": [
"Note: Version bump only for package @standardnotes/web"
]
}
},
{
"version": "3.167.18",
"title": "[3.167.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-07-28)",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/web",
"version": "3.167.18",
"version": "3.167.19",
"license": "AGPL-3.0-or-later",
"main": "dist/app.js",
"author": "Standard Notes",
@@ -66,7 +66,7 @@
"circular-dependency-plugin": "^5.2.2",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "*",
"dayjs": "^1.11.7",
"dayjs": "^1.11.9",
"dotenv": "^16.0.3",
"eslint": "*",
"eslint-config-prettier": "^8.9.0",
@@ -21,14 +21,8 @@ import { EditorOption, getDropdownItemsForAllEditors } from '@/Utils/DropdownIte
import { classNames } from '@standardnotes/utils'
import { NoteTitleFormatOptions } from './NoteTitleFormatOptions'
import { usePremiumModal } from '@/Hooks/usePremiumModal'
import dayjs from 'dayjs'
import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat'
import dayjsUTC from 'dayjs/plugin/utc'
import dayjsTimezone from 'dayjs/plugin/timezone'
dayjs.extend(dayjsAdvancedFormat)
dayjs.extend(dayjsUTC)
dayjs.extend(dayjsTimezone)
import { getDayjsFormattedString } from '@/Utils/GetDayjsFormattedString'
import { ErrorBoundary } from '@/Utils/ErrorBoundary'
const PrefChangeDebounceTimeInMs = 25
@@ -42,6 +36,10 @@ type Props = {
disabled?: boolean
}
function CustomNoteTitleFormatPreview({ format }: { format: string }) {
return <em>{getDayjsFormattedString(undefined, format)}</em>
}
const NewNotePreferences: FunctionComponent<Props> = ({
application,
selectedTag,
@@ -209,7 +207,9 @@ const NewNotePreferences: FunctionComponent<Props> = ({
</div>
<div className="mt-3 text-neutral">
<span className="font-bold">Preview: </span>
<em>{dayjs().format(customNoteTitleFormat)}</em>
<ErrorBoundary>
<CustomNoteTitleFormatPreview format={customNoteTitleFormat} />
</ErrorBoundary>
</div>
<div className="mt-2 text-neutral">
<a
@@ -34,10 +34,6 @@ import { SelectedItemsController } from '../SelectedItemsController'
import { NotesController } from '../NotesController/NotesController'
import { formatDateAndTimeForNote } from '@/Utils/DateUtils'
import dayjs from 'dayjs'
import dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat'
dayjs.extend(dayjsAdvancedFormat)
import { AbstractViewController } from '../Abstract/AbstractViewController'
import { log, LoggingDomain } from '@/Logging'
import { NoteViewController } from '@/Components/NoteView/Controller/NoteViewController'
@@ -45,6 +41,7 @@ import { FileViewController } from '@/Components/NoteView/Controller/FileViewCon
import { TemplateNoteViewAutofocusBehavior } from '@/Components/NoteView/Controller/TemplateNoteViewControllerOptions'
import { ItemsReloadSource } from './ItemsReloadSource'
import { VaultDisplayServiceEvent } from '@standardnotes/ui-services'
import { getDayjsFormattedString } from '@/Utils/GetDayjsFormattedString'
const MinNoteCellHeight = 51.0
const DefaultListNumNotes = 20
@@ -671,7 +668,12 @@ export class ItemListController extends AbstractViewController implements Intern
this.navigationController.selected?.preferences?.customNoteTitleFormat ||
this.application.getPreference(PrefKey.CustomNoteTitleFormat, PrefDefaults[PrefKey.CustomNoteTitleFormat])
return dayjs(createdAt).format(customFormat)
try {
return getDayjsFormattedString(createdAt, customFormat)
} catch (error) {
console.error(error)
return formatDateAndTimeForNote(createdAt || new Date())
}
}
if (titleFormat === NewNoteTitleFormat.Empty) {
@@ -0,0 +1,18 @@
import dayjs from 'dayjs'
import AdvancedFormat from 'dayjs/plugin/advancedFormat'
import IsoWeek from 'dayjs/plugin/isoWeek'
import UTC from 'dayjs/plugin/utc'
import Timezone from 'dayjs/plugin/timezone'
import WeekYear from 'dayjs/plugin/weekYear'
import WeekOfYear from 'dayjs/plugin/weekOfYear'
dayjs.extend(AdvancedFormat)
dayjs.extend(IsoWeek)
dayjs.extend(UTC)
dayjs.extend(Timezone)
dayjs.extend(WeekYear)
dayjs.extend(WeekOfYear)
export function getDayjsFormattedString(date: Parameters<typeof dayjs>[0], format: string): string {
return dayjs(date).format(format)
}
+2 -2
View File
@@ -5030,7 +5030,7 @@ __metadata:
circular-dependency-plugin: ^5.2.2
copy-webpack-plugin: ^11.0.0
css-loader: "*"
dayjs: ^1.11.7
dayjs: ^1.11.9
dotenv: ^16.0.3
eslint: "*"
eslint-config-prettier: ^8.9.0
@@ -9635,7 +9635,7 @@ __metadata:
languageName: node
linkType: hard
"dayjs@npm:^1.11.7, dayjs@npm:^1.8.15":
"dayjs@npm:^1.11.9, dayjs@npm:^1.8.15":
version: 1.11.9
resolution: "dayjs@npm:1.11.9"
checksum: a4844d83dc87f921348bb9b1b93af851c51e6f71fa259604809cfe1b49d1230e6b0212dab44d1cb01994c096ad3a77ea1cf18fa55154da6efcc9d3610526ac38