@goodfellow-cms/admin 0.2.0 → 0.4.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
@@ -49,8 +49,22 @@ export declare const defaultStrings: {
49
49
  readonly "signIn.error.no-access": "That account can't see this site. Make sure the token was given access to it.";
50
50
  readonly "signIn.error.cant-publish": "That account can see the site but isn't allowed to change it. Ask the site's owner to give it permission.";
51
51
  readonly "signIn.error.redirect-failed": "Signing in didn't finish. Try again.";
52
+ readonly "signIn.error.not-installed": "Goodfellow isn't installed on this site on {host} yet, so editors can't sign in with {host}. If you own the site, install it now, which signs you in too. Otherwise, ask an owner to, or sign in with an access token.";
53
+ readonly "signIn.error.no-address": "Signing in with {host} needs the site's address in Site settings. Sign in with an access token for now, and add the address there.";
54
+ readonly "signIn.error.wrong-address": "Signing in with {host} works only at the site's own address, as Site settings give it. Sign in there, or with an access token here.";
55
+ readonly "signIn.error.local-address": "Signing in with {host} works only on the published site. Sign in with an access token here.";
56
+ readonly "signIn.error.not-owner": "That account isn't an owner of this site on {host}.";
57
+ readonly "signIn.error.unavailable": "Signing in with {host} isn't available right now, perhaps because it's been used as much as it can be today. Sign in with an access token instead.";
58
+ readonly "signIn.install": "Install Goodfellow on {host}";
52
59
  readonly "signIn.error.expired": "You were signed out because your sign-in expired. Sign in again to keep editing.";
53
60
  readonly "signIn.error.other": "Couldn't reach {host}. Check your connection and try again.";
61
+ readonly "signIn.app.intro": "Sign in with your account on this site to edit it.";
62
+ readonly "signIn.app.button": "Sign in";
63
+ readonly "signIn.app.expired": "You've been signed out. Sign in again to keep editing.";
64
+ readonly "signIn.app.notAllowed": "You're signed in, but your account isn't allowed to edit this site. Ask one of its owners to give you access.";
65
+ readonly "signIn.app.error": "Couldn't reach the site. Check your connection and try again.";
66
+ readonly "owners.only": "Only the site's owners can change this.";
67
+ readonly "owners.onlyHint": "Ask one of them if something here needs changing.";
54
68
  readonly "account.signedInAs": "Signed in as {name}";
55
69
  readonly "account.signOut": "Sign out";
56
70
  readonly "deploy.building": "Updating the live site…";
@@ -298,6 +312,8 @@ export declare const defaultStrings: {
298
312
  readonly "demo.startOver": "Start over";
299
313
  readonly "demo.startOverTitle": "Start over?";
300
314
  readonly "demo.startOverBody": "Everything you've changed in this demo, including uploads, will be undone.";
315
+ readonly "blocks.contentOnly": "This site's blocks are added by its developer.";
316
+ readonly "blocks.contentOnlyHint": "Its code is kept apart from its content, so adding or removing a block is done where the code is, and shows up here once the site has been rebuilt.";
301
317
  readonly "blocks.demo": "In this demo you can see which blocks there are, but not add or remove them: a block is added to a real site by updating its code.";
302
318
  readonly "markdown.formatted": "Formatted";
303
319
  readonly "markdown.source": "Markdown";
@@ -375,6 +391,7 @@ export declare const defaultStrings: {
375
391
  readonly "media.pickerTitleVideo": "Choose a video";
376
392
  readonly "media.pickerEmpty": "Nothing has been uploaded yet. Upload a file to use it here.";
377
393
  readonly "media.clear": "Remove";
394
+ readonly "media.credit": "Credit: {credit}";
378
395
  readonly "ai.label": "AI";
379
396
  readonly "ai.title": "Write with AI";
380
397
  readonly "ai.mode.add": "Describe what to add to this page, and AI will write it at the end of the page.";
@@ -384,6 +401,15 @@ export declare const defaultStrings: {
384
401
  readonly "ai.placeholder.add": "For example: a section about our Christmas Mass schedule, with a heading, a short welcome and a button to the contact page.";
385
402
  readonly "ai.placeholder.edit": "For example: make it shorter and friendlier, or translate it into Spanish.";
386
403
  readonly "ai.placeholder.fill": "For example: Fr. Smith's homily from Sunday, about hope. Paste any notes here.";
404
+ readonly "ai.photos": "Find openly licensed photos where the media library has none that fit";
405
+ readonly "ai.photosHint": "Photos come from Openverse and are added to the media library. Pages that use them credit who made them, as their licenses require.";
406
+ readonly "ai.photos.finding": "Finding photos…";
407
+ readonly "ai.photos.message": "Add photos from Openverse: {names}";
408
+ readonly "ai.photos.added": "Photos from Openverse added to the media library: {names}.";
409
+ readonly "ai.photos.missing": "No photo was found for {count} of the images, so they're left empty.";
410
+ readonly "ai.photos.error.busy": "Openverse has had too many requests from this computer, so some images are left empty. Try again later, or choose them from the media library.";
411
+ readonly "ai.photos.error.unreachable": "Couldn't reach Openverse, so some images are left empty. Check your connection, or choose them from the media library.";
412
+ readonly "ai.photos.error.publish": "The photos found couldn't be added to the media library, so their images are left empty.";
387
413
  readonly "ai.write": "Write it";
388
414
  readonly "ai.change": "Change it";
389
415
  readonly "ai.fill": "Fill it in";
@@ -398,6 +424,8 @@ export declare const defaultStrings: {
398
424
  readonly "ai.provider.manual": "Copy and paste into a chat app (free)";
399
425
  readonly "ai.provider.custom": "Another service (OpenAI-compatible)";
400
426
  readonly "ai.noKey": "(free, no key needed)";
427
+ readonly "ai.siteKey": "(provided by this site)";
428
+ readonly "ai.siteKeyHint": "This site provides {service}, so you don't need a key of your own.";
401
429
  readonly "ai.baseUrl": "Address of the service's API";
402
430
  readonly "ai.baseUrlHint": "Such as https://example.org/v1.";
403
431
  readonly "ai.key": "API key";
@@ -491,6 +519,10 @@ export declare const defaultStrings: {
491
519
  readonly "domain.error.invalid": "{host} doesn't accept this domain.";
492
520
  readonly "domain.error.not-ready": "The HTTPS certificate isn't ready yet. Try again in a while.";
493
521
  readonly "domain.error.other": "Something went wrong.";
522
+ readonly "owner.signIn.title": "Sign in as an owner";
523
+ readonly "owner.signIn.intro": "Inviting and removing editors, and connecting a domain, need an owner's access on {host}, which everyday sign-in doesn't have. Sign in as an owner for this tab only.";
524
+ readonly "owner.signIn.button": "Sign in as an owner with {host}";
525
+ readonly "owner.signIn.orToken": "Or use an owner token";
494
526
  readonly "owner.token.title": "Use an owner token";
495
527
  readonly "owner.token.intro": "Inviting and removing editors, and connecting a domain, need more access on {host} than signing in has. Create a second token for them. It's kept only until you close this tab, and stops working after a day; you can delete it on {host} sooner.";
496
528
  readonly "owner.token.create": "Create an owner token on {host}";
@@ -505,6 +537,11 @@ export declare const defaultStrings: {
505
537
  readonly "settings.tab.editors": "Editors";
506
538
  readonly "settings.tab.updates": "Updates";
507
539
  readonly "updates.intro": "Goodfellow, the software the site runs on, gets fixes and new releases. Fixes install on their own each night, and only once the site has been checked to still build with them.";
540
+ readonly "updates.contentOnly": "This site's code is kept apart from its content, so Goodfellow's updates are installed where the code is, by the site's own setup or its developer.";
541
+ readonly "updates.code": "This site's code is kept apart from its content, at {place}, where Goodfellow's updates are installed.";
542
+ readonly "updates.code.link": "See it on {host}";
543
+ readonly "updates.noAccess": "Your sign-in can't see the site's code, at {place}, where its updates are installed. Ask the site's developer to give you access to it. On GitHub, an access token needs to reach it too, or with Sign in with GitHub, Goodfellow's app needs to be installed there.";
544
+ readonly "updates.back.skip": "Don't install Goodfellow {version} again";
508
545
  readonly "updates.local": "Updates are shown in the published site's admin panel, where you sign in with GitHub or GitLab.";
509
546
  readonly "updates.demo": "Updates aren't installed in a demo.";
510
547
  readonly "updates.loading": "Checking for updates…";
@@ -612,6 +649,8 @@ export declare const defaultStrings: {
612
649
  readonly "general.favicon": "Browser tab icon";
613
650
  readonly "general.logo": "Logo";
614
651
  readonly "general.logoAlt": "Logo description";
652
+ readonly "general.logoDark": "Logo in dark mode";
653
+ readonly "general.logoDarkHint": "A version of the logo that shows up on dark backgrounds, such as a white one. Leave it empty to use the same logo.";
615
654
  readonly "general.socialImage": "Image when shared on social media";
616
655
  readonly "general.contact": "Contact details";
617
656
  readonly "general.contactHint": "Shown wherever a Contact details block is placed, such as the footer.";
@@ -666,7 +705,20 @@ export declare const defaultStrings: {
666
705
  readonly "theme.color.accentForeground": "Text on highlight";
667
706
  readonly "theme.color.border": "Borders";
668
707
  readonly "theme.default": "Default";
708
+ readonly "theme.darkMode": "Dark mode";
709
+ readonly "theme.darkModeOn": "Follow each visitor's light or dark setting";
710
+ readonly "theme.darkModeHint": "Off by default, so the site is always light. When it's on, visitors whose computer or phone is set to dark see the site in the colors below.";
711
+ readonly "theme.darkColors": "Colors in dark mode";
712
+ readonly "theme.preview": "Preview";
713
+ readonly "theme.previewLight": "Light";
714
+ readonly "theme.previewDark": "Dark";
669
715
  readonly "theme.pickColor": "Choose a color for {name}";
716
+ readonly "theme.code": "Code colors";
717
+ readonly "theme.codeHint": "The colors of code in Code blocks and Markdown. Code that looks like the page uses the light colors, and the dark colors in dark mode.";
718
+ readonly "theme.codeLight": "Light colors";
719
+ readonly "theme.codeDark": "Dark colors";
720
+ readonly "theme.codeBackground": "Show code on the subtle background color";
721
+ readonly "theme.codeBackgroundHint": "Code that looks like the page sits on the site's Subtle background color instead of its colors' own background, so it matches the rest of the site. Check that it's still easy to read.";
670
722
  readonly "menus.intro": "Menus are lists of links. Show one anywhere with the Menu block, using its name.";
671
723
  readonly "menus.empty": "There are no menus yet.";
672
724
  readonly "menus.add": "Add menu";
@@ -726,6 +778,12 @@ interface AdminProps {
726
778
  store?: ContentStore;
727
779
  /** The git host the site is stored on. Defaults to the config's `backend`. */
728
780
  host?: GitHost;
781
+ /**
782
+ * The address of a full-stack site's API for the admin panel, such as
783
+ * `/api/goodfellow`. Editors then sign in with the site's own sign-in, and its
784
+ * server reads and publishes for them, so they never sign in to the git host.
785
+ */
786
+ server?: string;
729
787
  preview: PreviewOptions;
730
788
  /** The live site's address, for "View" links. Defaults to `/`. */
731
789
  siteUrl?: string;
@@ -738,7 +796,7 @@ interface AdminProps {
738
796
  registry?: string;
739
797
  }
740
798
  /** The admin panel. Render it on its own page, such as `/admin`. */
741
- export declare function Admin({ config, store, host, preview, siteUrl, strings, registry }: AdminProps): import("react").JSX.Element;
799
+ export declare function Admin({ config, store, host, server, preview, siteUrl, strings, registry }: AdminProps): import("react").JSX.Element;
742
800
  /** Renders the admin panel into an element. */
743
801
  export declare function mountAdmin(element: Element, props: AdminProps): void;
744
802
  //#endregion