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
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
3
3
|
import { useTranslations } from 'studiocms:i18n';
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
5
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
6
|
+
import { Group } from 'studiocms:ui/components/group';
|
|
7
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
8
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
5
9
|
|
|
6
10
|
interface Props {
|
|
7
11
|
currentUser: UserSessionData | null;
|
|
@@ -23,13 +27,13 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
23
27
|
<div class="form-header">
|
|
24
28
|
<Group>
|
|
25
29
|
<Button id="refresh-avatar" size='sm' variant={'outlined'} color={'info'} data-url={Astro.locals.StudioCMS.routeMap.endpointLinks.profile}>
|
|
26
|
-
<Icon slot="start-content" name="user-circle" width={24} height={24} />
|
|
30
|
+
<Icon slot="start-content" name="heroicons:user-circle" width={24} height={24} />
|
|
27
31
|
<t-profile-basic key="sync-with-libravatar">
|
|
28
32
|
{t('sync-with-libravatar')}
|
|
29
33
|
</t-profile-basic>
|
|
30
34
|
</Button>
|
|
31
35
|
<Button type='submit' size='sm' variant={'solid'} color='primary'>
|
|
32
|
-
<Icon slot="start-content" name="check" width={24} height={24} />
|
|
36
|
+
<Icon slot="start-content" name="heroicons:check" width={24} height={24} />
|
|
33
37
|
<t-profile-basic key="basic-info-save-button">
|
|
34
38
|
{t('basic-info-save-button')}
|
|
35
39
|
</t-profile-basic>
|
|
@@ -80,7 +84,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
80
84
|
|
|
81
85
|
|
|
82
86
|
<script>
|
|
83
|
-
import { toast } from "studiocms:ui/components";
|
|
87
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
84
88
|
|
|
85
89
|
const syncAvatar = document.getElementById('refresh-avatar') as HTMLButtonElement;
|
|
86
90
|
const syncUrl = syncAvatar.dataset.url as string;
|
|
@@ -3,8 +3,11 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
|
3
3
|
import { Mailer } from 'studiocms:mailer';
|
|
4
4
|
import { notificationTitleStrings, notificationTypes } from 'studiocms:notifier';
|
|
5
5
|
import { type SiteConfigCacheObject } from 'studiocms:sdk/types';
|
|
6
|
-
import { Button
|
|
7
|
-
import {
|
|
6
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
7
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
8
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
9
|
+
import { Toggle } from 'studiocms:ui/components/toggle';
|
|
10
|
+
import { Effect } from '../../../effect.js';
|
|
8
11
|
|
|
9
12
|
interface Props {
|
|
10
13
|
currentUser: UserSessionData | null;
|
|
@@ -57,7 +60,7 @@ if (enableMailer) {
|
|
|
57
60
|
size='sm'
|
|
58
61
|
disabled={!isNotificationsEnabled}
|
|
59
62
|
>
|
|
60
|
-
<Icon slot="start-content" name="check" width={24} height={24} />
|
|
63
|
+
<Icon slot="start-content" name="heroicons:check" width={24} height={24} />
|
|
61
64
|
Save
|
|
62
65
|
</Button>
|
|
63
66
|
|
|
@@ -108,7 +111,7 @@ if (enableMailer) {
|
|
|
108
111
|
</Card>
|
|
109
112
|
|
|
110
113
|
<script>
|
|
111
|
-
import { toast } from 'studiocms:ui/components';
|
|
114
|
+
import { toast } from 'studiocms:ui/components/toaster';
|
|
112
115
|
import { getEnabledNotificationCheckboxes, formatNotificationOptions } from 'studiocms:notifier/client'
|
|
113
116
|
|
|
114
117
|
const form = document.getElementById('notifications-form') as HTMLFormElement;
|
|
@@ -3,7 +3,10 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
|
3
3
|
import { useTranslations } from 'studiocms:i18n';
|
|
4
4
|
import { runSDK, SDKCoreJs } from 'studiocms:sdk';
|
|
5
5
|
import type { CombinedUserData } from 'studiocms:sdk/types';
|
|
6
|
-
import { Button
|
|
6
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
7
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
8
|
+
import { Center } from 'studiocms:ui/components/center';
|
|
9
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
7
10
|
import { providerData } from './oAuthButtonProviders.js';
|
|
8
11
|
|
|
9
12
|
interface Props {
|
|
@@ -73,7 +76,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
73
76
|
<Fragment set:html={image} />
|
|
74
77
|
<span>{label}</span>
|
|
75
78
|
</div>
|
|
76
|
-
<Icon name="minus-circle" width={24} height={24} />
|
|
79
|
+
<Icon name="heroicons:minus-circle" width={24} height={24} />
|
|
77
80
|
</Button>
|
|
78
81
|
))
|
|
79
82
|
}
|
|
@@ -105,7 +108,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
105
108
|
<Fragment set:html={image} />
|
|
106
109
|
<span>{label}</span>
|
|
107
110
|
</div>
|
|
108
|
-
<Icon name="plus-circle" width={24} height={24} />
|
|
111
|
+
<Icon name="heroicons:plus-circle" width={24} height={24} />
|
|
109
112
|
</Button>
|
|
110
113
|
))
|
|
111
114
|
}
|
|
@@ -161,7 +164,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
.social-signin-bg {
|
|
164
|
-
background-color:
|
|
167
|
+
background-color: var(--background-step-1);
|
|
165
168
|
height: auto;
|
|
166
169
|
}
|
|
167
170
|
|
|
@@ -170,7 +173,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
170
173
|
align-items: stretch;
|
|
171
174
|
justify-content: space-between !important;
|
|
172
175
|
width: 100%;
|
|
173
|
-
margin-
|
|
176
|
+
margin-bottom: 1rem;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
.icon-and-label {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
3
3
|
import { useTranslations } from 'studiocms:i18n';
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
5
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
6
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
7
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
5
8
|
|
|
6
9
|
interface Props {
|
|
7
10
|
currentUser: UserSessionData | null;
|
|
@@ -28,7 +31,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
28
31
|
disabled={userHasNoPassword}
|
|
29
32
|
size='sm'
|
|
30
33
|
>
|
|
31
|
-
<Icon slot="start-content" name="check" width={24} height={24} />
|
|
34
|
+
<Icon slot="start-content" name="heroicons:check" width={24} height={24} />
|
|
32
35
|
<t-profile-password key="user-password-save-button">
|
|
33
36
|
{t('user-password-save-button')}
|
|
34
37
|
</t-profile-password>
|
|
@@ -99,7 +102,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
99
102
|
</script>
|
|
100
103
|
|
|
101
104
|
<script>
|
|
102
|
-
import { toast } from "studiocms:ui/components";
|
|
105
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
103
106
|
const passwordUpdateForm = document.getElementById('password-update-form') as HTMLFormElement;
|
|
104
107
|
|
|
105
108
|
passwordUpdateForm.addEventListener('submit', async (e) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
3
3
|
import { getLabelForPermissionLevel } from 'studiocms:auth/utils/getLabelForPermissionLevel';
|
|
4
|
-
import
|
|
4
|
+
import User from '../../shared/SSRUser.astro';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
currentUser: UserSessionData | null;
|
|
@@ -17,7 +17,6 @@ type UserProps = PropsOf<typeof User>;
|
|
|
17
17
|
const userProps: UserProps = {
|
|
18
18
|
name: currentUser?.user?.name || 'Visitor',
|
|
19
19
|
description: getLabelForPermissionLevel(currentUser?.permissionLevel || 'Visitor'),
|
|
20
|
-
loading: 'eager',
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
if (currentUser?.user?.avatar) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { VersionCacheObject } from 'studiocms:sdk/types';
|
|
3
|
-
import { Button } from 'studiocms:ui/components';
|
|
3
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
4
4
|
import currentVersion from 'studiocms:version';
|
|
5
5
|
import { compare } from 'semver';
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
|
|
|
22
22
|
</Button>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import { ModalHelper } from 'studiocms:ui/components';
|
|
25
|
+
import { ModalHelper } from 'studiocms:ui/components/modal';
|
|
26
26
|
import { dateTimeListener } from '../component-scripts/dateTimeListener.js';
|
|
27
27
|
import { dateWithTimeAndZone } from '../component-scripts/dateWithTimeAndZone.js';
|
|
28
28
|
import { timeAgo } from '../component-scripts/timeAgo.js';
|
|
@@ -76,14 +76,14 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
|
|
|
76
76
|
align-items: center;
|
|
77
77
|
align-content: center;
|
|
78
78
|
vertical-align: middle;
|
|
79
|
-
color:
|
|
79
|
+
color: var(--text-muted);
|
|
80
80
|
font-weight: 700;
|
|
81
81
|
flex-wrap: wrap;
|
|
82
82
|
justify-content: center;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.version-check:hover {
|
|
86
|
-
color:
|
|
86
|
+
color: var(--primary-base);
|
|
87
87
|
cursor: pointer;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -92,7 +92,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
|
|
|
92
92
|
width: 14px;
|
|
93
93
|
height: 14px;
|
|
94
94
|
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775a5.25 5.25 0 0 1 10.233-2.33a3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5z'/%3E%3C/svg%3E");
|
|
95
|
-
background-color:
|
|
95
|
+
background-color: var(--warning-base);
|
|
96
96
|
-webkit-mask-image: var(--svg);
|
|
97
97
|
mask-image: var(--svg);
|
|
98
98
|
-webkit-mask-repeat: no-repeat;
|
|
@@ -106,7 +106,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
|
|
|
106
106
|
width: 14px;
|
|
107
107
|
height: 14px;
|
|
108
108
|
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m4.5 12.75l6 6l9-13.5'/%3E%3C/svg%3E");
|
|
109
|
-
background-color:
|
|
109
|
+
background-color: var(--success-base);
|
|
110
110
|
-webkit-mask-image: var(--svg);
|
|
111
111
|
mask-image: var(--svg);
|
|
112
112
|
-webkit-mask-repeat: no-repeat;
|
|
@@ -120,7 +120,7 @@ const status = comparison === -1 ? 'outdated' : comparison === 0 ? 'latest' : 'f
|
|
|
120
120
|
width: 14px;
|
|
121
121
|
height: 14px;
|
|
122
122
|
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104q-.376.034-.75.082m.75-.082a24.3 24.3 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104q.377.034.75.082M19.8 15.3l-1.57.393A9.07 9.07 0 0 1 12 15a9.07 9.07 0 0 0-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.3 48.3 0 0 1 12 21a48 48 0 0 1-8.135-.687c-1.718-.293-2.3-2.379-1.067-3.61L5 14.5'/%3E%3C/svg%3E");
|
|
123
|
-
background-color:
|
|
123
|
+
background-color: var(--primary-base);
|
|
124
124
|
-webkit-mask-image: var(--svg);
|
|
125
125
|
mask-image: var(--svg);
|
|
126
126
|
-webkit-mask-repeat: no-repeat;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
import css from '@studiocms/ui/css/prose.css?raw';
|
|
3
|
+
|
|
2
4
|
interface Props {
|
|
3
5
|
link: string;
|
|
4
6
|
changelog: string;
|
|
@@ -7,7 +9,7 @@ interface Props {
|
|
|
7
9
|
const { link, changelog } = Astro.props;
|
|
8
10
|
---
|
|
9
11
|
|
|
10
|
-
<frame-button data-link={link} data-changelog={changelog}>
|
|
12
|
+
<frame-button data-link={link} data-changelog={changelog} data-styles={css}>
|
|
11
13
|
<slot />
|
|
12
14
|
</frame-button>
|
|
13
15
|
|
|
@@ -15,6 +17,8 @@ const { link, changelog } = Astro.props;
|
|
|
15
17
|
if (!customElements.get('frame-button')) {
|
|
16
18
|
|
|
17
19
|
class FrameButton extends HTMLElement {
|
|
20
|
+
_onKeydown: (e: KeyboardEvent) => void;
|
|
21
|
+
|
|
18
22
|
constructor() {
|
|
19
23
|
super();
|
|
20
24
|
// Get the slot element
|
|
@@ -22,9 +26,11 @@ const { link, changelog } = Astro.props;
|
|
|
22
26
|
|
|
23
27
|
const frameContainer = document.createElement('div');
|
|
24
28
|
frameContainer.style.position = 'absolute';
|
|
29
|
+
frameContainer.setAttribute('role', 'dialog');
|
|
30
|
+
frameContainer.setAttribute('aria-modal', 'true');
|
|
25
31
|
frameContainer.style.width = '100%';
|
|
26
32
|
frameContainer.style.height = '100%';
|
|
27
|
-
frameContainer.style.backgroundColor = '
|
|
33
|
+
frameContainer.style.backgroundColor = 'var(--background-step-1)';
|
|
28
34
|
frameContainer.style.display = 'none';
|
|
29
35
|
frameContainer.style.justifyContent = 'center';
|
|
30
36
|
frameContainer.style.alignItems = 'center';
|
|
@@ -50,19 +56,20 @@ const { link, changelog } = Astro.props;
|
|
|
50
56
|
frameButton.style.justifyContent = 'center';
|
|
51
57
|
frameButton.style.alignItems = 'center';
|
|
52
58
|
frameButton.style.transition = 'background-color 0.15s ease-in-out';
|
|
59
|
+
frameButton.setAttribute('aria-label', 'Close full changelog');
|
|
53
60
|
|
|
54
61
|
const frameContent = document.createElement('div');
|
|
55
62
|
frameContent.style.padding = '1.5rem';
|
|
56
63
|
frameContent.style.width = '100%';
|
|
57
64
|
frameContent.style.height = '90%';
|
|
58
|
-
frameContent.style.overflowX = '
|
|
65
|
+
frameContent.style.overflowX = 'hidden';
|
|
59
66
|
frameContent.style.overflowWrap = 'break-word';
|
|
60
67
|
frameContent.style.overflowY = 'auto';
|
|
61
68
|
frameContent.style.scrollbarWidth = 'thin';
|
|
62
|
-
frameContent.style.scrollbarColor = '
|
|
69
|
+
frameContent.style.scrollbarColor = 'var(--default-active) var(--background-step-1)';
|
|
63
70
|
|
|
64
71
|
frameButton.addEventListener('mouseenter', () => {
|
|
65
|
-
frameButton.style.backgroundColor = '
|
|
72
|
+
frameButton.style.backgroundColor = 'var(--default-base)';
|
|
66
73
|
});
|
|
67
74
|
|
|
68
75
|
frameButton.addEventListener('mouseleave', () => {
|
|
@@ -83,16 +90,24 @@ const { link, changelog } = Astro.props;
|
|
|
83
90
|
},
|
|
84
91
|
body: JSON.stringify({ currentURLOrigin: window.location.origin }),
|
|
85
92
|
})).json();
|
|
93
|
+
const styles = this.getAttribute('data-styles')!;
|
|
86
94
|
|
|
87
95
|
frameContent.innerHTML = `
|
|
88
96
|
<h1>Full Changelog</h1>
|
|
89
97
|
<a href="${changelogLink}" target="_blank">See on GitHub ⤴</a>
|
|
90
|
-
|
|
98
|
+
<style>${styles}</style>
|
|
99
|
+
<div class="prose">${changelog}</div>
|
|
91
100
|
`;
|
|
92
101
|
|
|
93
102
|
frameContainer.style.display = 'flex';
|
|
94
103
|
});
|
|
95
104
|
|
|
105
|
+
this._onKeydown = (e: KeyboardEvent) => {
|
|
106
|
+
if (e.key === 'Escape' && frameContainer.style.display === 'flex') {
|
|
107
|
+
frameContainer.style.display = 'none';
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
96
111
|
frameContainer.appendChild(frameButton);
|
|
97
112
|
frameContainer.appendChild(frameContent);
|
|
98
113
|
|
|
@@ -100,6 +115,13 @@ const { link, changelog } = Astro.props;
|
|
|
100
115
|
shadow.appendChild(frameContainer);
|
|
101
116
|
shadow.appendChild(slot);
|
|
102
117
|
}
|
|
118
|
+
|
|
119
|
+
connectedCallback() {
|
|
120
|
+
document.addEventListener('keydown', this._onKeydown);
|
|
121
|
+
}
|
|
122
|
+
disconnectedCallback() {
|
|
123
|
+
document.removeEventListener('keydown', this._onKeydown);
|
|
124
|
+
}
|
|
103
125
|
}
|
|
104
126
|
|
|
105
127
|
customElements.define('frame-button', FrameButton);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { Button
|
|
2
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
3
|
+
import { Center } from 'studiocms:ui/components/center';
|
|
4
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
5
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
6
|
+
import { Modal } from 'studiocms:ui/components/modal';
|
|
7
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
3
8
|
---
|
|
4
9
|
<Modal
|
|
5
10
|
id='create-new-user-modal'
|
|
@@ -51,7 +56,7 @@ import { Button, Center, Icon, Input, Modal, Select } from 'studiocms:ui/compone
|
|
|
51
56
|
<div class="link-container">
|
|
52
57
|
<code id="invite-response-placeholder"></code>
|
|
53
58
|
<Button color="primary" size="sm" class="copy-btn">
|
|
54
|
-
<Icon name="document-duplicate-20-solid" width={20} height={20} />
|
|
59
|
+
<Icon name="heroicons:document-duplicate-20-solid" width={20} height={20} />
|
|
55
60
|
</Button>
|
|
56
61
|
</div>
|
|
57
62
|
</div>
|
|
@@ -70,7 +75,7 @@ import { Button, Center, Icon, Input, Modal, Select } from 'studiocms:ui/compone
|
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
code {
|
|
73
|
-
background-color:
|
|
78
|
+
background-color: var(--background-step-3);
|
|
74
79
|
padding: .25rem;
|
|
75
80
|
border-radius: 4px;
|
|
76
81
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
+
import 'studiocms:ui/prose';
|
|
2
3
|
import changelog from 'studiocms:changelog';
|
|
3
4
|
import type { VersionCacheObject } from 'studiocms:sdk/types';
|
|
4
|
-
import { Modal } from 'studiocms:ui/components';
|
|
5
|
+
import { Modal } from 'studiocms:ui/components/modal';
|
|
5
6
|
import currentVersion from 'studiocms:version';
|
|
6
7
|
import { studioCMSSocials } from '../../../consts.js';
|
|
7
8
|
import { parseMarkdown } from '../../../utils/tinyMDParser.js';
|
|
@@ -53,7 +54,7 @@ const lastChecked = new Date(latestVersion.lastCacheUpdate);
|
|
|
53
54
|
</div>
|
|
54
55
|
|
|
55
56
|
<div class="version-modal-release-notes">
|
|
56
|
-
<div><Fragment set:html={parseMarkdown(changelog)} /></div>
|
|
57
|
+
<div class="prose"><Fragment set:html={parseMarkdown(changelog)} /></div>
|
|
57
58
|
<span class="release-notes-read-more">
|
|
58
59
|
<VersionCheckChangelog changelog={studioCMSSocials.changelog} link={Astro.locals.StudioCMS.routeMap.sdk.changelog}><span class="read-more-text">Full Changelog</span></VersionCheckChangelog>
|
|
59
60
|
</span>
|
|
@@ -116,25 +117,25 @@ to allow for more information on a slightly bigger modal.
|
|
|
116
117
|
font-size: 1rem;
|
|
117
118
|
|
|
118
119
|
.read-more-text {
|
|
119
|
-
color:
|
|
120
|
+
color: var(--text-muted);
|
|
120
121
|
text-align: end;
|
|
121
122
|
font-weight: 400;
|
|
122
123
|
cursor: pointer;
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
.read-more-text:hover {
|
|
126
|
-
color:
|
|
127
|
+
color: var(--primary-base);
|
|
127
128
|
text-decoration: underline;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
a {
|
|
131
|
-
color:
|
|
132
|
+
color: var(--text-muted);
|
|
132
133
|
text-decoration: none;
|
|
133
134
|
font-weight: 700;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
a:hover {
|
|
137
|
-
color:
|
|
138
|
+
color: var(--primary-base);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
|
|
@@ -150,7 +151,7 @@ to allow for more information on a slightly bigger modal.
|
|
|
150
151
|
|
|
151
152
|
.version-modal-row-title {
|
|
152
153
|
font-weight: 500;
|
|
153
|
-
color:
|
|
154
|
+
color: var(--text-muted);
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
.version-modal-col-value {
|
|
@@ -169,7 +170,7 @@ to allow for more information on a slightly bigger modal.
|
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
.version-modal-release-notes {
|
|
172
|
-
border: 1px solid
|
|
173
|
+
border: 1px solid var(--border);
|
|
173
174
|
border-radius: 0.5rem;
|
|
174
175
|
padding: 1rem;
|
|
175
176
|
overflow: auto;
|
|
@@ -182,7 +183,7 @@ to allow for more information on a slightly bigger modal.
|
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
.latest-update-check {
|
|
185
|
-
color:
|
|
186
|
+
color: var(--text-muted);
|
|
186
187
|
font-size: .7em;
|
|
187
188
|
font-weight: 700;
|
|
188
189
|
text-align: center;
|
|
@@ -198,11 +199,11 @@ to allow for more information on a slightly bigger modal.
|
|
|
198
199
|
|
|
199
200
|
a:-webkit-any-link:hover {
|
|
200
201
|
text-decoration: underline;
|
|
201
|
-
color:
|
|
202
|
+
color: var(--primary-base);
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
a:-webkit-any-link {
|
|
205
|
-
color:
|
|
206
|
+
color: var(--text-muted);
|
|
206
207
|
text-decoration: none;
|
|
207
208
|
}
|
|
208
209
|
|
|
@@ -217,7 +218,7 @@ to allow for more information on a slightly bigger modal.
|
|
|
217
218
|
.reload-button {
|
|
218
219
|
display: flex;
|
|
219
220
|
padding: 0.125rem;
|
|
220
|
-
border: 2px solid
|
|
221
|
+
border: 2px solid var(--border);
|
|
221
222
|
border-radius: 0.5rem;
|
|
222
223
|
width: 1.5rem;
|
|
223
224
|
height: 1.5rem;
|
|
@@ -228,10 +229,10 @@ to allow for more information on a slightly bigger modal.
|
|
|
228
229
|
transition: all 0.15s ease;
|
|
229
230
|
margin-left: 0.25rem;
|
|
230
231
|
&:hover {
|
|
231
|
-
background-color:
|
|
232
|
+
background-color: var(--border);
|
|
232
233
|
|
|
233
234
|
.reload {
|
|
234
|
-
background-color:
|
|
235
|
+
background-color: var(--primary-base);
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
}
|
|
@@ -241,7 +242,7 @@ to allow for more information on a slightly bigger modal.
|
|
|
241
242
|
width: 16px;
|
|
242
243
|
height: 16px;
|
|
243
244
|
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99'/%3E%3C/svg%3E");
|
|
244
|
-
background-color:
|
|
245
|
+
background-color: var(--text-muted);
|
|
245
246
|
-webkit-mask-image: var(--svg);
|
|
246
247
|
mask-image: var(--svg);
|
|
247
248
|
-webkit-mask-repeat: no-repeat;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { UiLanguageKeys } from 'studiocms:i18n';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AvailableIcons } from 'studiocms:ui/icons';
|
|
3
3
|
/**
|
|
4
4
|
* Represents a link in the sidebar of the dashboard.
|
|
5
5
|
*/
|
|
6
6
|
interface SidebarLink {
|
|
7
7
|
title?: string;
|
|
8
8
|
key?: string;
|
|
9
|
-
icon:
|
|
9
|
+
icon: AvailableIcons;
|
|
10
10
|
href: string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -7,7 +7,7 @@ function filterAndProcessPages(pages, admin, permission, lang) {
|
|
|
7
7
|
const filteredPages = [];
|
|
8
8
|
for (const { title: t, icon: ico, slug, requiredPermissions } of pages) {
|
|
9
9
|
const href = makeDashboardRoute(slug);
|
|
10
|
-
const icon = ico || "cube-transparent";
|
|
10
|
+
const icon = ico || "heroicons:cube-transparent";
|
|
11
11
|
const title = t[lang] || t[defaultLang];
|
|
12
12
|
if (admin) {
|
|
13
13
|
if (requiredPermissions === void 0) {
|
|
@@ -47,7 +47,7 @@ function getSidebarLinks(lang) {
|
|
|
47
47
|
const baseLinks = [
|
|
48
48
|
{
|
|
49
49
|
key: "dashboard-link-label",
|
|
50
|
-
icon: "home",
|
|
50
|
+
icon: "heroicons:home",
|
|
51
51
|
href: StudioCMSRoutes.mainLinks.dashboardIndex
|
|
52
52
|
},
|
|
53
53
|
...filterAndProcessPages(userPages, false, ["none", "visitor"], lang)
|
|
@@ -55,7 +55,7 @@ function getSidebarLinks(lang) {
|
|
|
55
55
|
const editorLinks = [
|
|
56
56
|
{
|
|
57
57
|
key: "content-management-label",
|
|
58
|
-
icon: "pencil-square",
|
|
58
|
+
icon: "heroicons:pencil-square",
|
|
59
59
|
href: StudioCMSRoutes.mainLinks.contentManagement
|
|
60
60
|
},
|
|
61
61
|
...filterAndProcessPages(userPages, false, ["editor"], lang)
|
|
@@ -63,7 +63,7 @@ function getSidebarLinks(lang) {
|
|
|
63
63
|
const adminLinks = [
|
|
64
64
|
{
|
|
65
65
|
key: "user-management-label",
|
|
66
|
-
icon: "user-group",
|
|
66
|
+
icon: "heroicons:user-group",
|
|
67
67
|
href: StudioCMSRoutes.mainLinks.userManagement
|
|
68
68
|
},
|
|
69
69
|
...filterAndProcessPages(adminPages, true, ["admin"], lang)
|
|
@@ -71,12 +71,12 @@ function getSidebarLinks(lang) {
|
|
|
71
71
|
const ownerLinks = [
|
|
72
72
|
{
|
|
73
73
|
key: "site-configuration-label",
|
|
74
|
-
icon: "cog-6-tooth",
|
|
74
|
+
icon: "heroicons:cog-6-tooth",
|
|
75
75
|
href: StudioCMSRoutes.mainLinks.siteConfiguration
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
key: "mailer-configuration-label",
|
|
79
|
-
icon: "inbox",
|
|
79
|
+
icon: "heroicons:inbox",
|
|
80
80
|
href: StudioCMSRoutes.mainLinks.smtpConfiguration
|
|
81
81
|
},
|
|
82
82
|
...filterAndProcessPages(adminPages, true, ["owner"], lang)
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
3
3
|
import { runSDK, SDKCoreJs } from 'studiocms:sdk';
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
5
|
+
import { Divider } from 'studiocms:ui/components/divider';
|
|
6
|
+
import { Dropdown } from 'studiocms:ui/components/dropdown';
|
|
7
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
8
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
9
|
+
import type { AvailablePermissionRanks } from '@withstudiocms/auth-kit/types';
|
|
5
10
|
import UserListItem from './UserListItem.astro';
|
|
6
11
|
|
|
7
12
|
interface Props {
|
|
@@ -21,7 +26,7 @@ const safeUsers: {
|
|
|
21
26
|
permissionsData:
|
|
22
27
|
| {
|
|
23
28
|
user: string;
|
|
24
|
-
rank:
|
|
29
|
+
rank: AvailablePermissionRanks;
|
|
25
30
|
}
|
|
26
31
|
| undefined;
|
|
27
32
|
}[] = Users.map(({ avatar, email, id, name, username, permissionsData }) => {
|
|
@@ -32,7 +37,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
|
|
|
32
37
|
---
|
|
33
38
|
<div class="inner-user-sidebar-header">
|
|
34
39
|
<Button variant="solid" color="primary" size='md' id="back-to-outer" class="mobile-btn mid-size-btn">
|
|
35
|
-
<Icon name="arrow-left" width={24} height={24} slot="start-content" />
|
|
40
|
+
<Icon name="heroicons:arrow-left" width={24} height={24} slot="start-content" />
|
|
36
41
|
</Button>
|
|
37
42
|
<form id="search-form">
|
|
38
43
|
<Input name='search' placeholder={t('input-placeholder-search')} type='search' required />
|
|
@@ -40,18 +45,18 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
|
|
|
40
45
|
<Dropdown
|
|
41
46
|
id='create-user-dropdown'
|
|
42
47
|
options={[
|
|
43
|
-
{ label: t('dropdown-create-user'), icon: 'user-plus', value: 'new-user' },
|
|
44
|
-
{ label: t('dropdown-create-invite'), icon: 'inbox-arrow-down', value: 'new-invite' },
|
|
48
|
+
{ label: t('dropdown-create-user'), icon: 'heroicons:user-plus', value: 'new-user' },
|
|
49
|
+
{ label: t('dropdown-create-invite'), icon: 'heroicons:inbox-arrow-down', value: 'new-invite' },
|
|
45
50
|
]}
|
|
46
51
|
align={'end'}
|
|
47
52
|
offset={8}
|
|
48
53
|
>
|
|
49
54
|
<Button variant="solid" color="primary" size='md' class="add-button">
|
|
50
|
-
<Icon name="plus" width={24} height={24} />
|
|
55
|
+
<Icon name="heroicons:plus" width={24} height={24} />
|
|
51
56
|
</Button>
|
|
52
57
|
</Dropdown>
|
|
53
58
|
<Button variant="solid" color="primary" size='md' class="mobile-btn" id="show-page">
|
|
54
|
-
<Icon name="x-mark" width={24} height={24} slot="start-content" />
|
|
59
|
+
<Icon name="heroicons:x-mark" width={24} height={24} slot="start-content" />
|
|
55
60
|
</Button>
|
|
56
61
|
</div>
|
|
57
62
|
|
|
@@ -130,8 +135,10 @@ const t = useTranslations(lang, '@studiocms/dashboard:user-mngmt-sidebar');
|
|
|
130
135
|
</script>
|
|
131
136
|
|
|
132
137
|
<script>
|
|
133
|
-
import { DropdownHelper
|
|
134
|
-
|
|
138
|
+
import { DropdownHelper } from 'studiocms:ui/components/dropdown';
|
|
139
|
+
import { ModalHelper } from 'studiocms:ui/components/modal';
|
|
140
|
+
import { toast } from 'studiocms:ui/components/toaster';
|
|
141
|
+
|
|
135
142
|
const createNewDropdown = new DropdownHelper('create-user-dropdown');
|
|
136
143
|
const createNewUserModal = new ModalHelper('create-new-user-modal');
|
|
137
144
|
const createUserInviteModal = new ModalHelper('create-user-invite-modal');
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { User } from 'studiocms:auth/lib';
|
|
3
|
-
import {
|
|
3
|
+
import type { AvailablePermissionRanks } from '@withstudiocms/auth-kit/types';
|
|
4
|
+
import { Effect } from '../../../effect.js';
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
|
-
requiredPermission?:
|
|
7
|
+
requiredPermission?: AvailablePermissionRanks;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
const { requiredPermission } = Astro.props;
|
|
10
|
+
const { requiredPermission = 'unknown' } = Astro.props;
|
|
10
11
|
|
|
11
12
|
const { userSessionData: user } = Astro.locals.StudioCMS?.security ?? {
|
|
12
13
|
userSessionData: null,
|
|
@@ -15,11 +16,8 @@ const { userSessionData: user } = Astro.locals.StudioCMS?.security ?? {
|
|
|
15
16
|
const isAuthorized = await Effect.runPromise(
|
|
16
17
|
Effect.gen(function* () {
|
|
17
18
|
const { isUserAllowed } = yield* User;
|
|
18
|
-
return yield* isUserAllowed(
|
|
19
|
-
|
|
20
|
-
(requiredPermission as 'owner' | 'admin' | 'editor' | 'visitor' | 'unknown') ?? 'unknown'
|
|
21
|
-
);
|
|
22
|
-
}).pipe(User.Provide)
|
|
19
|
+
return yield* isUserAllowed(user, requiredPermission);
|
|
20
|
+
})
|
|
23
21
|
);
|
|
24
22
|
|
|
25
23
|
if (!isAuthorized) {
|