@goodfellow-cms/admin 0.7.0 → 0.8.0

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/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export declare const defaultStrings: {
17
17
  readonly "nav.blocks": "Blocks";
18
18
  readonly "nav.layout": "Header & Footer";
19
19
  readonly "nav.settings": "Site Settings";
20
+ readonly "nav.menu": "Menu";
20
21
  readonly loading: "Loading…";
21
22
  readonly "setup.noBackend": "This site's settings don't say where the site is stored, so the admin panel can't open it. A developer needs to add a backend to goodfellow.config.tsx.";
22
23
  readonly "signIn.title": "Sign in to edit this site";
@@ -112,11 +113,14 @@ export declare const defaultStrings: {
112
113
  readonly "editor.plugin.problemField": "{block}, {field}: {message}";
113
114
  readonly "editor.plugin.loading": "Opening {editor}…";
114
115
  readonly "editor.plugin.failed": "{editor} didn't start. Choose the standard editor to keep editing.";
116
+ readonly "editor.invalid": "The editor gave back something this site can't publish, so nothing was published. Reload the page and try again.";
115
117
  readonly "editor.plugin.invalid": "{editor} gave back something this site can't publish, so nothing was published. Try again, or choose the standard editor.";
116
118
  readonly "publish.publishing": "Publishing…";
117
119
  readonly "publish.done": "Published.";
118
120
  readonly "publish.conflict": "Someone else changed the site since you opened this page, so your changes weren't published. Reload to see their changes, then make yours again.";
119
121
  readonly "publish.error": "Your changes couldn't be published. Check your connection and try again.";
122
+ readonly "publish.reloaded": "This is the page as the other person left it. Make your changes again, or put yours back to publish them over theirs.";
123
+ readonly "publish.putMineBack": "Put my changes back";
120
124
  readonly "publish.invalid": "Fix the highlighted problems before publishing.";
121
125
  readonly "draft.label": "Draft";
122
126
  readonly "draft.add": "Add to draft";
@@ -179,6 +183,7 @@ export declare const defaultStrings: {
179
183
  readonly "limits.mediaReadOnly": "An owner has limited what you can change, and the media library is outside it. You can still use its files on pages you can change.";
180
184
  readonly "checks.missing-page": "{place} links to {target}, which isn't a page on the site.";
181
185
  readonly "checks.missing-media": "{place} uses {target}, which isn't in the media library.";
186
+ readonly "checks.unsafe-link": "{place} links to {target}, an address that would run code on the site. Pages leave it out: use an address that starts with https://, or one of the site's own pages.";
182
187
  readonly "checks.no-title": "{place} has no title, so browser tabs and search results show only the site's name.";
183
188
  readonly "checks.missing-translation": "{place} has no translation in {language} yet. Visitors reading in {language} are sent to its home page instead.";
184
189
  readonly "checks.outdated-translation": "{place} has changed since its translation in {language} was made. Update the translation, then mark it as up to date.";
@@ -479,6 +484,11 @@ export declare const defaultStrings: {
479
484
  readonly "blocks.discard": "Discard changes";
480
485
  readonly "blocks.publish": "Publish";
481
486
  readonly "blocks.publishedNotice": "Published. Added blocks will be in the editor's list of blocks, and removed ones gone from it, once the site has been updated.";
487
+ readonly "blocks.submit": "Submit for review";
488
+ readonly "blocks.reviewHint": "Blocks' code runs on this site's server, which holds its secrets, so adding and removing blocks is submitted for review, for a developer to accept.";
489
+ readonly "blocks.reviewDescription": "From the admin panel's Blocks screen. The blocks' code runs on the site's server.";
490
+ readonly "blocks.submittedNotice": "Submitted for review. Once a developer accepts it and the site has been updated, the editor's list of blocks will change.";
491
+ readonly "blocks.seeReview": "See it";
482
492
  readonly "blocks.addMessage": "Add the {name} block";
483
493
  readonly "blocks.removeMessage": "Remove the {name} block";
484
494
  readonly "blocks.changeMessage": "Change blocks: {changes}";
@@ -516,6 +526,7 @@ export declare const defaultStrings: {
516
526
  readonly "media.uploaded": "Uploaded. Visitors see new files once the live site is updated.";
517
527
  readonly "media.uploadMessage": "Add {names}";
518
528
  readonly "media.replaceMessage": "Replace {name}";
529
+ readonly "media.replaceKind": "{name} is a different kind of file from {target}. Replace it with a file of the same kind, or upload {name} as a new file.";
519
530
  readonly "media.deleteMessage": "Delete {name}";
520
531
  readonly "media.deleteTitle": "Delete {name}?";
521
532
  readonly "media.deleteBody": "{name} will be removed from the site.";
@@ -573,6 +584,12 @@ export declare const defaultStrings: {
573
584
  readonly "style.allSides": "All sides";
574
585
  readonly "style.none": "None";
575
586
  readonly "style.radius": "Rounded corners";
587
+ readonly "style.hiddenOn": "Hide on";
588
+ readonly "style.hiddenOn.phones": "Phones (narrower than 640px)";
589
+ readonly "style.hiddenOn.tablets": "Tablets (640px to 1023px)";
590
+ readonly "style.hiddenOn.computers": "Computers (1024px and wider)";
591
+ readonly "style.hiddenOnHint": "Choose a preview width above the page to see it as each size of screen does. A block hidden there is still in the Outline, where you can choose it.";
592
+ readonly "style.hiddenOnAll": "This block is hidden on every size of screen, so visitors never see it.";
576
593
  readonly "style.radius.none": "Square";
577
594
  readonly "style.radius.sm": "Slightly rounded";
578
595
  readonly "style.radius.md": "Rounded";
@@ -677,10 +694,8 @@ export declare const defaultStrings: {
677
694
  readonly "ai.error.answer": "The answer couldn't be used. Try again, or try a different model or service.";
678
695
  readonly "ai.error.service": "{service} reported a problem. Try again in a moment.";
679
696
  readonly "settings.title": "Site Settings";
680
- readonly "appearance.choice": "Colors of the admin panel";
681
- readonly "appearance.system": "Match my computer";
682
- readonly "appearance.light": "Light";
683
- readonly "appearance.dark": "Dark";
697
+ readonly "appearance.darkMode": "Dark mode";
698
+ readonly "adminLanguage.label": "Language of the admin panel";
684
699
  readonly "settings.tab.general": "General";
685
700
  readonly "settings.tab.languages": "Languages";
686
701
  readonly "settings.tab.theme": "Colors & fonts";
@@ -796,6 +811,7 @@ export declare const defaultStrings: {
796
811
  readonly "security.contentOnly": "The sign-in page is set in the site's code, which is kept apart from its content, so a developer sets it there.";
797
812
  readonly "security.broker.title": "Sign-in page";
798
813
  readonly "security.broker.intro": "A sign-in page of its own, called a token broker, keeps editors' sign-in and AI keys at an address that holds nothing else, and shows the admin panel from there, so nothing on the site's pages can reach them. It asks the editor before publishing the site's code. It needs an address of its own, such as signin.example.org, that serves nothing else.";
814
+ readonly "security.exposed": "Editors sign in at the site's own address, where its pages could reach their sign-in: code added on the Code tab, or by a block, could act as anyone signed in. A sign-in page of its own, below, keeps it out of their reach, and needs no domain on GitLab, Cloudflare Pages or Vercel. Where you have a domain and the host allows it, an admin address of its own, on the Domain screen, does too.";
799
815
  readonly "security.broker.useTitle": "Sign in at a sign-in page that's online";
800
816
  readonly "security.add.title": "Add a token broker";
801
817
  readonly "security.add.intro": "Makes a project on {host} for the sign-in page, from Goodfellow's released files and a file naming this site, and puts it online where you choose. It needs a token that can create projects, used only now and kept only until you leave this screen.";
@@ -868,6 +884,74 @@ export declare const defaultStrings: {
868
884
  readonly "settings.tab.editors": "Editors";
869
885
  readonly "settings.tab.updates": "Updates";
870
886
  readonly "settings.tab.history": "Site history";
887
+ readonly "settings.tab.comments": "Comments";
888
+ readonly "comments.intro": "Visitors' comments are kept on GitHub, in a public project of their own, and shown on pages with the Comments block through Giscus. Visitors sign in with a GitHub account to comment.";
889
+ readonly "comments.demo": "Comments can't be set up in the demo.";
890
+ readonly "comments.local": "Comments are set up from the admin panel on the live site, which signs in to GitHub. Pages here show them once they are.";
891
+ readonly "comments.unavailable": "The admin panel can set comments up only where it signs in to GitHub itself. Set them up on GitHub as the documentation's Comments page says, then paste Giscus's code into the Comments block.";
892
+ readonly "comments.setup.title": "Set up comments";
893
+ readonly "comments.setup.new": "Make a new project for comments";
894
+ readonly "comments.setup.existing": "Use a project I already have";
895
+ readonly "comments.setup.name": "Name of the new project";
896
+ readonly "comments.setup.nameHint": "It's made beside the site's own on GitHub. Anyone can read it, since visitors read the comments from there.";
897
+ readonly "comments.setup.existingName": "The project, as owner/name or its address on GitHub";
898
+ readonly "comments.setup.existingHint": "It must be public. Its Discussions are turned on if they're off.";
899
+ readonly "comments.setup.button": "Set up comments";
900
+ readonly "comments.setup.working": "Setting up…";
901
+ readonly "comments.setup.description": "Visitors' comments on {site}";
902
+ readonly "comments.setup.message": "Set up comments";
903
+ readonly "comments.install.title": "Last step: install Giscus";
904
+ readonly "comments.install.intro": "Giscus is the GitHub app that shows comments on pages and posts what visitors write. Install it on {project}, choosing only that project.";
905
+ readonly "comments.install.button": "Install Giscus";
906
+ readonly "comments.install.then": "Then add the Comments block to a page, or to a collection's template. Pages show comments once the site has been rebuilt.";
907
+ readonly "comments.place.title": "Where comments are kept";
908
+ readonly "comments.place.kept": "Comments are kept as {category} discussions in";
909
+ readonly "comments.place.install": "If pages don't show comments, check that Giscus is installed on the project:";
910
+ readonly "comments.place.giscus": "Giscus on GitHub";
911
+ readonly "comments.stop.button": "Stop using comments";
912
+ readonly "comments.stop.title": "Stop using comments?";
913
+ readonly "comments.stop.body": "Pages stop showing comments once the site has been rebuilt. Everything visitors wrote stays in {project} on GitHub, so you can set comments up with it again later.";
914
+ readonly "comments.stop.message": "Stop using comments";
915
+ readonly "comments.moderate.title": "What visitors have written";
916
+ readonly "comments.moderate.empty": "No one has commented yet.";
917
+ readonly "comments.moderate.more": "Show more pages";
918
+ readonly "comments.moderate.block": "To stop someone commenting at all, block them on GitHub.";
919
+ readonly "comments.moderate.blockLink": "How to block someone";
920
+ readonly "comments.thread.count": "Comments: {count}";
921
+ readonly "comments.thread.locked": "Closed to new comments";
922
+ readonly "comments.thread.lock": "Close to new comments";
923
+ readonly "comments.thread.unlock": "Open to new comments";
924
+ readonly "comments.openOnGitHub": "Open on GitHub";
925
+ readonly "comments.comment.hidden": "Hidden";
926
+ readonly "comments.comment.hiddenAs": "Hidden as {reason}";
927
+ readonly "comments.comment.hide": "Hide";
928
+ readonly "comments.comment.show": "Show again";
929
+ readonly "comments.comment.delete": "Delete";
930
+ readonly "comments.hide.title": "Hide this comment?";
931
+ readonly "comments.hide.body": "It stays on the page, folded away and marked with why it was hidden, until you show it again.";
932
+ readonly "comments.hide.reason": "Why";
933
+ readonly "comments.reason.spam": "spam";
934
+ readonly "comments.reason.abuse": "abusive";
935
+ readonly "comments.reason.off-topic": "off topic";
936
+ readonly "comments.delete.title": "Delete this comment?";
937
+ readonly "comments.delete.body": "It's removed for good.";
938
+ readonly "comments.delete.bodyReplies": "It's removed for good, with the replies to it.";
939
+ readonly "comments.token.title": "Use a GitHub token for comments";
940
+ readonly "comments.token.intro": "The admin panel's sign-in can reach only the site's own project on GitHub. To set up and moderate comments, use a GitHub token of your own. It's kept only in this tab, until you sign out.";
941
+ readonly "comments.token.create": "Create a token on GitHub";
942
+ readonly "comments.token.scope": "It's filled in with what comments need: leave the choices as they are.";
943
+ readonly "comments.token.paste": "Copy the token and paste it here:";
944
+ readonly "comments.token.label": "GitHub token";
945
+ readonly "comments.token.active": "This tab is using a GitHub token of your own for comments.";
946
+ readonly "comments.error.no-access": "GitHub didn't let this sign-in do that. Use a GitHub token of your own, made by someone who can manage the project.";
947
+ readonly "comments.error.not-found": "GitHub has no project with that name, or this sign-in can't see it.";
948
+ readonly "comments.error.not-public": "That project is private, so visitors couldn't read its comments. Make it public on GitHub, then try again.";
949
+ readonly "comments.error.name-taken": "There's already a project with that name. Choose another name, or use it as a project you already have.";
950
+ readonly "comments.error.name-invalid": "A project's name can have only letters, numbers, hyphens, underscores and dots.";
951
+ readonly "comments.error.no-discussions": "Discussions are off in that project, and this sign-in can't turn them on. Turn them on in the project's settings on GitHub, then try again.";
952
+ readonly "comments.error.no-category": "That project's Discussions have no categories yet. Open its Discussions on GitHub once, then try again.";
953
+ readonly "comments.error.other": "Something went wrong on GitHub. Try again in a moment.";
954
+ readonly "comments.error.fix": "Open it on GitHub";
871
955
  readonly "settings.tab.import": "WordPress";
872
956
  readonly "settings.tab.themes": "Themes";
873
957
  readonly "plugins.notFound": "The site has no plugin screen at this address.";
@@ -1338,6 +1422,25 @@ export declare const defaultStrings: {
1338
1422
  readonly "forms.accessKeyLink": "Get an access key from Web3Forms";
1339
1423
  readonly "forms.captcha": "Ask visitors to show they aren't robots (hCaptcha)";
1340
1424
  readonly "forms.captchaHint": "Adds Web3Forms' hCaptcha and its script to pages with a form. To turn away answers without it, also turn hCaptcha on for the form in a Web3Forms account.";
1425
+ readonly "consent.title": "Visitors' consent";
1426
+ readonly "consent.ask": "Ask visitors before showing content from other sites";
1427
+ readonly "consent.hint": "Videos from YouTube and Vimeo, Google forms and maps, hCaptcha and the code under Code wait until visitors agree, with a notice at the bottom of the page that asks them. Their answer is kept in their browser. Links to #consent, such as in a menu, open the notice again.";
1428
+ readonly "consent.message": "What the notice says";
1429
+ readonly "consent.accept": "Button that agrees";
1430
+ readonly "consent.decline": "Button that doesn't";
1431
+ readonly "consent.held": "What's shown in a video's or form's place";
1432
+ readonly "consent.heldHint": "{site} is where it comes from, such as youtube-nocookie.com.";
1433
+ readonly "consent.show": "Button there that shows it";
1434
+ readonly "consent.policy": "Privacy page";
1435
+ readonly "consent.policyHint": "The page that says what the site and the sites it shows content from do, such as /privacy.";
1436
+ readonly "consent.policyLabel": "Words of the link to it";
1437
+ readonly "consent.choose": "Button that shows the choices";
1438
+ readonly "consent.save": "Button that keeps the choices";
1439
+ readonly "consent.kind.content": "Choice for content from other sites";
1440
+ readonly "consent.kind.statistics": "Choice for statistics";
1441
+ readonly "consent.kind.marketing": "Choice for advertising";
1442
+ readonly "consent.days": "Ask again after this many days";
1443
+ readonly "consent.daysHint": "Visitors' answers last this long, then the notice asks again. 180 days, about six months, is common; regulators in Europe accept up to 395, 13 months.";
1341
1444
  readonly "forms.formspree": "Formspree form address";
1342
1445
  readonly "forms.formspreeHint": "Make a form in Formspree and copy its address, such as https://formspree.io/f/xyzabcde. On Formspree's free plan, visitors see Formspree's own thank-you page.";
1343
1446
  readonly "forms.address": "Address forms send answers to";
@@ -1456,13 +1559,23 @@ export declare const defaultStrings: {
1456
1559
  readonly "css.label": "Custom CSS";
1457
1560
  readonly "code.editorHint": "Tab indents, and suggestions appear as you type. Press Escape, then Tab, to leave the editor. Ctrl+F finds and replaces.";
1458
1561
  readonly "code.intro": "Code from services such as analytics or site verification, added to every page of the site. It never runs in the admin panel, so check it on the site once it's published. Paste only code you trust: it can change anything on the site.";
1562
+ readonly "code.exposed": "Editors sign in at the same address as the site's pages, so code here runs where it could act as anyone signed in to the admin panel, and publish changes as them.";
1563
+ readonly "code.exposedFix": "A sign-in page or an admin address of its own, on the Security tab, keeps their sign-in out of its reach.";
1459
1564
  readonly "code.head": "In the page head";
1460
1565
  readonly "code.headHint": "Script, style, link, meta and noscript tags, such as the ones Google Analytics gives you.";
1566
+ readonly "code.purpose.head": "What the code in the page head is for";
1567
+ readonly "code.purpose.body": "What the code at the end of the page is for";
1568
+ readonly "code.purposeHint": "Visitors choose which kinds to allow. Code needed for the site to work loads for everyone without asking, so choose it only for code that doesn't follow visitors.";
1569
+ readonly "code.purpose.needed": "Needed for the site to work: loads without asking";
1570
+ readonly "code.purpose.content": "Content from other sites, such as a chat widget";
1571
+ readonly "code.purpose.statistics": "Statistics, such as Google Analytics";
1572
+ readonly "code.purpose.marketing": "Advertising";
1461
1573
  readonly "code.body": "At the end of the page";
1462
1574
  readonly "code.bodyHint": "Any HTML, such as a chat widget, added just before the end of every page.";
1463
1575
  readonly "code.error.text": 'The code in the page head has text outside a tag: "{text}". Only tags such as <script> and <meta> can go there.';
1464
1576
  readonly "code.error.tag": 'A <{tag}> tag can\'t go in the page head. Put it in "At the end of the page" instead.';
1465
1577
  readonly "code.error.unclosed": "A {tag} tag in the page head isn't closed.";
1578
+ readonly "code.error.template": "This code has </template> in it. While the site asks visitors before loading other sites' content, that would let the code run before they agree. Take it out.";
1466
1579
  };
1467
1580
  type StringKey = keyof typeof defaultStrings;
1468
1581
  type Strings = Record<StringKey, string>;
@@ -1534,7 +1647,7 @@ interface AdminProps {
1534
1647
  registry?: string;
1535
1648
  }
1536
1649
  /** The admin panel. Render it on its own page, such as `/admin`. */
1537
- export declare function Admin({ site, frames, store, host, server, preview, siteUrl, strings, registry }: AdminProps): import("react").JSX.Element;
1650
+ export declare function Admin({ site, frames, store, host, server, preview, siteUrl, strings, registry }: AdminProps): import("react").JSX.Element | null;
1538
1651
  /** Renders the admin panel into an element. */
1539
1652
  export declare function mountAdmin(element: Element, props: AdminProps): void;
1540
1653
  //#endregion