studiocms 0.1.0-beta.25 → 0.1.0-beta.26
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/CHANGELOG.md +91 -0
- package/dist/cli/users/steps/libsqlCreateUsers.js +1 -3
- package/dist/cli/users/steps/libsqlModifyUsers.js +1 -3
- package/dist/components/auth/OAuthButton.astro +1 -1
- package/dist/components/auth/OAuthButtonStack.astro +1 -1
- package/dist/components/auth/component-scripts/formListener.js +1 -1
- package/dist/components/dashboard/BaseHead.astro +6 -17
- package/dist/components/dashboard/DashboardGrid.astro +2 -2
- package/dist/components/dashboard/DashboardGridItem.astro +2 -1
- package/dist/components/dashboard/DashboardPageHeader.astro +8 -4
- package/dist/components/dashboard/DoubleSidebar.astro +2 -2
- package/dist/components/dashboard/LoginChecker.astro +3 -2
- package/dist/components/dashboard/MainSidebarContent.astro +16 -12
- package/dist/components/dashboard/PageHeader.astro +3 -2
- package/dist/components/dashboard/SidebarLink.astro +5 -5
- package/dist/components/dashboard/SidebarPluginLink.astro +3 -3
- package/dist/components/dashboard/SingleSidebar.astro +2 -2
- package/dist/components/dashboard/configuration/ConfigForm.astro +49 -47
- package/dist/components/dashboard/configuration/LoginPreview.astro +6 -4
- package/dist/components/dashboard/content-mgmt/CreateFolder.astro +3 -2
- package/dist/components/dashboard/content-mgmt/CreatePage.astro +8 -5
- package/dist/components/dashboard/content-mgmt/EditFolder.astro +3 -2
- package/dist/components/dashboard/content-mgmt/EditPage.astro +25 -13
- package/dist/components/dashboard/content-mgmt/InnerSidebarElement.astro +23 -15
- package/dist/components/dashboard/content-mgmt/PageHeader.astro +23 -14
- package/dist/components/dashboard/content-mgmt/PluginFields.astro +6 -1
- package/dist/components/dashboard/content-mgmt/TreeRenderer.astro +6 -6
- package/dist/components/dashboard/content-mgmt/TreeSidebarFolder.astro +4 -4
- package/dist/components/dashboard/content-mgmt/TreeSidebarLink.astro +4 -4
- package/dist/components/dashboard/plugins/SettingsRenderer.astro +6 -1
- package/dist/components/dashboard/profile/APITokens.astro +14 -8
- package/dist/components/dashboard/profile/BasicInfo.astro +8 -4
- package/dist/components/dashboard/profile/Notifications.astro +7 -4
- package/dist/components/dashboard/profile/SocialSignin.astro +8 -5
- package/dist/components/dashboard/profile/UpdatePassword.astro +6 -3
- package/dist/components/dashboard/sidebar/UserAccount.astro +1 -2
- package/dist/components/dashboard/sidebar/VersionCheck.astro +7 -7
- package/dist/components/dashboard/sidebar/VersionCheckChangelog.astro +28 -6
- package/dist/components/dashboard/sidebar-modals/UserManagementModals.astro +8 -3
- package/dist/components/dashboard/sidebar-modals/VersionModal.astro +16 -15
- package/dist/components/dashboard/sidebarConfig.d.ts +2 -2
- package/dist/components/dashboard/sidebarConfig.js +6 -6
- package/dist/components/dashboard/user-mgmt/InnerSidebarElement.astro +16 -9
- package/dist/components/dashboard/user-mgmt/RankCheck.astro +6 -8
- package/dist/components/dashboard/user-mgmt/SocialSignin.astro +9 -10
- package/dist/components/dashboard/user-mgmt/UserListItem.astro +8 -6
- package/dist/components/default-grid-items/Recently-created-pages.astro +11 -9
- package/dist/components/default-grid-items/Recently-signed-up.astro +8 -8
- package/dist/components/default-grid-items/Recently-updated-pages.astro +11 -9
- package/dist/components/default-grid-items/Totals.astro +7 -6
- package/dist/components/first-time-setup/PageHeader.astro +4 -3
- package/dist/components/shared/SSRUser.astro +200 -0
- package/dist/components/shared/head/Favicons.astro +6 -0
- package/dist/components/shared/head/Global.astro +4 -0
- package/dist/components/shared/head/TitleTags.astro +14 -0
- package/dist/config.d.ts +1 -4
- package/dist/consts.d.ts +34 -1
- package/dist/consts.js +42 -1
- package/dist/db/config.d.ts +22 -37
- package/dist/db/config.js +14 -2
- package/dist/handlers/astroConfigCheck.js +1 -1
- package/dist/handlers/changelog.d.ts +1 -0
- package/dist/handlers/changelog.js +54 -0
- package/dist/handlers/index.d.ts +1 -2
- package/dist/handlers/index.js +2 -4
- package/dist/handlers/pluginHandler.d.ts +2 -1
- package/dist/handlers/pluginHandler.js +14 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +115 -107
- package/dist/integrations/dynamic-sitemap/index.js +1 -1
- package/dist/integrations/webVitals/checkForWebVitalsPlugin.js +3 -3
- package/dist/integrations/webVitals/dashboard-grid-items/CoreVitals.astro +1 -1
- package/dist/integrations/webVitals/dashboard-grid-items/MetricCard.astro +3 -2
- package/dist/integrations/webVitals/dashboard-grid-items/SummaryCard.astro +2 -2
- package/dist/integrations/webVitals/dashboard-grid-items/metric.css +17 -17
- package/dist/integrations/webVitals/dashboard-grid-items/shared.d.ts +4 -4
- package/dist/integrations/webVitals/dashboard-grid-items/shared.js +3 -3
- package/dist/integrations/webVitals/pages/analytics/body.astro +10 -9
- package/dist/integrations/webVitals/utils/webVitalsUtils.d.ts +9 -9
- package/dist/layouts/AuthLayout.astro +7 -18
- package/dist/layouts/DashboardLayout.astro +3 -2
- package/dist/layouts/FirstTimeSetupLayout.astro +7 -18
- package/dist/middleware/index.js +3 -13
- package/dist/middleware/utils.d.ts +1 -1
- package/dist/middleware/utils.js +8 -5
- package/dist/routes/api/auth/login.js +1 -6
- package/dist/routes/api/auth/logout.js +3 -2
- package/dist/routes/api/auth/register.js +1 -7
- package/dist/routes/api/dashboard/content/page.js +5 -5
- package/dist/routes/api/dashboard/create-user-invite.js +1 -1
- package/dist/routes/api/dashboard/create-user.d.ts +0 -7
- package/dist/routes/api/dashboard/create-user.js +18 -23
- package/dist/routes/api/dashboard/email-notification-settings-site.js +10 -0
- package/dist/routes/api/dashboard/profile.js +1 -1
- package/dist/routes/api/dashboard/reset-password.js +1 -1
- package/dist/routes/api/dashboard/users.js +27 -10
- package/dist/routes/api/dashboard/verify-email.js +5 -2
- package/dist/routes/api/dashboard/verify-session.js +3 -2
- package/dist/routes/api/rest/utils/auth-token.d.ts +1 -1
- package/dist/routes/api/rest/v1/pages/[id]/index.js +3 -10
- package/dist/routes/api/rest/v1/users/[id].js +24 -23
- package/dist/routes/api/rest/v1/users/index.js +1 -1
- package/dist/routes/api/sdk/utils/changelog.d.ts +0 -15
- package/dist/routes/api/sdk/utils/changelog.js +9 -112
- package/dist/routes/auth/login.astro +16 -9
- package/dist/routes/auth/signup.astro +2 -1
- package/dist/routes/dashboard/configuration.astro +3 -2
- package/dist/routes/dashboard/content-management/createfolder.astro +1 -1
- package/dist/routes/dashboard/content-management/createpage.astro +1 -1
- package/dist/routes/dashboard/content-management/diff.astro +8 -5
- package/dist/routes/dashboard/content-management/index.astro +1 -1
- package/dist/routes/dashboard/password-reset.astro +8 -5
- package/dist/routes/dashboard/plugins/[plugin].astro +4 -3
- package/dist/routes/dashboard/smtp-configuration.astro +21 -10
- package/dist/routes/dashboard/unverified-email.astro +2 -4
- package/dist/routes/dashboard/user-management/edit.astro +30 -22
- package/dist/routes/dashboard/user-management/index.astro +2 -2
- package/dist/routes/error-pages/404.astro +1 -1
- package/dist/routes/firstTimeSetupRoutes/1-start.astro +15 -14
- package/dist/routes/firstTimeSetupRoutes/2-next.astro +14 -11
- package/dist/routes/firstTimeSetupRoutes/3-done.astro +3 -2
- package/dist/routes/firstTimeSetupRoutes/api/step-2.js +1 -1
- package/dist/schemas/plugins/index.d.ts +64 -64
- package/dist/schemas/plugins/shared.d.ts +84 -84
- package/dist/schemas/plugins/shared.js +10 -16
- package/dist/styles/404.css +1 -1
- package/dist/styles/code-component.css +8 -8
- package/dist/styles/dashboard-base.css +29 -29
- package/dist/styles/dashboard-diff.css +31 -31
- package/dist/types.d.ts +2 -22
- package/dist/utils/effects/smtp.d.ts +2 -3
- package/dist/utils/effects/smtp.js +5 -1
- package/dist/utils/safeString.d.ts +1 -1
- package/dist/utils/safeString.js +1 -3
- package/dist/utils/stripIconify.d.ts +13 -0
- package/dist/utils/stripIconify.js +11 -0
- package/dist/utils/tinyMDParser.js +5 -5
- package/dist/virtual.d.ts +17 -60
- package/dist/virtuals/auth/core.d.ts +91 -0
- package/dist/virtuals/auth/core.js +45 -0
- package/dist/virtuals/auth/index.d.ts +1 -4
- package/dist/virtuals/auth/index.js +1 -4
- package/dist/virtuals/auth/verify-email.d.ts +3 -3
- package/dist/virtuals/i18n/LanguageSelector.astro +1 -1
- package/dist/virtuals/i18n/client.d.ts +100 -4
- package/dist/virtuals/i18n/client.js +11 -10
- package/dist/virtuals/i18n/config.d.ts +417 -3
- package/dist/virtuals/i18n/config.js +22 -1
- package/dist/virtuals/i18n/server.d.ts +116 -0
- package/dist/virtuals/i18n/{index.js → server.js} +6 -19
- package/dist/virtuals/i18n/v-files.d.ts +30 -0
- package/dist/virtuals/i18n/v-files.js +46 -0
- package/dist/virtuals/lib/head.d.ts +1 -25
- package/dist/virtuals/lib/head.js +1 -73
- package/dist/virtuals/lib/headDefaults.d.ts +2 -2
- package/dist/virtuals/lib/pathGenerators.d.ts +1 -20
- package/dist/virtuals/lib/pathGenerators.js +1 -66
- package/dist/virtuals/lib/urlGen.d.ts +2 -1
- package/dist/virtuals/lib/urlGen.js +4 -24
- package/dist/virtuals/mailer/index.d.ts +4 -34
- package/dist/virtuals/mailer/index.js +3 -16
- package/dist/virtuals/plugins/dashboard-pages.d.ts +8 -8
- package/dist/virtuals/scripts/user-quick-tools.d.ts +3 -2
- package/dist/virtuals/scripts/user-quick-tools.js +135 -53
- package/dist/virtuals/sdk/effect/collectors.d.ts +1 -1
- package/dist/virtuals/sdk/effect/foldertree.d.ts +1 -1
- package/dist/virtuals/sdk/effect/parsers.js +1 -1
- package/dist/virtuals/sdk/index.d.ts +2 -1
- package/dist/virtuals/sdk/modules/auth.d.ts +6 -5
- package/dist/virtuals/sdk/modules/config.d.ts +272 -0
- package/dist/virtuals/sdk/modules/config.js +205 -0
- package/dist/virtuals/sdk/modules/get.d.ts +10 -23
- package/dist/virtuals/sdk/modules/get.js +27 -40
- package/dist/virtuals/sdk/modules/init.d.ts +4 -18
- package/dist/virtuals/sdk/modules/init.js +7 -8
- package/dist/virtuals/sdk/modules/notificationSettings.d.ts +5 -22
- package/dist/virtuals/sdk/modules/notificationSettings.js +7 -29
- package/dist/virtuals/sdk/modules/post.d.ts +5 -5
- package/dist/virtuals/sdk/modules/post.js +14 -9
- package/dist/virtuals/sdk/modules/rest_api.d.ts +3 -3
- package/dist/virtuals/sdk/modules/update.d.ts +19 -19
- package/dist/virtuals/sdk/modules/update.js +28 -25
- package/dist/virtuals/sdk/sdkCore.d.ts +5 -3
- package/dist/virtuals/sdk/sdkCore.js +9 -4
- package/dist/virtuals/sdk/types/index.d.ts +4 -3
- package/dist/virtuals/sdk/types/tableDefs.d.ts +5 -4
- package/dist/virtuals/sdk/types/tsAlias.d.ts +4 -0
- package/dist/virtuals/sdk/utils.d.ts +3 -2
- package/dist/virtuals/utils.d.ts +21 -17
- package/dist/virtuals/utils.js +10 -6
- package/package.json +15 -20
- package/src/cli/users/steps/libsqlCreateUsers.ts +2 -4
- package/src/cli/users/steps/libsqlModifyUsers.ts +2 -4
- package/src/components/auth/OAuthButton.astro +1 -1
- package/src/components/auth/OAuthButtonStack.astro +1 -1
- package/src/components/auth/component-scripts/formListener.ts +1 -1
- package/src/components/dashboard/BaseHead.astro +6 -17
- package/src/components/dashboard/DashboardGrid.astro +2 -2
- package/src/components/dashboard/DashboardGridItem.astro +2 -1
- package/src/components/dashboard/DashboardPageHeader.astro +8 -4
- package/src/components/dashboard/DoubleSidebar.astro +2 -2
- package/src/components/dashboard/LoginChecker.astro +3 -2
- package/src/components/dashboard/MainSidebarContent.astro +16 -12
- package/src/components/dashboard/PageHeader.astro +3 -2
- package/src/components/dashboard/SidebarLink.astro +5 -5
- package/src/components/dashboard/SidebarPluginLink.astro +3 -3
- package/src/components/dashboard/SingleSidebar.astro +2 -2
- package/src/components/dashboard/configuration/ConfigForm.astro +49 -47
- package/src/components/dashboard/configuration/LoginPreview.astro +6 -4
- package/src/components/dashboard/content-mgmt/CreateFolder.astro +3 -2
- package/src/components/dashboard/content-mgmt/CreatePage.astro +8 -5
- package/src/components/dashboard/content-mgmt/EditFolder.astro +3 -2
- package/src/components/dashboard/content-mgmt/EditPage.astro +25 -13
- package/src/components/dashboard/content-mgmt/InnerSidebarElement.astro +23 -15
- package/src/components/dashboard/content-mgmt/PageHeader.astro +23 -14
- package/src/components/dashboard/content-mgmt/PluginFields.astro +6 -1
- package/src/components/dashboard/content-mgmt/TreeRenderer.astro +6 -6
- package/src/components/dashboard/content-mgmt/TreeSidebarFolder.astro +4 -4
- package/src/components/dashboard/content-mgmt/TreeSidebarLink.astro +4 -4
- package/src/components/dashboard/plugins/SettingsRenderer.astro +6 -1
- package/src/components/dashboard/profile/APITokens.astro +14 -8
- package/src/components/dashboard/profile/BasicInfo.astro +8 -4
- package/src/components/dashboard/profile/Notifications.astro +7 -4
- package/src/components/dashboard/profile/SocialSignin.astro +8 -5
- package/src/components/dashboard/profile/UpdatePassword.astro +6 -3
- package/src/components/dashboard/sidebar/UserAccount.astro +1 -2
- package/src/components/dashboard/sidebar/VersionCheck.astro +7 -7
- package/src/components/dashboard/sidebar/VersionCheckChangelog.astro +28 -6
- package/src/components/dashboard/sidebar-modals/UserManagementModals.astro +8 -3
- package/src/components/dashboard/sidebar-modals/VersionModal.astro +16 -15
- package/src/components/dashboard/sidebarConfig.ts +8 -8
- package/src/components/dashboard/user-mgmt/InnerSidebarElement.astro +16 -9
- package/src/components/dashboard/user-mgmt/RankCheck.astro +6 -8
- package/src/components/dashboard/user-mgmt/SocialSignin.astro +9 -10
- package/src/components/dashboard/user-mgmt/UserListItem.astro +8 -6
- package/src/components/default-grid-items/Recently-created-pages.astro +11 -9
- package/src/components/default-grid-items/Recently-signed-up.astro +8 -8
- package/src/components/default-grid-items/Recently-updated-pages.astro +11 -9
- package/src/components/default-grid-items/Totals.astro +7 -6
- package/src/components/first-time-setup/PageHeader.astro +4 -3
- package/src/components/shared/SSRUser.astro +200 -0
- package/src/components/shared/head/Favicons.astro +6 -0
- package/src/components/shared/head/Global.astro +4 -0
- package/src/components/shared/head/TitleTags.astro +14 -0
- package/src/config.ts +1 -4
- package/src/consts.ts +67 -1
- package/src/db/config.ts +43 -2
- package/src/handlers/astroConfigCheck.ts +1 -1
- package/src/handlers/changelog.ts +67 -0
- package/src/handlers/index.ts +1 -2
- package/src/handlers/pluginHandler.ts +16 -9
- package/src/index.ts +142 -121
- package/src/integrations/dynamic-sitemap/index.ts +1 -1
- package/src/integrations/webVitals/checkForWebVitalsPlugin.ts +3 -3
- package/src/integrations/webVitals/dashboard-grid-items/CoreVitals.astro +1 -1
- package/src/integrations/webVitals/dashboard-grid-items/MetricCard.astro +3 -2
- package/src/integrations/webVitals/dashboard-grid-items/SummaryCard.astro +2 -2
- package/src/integrations/webVitals/dashboard-grid-items/metric.css +17 -17
- package/src/integrations/webVitals/dashboard-grid-items/shared.ts +7 -7
- package/src/integrations/webVitals/pages/analytics/body.astro +10 -9
- package/src/layouts/AuthLayout.astro +7 -18
- package/src/layouts/DashboardLayout.astro +3 -2
- package/src/layouts/FirstTimeSetupLayout.astro +7 -18
- package/src/middleware/index.ts +3 -19
- package/src/middleware/utils.ts +7 -4
- package/src/routes/api/auth/login.ts +1 -6
- package/src/routes/api/auth/logout.ts +3 -2
- package/src/routes/api/auth/register.ts +1 -7
- package/src/routes/api/dashboard/config.ts +3 -2
- package/src/routes/api/dashboard/content/page.ts +6 -6
- package/src/routes/api/dashboard/create-user-invite.ts +3 -2
- package/src/routes/api/dashboard/create-user.ts +21 -23
- package/src/routes/api/dashboard/email-notification-settings-site.ts +27 -2
- package/src/routes/api/dashboard/profile.ts +1 -1
- package/src/routes/api/dashboard/reset-password.ts +1 -1
- package/src/routes/api/dashboard/users.ts +33 -15
- package/src/routes/api/dashboard/verify-email.ts +5 -2
- package/src/routes/api/dashboard/verify-session.ts +3 -2
- package/src/routes/api/rest/v1/pages/[id]/index.ts +3 -13
- package/src/routes/api/rest/v1/users/[id].ts +24 -23
- package/src/routes/api/rest/v1/users/index.ts +1 -1
- package/src/routes/api/sdk/utils/changelog.ts +2 -143
- package/src/routes/auth/login.astro +16 -9
- package/src/routes/auth/signup.astro +2 -1
- package/src/routes/dashboard/configuration.astro +3 -2
- package/src/routes/dashboard/content-management/createfolder.astro +1 -1
- package/src/routes/dashboard/content-management/createpage.astro +1 -1
- package/src/routes/dashboard/content-management/diff.astro +8 -5
- package/src/routes/dashboard/content-management/index.astro +1 -1
- package/src/routes/dashboard/password-reset.astro +8 -5
- package/src/routes/dashboard/plugins/[plugin].astro +4 -3
- package/src/routes/dashboard/smtp-configuration.astro +21 -10
- package/src/routes/dashboard/unverified-email.astro +2 -4
- package/src/routes/dashboard/user-management/edit.astro +30 -22
- package/src/routes/dashboard/user-management/index.astro +2 -2
- package/src/routes/error-pages/404.astro +1 -1
- package/src/routes/firstTimeSetupRoutes/1-start.astro +15 -14
- package/src/routes/firstTimeSetupRoutes/2-next.astro +14 -11
- package/src/routes/firstTimeSetupRoutes/3-done.astro +3 -2
- package/src/routes/firstTimeSetupRoutes/api/step-2.ts +1 -1
- package/src/schemas/plugins/shared.ts +13 -25
- package/src/styles/404.css +1 -1
- package/src/styles/code-component.css +8 -8
- package/src/styles/dashboard-base.css +29 -29
- package/src/styles/dashboard-diff.css +31 -31
- package/src/types.ts +3 -20
- package/src/utils/effects/smtp.ts +8 -4
- package/src/utils/safeString.ts +1 -6
- package/src/utils/stripIconify.ts +20 -0
- package/src/utils/tinyMDParser.ts +7 -7
- package/src/virtual.d.ts +17 -60
- package/src/virtuals/auth/core.ts +82 -0
- package/src/virtuals/auth/index.ts +1 -4
- package/src/virtuals/i18n/LanguageSelector.astro +1 -1
- package/src/virtuals/i18n/client.ts +115 -11
- package/src/virtuals/i18n/config.ts +154 -3
- package/src/virtuals/i18n/{index.ts → server.ts} +42 -46
- package/src/virtuals/i18n/v-files.ts +122 -0
- package/src/virtuals/lib/head.ts +1 -114
- package/src/virtuals/lib/pathGenerators.ts +1 -72
- package/src/virtuals/lib/urlGen.ts +4 -29
- package/src/virtuals/mailer/index.ts +7 -34
- package/src/virtuals/scripts/user-quick-tools.ts +151 -59
- package/src/virtuals/sdk/effect/parsers.ts +1 -1
- package/src/virtuals/sdk/modules/auth.ts +2 -1
- package/src/virtuals/sdk/modules/config.ts +602 -0
- package/src/virtuals/sdk/modules/get.ts +32 -48
- package/src/virtuals/sdk/modules/init.ts +18 -26
- package/src/virtuals/sdk/modules/notificationSettings.ts +8 -44
- package/src/virtuals/sdk/modules/post.ts +17 -18
- package/src/virtuals/sdk/modules/update.ts +31 -29
- package/src/virtuals/sdk/sdkCore.ts +5 -0
- package/src/virtuals/sdk/types/index.ts +4 -8
- package/src/virtuals/sdk/types/tableDefs.ts +4 -4
- package/src/virtuals/sdk/types/tsAlias.ts +4 -0
- package/src/virtuals/sdk/utils.ts +2 -2
- package/src/virtuals/utils.ts +29 -25
- package/ui.d.ts +1301 -274
- package/dist/components/first-time-setup/TabItem.astro +0 -44
- package/dist/components/first-time-setup/Tabs.astro +0 -170
- package/dist/handlers/changelog/changelogLoader.d.ts +0 -15
- package/dist/handlers/changelog/changelogLoader.js +0 -104
- package/dist/handlers/changelog/index.d.ts +0 -1
- package/dist/handlers/changelog/index.js +0 -53
- package/dist/handlers/scriptHandler.d.ts +0 -30
- package/dist/handlers/scriptHandler.js +0 -25
- package/dist/utils/addIntegrationArray.d.ts +0 -24
- package/dist/utils/addIntegrationArray.js +0 -11
- package/dist/utils/getLatestVersion.d.ts +0 -12
- package/dist/utils/getLatestVersion.js +0 -36
- package/dist/utils/integrationLogger.d.ts +0 -8
- package/dist/utils/integrationLogger.js +0 -23
- package/dist/utils/jsonUtils.d.ts +0 -13
- package/dist/utils/jsonUtils.js +0 -11
- package/dist/utils/pageTypeFilter.d.ts +0 -2
- package/dist/utils/pageTypeFilter.js +0 -16
- package/dist/virtuals/auth/encryption.d.ts +0 -46
- package/dist/virtuals/auth/encryption.js +0 -82
- package/dist/virtuals/auth/password.d.ts +0 -47
- package/dist/virtuals/auth/password.js +0 -147
- package/dist/virtuals/auth/session.d.ts +0 -77
- package/dist/virtuals/auth/session.js +0 -146
- package/dist/virtuals/auth/user.d.ts +0 -155
- package/dist/virtuals/auth/user.js +0 -251
- package/dist/virtuals/auth/utils/lists/passwords.d.ts +0 -2
- package/dist/virtuals/auth/utils/lists/passwords.js +0 -10006
- package/dist/virtuals/auth/utils/lists/usernames.d.ts +0 -2
- package/dist/virtuals/auth/utils/lists/usernames.js +0 -547
- package/dist/virtuals/auth/utils/scrypt.d.ts +0 -17
- package/dist/virtuals/auth/utils/scrypt.js +0 -30
- package/dist/virtuals/auth/utils/unsafeCheck.d.ts +0 -34
- package/dist/virtuals/auth/utils/unsafeCheck.js +0 -39
- package/dist/virtuals/i18n/index.d.ts +0 -2471
- package/dist/virtuals/lib/jsonUtils.d.ts +0 -2
- package/dist/virtuals/lib/jsonUtils.js +0 -14
- package/dist/virtuals/lib/removeLeadingTrailingSlashes.d.ts +0 -10
- package/dist/virtuals/lib/removeLeadingTrailingSlashes.js +0 -5
- package/src/components/first-time-setup/TabItem.astro +0 -44
- package/src/components/first-time-setup/Tabs.astro +0 -170
- package/src/handlers/changelog/changelogLoader.ts +0 -138
- package/src/handlers/changelog/index.ts +0 -67
- package/src/handlers/scriptHandler.ts +0 -86
- package/src/utils/addIntegrationArray.ts +0 -35
- package/src/utils/getLatestVersion.ts +0 -67
- package/src/utils/integrationLogger.ts +0 -29
- package/src/utils/jsonUtils.ts +0 -20
- package/src/utils/pageTypeFilter.ts +0 -13
- package/src/virtuals/auth/encryption.ts +0 -148
- package/src/virtuals/auth/password.ts +0 -279
- package/src/virtuals/auth/session.ts +0 -290
- package/src/virtuals/auth/user.ts +0 -501
- package/src/virtuals/auth/utils/lists/passwords.ts +0 -10004
- package/src/virtuals/auth/utils/lists/usernames.ts +0 -546
- package/src/virtuals/auth/utils/scrypt.ts +0 -42
- package/src/virtuals/auth/utils/unsafeCheck.ts +0 -72
- package/src/virtuals/lib/jsonUtils.ts +0 -11
- package/src/virtuals/lib/removeLeadingTrailingSlashes.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# studiocms
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#730](https://github.com/withstudiocms/studiocms/pull/730) [`cf0e866`](https://github.com/withstudiocms/studiocms/commit/cf0e866e1508d6fec7d59c765126c6bbfe09f068) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Update to StudioCMS UI 1.0 beta
|
|
8
|
+
|
|
9
|
+
- [#754](https://github.com/withstudiocms/studiocms/pull/754) [`3daaf92`](https://github.com/withstudiocms/studiocms/commit/3daaf92efa7ba78de41927cc56cc3d166da48075) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fix: Adjust SDK page lookup to return `undefined` when a page is not found, eliminating noisy Astro errors in development (notably when using Chrome DevTools).
|
|
10
|
+
|
|
11
|
+
- [#759](https://github.com/withstudiocms/studiocms/pull/759) [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Cleanup internal integration code
|
|
12
|
+
|
|
13
|
+
- [#740](https://github.com/withstudiocms/studiocms/pull/740) [`203852c`](https://github.com/withstudiocms/studiocms/commit/203852c2e102c668eed71e46b96f134899895327) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implement new auth package into StudioCMS
|
|
14
|
+
|
|
15
|
+
- [#761](https://github.com/withstudiocms/studiocms/pull/761) [`447843f`](https://github.com/withstudiocms/studiocms/commit/447843f8e565f7ea15131a1a02cf178c6269d5ef) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Renames internal i18n file to server.ts instead of index.ts
|
|
16
|
+
|
|
17
|
+
- [#724](https://github.com/withstudiocms/studiocms/pull/724) [`0921bd3`](https://github.com/withstudiocms/studiocms/commit/0921bd330bcd69080aba0265db822b33327fbb9f) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.49
|
|
18
|
+
|
|
19
|
+
- [#734](https://github.com/withstudiocms/studiocms/pull/734) [`c613781`](https://github.com/withstudiocms/studiocms/commit/c613781d04003f1808a1632dcfcd2f2662d4ee8b) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
|
|
20
|
+
|
|
21
|
+
- [#746](https://github.com/withstudiocms/studiocms/pull/746) [`d52873f`](https://github.com/withstudiocms/studiocms/commit/d52873f975fa7cbfe52a037bf84648b03c4773b4) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.50
|
|
22
|
+
|
|
23
|
+
- [#766](https://github.com/withstudiocms/studiocms/pull/766) [`06444cb`](https://github.com/withstudiocms/studiocms/commit/06444cbaf17e63a12b08eb8a08c1b6d65eeaac82) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
|
|
24
|
+
|
|
25
|
+
- [#749](https://github.com/withstudiocms/studiocms/pull/749) [`5780dd6`](https://github.com/withstudiocms/studiocms/commit/5780dd603ec6dc900d8f0f667374b4cf5eaf6a5a) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - BREAKING: Remove deprecated locals from middleware in favor of a joined StudioCMS locals object.
|
|
26
|
+
|
|
27
|
+
Removed top-level Astro.Locals keys:
|
|
28
|
+
|
|
29
|
+
- SCMSGenerator, SCMSUiGenerator, latestVersion, siteConfig, defaultLang, routeMap
|
|
30
|
+
- userSessionData, emailVerificationEnabled, userPermissionLevel
|
|
31
|
+
- wysiwygCsrfToken (renamed)
|
|
32
|
+
|
|
33
|
+
New location:
|
|
34
|
+
|
|
35
|
+
- Access these under event.locals.StudioCMS.<key>
|
|
36
|
+
|
|
37
|
+
Renames:
|
|
38
|
+
|
|
39
|
+
- wysiwygCsrfToken → editorCSRFToken (under StudioCMS)
|
|
40
|
+
|
|
41
|
+
Migration examples:
|
|
42
|
+
Before:
|
|
43
|
+
const { siteConfig, defaultLang } = Astro.locals;
|
|
44
|
+
After:
|
|
45
|
+
const { siteConfig, defaultLang } = Astro.locals.StudioCMS;
|
|
46
|
+
|
|
47
|
+
Before:
|
|
48
|
+
const token = Astro.locals.wysiwygCsrfToken;
|
|
49
|
+
After:
|
|
50
|
+
const token = Astro.locals.StudioCMS.editorCSRFToken;
|
|
51
|
+
|
|
52
|
+
- [#755](https://github.com/withstudiocms/studiocms/pull/755) [`85a9a99`](https://github.com/withstudiocms/studiocms/commit/85a9a99d3c4595ff7130ca753e4962da66ad2511) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implements new DB table for dynamic config storage in unified table
|
|
53
|
+
|
|
54
|
+
BREAKING:
|
|
55
|
+
|
|
56
|
+
Users will be required to run `astro db push --remote` to update their database table schemas.
|
|
57
|
+
|
|
58
|
+
- [#759](https://github.com/withstudiocms/studiocms/pull/759) [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - cleanup and organize dependencies
|
|
59
|
+
|
|
60
|
+
- [#741](https://github.com/withstudiocms/studiocms/pull/741) [`e685425`](https://github.com/withstudiocms/studiocms/commit/e6854250165650c7642a03e4f612aa0a9ea880d1) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Tweak auth-kit to conform types to table configs
|
|
61
|
+
|
|
62
|
+
- [#742](https://github.com/withstudiocms/studiocms/pull/742) [`8e53f8f`](https://github.com/withstudiocms/studiocms/commit/8e53f8fc56adb8a8b110c9854053c779e07b3cb3) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Init new package @withstudiocms/internal_helpers
|
|
63
|
+
|
|
64
|
+
- [#744](https://github.com/withstudiocms/studiocms/pull/744) [`95b41f1`](https://github.com/withstudiocms/studiocms/commit/95b41f1a37b241dd3e1bfa90c8a85b858c107e6d) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fix missing variable during First time setup
|
|
65
|
+
|
|
66
|
+
- [#741](https://github.com/withstudiocms/studiocms/pull/741) [`e685425`](https://github.com/withstudiocms/studiocms/commit/e6854250165650c7642a03e4f612aa0a9ea880d1) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - BREAKING CHANGE: Updated AstroDB table config to utilize enums for permissions.
|
|
67
|
+
|
|
68
|
+
Users will be required to run `astro db push --remote` to update their table schema.
|
|
69
|
+
|
|
70
|
+
- [#751](https://github.com/withstudiocms/studiocms/pull/751) [`d5229f5`](https://github.com/withstudiocms/studiocms/commit/d5229f557b8035406582c9792e8a738dba18a1b5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - fixes formdata conversion on first time setup
|
|
71
|
+
|
|
72
|
+
- [#763](https://github.com/withstudiocms/studiocms/pull/763) [`2b280d8`](https://github.com/withstudiocms/studiocms/commit/2b280d84bcb40805bbd1ed44e45a9f7260eed081) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Clean up and deduplicate code in the main integration index.
|
|
73
|
+
|
|
74
|
+
- [#756](https://github.com/withstudiocms/studiocms/pull/756) [`2f5403d`](https://github.com/withstudiocms/studiocms/commit/2f5403de6af5662a088bdcb764a43bf351249c44) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Restore avatar functionality with automatic fallback when remote avatars are unavailable to prevent server errors
|
|
75
|
+
|
|
76
|
+
- [#750](https://github.com/withstudiocms/studiocms/pull/750) [`0fc4fd7`](https://github.com/withstudiocms/studiocms/commit/0fc4fd7c4567b36865c4dba617663a12ecf619f5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - NOTICE: Avatars disabled for now due to performance issues.
|
|
77
|
+
|
|
78
|
+
- [#759](https://github.com/withstudiocms/studiocms/pull/759) [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Create and implement new injectScripts helper for Astro integrations
|
|
79
|
+
|
|
80
|
+
- [#747](https://github.com/withstudiocms/studiocms/pull/747) [`57f2d80`](https://github.com/withstudiocms/studiocms/commit/57f2d800d929734dfaa9eb324e8d8171856e8f3f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Clean up and remove deprecated `removeLeadingTrailingSlashes` in favor of `stripLeadingAndTrailingSlashes`.
|
|
81
|
+
|
|
82
|
+
- [#750](https://github.com/withstudiocms/studiocms/pull/750) [`0fc4fd7`](https://github.com/withstudiocms/studiocms/commit/0fc4fd7c4567b36865c4dba617663a12ecf619f5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Streamlines i18n setup to utilize centralized config.
|
|
83
|
+
|
|
84
|
+
- [#764](https://github.com/withstudiocms/studiocms/pull/764) [`3b22102`](https://github.com/withstudiocms/studiocms/commit/3b2210274705cb534b03d02d6952bfcdbdb10478) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Refactor: Handle i18n translations at build instead of bundling json files
|
|
85
|
+
|
|
86
|
+
- [#758](https://github.com/withstudiocms/studiocms/pull/758) [`bfda1e4`](https://github.com/withstudiocms/studiocms/commit/bfda1e4922fe391d2b8ecc81e8a83f68990ab083) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Tweaks i18n loader to ignore translations with more than 10% of the translations missing
|
|
87
|
+
|
|
88
|
+
- Updated dependencies [[`203852c`](https://github.com/withstudiocms/studiocms/commit/203852c2e102c668eed71e46b96f134899895327), [`2ad259e`](https://github.com/withstudiocms/studiocms/commit/2ad259e9662bd4c8b58e07629491cb322eb479fa), [`d77a8c1`](https://github.com/withstudiocms/studiocms/commit/d77a8c16c97b91343f1c03b2fd9dd2fca0252647), [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f), [`e685425`](https://github.com/withstudiocms/studiocms/commit/e6854250165650c7642a03e4f612aa0a9ea880d1), [`8e53f8f`](https://github.com/withstudiocms/studiocms/commit/8e53f8fc56adb8a8b110c9854053c779e07b3cb3), [`341b59e`](https://github.com/withstudiocms/studiocms/commit/341b59e3c775f619e9630c9044772ef0f16d1970), [`c14b94c`](https://github.com/withstudiocms/studiocms/commit/c14b94c855a750b5666fffc975bebf1a556cf80f), [`e70f380`](https://github.com/withstudiocms/studiocms/commit/e70f38001d9ef80e27f701d249fda23c670dfb5e)]:
|
|
89
|
+
- @withstudiocms/auth-kit@0.1.0-beta.1
|
|
90
|
+
- @withstudiocms/effect@0.1.0-beta.2
|
|
91
|
+
- @withstudiocms/internal_helpers@0.1.0-beta.1
|
|
92
|
+
- @withstudiocms/component-registry@0.1.0-beta.2
|
|
93
|
+
|
|
3
94
|
## 0.1.0-beta.25
|
|
4
95
|
|
|
5
96
|
### Patch Changes
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { CheckIfUnsafe } from "@withstudiocms/auth-kit/utils/unsafeCheck";
|
|
1
2
|
import { StudioCMSColorwayError, StudioCMSColorwayInfo } from "@withstudiocms/cli-kit/colors";
|
|
2
3
|
import { z } from "astro/zod";
|
|
3
4
|
import dotenv from "dotenv";
|
|
4
5
|
import { Effect, runEffect } from "../../../effect.js";
|
|
5
|
-
import {
|
|
6
|
-
CheckIfUnsafe
|
|
7
|
-
} from "../../../virtuals/auth/utils/unsafeCheck.js";
|
|
8
6
|
import { checkRequiredEnvVars } from "../../utils/checkRequiredEnvVars.js";
|
|
9
7
|
import { createUserAvatar } from "../../utils/createUserAvatar.js";
|
|
10
8
|
import { logger } from "../../utils/logger.js";
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { CheckIfUnsafe } from "@withstudiocms/auth-kit/utils/unsafeCheck";
|
|
1
2
|
import { StudioCMSColorwayError, StudioCMSColorwayInfo } from "@withstudiocms/cli-kit/colors";
|
|
2
3
|
import dotenv from "dotenv";
|
|
3
4
|
import { eq } from "drizzle-orm";
|
|
4
5
|
import { Effect, runEffect } from "../../../effect.js";
|
|
5
|
-
import {
|
|
6
|
-
CheckIfUnsafe
|
|
7
|
-
} from "../../../virtuals/auth/utils/unsafeCheck.js";
|
|
8
6
|
import { checkRequiredEnvVars } from "../../utils/checkRequiredEnvVars.js";
|
|
9
7
|
import { logger } from "../../utils/logger.js";
|
|
10
8
|
import { Permissions, Users, useLibSQLDb } from "../../utils/useLibSQLDb.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { useTranslations } from 'studiocms:i18n';
|
|
3
|
-
import { Divider } from 'studiocms:ui/components';
|
|
3
|
+
import { Divider } from 'studiocms:ui/components/divider';
|
|
4
4
|
import OAuthButton from './OAuthButton.astro';
|
|
5
5
|
import { providerData, showOAuth } from './oAuthButtonProviders.js';
|
|
6
6
|
|
|
@@ -3,7 +3,9 @@ import 'studiocms:ui/global-css';
|
|
|
3
3
|
import '../../styles/dashboard-base.css';
|
|
4
4
|
import '../../styles/dashboard-diff.css';
|
|
5
5
|
import { Generator } from 'studiocms:components';
|
|
6
|
-
import
|
|
6
|
+
import Favicons from '../shared/head/Favicons.astro';
|
|
7
|
+
import Global from '../shared/head/Global.astro';
|
|
8
|
+
import TitleTags from '../shared/head/TitleTags.astro';
|
|
7
9
|
import ThemeManager from '../shared/ThemeManager.astro';
|
|
8
10
|
|
|
9
11
|
export interface Props {
|
|
@@ -15,22 +17,9 @@ const { title, description } = Astro.props;
|
|
|
15
17
|
---
|
|
16
18
|
|
|
17
19
|
<head>
|
|
18
|
-
|
|
19
|
-
<meta charset="utf-8" />
|
|
20
|
-
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
20
|
+
<Global />
|
|
21
21
|
<Generator />
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<link rel="icon" href={FAVICON_ASSETS.svg} type="image/svg+xml" />
|
|
25
|
-
<link rel="icon" href={FAVICON_ASSETS.png.light} type="image/png" media="(prefers-color-scheme: dark)" />
|
|
26
|
-
<link rel="icon" href={FAVICON_ASSETS.png.dark} type="image/png" media="(prefers-color-scheme: light)" />
|
|
27
|
-
|
|
28
|
-
{/* Primary Meta Tags */}
|
|
29
|
-
<title>{title}</title>
|
|
30
|
-
<meta name="title" content={title} />
|
|
31
|
-
<meta name="description" content={description} />
|
|
32
|
-
<meta name="theme-color" content={STUDIOCMS_THEME_COLOR} />
|
|
33
|
-
|
|
34
|
-
{/* Theme Manager */}
|
|
22
|
+
<Favicons />
|
|
23
|
+
<TitleTags {title} {description} />
|
|
35
24
|
<ThemeManager />
|
|
36
25
|
</head>
|
|
@@ -4,7 +4,7 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
|
4
4
|
import dashboardGridItems from 'studiocms:components/dashboard-grid-items';
|
|
5
5
|
import type { UiLanguageKeys } from 'studiocms:i18n';
|
|
6
6
|
import type { SiteConfigCacheObject } from 'studiocms:sdk/types';
|
|
7
|
-
import { Center } from 'studiocms:ui/components';
|
|
7
|
+
import { Center } from 'studiocms:ui/components/center';
|
|
8
8
|
import { Effect } from '../../effect.js';
|
|
9
9
|
import DashboardGridItem from './DashboardGridItem.astro';
|
|
10
10
|
|
|
@@ -32,7 +32,7 @@ const checkAllowed = (perm: 'owner' | 'admin' | 'editor' | 'visitor' | undefined
|
|
|
32
32
|
Effect.gen(function* () {
|
|
33
33
|
const user = yield* User;
|
|
34
34
|
return user.isUserAllowed(currentUser, perm ?? 'unknown');
|
|
35
|
-
})
|
|
35
|
+
});
|
|
36
36
|
---
|
|
37
37
|
|
|
38
38
|
<div class="dashboard-grid-container">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UiLanguageKeys } from 'studiocms:i18n';
|
|
3
|
-
import { Card
|
|
3
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
4
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
4
5
|
import { createComponentProxy, transformHTML } from '../../runtime/index.js';
|
|
5
6
|
import type { GridItem } from './shared.js';
|
|
6
7
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
3
3
|
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
5
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
6
|
+
import { Modal } from 'studiocms:ui/components/modal';
|
|
7
|
+
import { Textarea } from 'studiocms:ui/components/textarea';
|
|
5
8
|
import { studioCMSSocials } from '../../consts.js';
|
|
6
9
|
import UserName from './UserName.astro';
|
|
7
10
|
|
|
@@ -18,7 +21,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:index');
|
|
|
18
21
|
<header class="index-page-header">
|
|
19
22
|
<div class="page-title-container">
|
|
20
23
|
<Button color='primary' id='nav-open' class='mobile-btn'>
|
|
21
|
-
<Icon name="bars-3" height={24} width={24} />
|
|
24
|
+
<Icon name="heroicons:bars-3" height={24} width={24} />
|
|
22
25
|
</Button>
|
|
23
26
|
<h1 class="page-title">
|
|
24
27
|
<t-dashboard-header key="welcome-title">{t("welcome-title")}</t-dashboard-header>, <UserName {currentUser} />.
|
|
@@ -30,7 +33,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:index');
|
|
|
30
33
|
<t-dashboard-header key="title-button:discord">{t("title-button:discord")}</t-dashboard-header>
|
|
31
34
|
</Button>
|
|
32
35
|
<Button color='success' variant='flat' id="feedback-button">
|
|
33
|
-
<Icon name='chat-bubble-oval-left-ellipsis' width={24} height={24} />
|
|
36
|
+
<Icon name='heroicons:chat-bubble-oval-left-ellipsis' width={24} height={24} />
|
|
34
37
|
<t-dashboard-header key="title-button:feedback">{t("title-button:feedback")}</t-dashboard-header>
|
|
35
38
|
</Button>
|
|
36
39
|
</div>
|
|
@@ -50,7 +53,8 @@ const t = useTranslations(lang, '@studiocms/dashboard:index');
|
|
|
50
53
|
</Modal>
|
|
51
54
|
|
|
52
55
|
<script>
|
|
53
|
-
import {
|
|
56
|
+
import { toast } from 'studiocms:ui/components/toaster';
|
|
57
|
+
import { ModalHelper } from 'studiocms:ui/components/modal';
|
|
54
58
|
|
|
55
59
|
const ENDPOINT = "https://api.feelback.dev/v0";
|
|
56
60
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
3
3
|
import type { VersionCacheObject } from 'studiocms:sdk/types';
|
|
4
|
-
import { DoubleSidebar as SuiDoubleSidebar } from 'studiocms:ui/components';
|
|
4
|
+
import { DoubleSidebar as SuiDoubleSidebar } from 'studiocms:ui/components/sidebar';
|
|
5
5
|
import MainSidebarContent from './MainSidebarContent.astro';
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -22,7 +22,7 @@ const { currentUser, latestVersion } = Astro.props as Props;
|
|
|
22
22
|
</SuiDoubleSidebar>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import { DoubleSidebarHelper } from "studiocms:ui/components";
|
|
25
|
+
import { DoubleSidebarHelper } from "studiocms:ui/components/sidebar";
|
|
26
26
|
|
|
27
27
|
if (document.getElementById('sui-sidebars')) {
|
|
28
28
|
const sidebar = new DoubleSidebarHelper();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { User, VerifyEmail } from 'studiocms:auth/lib';
|
|
3
3
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
4
|
+
import type { AvailablePermissionRanks } from '@withstudiocms/auth-kit/types';
|
|
4
5
|
import { Effect } from '../../effect.js';
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
|
-
requiredPermission:
|
|
8
|
+
requiredPermission: AvailablePermissionRanks;
|
|
8
9
|
currentUser: UserSessionData | null;
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -18,7 +19,7 @@ let [isAuthorized, emailVerified] = await Effect.runPromise(
|
|
|
18
19
|
isUserAllowed(currentUser, requiredPermission),
|
|
19
20
|
isEmailVerified(currentUser),
|
|
20
21
|
]);
|
|
21
|
-
}).pipe(
|
|
22
|
+
}).pipe(VerifyEmail.Provide)
|
|
22
23
|
);
|
|
23
24
|
|
|
24
25
|
let redirectProfile = Astro.locals.StudioCMS.routeMap.mainLinks.userProfile;
|
|
@@ -4,7 +4,11 @@ import { dashboardConfig } from 'studiocms:config';
|
|
|
4
4
|
import { useTranslations } from 'studiocms:i18n';
|
|
5
5
|
import pluginList from 'studiocms:plugins';
|
|
6
6
|
import type { VersionCacheObject } from 'studiocms:sdk/types';
|
|
7
|
-
import { Button
|
|
7
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
8
|
+
import { Divider } from 'studiocms:ui/components/divider';
|
|
9
|
+
import { Dropdown } from 'studiocms:ui/components/dropdown';
|
|
10
|
+
import { Group } from 'studiocms:ui/components/group';
|
|
11
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
8
12
|
import Footer from './Footer.astro';
|
|
9
13
|
import SidebarLink from './SidebarLink.astro';
|
|
10
14
|
import SidebarPluginLink from './SidebarPluginLink.astro';
|
|
@@ -46,18 +50,18 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
|
|
|
46
50
|
{ versionCheck && <VersionCheck {latestVersion} /> }
|
|
47
51
|
<Button size='sm' variant="outlined" color={'default'} id={'studiocms-theme-toggle'}>
|
|
48
52
|
<div id="dark-content">
|
|
49
|
-
<Icon name='moon-16-solid' width={16} height={16} slot="dark" />
|
|
53
|
+
<Icon name='heroicons:moon-16-solid' width={16} height={16} slot="dark" />
|
|
50
54
|
</div>
|
|
51
55
|
<div id="light-content">
|
|
52
|
-
<Icon name='sun-16-solid' width={16} height={16} slot="light" />
|
|
56
|
+
<Icon name='heroicons:sun-16-solid' width={16} height={16} slot="light" />
|
|
53
57
|
</div>
|
|
54
58
|
<div id="fallback-content">
|
|
55
|
-
<Icon name='arrow-path-16-solid' width={16} height={16} slot="fallback" />
|
|
59
|
+
<Icon name='heroicons:arrow-path-16-solid' width={16} height={16} slot="fallback" />
|
|
56
60
|
</div>
|
|
57
61
|
</Button>
|
|
58
62
|
</Group>
|
|
59
63
|
<Button color='primary' size='sm' id='nav-close' class='mobile-btn mid-size-btn'>
|
|
60
|
-
<Icon name="x-mark" height={16} width={16} />
|
|
64
|
+
<Icon name="heroicons:x-mark" height={16} width={16} />
|
|
61
65
|
</Button>
|
|
62
66
|
</div>
|
|
63
67
|
</div>
|
|
@@ -146,9 +150,9 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
|
|
|
146
150
|
<Dropdown
|
|
147
151
|
id='sidebar-user-dropdown'
|
|
148
152
|
options={[
|
|
149
|
-
{ label: t("user-dropdown:settings"), icon: "user", value: Astro.locals.StudioCMS.routeMap.mainLinks.userProfile },
|
|
150
|
-
{ label: t("user-dropdown:view-site"), icon: "globe-alt", value: Astro.locals.StudioCMS.routeMap.mainLinks.baseSiteURL },
|
|
151
|
-
{ label: t("user-dropdown:logout"), icon: "arrow-left-start-on-rectangle", color: 'danger', value: Astro.locals.StudioCMS.routeMap.authLinks.logoutURL },
|
|
153
|
+
{ label: t("user-dropdown:settings"), icon: "heroicons:user", value: Astro.locals.StudioCMS.routeMap.mainLinks.userProfile },
|
|
154
|
+
{ label: t("user-dropdown:view-site"), icon: "heroicons:globe-alt", value: Astro.locals.StudioCMS.routeMap.mainLinks.baseSiteURL },
|
|
155
|
+
{ label: t("user-dropdown:logout"), icon: "heroicons:arrow-left-start-on-rectangle", color: 'danger', value: Astro.locals.StudioCMS.routeMap.authLinks.logoutURL },
|
|
152
156
|
]}
|
|
153
157
|
offset={8}
|
|
154
158
|
>
|
|
@@ -244,7 +248,7 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
|
|
|
244
248
|
</script>
|
|
245
249
|
|
|
246
250
|
<script>
|
|
247
|
-
import { DropdownHelper } from "studiocms:ui/components";
|
|
251
|
+
import { DropdownHelper } from "studiocms:ui/components/dropdown";
|
|
248
252
|
import { ThemeHelper } from '@studiocms/ui/utils/ThemeHelper.js';
|
|
249
253
|
|
|
250
254
|
function setup() {
|
|
@@ -294,21 +298,21 @@ const filteredPluginList = pluginList.filter((plugin) => !!plugin.settingsPage);
|
|
|
294
298
|
.empty-placeholder-span {
|
|
295
299
|
width: 100%;
|
|
296
300
|
text-align: center;
|
|
297
|
-
color:
|
|
301
|
+
color: var(--text-muted);
|
|
298
302
|
font-size: .875em;
|
|
299
303
|
}
|
|
300
304
|
|
|
301
305
|
.user-dropdown-trigger-container {
|
|
302
306
|
width: calc(280px - 3rem);
|
|
303
307
|
cursor: pointer;
|
|
304
|
-
border: 1px solid
|
|
308
|
+
border: 1px solid var(--border);
|
|
305
309
|
padding: .5rem;
|
|
306
310
|
border-radius: .5rem;
|
|
307
311
|
transition: all .15s ease;
|
|
308
312
|
}
|
|
309
313
|
|
|
310
314
|
.user-dropdown-trigger-container:hover {
|
|
311
|
-
background-color:
|
|
315
|
+
background-color: var(--background-step-2);
|
|
312
316
|
}
|
|
313
317
|
|
|
314
318
|
.sidebar {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { Button
|
|
2
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
3
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
5
6
|
title: string;
|
|
@@ -10,7 +11,7 @@ const { title } = Astro.props;
|
|
|
10
11
|
<header class="page-header">
|
|
11
12
|
<div class="page-title-container">
|
|
12
13
|
<Button color='primary' id='nav-open' class='mobile-btn'>
|
|
13
|
-
<Icon name="bars-3" height={24} width={24} />
|
|
14
|
+
<Icon name="heroicons:bars-3" height={24} width={24} />
|
|
14
15
|
</Button>
|
|
15
16
|
<h1 class="page-title">{title}</h1>
|
|
16
17
|
</div>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { Icon } from 'studiocms:ui/components';
|
|
3
|
-
import type {
|
|
2
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
3
|
+
import type { AvailableIcons } from 'studiocms:ui/icons';
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types';
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'a'> {
|
|
7
7
|
/**
|
|
8
8
|
* ONLY USE OUTLINED ICONS! Shit will break otherwise
|
|
9
9
|
*/
|
|
10
|
-
icon:
|
|
10
|
+
icon: AvailableIcons;
|
|
11
11
|
href: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const { icon, class: className, ...props } = Astro.props;
|
|
15
15
|
|
|
16
|
-
const activeIcon = `${icon}-solid
|
|
16
|
+
const activeIcon = (icon.endsWith('-solid') ? icon : `${icon}-solid`) as AvailableIcons;
|
|
17
17
|
|
|
18
18
|
const compId = crypto.randomUUID();
|
|
19
19
|
---
|
|
@@ -33,7 +33,7 @@ const compId = crypto.randomUUID();
|
|
|
33
33
|
height={24}
|
|
34
34
|
/>
|
|
35
35
|
<Icon
|
|
36
|
-
name={activeIcon
|
|
36
|
+
name={activeIcon}
|
|
37
37
|
id="selected-icon"
|
|
38
38
|
class="sidebar-link-icon selected"
|
|
39
39
|
width={24}
|
|
@@ -25,15 +25,15 @@ const isActive = Astro.url.pathname === href && 'active';
|
|
|
25
25
|
width: 100%;
|
|
26
26
|
padding: .375rem .5rem;
|
|
27
27
|
text-decoration: none;
|
|
28
|
-
color:
|
|
28
|
+
color: var(--text-muted);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.sidebar-plugin-link:hover {
|
|
32
|
-
background-color:
|
|
32
|
+
background-color: var(--background-step-2);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.sidebar-plugin-link.active {
|
|
36
|
-
color:
|
|
36
|
+
color: var(--text);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.sidebar-plugin-identifier {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
3
3
|
import type { VersionCacheObject } from 'studiocms:sdk/types';
|
|
4
|
-
import { Sidebar } from 'studiocms:ui/components';
|
|
4
|
+
import { Sidebar } from 'studiocms:ui/components/sidebar';
|
|
5
5
|
import MainSidebarContent from './MainSidebarContent.astro';
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -16,7 +16,7 @@ const { currentUser, latestVersion } = Astro.props as Props;
|
|
|
16
16
|
</Sidebar>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
-
import { SingleSidebarHelper } from "studiocms:ui/components";
|
|
19
|
+
import { SingleSidebarHelper } from "studiocms:ui/components/sidebar";
|
|
20
20
|
|
|
21
21
|
function setupSidebar() {
|
|
22
22
|
if (!document.getElementById('sui-sidebar')) return;
|
|
@@ -3,7 +3,11 @@ import { validImages } from 'studiocms:auth/utils/validImages';
|
|
|
3
3
|
import dashboardGridItems from 'studiocms:components/dashboard-grid-items';
|
|
4
4
|
import { useTranslations } from 'studiocms:i18n';
|
|
5
5
|
import type { SiteConfigCacheObject } from 'studiocms:sdk/types';
|
|
6
|
-
import { Card
|
|
6
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
7
|
+
import { Divider } from 'studiocms:ui/components/divider';
|
|
8
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
9
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
10
|
+
import { Toggle } from 'studiocms:ui/components/toggle';
|
|
7
11
|
import LoginPreview from './LoginPreview.astro';
|
|
8
12
|
|
|
9
13
|
interface Props {
|
|
@@ -88,7 +92,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:configuration');
|
|
|
88
92
|
<div class="grid-items-container">
|
|
89
93
|
{
|
|
90
94
|
gridItemOptions.map(({ enabled, label, name }) => (
|
|
91
|
-
<Card style="background-color:
|
|
95
|
+
<Card style="background-color: var(--background-step-2);">
|
|
92
96
|
<Toggle {label} {name} color='primary' defaultChecked={enabled} />
|
|
93
97
|
</Card>
|
|
94
98
|
))
|
|
@@ -147,61 +151,59 @@ const t = useTranslations(lang, '@studiocms/dashboard:configuration');
|
|
|
147
151
|
</script>
|
|
148
152
|
|
|
149
153
|
<script>
|
|
150
|
-
import { toast } from "studiocms:ui/components";
|
|
154
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
151
155
|
const configForm = document.querySelector('#site-config-form') as HTMLFormElement;
|
|
152
156
|
|
|
153
157
|
configForm.addEventListener('submit', async (e) => {
|
|
154
158
|
e.preventDefault();
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const gridItems = Array.from(configForm.querySelectorAll('input[type="checkbox"]') as NodeListOf<HTMLInputElement>).map((input) => {
|
|
160
|
-
return {
|
|
159
|
+
try {
|
|
160
|
+
const formData = new FormData(configForm);
|
|
161
|
+
// Scope to grid container to avoid unrelated checkboxes
|
|
162
|
+
const gridItems = Array.from(document.querySelectorAll('.grid-items-container input[type="checkbox"]') as NodeListOf<HTMLInputElement>).map((input) => ({
|
|
161
163
|
name: input.name,
|
|
162
164
|
enabled: input.checked,
|
|
165
|
+
}));
|
|
166
|
+
const enabledGridItems = gridItems.filter((item) => item.enabled).map((item) => item.name);
|
|
167
|
+
const diffPerPageRaw = formData.get('diff-per-page') as string;
|
|
168
|
+
const diffPerPageParsed = Number.parseInt(diffPerPageRaw, 10);
|
|
169
|
+
const data = {
|
|
170
|
+
title: formData.get('site-title') as string,
|
|
171
|
+
description: formData.get('site-description') as string,
|
|
172
|
+
defaultOgImage: formData.get('default-og-image') ?? null,
|
|
173
|
+
siteIcon: formData.get('site-icon') ?? null,
|
|
174
|
+
loginPageBackground: formData.get('login-page-background') as string,
|
|
175
|
+
loginPageCustomImage: formData.get('login-page-background-custom') ?? null,
|
|
176
|
+
enableDiffs: formData.get('diff-enabled') === 'true',
|
|
177
|
+
diffPerPage: Number.isNaN(diffPerPageParsed) ? 10 : diffPerPageParsed,
|
|
178
|
+
gridItems: enabledGridItems,
|
|
179
|
+
enableMailer: formData.get('enable-mailer') === 'true',
|
|
180
|
+
hideDefaultIndex: formData.get('hide-default-index') === 'true'
|
|
181
|
+
};
|
|
182
|
+
const response = await fetch(configForm.action, {
|
|
183
|
+
method: 'POST',
|
|
184
|
+
body: JSON.stringify(data),
|
|
185
|
+
headers: { 'Content-Type': 'application/json' },
|
|
186
|
+
});
|
|
187
|
+
const res: any = await response.json().catch(() => ({}));
|
|
188
|
+
if (!response.ok) {
|
|
189
|
+
toast({
|
|
190
|
+
title: 'Error',
|
|
191
|
+
description: res?.error || res?.message || 'Request failed',
|
|
192
|
+
type: 'danger'
|
|
193
|
+
});
|
|
194
|
+
return;
|
|
163
195
|
}
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
const enabledGridItems = gridItems.filter((item) => item.enabled).map((item) => item.name);
|
|
167
|
-
|
|
168
|
-
const data = {
|
|
169
|
-
title: formData.get('site-title') as string,
|
|
170
|
-
description: formData.get('site-description') as string,
|
|
171
|
-
defaultOgImage: formData.get('default-og-image') ?? null,
|
|
172
|
-
siteIcon: formData.get('site-icon') ?? null,
|
|
173
|
-
loginPageBackground: formData.get('login-page-background') as string,
|
|
174
|
-
loginPageCustomImage: formData.get('login-page-background-custom') ?? null,
|
|
175
|
-
enableDiffs: formData.get('diff-enabled') === 'true',
|
|
176
|
-
diffPerPage: parseInt(formData.get('diff-per-page') as string),
|
|
177
|
-
gridItems: enabledGridItems,
|
|
178
|
-
enableMailer: formData.get('enable-mailer') === 'true',
|
|
179
|
-
hideDefaultIndex: formData.get('hide-default-index') === 'true'
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const response = await fetch(configForm.action, {
|
|
183
|
-
method: 'POST',
|
|
184
|
-
body: JSON.stringify(data),
|
|
185
|
-
headers: {
|
|
186
|
-
'Content-Type': 'application/json',
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
const res = await response.json();
|
|
190
|
-
|
|
191
|
-
if (response.status !== 200) {
|
|
192
|
-
toast({
|
|
193
|
-
title: 'Error',
|
|
194
|
-
description: res.error,
|
|
195
|
-
type: 'danger'
|
|
196
|
-
})
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (response.status === 200) {
|
|
200
196
|
toast({
|
|
201
197
|
title: 'Success',
|
|
202
|
-
description: res
|
|
198
|
+
description: res?.message || 'Configuration saved',
|
|
203
199
|
type: 'success'
|
|
204
|
-
})
|
|
200
|
+
});
|
|
201
|
+
} catch (err) {
|
|
202
|
+
toast({
|
|
203
|
+
title: 'Network error',
|
|
204
|
+
description: (err as Error)?.message ?? 'Unexpected error',
|
|
205
|
+
type: 'danger'
|
|
206
|
+
});
|
|
205
207
|
}
|
|
206
208
|
});
|
|
207
209
|
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Image } from 'astro:assets';
|
|
3
3
|
import { validImages } from 'studiocms:auth/utils/validImages';
|
|
4
|
-
import { useTranslations } from 'studiocms:i18n';
|
|
5
|
-
import { Card } from 'studiocms:ui/components';
|
|
4
|
+
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
5
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
6
6
|
|
|
7
7
|
const imageFilter = (filterName: string) =>
|
|
8
8
|
validImages.filter(({ name }) => name === filterName)[0];
|
|
@@ -33,9 +33,11 @@ const curves = getLoginImage('studiocms-curves');
|
|
|
33
33
|
interface Props {
|
|
34
34
|
light?: ImageMetadata;
|
|
35
35
|
dark?: ImageMetadata;
|
|
36
|
+
|
|
37
|
+
defaultLang?: UiLanguageKeys;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
const { light, dark } = Astro.props as Props;
|
|
40
|
+
const { light, dark, defaultLang } = Astro.props as Props;
|
|
39
41
|
|
|
40
42
|
const lightSrc = light ? light : blobs.light;
|
|
41
43
|
const darkSrc = dark ? dark : blobs.dark;
|
|
@@ -55,7 +57,7 @@ const stringifyable = {
|
|
|
55
57
|
},
|
|
56
58
|
};
|
|
57
59
|
|
|
58
|
-
const lang = Astro.locals
|
|
60
|
+
const lang = defaultLang ?? Astro.locals?.StudioCMS?.defaultLang ?? 'en';
|
|
59
61
|
const t = useTranslations(lang, '@studiocms/dashboard:configuration');
|
|
60
62
|
---
|
|
61
63
|
|