@velocity-astro/cms-admin 0.1.0-beta.6 → 0.1.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-dist/assets/{RichTextEditor-BiKJJtkz.js → RichTextEditor-BpltDhwX.js} +1 -1
- package/app-dist/assets/index-Bx7Xh90l.js +80 -0
- package/app-dist/assets/index-DLXIqdLb.css +2 -0
- package/app-dist/index.html +5 -3
- package/dist/app/AdminLayout.d.ts.map +1 -1
- package/dist/app/AdminLayout.js +1 -1
- package/dist/app/AdminLayout.js.map +1 -1
- package/dist/app/paths.d.ts +2 -0
- package/dist/app/paths.d.ts.map +1 -1
- package/dist/app/paths.js +2 -0
- package/dist/app/paths.js.map +1 -1
- package/dist/client/queries.d.ts.map +1 -1
- package/dist/client/queries.js +32 -7
- package/dist/client/queries.js.map +1 -1
- package/dist/fields/BlocksControl.d.ts +6 -0
- package/dist/fields/BlocksControl.d.ts.map +1 -1
- package/dist/fields/BlocksControl.js +301 -89
- package/dist/fields/BlocksControl.js.map +1 -1
- package/dist/fields/SiteImagePicker.d.ts +22 -0
- package/dist/fields/SiteImagePicker.d.ts.map +1 -0
- package/dist/fields/SiteImagePicker.js +42 -0
- package/dist/fields/SiteImagePicker.js.map +1 -0
- package/dist/fields/block-icons.d.ts.map +1 -1
- package/dist/fields/block-icons.js +3 -1
- package/dist/fields/block-icons.js.map +1 -1
- package/dist/fields/carry.d.ts +19 -0
- package/dist/fields/carry.d.ts.map +1 -0
- package/dist/fields/carry.js +61 -0
- package/dist/fields/carry.js.map +1 -0
- package/dist/fields/controls.d.ts.map +1 -1
- package/dist/fields/controls.js +82 -58
- package/dist/fields/controls.js.map +1 -1
- package/dist/fields/field-control.d.ts +80 -0
- package/dist/fields/field-control.d.ts.map +1 -1
- package/dist/fields/field-control.js.map +1 -1
- package/dist/fields/page-focus.d.ts +32 -3
- package/dist/fields/page-focus.d.ts.map +1 -1
- package/dist/fields/page-focus.js +55 -1
- package/dist/fields/page-focus.js.map +1 -1
- package/dist/lib/open-site.d.ts +6 -0
- package/dist/lib/open-site.d.ts.map +1 -0
- package/dist/lib/open-site.js +8 -0
- package/dist/lib/open-site.js.map +1 -0
- package/dist/lib/rich-from-html.d.ts +9 -0
- package/dist/lib/rich-from-html.d.ts.map +1 -0
- package/dist/lib/rich-from-html.js +129 -0
- package/dist/lib/rich-from-html.js.map +1 -0
- package/dist/lib/sittings.d.ts +16 -0
- package/dist/lib/sittings.d.ts.map +1 -0
- package/dist/lib/sittings.js +29 -0
- package/dist/lib/sittings.js.map +1 -0
- package/dist/lib/use-history.d.ts +24 -0
- package/dist/lib/use-history.d.ts.map +1 -0
- package/dist/lib/use-history.js +48 -0
- package/dist/lib/use-history.js.map +1 -0
- package/dist/lib/use-narrow.d.ts +5 -0
- package/dist/lib/use-narrow.d.ts.map +1 -0
- package/dist/lib/use-narrow.js +19 -0
- package/dist/lib/use-narrow.js.map +1 -0
- package/dist/lib/use-save-key.d.ts +15 -0
- package/dist/lib/use-save-key.d.ts.map +1 -0
- package/dist/lib/use-save-key.js +27 -0
- package/dist/lib/use-save-key.js.map +1 -0
- package/dist/lib/use-undo-keys.d.ts +14 -0
- package/dist/lib/use-undo-keys.d.ts.map +1 -0
- package/dist/lib/use-undo-keys.js +46 -0
- package/dist/lib/use-undo-keys.js.map +1 -0
- package/dist/messages/en.d.ts +29 -1
- package/dist/messages/en.d.ts.map +1 -1
- package/dist/messages/en.js +29 -1
- package/dist/messages/en.js.map +1 -1
- package/dist/page-bridge/preview-bridge.d.ts +3 -3
- package/dist/page-bridge/preview-bridge.d.ts.map +1 -1
- package/dist/page-bridge/preview-bridge.js +868 -33
- package/dist/page-bridge/preview-bridge.js.map +1 -1
- package/dist/screens/Contact/ContactScreen.js +1 -1
- package/dist/screens/Contact/ContactScreen.js.map +1 -1
- package/dist/screens/Contacts/ContactsScreen.js +2 -2
- package/dist/screens/Contacts/ContactsScreen.js.map +1 -1
- package/dist/screens/ContentList/ContentListScreen.d.ts.map +1 -1
- package/dist/screens/ContentList/ContentListScreen.js +5 -2
- package/dist/screens/ContentList/ContentListScreen.js.map +1 -1
- package/dist/screens/ContentType/ContentTypeScreen.js +1 -1
- package/dist/screens/ContentType/ContentTypeScreen.js.map +1 -1
- package/dist/screens/EntryEditor/EntryEditorScreen.d.ts.map +1 -1
- package/dist/screens/EntryEditor/EntryEditorScreen.js +5 -3
- package/dist/screens/EntryEditor/EntryEditorScreen.js.map +1 -1
- package/dist/screens/EntryEditor/EntryForm.d.ts +2 -0
- package/dist/screens/EntryEditor/EntryForm.d.ts.map +1 -1
- package/dist/screens/EntryEditor/EntryForm.js +164 -19
- package/dist/screens/EntryEditor/EntryForm.js.map +1 -1
- package/dist/screens/EntryEditor/HistoryDialog.d.ts +2 -1
- package/dist/screens/EntryEditor/HistoryDialog.d.ts.map +1 -1
- package/dist/screens/EntryEditor/HistoryDialog.js +24 -5
- package/dist/screens/EntryEditor/HistoryDialog.js.map +1 -1
- package/dist/screens/EntryEditor/PagePane.d.ts +12 -2
- package/dist/screens/EntryEditor/PagePane.d.ts.map +1 -1
- package/dist/screens/EntryEditor/PagePane.js +54 -19
- package/dist/screens/EntryEditor/PagePane.js.map +1 -1
- package/dist/screens/EntryEditor/ThemeCard.d.ts +32 -0
- package/dist/screens/EntryEditor/ThemeCard.d.ts.map +1 -0
- package/dist/screens/EntryEditor/ThemeCard.js +67 -0
- package/dist/screens/EntryEditor/ThemeCard.js.map +1 -0
- package/dist/screens/Home/HomeScreen.d.ts.map +1 -1
- package/dist/screens/Home/HomeScreen.js +8 -3
- package/dist/screens/Home/HomeScreen.js.map +1 -1
- package/package.json +5 -5
- package/app-dist/assets/index-BgVjqwy6.js +0 -80
- package/app-dist/assets/index-BvWFILf6.css +0 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Saves by one person that follow each other this closely are one sitting, in milliseconds. */
|
|
2
|
+
export const SITTING_PAUSE_MS = 10 * 60_000;
|
|
3
|
+
/**
|
|
4
|
+
* Folds a history, the latest first, into sittings. A draft saves itself every few seconds of
|
|
5
|
+
* work, and a list of every one of those hides the saves that matter. Saves are one sitting when
|
|
6
|
+
* one person made them, none waited long after the one before, and none changed whether the entry
|
|
7
|
+
* is on the site. The save visitors see (`onSite`) always stands by itself.
|
|
8
|
+
*/
|
|
9
|
+
export function sittings(revisions, onSite) {
|
|
10
|
+
const folded = [];
|
|
11
|
+
let after;
|
|
12
|
+
for (const revision of revisions) {
|
|
13
|
+
const open = folded.at(-1);
|
|
14
|
+
const joins = open !== undefined &&
|
|
15
|
+
after !== undefined &&
|
|
16
|
+
after.actorId === revision.actorId &&
|
|
17
|
+
after.status === revision.status &&
|
|
18
|
+
after.revision !== onSite &&
|
|
19
|
+
revision.revision !== onSite &&
|
|
20
|
+
Date.parse(after.createdAt) - Date.parse(revision.createdAt) < SITTING_PAUSE_MS;
|
|
21
|
+
if (joins)
|
|
22
|
+
open.earlier.push(revision);
|
|
23
|
+
else
|
|
24
|
+
folded.push({ latest: revision, earlier: [] });
|
|
25
|
+
after = revision;
|
|
26
|
+
}
|
|
27
|
+
return folded;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=sittings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sittings.js","sourceRoot":"","sources":["../../src/lib/sittings.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC;AAQ5C;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,SAA8B,EAAE,MAAe;IACtE,MAAM,MAAM,GAAgD,EAAE,CAAC;IAC/D,IAAI,KAA2B,CAAC;IAChC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,KAAK,GACT,IAAI,KAAK,SAAS;YAClB,KAAK,KAAK,SAAS;YACnB,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO;YAClC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;YAChC,KAAK,CAAC,QAAQ,KAAK,MAAM;YACzB,QAAQ,CAAC,QAAQ,KAAK,MAAM;YAC5B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,gBAAgB,CAAC;QAClF,IAAI,KAAK;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;;YAClC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QACpD,KAAK,GAAG,QAAQ,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Changes of one thing that follow each other this closely are one step: a word, not a letter. */
|
|
2
|
+
export declare const STEP_PAUSE_MS = 700;
|
|
3
|
+
/** How many steps back are kept. */
|
|
4
|
+
export declare const STEPS_KEPT = 100;
|
|
5
|
+
/** A value and the steps that led to it, so a change can be taken back and made again. */
|
|
6
|
+
export interface History<T> {
|
|
7
|
+
readonly value: T;
|
|
8
|
+
/** Changes the value. Changes with the same `mark` that follow each other closely are one step. */
|
|
9
|
+
readonly set: (next: (current: T) => T, mark?: string) => void;
|
|
10
|
+
/** Takes a value as what is held now without a step: what the server made of a save. */
|
|
11
|
+
readonly settle: (value: T) => void;
|
|
12
|
+
/** Starts again from a value, with nothing to take back. */
|
|
13
|
+
readonly restart: (value: T) => void;
|
|
14
|
+
readonly undo: () => void;
|
|
15
|
+
readonly redo: () => void;
|
|
16
|
+
readonly canUndo: boolean;
|
|
17
|
+
readonly canRedo: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Holds a value with its steps, in memory only. A change that leaves the value as it was (by
|
|
21
|
+
* `same`) is no step, and a change after going back drops what was ahead.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useHistory<T extends object>(start: T, same: (a: T, b: T) => boolean): History<T>;
|
|
24
|
+
//# sourceMappingURL=use-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-history.d.ts","sourceRoot":"","sources":["../../src/lib/use-history.ts"],"names":[],"mappings":"AAEA,mGAAmG;AACnG,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,oCAAoC;AACpC,eAAO,MAAM,UAAU,MAAM,CAAC;AAyC9B,0FAA0F;AAC1F,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAClB,mGAAmG;IACnG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACpC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAQhG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useCallback, useReducer } from 'react';
|
|
2
|
+
/** Changes of one thing that follow each other this closely are one step: a word, not a letter. */
|
|
3
|
+
export const STEP_PAUSE_MS = 700;
|
|
4
|
+
/** How many steps back are kept. */
|
|
5
|
+
export const STEPS_KEPT = 100;
|
|
6
|
+
function steps(state, said) {
|
|
7
|
+
if (said.type === 'set') {
|
|
8
|
+
const value = said.next(state.present);
|
|
9
|
+
if (said.same(value, state.present))
|
|
10
|
+
return state;
|
|
11
|
+
const joins = said.mark !== undefined && said.mark === state.mark && said.at - state.at < STEP_PAUSE_MS && state.past.length > 0;
|
|
12
|
+
return {
|
|
13
|
+
past: joins ? state.past : [...state.past, state.present].slice(-STEPS_KEPT),
|
|
14
|
+
present: value,
|
|
15
|
+
future: [],
|
|
16
|
+
mark: said.mark,
|
|
17
|
+
at: said.at,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
if (said.type === 'settle')
|
|
21
|
+
return { ...state, present: said.value, mark: undefined };
|
|
22
|
+
if (said.type === 'restart')
|
|
23
|
+
return { past: [], present: said.value, future: [], mark: undefined, at: 0 };
|
|
24
|
+
if (said.type === 'undo') {
|
|
25
|
+
const last = state.past.at(-1);
|
|
26
|
+
if (last === undefined)
|
|
27
|
+
return state;
|
|
28
|
+
return { past: state.past.slice(0, -1), present: last, future: [state.present, ...state.future], mark: undefined, at: 0 };
|
|
29
|
+
}
|
|
30
|
+
const [next, ...future] = state.future;
|
|
31
|
+
if (next === undefined)
|
|
32
|
+
return state;
|
|
33
|
+
return { past: [...state.past, state.present], present: next, future, mark: undefined, at: 0 };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Holds a value with its steps, in memory only. A change that leaves the value as it was (by
|
|
37
|
+
* `same`) is no step, and a change after going back drops what was ahead.
|
|
38
|
+
*/
|
|
39
|
+
export function useHistory(start, same) {
|
|
40
|
+
const [state, say] = useReducer((steps), { past: [], present: start, future: [], mark: undefined, at: 0 });
|
|
41
|
+
const set = useCallback((next, mark) => say({ type: 'set', next, mark, at: Date.now(), same }), [same]);
|
|
42
|
+
const settle = useCallback((value) => say({ type: 'settle', value }), []);
|
|
43
|
+
const restart = useCallback((value) => say({ type: 'restart', value }), []);
|
|
44
|
+
const undo = useCallback(() => say({ type: 'undo' }), []);
|
|
45
|
+
const redo = useCallback(() => say({ type: 'redo' }), []);
|
|
46
|
+
return { value: state.present, set, settle, restart, undo, redo, canUndo: state.past.length > 0, canRedo: state.future.length > 0 };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=use-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-history.js","sourceRoot":"","sources":["../../src/lib/use-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEhD,mGAAmG;AACnG,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC,oCAAoC;AACpC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAgB9B,SAAS,KAAK,CAAI,KAAe,EAAE,IAAa;IAC9C,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;YAAE,OAAO,KAAK,CAAC;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,GAAG,aAAa,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACjI,OAAO;YACL,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,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;IAC1D,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;AACtI,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** A window narrower than this, in pixels, is taken to be a phone. */
|
|
2
|
+
export declare const NARROW = 640;
|
|
3
|
+
/** Whether the window is as narrow as a phone, now and as it is turned or resized. */
|
|
4
|
+
export declare function useNarrow(): boolean;
|
|
5
|
+
//# sourceMappingURL=use-narrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-narrow.d.ts","sourceRoot":"","sources":["../../src/lib/use-narrow.ts"],"names":[],"mappings":"AAEA,sEAAsE;AACtE,eAAO,MAAM,MAAM,MAAM,CAAC;AAI1B,sFAAsF;AACtF,wBAAgB,SAAS,IAAI,OAAO,CAWnC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
/** A window narrower than this, in pixels, is taken to be a phone. */
|
|
3
|
+
export const NARROW = 640;
|
|
4
|
+
const narrow = () => (typeof window.matchMedia === 'function' ? window.matchMedia(`(max-width: ${NARROW - 1}px)`) : null);
|
|
5
|
+
/** Whether the window is as narrow as a phone, now and as it is turned or resized. */
|
|
6
|
+
export function useNarrow() {
|
|
7
|
+
const [isNarrow, setNarrow] = useState(() => narrow()?.matches ?? false);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const watched = narrow();
|
|
10
|
+
if (!watched)
|
|
11
|
+
return;
|
|
12
|
+
const follow = () => setNarrow(watched.matches);
|
|
13
|
+
watched.addEventListener('change', follow);
|
|
14
|
+
follow();
|
|
15
|
+
return () => watched.removeEventListener('change', follow);
|
|
16
|
+
}, []);
|
|
17
|
+
return isNarrow;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=use-narrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-narrow.js","sourceRoot":"","sources":["../../src/lib/use-narrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,sEAAsE;AACtE,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;AAE1B,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAE1H,sFAAsF;AACtF,MAAM,UAAU,SAAS;IACvB,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,OAAO,IAAI,KAAK,CAAC,CAAC;IACzE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChD,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,EAAE,CAAC;QACT,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Whether a key press asks to save: Ctrl or Command with S, and nothing else held. */
|
|
2
|
+
export declare function isSaveKey(event: {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly metaKey: boolean;
|
|
5
|
+
readonly ctrlKey: boolean;
|
|
6
|
+
readonly shiftKey: boolean;
|
|
7
|
+
readonly altKey: boolean;
|
|
8
|
+
}): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Listens for the keys that save, anywhere on the screen, a field being typed in included. The
|
|
11
|
+
* browser's own answer to them (saving the page as a file) is never wanted here, so it is
|
|
12
|
+
* stopped whether or not there is anything to save.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useSaveKey(save: () => void): void;
|
|
15
|
+
//# sourceMappingURL=use-save-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-save-key.d.ts","sourceRoot":"","sources":["../../src/lib/use-save-key.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAE9K;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI,CAcjD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
/** Whether a key press asks to save: Ctrl or Command with S, and nothing else held. */
|
|
3
|
+
export function isSaveKey(event) {
|
|
4
|
+
return (event.metaKey || event.ctrlKey) && !event.altKey && !event.shiftKey && event.key.toLowerCase() === 's';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Listens for the keys that save, anywhere on the screen, a field being typed in included. The
|
|
8
|
+
* browser's own answer to them (saving the page as a file) is never wanted here, so it is
|
|
9
|
+
* stopped whether or not there is anything to save.
|
|
10
|
+
*/
|
|
11
|
+
export function useSaveKey(save) {
|
|
12
|
+
const latest = useRef(save);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
latest.current = save;
|
|
15
|
+
});
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const hear = (event) => {
|
|
18
|
+
if (event.defaultPrevented || !isSaveKey(event))
|
|
19
|
+
return;
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
latest.current();
|
|
22
|
+
};
|
|
23
|
+
window.addEventListener('keydown', hear);
|
|
24
|
+
return () => window.removeEventListener('keydown', hear);
|
|
25
|
+
}, []);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=use-save-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-save-key.js","sourceRoot":"","sources":["../../src/lib/use-save-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,uFAAuF;AACvF,MAAM,UAAU,SAAS,CAAC,KAA2I;IACnK,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC;AACjH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAgB;IACzC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,CAAC,KAAoB,EAAE,EAAE;YACpC,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;gBAAE,OAAO;YACxD,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Which of the two a key press asks for: Ctrl or Command with Z, with Shift (or Ctrl with Y) for again. */
|
|
2
|
+
export declare function undoKey(event: {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly metaKey: boolean;
|
|
5
|
+
readonly ctrlKey: boolean;
|
|
6
|
+
readonly shiftKey: boolean;
|
|
7
|
+
readonly altKey: boolean;
|
|
8
|
+
}): 'undo' | 'redo' | null;
|
|
9
|
+
/**
|
|
10
|
+
* Listens for the keys that take a change back and make it again, anywhere on the screen but
|
|
11
|
+
* where words are being typed: there the browser takes back the typing itself.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useUndoKeys(undo: () => void, redo: () => void): void;
|
|
14
|
+
//# sourceMappingURL=use-undo-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-undo-keys.d.ts","sourceRoot":"","sources":["../../src/lib/use-undo-keys.ts"],"names":[],"mappings":"AAEA,4GAA4G;AAC5G,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAM3L;AAYD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI,CAgBpE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
/** Which of the two a key press asks for: Ctrl or Command with Z, with Shift (or Ctrl with Y) for again. */
|
|
3
|
+
export function undoKey(event) {
|
|
4
|
+
if (!(event.metaKey || event.ctrlKey) || event.altKey)
|
|
5
|
+
return null;
|
|
6
|
+
const key = event.key.toLowerCase();
|
|
7
|
+
if (key === 'z')
|
|
8
|
+
return event.shiftKey ? 'redo' : 'undo';
|
|
9
|
+
if (key === 'y' && event.ctrlKey && !event.shiftKey)
|
|
10
|
+
return 'redo';
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const NOT_TYPED = ['checkbox', 'radio', 'button', 'submit', 'reset', 'range', 'color', 'file', 'image'];
|
|
14
|
+
/** Whether the browser has an undo of its own where the keys were pressed: somewhere words are typed. */
|
|
15
|
+
function typesHere(target) {
|
|
16
|
+
if (!(target instanceof HTMLElement))
|
|
17
|
+
return false;
|
|
18
|
+
// A switch and a checkbox are inputs too, and hold no typing to take back.
|
|
19
|
+
if (target instanceof HTMLInputElement)
|
|
20
|
+
return !NOT_TYPED.includes(target.type);
|
|
21
|
+
return target instanceof HTMLTextAreaElement || target.isContentEditable;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Listens for the keys that take a change back and make it again, anywhere on the screen but
|
|
25
|
+
* where words are being typed: there the browser takes back the typing itself.
|
|
26
|
+
*/
|
|
27
|
+
export function useUndoKeys(undo, redo) {
|
|
28
|
+
const latest = useRef({ undo, redo });
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
latest.current = { undo, redo };
|
|
31
|
+
});
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const hear = (event) => {
|
|
34
|
+
if (event.defaultPrevented || typesHere(event.target))
|
|
35
|
+
return;
|
|
36
|
+
const asked = undoKey(event);
|
|
37
|
+
if (asked === null)
|
|
38
|
+
return;
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
latest.current[asked]();
|
|
41
|
+
};
|
|
42
|
+
window.addEventListener('keydown', hear);
|
|
43
|
+
return () => window.removeEventListener('keydown', hear);
|
|
44
|
+
}, []);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=use-undo-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-undo-keys.js","sourceRoot":"","sources":["../../src/lib/use-undo-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,4GAA4G;AAC5G,MAAM,UAAU,OAAO,CAAC,KAA2I;IACjK,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACnE,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;IACpC,IAAI,GAAG,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACzD,IAAI,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO,MAAM,CAAC;IACnE,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAExG,yGAAyG;AACzG,SAAS,SAAS,CAAC,MAA0B;IAC3C,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC;IACnD,2EAA2E;IAC3E,IAAI,MAAM,YAAY,gBAAgB;QAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChF,OAAO,MAAM,YAAY,mBAAmB,IAAI,MAAM,CAAC,iBAAiB,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAgB,EAAE,IAAgB;IAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,CAAC,OAAO,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,CAAC,KAAoB,EAAE,EAAE;YACpC,IAAI,KAAK,CAAC,gBAAgB,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;gBAAE,OAAO;YAC9D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAC7B,IAAI,KAAK,KAAK,IAAI;gBAAE,OAAO;YAC3B,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
package/dist/messages/en.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const en: {
|
|
|
10
10
|
readonly contentGroup: "Content";
|
|
11
11
|
readonly home: "Home";
|
|
12
12
|
readonly skipToContent: "Skip to content";
|
|
13
|
+
readonly openMenu: "Open the menu";
|
|
13
14
|
readonly mainNavigation: "Main";
|
|
14
15
|
readonly notifications: "Notifications";
|
|
15
16
|
readonly dismiss: "Dismiss";
|
|
@@ -87,6 +88,7 @@ export declare const en: {
|
|
|
87
88
|
readonly noMatchesDescription: "Try another word, or show all entries.";
|
|
88
89
|
readonly columnUpdated: "Updated";
|
|
89
90
|
readonly untitled: "Untitled";
|
|
91
|
+
readonly homePage: "Home page";
|
|
90
92
|
readonly newEntry: "New entry";
|
|
91
93
|
readonly emptyTitle: (type: string) => string;
|
|
92
94
|
readonly emptyDescription: "Entries appear on the site as soon as they are published.";
|
|
@@ -119,7 +121,7 @@ export declare const en: {
|
|
|
119
121
|
readonly history: {
|
|
120
122
|
readonly title: "History";
|
|
121
123
|
readonly close: "Close";
|
|
122
|
-
readonly help: "Every save, the latest first. Bringing a version back makes a new save: nothing is lost, and the site changes only when you publish.";
|
|
124
|
+
readonly help: "Every save, the latest first. Saves made in one go are shown as one. Bringing a version back makes a new save: nothing is lost, and the site changes only when you publish.";
|
|
123
125
|
readonly saveFirst: "Save or undo what you have typed before bringing a version back.";
|
|
124
126
|
readonly current: "Now";
|
|
125
127
|
readonly onSite: "On the site";
|
|
@@ -129,6 +131,9 @@ export declare const en: {
|
|
|
129
131
|
readonly published: "Published";
|
|
130
132
|
readonly unpublished: "Taken off the site";
|
|
131
133
|
readonly saved: "Saved";
|
|
134
|
+
readonly sitting: (count: number) => string;
|
|
135
|
+
readonly showEach: "Show each";
|
|
136
|
+
readonly showAsOne: "Show as one";
|
|
132
137
|
readonly bringBack: "Bring back this version";
|
|
133
138
|
readonly broughtBack: (when: string) => string;
|
|
134
139
|
readonly broughtBackDescription: "It is the working version now. Publish it to put it on the site.";
|
|
@@ -183,6 +188,14 @@ export declare const en: {
|
|
|
183
188
|
readonly pageAdd: "Add section";
|
|
184
189
|
readonly pageAddBefore: "Add a section above";
|
|
185
190
|
readonly pageAddAfter: "Add a section below";
|
|
191
|
+
readonly pagePicture: "Change image";
|
|
192
|
+
readonly pageLink: "Edit link";
|
|
193
|
+
readonly pageTextLinkProblem: "A link must be a web address, an email address, a phone number or a page of this site such as /contact/.";
|
|
194
|
+
readonly pageItemUp: "Move earlier";
|
|
195
|
+
readonly pageItemDown: "Move later";
|
|
196
|
+
readonly pageItemDuplicate: "Duplicate";
|
|
197
|
+
readonly pageItemRemove: "Remove";
|
|
198
|
+
readonly pageLinkDone: "Done";
|
|
186
199
|
readonly visualOpen: "Visual editor";
|
|
187
200
|
readonly visualClose: "Back to the form";
|
|
188
201
|
readonly visualShowForm: "Show the form";
|
|
@@ -248,8 +261,19 @@ export declare const en: {
|
|
|
248
261
|
readonly saveDraft: "Save draft";
|
|
249
262
|
readonly publish: "Publish";
|
|
250
263
|
readonly publishChanges: "Publish changes";
|
|
264
|
+
readonly viewOnSite: "View on the site";
|
|
251
265
|
readonly unpublish: "Unpublish";
|
|
252
266
|
readonly more: "More actions";
|
|
267
|
+
readonly theme: "Theme";
|
|
268
|
+
readonly themeTitle: "Site theme";
|
|
269
|
+
readonly themeHelp: (settings: string) => string;
|
|
270
|
+
readonly themePublish: "Publish theme";
|
|
271
|
+
readonly themeDiscard: "Discard";
|
|
272
|
+
readonly themePublished: "Theme published";
|
|
273
|
+
readonly themePublishedDescription: "Every page of the site now shows it.";
|
|
274
|
+
readonly themeNotPublished: "The theme was not published";
|
|
275
|
+
readonly undo: "Undo";
|
|
276
|
+
readonly redo: "Redo";
|
|
253
277
|
readonly trash: "Move to trash";
|
|
254
278
|
readonly trashTitle: "Move this to the trash?";
|
|
255
279
|
readonly trashDescription: "It leaves the lists and can be restored from the trash whenever you need it. Changes you have not saved are not kept.";
|
|
@@ -275,6 +299,7 @@ export declare const en: {
|
|
|
275
299
|
readonly notPreviewed: "No preview";
|
|
276
300
|
readonly notSavedYet: "Not saved yet";
|
|
277
301
|
readonly unsavedChanges: "Unsaved changes";
|
|
302
|
+
readonly notAutosaved: "Not saved. Press \"Save draft\" to see why.";
|
|
278
303
|
readonly saved: (when: string) => string;
|
|
279
304
|
readonly draftSaved: "Draft saved";
|
|
280
305
|
readonly draftSavedDescription: "Visitors do not see it until you publish.";
|
|
@@ -1231,6 +1256,9 @@ export declare const en: {
|
|
|
1231
1256
|
readonly draftsDetail: "Not on the site yet";
|
|
1232
1257
|
readonly changed: "Unpublished changes";
|
|
1233
1258
|
readonly changedDetail: "Saved, waiting to be published";
|
|
1259
|
+
readonly siteTitle: "Your site";
|
|
1260
|
+
readonly editHome: "Edit the home page";
|
|
1261
|
+
readonly viewSite: "View the site";
|
|
1234
1262
|
readonly addTitle: "Add new";
|
|
1235
1263
|
readonly recentTitle: "Recent changes";
|
|
1236
1264
|
readonly recentEmpty: "Nothing has been written yet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAqCW,MAAM;wCACL,MAAM;;;;;;;;;;;;;;;;;;;;;;;mCAuBX,MAAM;;;kCAIP,MAAM;;;;sCAIF,MAAM;;;;;;;;;gCASZ,MAAM;;;;;;;;;oCASF,MAAM;;;;;;;;;;;;iCAYT,MAAM;kCACL,MAAM;;;;8BAIV,MAAM;;;;;;wCAMI,MAAM;;;;;;;;;;;;8BAYhB,MAAM,MAAM,MAAM,GAAG,SAAS;;mCAEzB,SAAS,MAAM,EAAE;;;;kCAIlB,MAAM;;;;qCAIH,MAAM;;;;;8BAKb,MAAM;;;;4CAIQ,MAAM;;;;gDAIF,MAAM;gDACN,MAAM;;;qCAGjB,MAAM;;;oCAGP,MAAM;;;;;;mCAMP,MAAM;;;;;kCAKP,MAAM,YAAY,MAAM;oCACtB,MAAM,YAAY,MAAM;oCACxB,MAAM,YAAY,MAAM;sCACtB,MAAM,YAAY,MAAM;k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MAAM;kCACV,MAAM;;wBAoBlB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;;;;;;;;;;;;;;;;;;qCAmBpE,MAAM;uCACJ,MAAM;qCACR,MAAM;;qCAEJ,MAAM;;;;;;;;;;;;;;;;;wCAiBH,MAAM;;;;;;;;;CASvB,CAAC;AAEX,yCAAyC;AACzC,MAAM,MAAM,QAAQ,GAAG,OAAO,EAAE,CAAC"}
|
package/dist/messages/en.js
CHANGED
|
@@ -10,6 +10,7 @@ export const en = {
|
|
|
10
10
|
contentGroup: 'Content',
|
|
11
11
|
home: 'Home',
|
|
12
12
|
skipToContent: 'Skip to content',
|
|
13
|
+
openMenu: 'Open the menu',
|
|
13
14
|
mainNavigation: 'Main',
|
|
14
15
|
notifications: 'Notifications',
|
|
15
16
|
dismiss: 'Dismiss',
|
|
@@ -87,6 +88,7 @@ export const en = {
|
|
|
87
88
|
noMatchesDescription: 'Try another word, or show all entries.',
|
|
88
89
|
columnUpdated: 'Updated',
|
|
89
90
|
untitled: 'Untitled',
|
|
91
|
+
homePage: 'Home page',
|
|
90
92
|
newEntry: 'New entry',
|
|
91
93
|
emptyTitle: (type) => `No ${type.toLowerCase()} yet`,
|
|
92
94
|
emptyDescription: 'Entries appear on the site as soon as they are published.',
|
|
@@ -119,7 +121,7 @@ export const en = {
|
|
|
119
121
|
history: {
|
|
120
122
|
title: 'History',
|
|
121
123
|
close: 'Close',
|
|
122
|
-
help: 'Every save, the latest first. Bringing a version back makes a new save: nothing is lost, and the site changes only when you publish.',
|
|
124
|
+
help: 'Every save, the latest first. Saves made in one go are shown as one. Bringing a version back makes a new save: nothing is lost, and the site changes only when you publish.',
|
|
123
125
|
saveFirst: 'Save or undo what you have typed before bringing a version back.',
|
|
124
126
|
current: 'Now',
|
|
125
127
|
onSite: 'On the site',
|
|
@@ -129,6 +131,9 @@ export const en = {
|
|
|
129
131
|
published: 'Published',
|
|
130
132
|
unpublished: 'Taken off the site',
|
|
131
133
|
saved: 'Saved',
|
|
134
|
+
sitting: (count) => `${count} saves in one go`,
|
|
135
|
+
showEach: 'Show each',
|
|
136
|
+
showAsOne: 'Show as one',
|
|
132
137
|
bringBack: 'Bring back this version',
|
|
133
138
|
broughtBack: (when) => `Version from ${when} brought back`,
|
|
134
139
|
broughtBackDescription: 'It is the working version now. Publish it to put it on the site.',
|
|
@@ -183,6 +188,14 @@ export const en = {
|
|
|
183
188
|
pageAdd: 'Add section',
|
|
184
189
|
pageAddBefore: 'Add a section above',
|
|
185
190
|
pageAddAfter: 'Add a section below',
|
|
191
|
+
pagePicture: 'Change image',
|
|
192
|
+
pageLink: 'Edit link',
|
|
193
|
+
pageTextLinkProblem: 'A link must be a web address, an email address, a phone number or a page of this site such as /contact/.',
|
|
194
|
+
pageItemUp: 'Move earlier',
|
|
195
|
+
pageItemDown: 'Move later',
|
|
196
|
+
pageItemDuplicate: 'Duplicate',
|
|
197
|
+
pageItemRemove: 'Remove',
|
|
198
|
+
pageLinkDone: 'Done',
|
|
186
199
|
visualOpen: 'Visual editor',
|
|
187
200
|
visualClose: 'Back to the form',
|
|
188
201
|
visualShowForm: 'Show the form',
|
|
@@ -248,8 +261,19 @@ export const en = {
|
|
|
248
261
|
saveDraft: 'Save draft',
|
|
249
262
|
publish: 'Publish',
|
|
250
263
|
publishChanges: 'Publish changes',
|
|
264
|
+
viewOnSite: 'View on the site',
|
|
251
265
|
unpublish: 'Unpublish',
|
|
252
266
|
more: 'More actions',
|
|
267
|
+
theme: 'Theme',
|
|
268
|
+
themeTitle: 'Site theme',
|
|
269
|
+
themeHelp: (settings) => `The colors of the whole site, from the template's own. Try them on this page, then publish them. They are kept in Settings, under ${settings}, and publishing them publishes what is saved there.`,
|
|
270
|
+
themePublish: 'Publish theme',
|
|
271
|
+
themeDiscard: 'Discard',
|
|
272
|
+
themePublished: 'Theme published',
|
|
273
|
+
themePublishedDescription: 'Every page of the site now shows it.',
|
|
274
|
+
themeNotPublished: 'The theme was not published',
|
|
275
|
+
undo: 'Undo',
|
|
276
|
+
redo: 'Redo',
|
|
253
277
|
trash: 'Move to trash',
|
|
254
278
|
trashTitle: 'Move this to the trash?',
|
|
255
279
|
trashDescription: 'It leaves the lists and can be restored from the trash whenever you need it. Changes you have not saved are not kept.',
|
|
@@ -275,6 +299,7 @@ export const en = {
|
|
|
275
299
|
notPreviewed: 'No preview',
|
|
276
300
|
notSavedYet: 'Not saved yet',
|
|
277
301
|
unsavedChanges: 'Unsaved changes',
|
|
302
|
+
notAutosaved: 'Not saved. Press "Save draft" to see why.',
|
|
278
303
|
saved: (when) => `Saved ${when}`,
|
|
279
304
|
draftSaved: 'Draft saved',
|
|
280
305
|
draftSavedDescription: 'Visitors do not see it until you publish.',
|
|
@@ -1177,6 +1202,9 @@ export const en = {
|
|
|
1177
1202
|
draftsDetail: 'Not on the site yet',
|
|
1178
1203
|
changed: 'Unpublished changes',
|
|
1179
1204
|
changedDetail: 'Saved, waiting to be published',
|
|
1205
|
+
siteTitle: 'Your site',
|
|
1206
|
+
editHome: 'Edit the home page',
|
|
1207
|
+
viewSite: 'View the site',
|
|
1180
1208
|
addTitle: 'Add new',
|
|
1181
1209
|
recentTitle: 'Recent changes',
|
|
1182
1210
|
recentEmpty: 'Nothing has been written yet',
|