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,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
3
|
-
import { Input
|
|
3
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
4
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
4
5
|
import { parentFolderOptions } from './shared.js';
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
@@ -42,7 +43,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-folder');
|
|
|
42
43
|
</script>
|
|
43
44
|
|
|
44
45
|
<script>
|
|
45
|
-
import { toast } from "studiocms:ui/components";
|
|
46
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
46
47
|
|
|
47
48
|
const form = document.getElementById('create-folder-form') as HTMLFormElement;
|
|
48
49
|
const createContainer = document.getElementById('create-folder-container') as HTMLDivElement;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
3
3
|
import pluginList from 'studiocms:plugins';
|
|
4
|
-
import { Card
|
|
4
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
5
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
6
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
7
|
+
import { TabItem, Tabs } from 'studiocms:ui/components/tabs';
|
|
5
8
|
import PageTypeHandler from './PageTypeHandler.astro';
|
|
6
9
|
import {
|
|
7
10
|
categoriesOptions,
|
|
@@ -35,7 +38,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
35
38
|
<Tabs variant={"starlight"}>
|
|
36
39
|
<TabItem
|
|
37
40
|
label={t("tab-label-basic-info")}
|
|
38
|
-
icon={"information-circle-20-solid"}
|
|
41
|
+
icon={"heroicons:information-circle-20-solid"}
|
|
39
42
|
color={"primary"}
|
|
40
43
|
>
|
|
41
44
|
<div class="tab-section">
|
|
@@ -154,7 +157,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
154
157
|
</TabItem>
|
|
155
158
|
<TabItem
|
|
156
159
|
label={t("tab-label-content")}
|
|
157
|
-
icon={"document-text-20-solid"}
|
|
160
|
+
icon={"heroicons:document-text-20-solid"}
|
|
158
161
|
color={"success"}
|
|
159
162
|
>
|
|
160
163
|
<div class="tab-section">
|
|
@@ -211,7 +214,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
211
214
|
|
|
212
215
|
|
|
213
216
|
<script>
|
|
214
|
-
import { toast } from "studiocms:ui/components";
|
|
217
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
215
218
|
// get the elements
|
|
216
219
|
const createPageForm = document.getElementById(
|
|
217
220
|
"page-create-form",
|
|
@@ -325,7 +328,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
325
328
|
.page-content-editor #page-content {
|
|
326
329
|
height: 100%;
|
|
327
330
|
width: 100%;
|
|
328
|
-
border: 1px solid
|
|
331
|
+
border: 1px solid var(--border);
|
|
329
332
|
border-radius: 4px;
|
|
330
333
|
padding: 1rem;
|
|
331
334
|
font-size: 1rem;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
3
3
|
import { runSDK, SDKCoreJs } from 'studiocms:sdk';
|
|
4
|
-
import { Input
|
|
4
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
5
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
5
6
|
import { parentFolderOptions } from './shared.js';
|
|
6
7
|
|
|
7
8
|
const urlParams = Astro.url.searchParams;
|
|
@@ -64,7 +65,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-folder');
|
|
|
64
65
|
</script>
|
|
65
66
|
|
|
66
67
|
<script>
|
|
67
|
-
import { toast } from "studiocms:ui/components";
|
|
68
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
68
69
|
|
|
69
70
|
const form = document.getElementById('edit-folder-form') as HTMLFormElement;
|
|
70
71
|
const createContainer = document.getElementById('edit-folder-container') as HTMLDivElement;
|
|
@@ -5,7 +5,13 @@ import type { SettingsField } from 'studiocms:plugin-helpers';
|
|
|
5
5
|
import pluginList from 'studiocms:plugins';
|
|
6
6
|
import { runSDK, SDKCoreJs } from 'studiocms:sdk';
|
|
7
7
|
import type { SiteConfigCacheObject } from 'studiocms:sdk/types';
|
|
8
|
-
import { Button
|
|
8
|
+
import { Button } from 'studiocms:ui/components/button';
|
|
9
|
+
import { Card } from 'studiocms:ui/components/card';
|
|
10
|
+
import { Center } from 'studiocms:ui/components/center';
|
|
11
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
12
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
13
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
14
|
+
import { TabItem, Tabs } from 'studiocms:ui/components/tabs';
|
|
9
15
|
import { editorKeys } from 'virtual:studiocms/components/Editors';
|
|
10
16
|
import { Effect } from 'effect';
|
|
11
17
|
import PageEditorSwapper from './PageEditorSwapper.astro';
|
|
@@ -32,11 +38,17 @@ const { lang, config } = Astro.props as Props;
|
|
|
32
38
|
|
|
33
39
|
const enableDiffs = config.data.enableDiffs;
|
|
34
40
|
|
|
35
|
-
const [[
|
|
41
|
+
const [[currentPageData, users], editors] = await Promise.all([
|
|
36
42
|
runSDK(Effect.all([SDKCoreJs.GET.page.byId(editId), SDKCoreJs.GET.users.all()])),
|
|
37
43
|
importEditorKeys(editorKeys),
|
|
38
44
|
]);
|
|
39
45
|
|
|
46
|
+
if (!currentPageData) {
|
|
47
|
+
return new Response(null, { status: 404, statusText: 'Page Not Found' });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const pageData = currentPageData.data;
|
|
51
|
+
|
|
40
52
|
function getParentFolderValue(value: string | null): string | undefined {
|
|
41
53
|
const options = parentFolderOptions;
|
|
42
54
|
if (value === null) return 'null';
|
|
@@ -79,7 +91,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
79
91
|
<form id="edit-page-form" action={Astro.locals.StudioCMS.routeMap.endpointLinks.content.page}>
|
|
80
92
|
|
|
81
93
|
<Tabs variant={'starlight'}>
|
|
82
|
-
<TabItem label={t('tab-label-basic-info')} icon={'information-circle-20-solid'} color={'primary'}>
|
|
94
|
+
<TabItem label={t('tab-label-basic-info')} icon={'heroicons:information-circle-20-solid'} color={'primary'}>
|
|
83
95
|
<div class="tab-section">
|
|
84
96
|
<div class="form-row">
|
|
85
97
|
<Input label={t('input-page-title')} name='page-title' isRequired defaultValue={pageData.title} />
|
|
@@ -140,7 +152,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
140
152
|
</div>
|
|
141
153
|
</div>
|
|
142
154
|
</TabItem>
|
|
143
|
-
<TabItem label={t('tab-label-content')} icon={'document-text-20-solid'} color={'success'}>
|
|
155
|
+
<TabItem label={t('tab-label-content')} icon={'heroicons:document-text-20-solid'} color={'success'}>
|
|
144
156
|
|
|
145
157
|
<input type="hidden" name="page-content-id" value={pageData.defaultContent?.id} />
|
|
146
158
|
|
|
@@ -154,7 +166,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
154
166
|
|
|
155
167
|
{
|
|
156
168
|
enableDiffs && (
|
|
157
|
-
<TabItem label={t('tab-label-diff')} icon={'archive-box-20-solid'} color={'warning'}>
|
|
169
|
+
<TabItem label={t('tab-label-diff')} icon={'heroicons:archive-box-20-solid'} color={'warning'}>
|
|
158
170
|
<div class="tab-section">
|
|
159
171
|
<div class="edit-card-list">
|
|
160
172
|
|
|
@@ -170,13 +182,13 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
170
182
|
<div class="card-row">
|
|
171
183
|
<span class="card-description">{pageData.description}</span>
|
|
172
184
|
<Button size='sm' as='a' href={Astro.locals.StudioCMS.routeMap.mainLinks.contentManagementDiff + `?diff=${diff.id}`}>
|
|
173
|
-
<Icon name="eye" width={24} height={24} class="card-icon" />
|
|
185
|
+
<Icon name="heroicons:eye" width={24} height={24} class="card-icon" />
|
|
174
186
|
</Button>
|
|
175
187
|
</div>
|
|
176
188
|
</Card>
|
|
177
189
|
))
|
|
178
190
|
) : (
|
|
179
|
-
<Card fullWidth style="background-color:
|
|
191
|
+
<Card fullWidth style="background-color: var(--background-step-1);">
|
|
180
192
|
<Center><t-content-edit-page key="diff-no-history">{t('diff-no-history')}</t-content-edit-page></Center>
|
|
181
193
|
</Card>
|
|
182
194
|
)
|
|
@@ -231,7 +243,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-page');
|
|
|
231
243
|
|
|
232
244
|
|
|
233
245
|
<script>
|
|
234
|
-
import { toast } from "studiocms:ui/components";
|
|
246
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
235
247
|
|
|
236
248
|
// get the elements
|
|
237
249
|
const editPageForm = document.getElementById('edit-page-form') as HTMLFormElement;
|
|
@@ -322,7 +334,7 @@ editPageForm.addEventListener('submit', async (e) => {
|
|
|
322
334
|
#page-content {
|
|
323
335
|
height: 100%;
|
|
324
336
|
width: 100%;
|
|
325
|
-
border: 1px solid
|
|
337
|
+
border: 1px solid var(--border);
|
|
326
338
|
border-radius: 4px;
|
|
327
339
|
padding: 1rem;
|
|
328
340
|
font-size: 1rem;
|
|
@@ -339,7 +351,7 @@ editPageForm.addEventListener('submit', async (e) => {
|
|
|
339
351
|
.edit-card {
|
|
340
352
|
display: flex;
|
|
341
353
|
flex-direction: column;
|
|
342
|
-
background-color:
|
|
354
|
+
background-color: var(--background-step-2);
|
|
343
355
|
|
|
344
356
|
& .card-row {
|
|
345
357
|
display: flex;
|
|
@@ -352,18 +364,18 @@ editPageForm.addEventListener('submit', async (e) => {
|
|
|
352
364
|
}
|
|
353
365
|
|
|
354
366
|
& .card-date {
|
|
355
|
-
color:
|
|
367
|
+
color: var(--text-muted);
|
|
356
368
|
font-size: .8rem;
|
|
357
369
|
}
|
|
358
370
|
|
|
359
371
|
& .card-description {
|
|
360
372
|
font-size: 1rem;
|
|
361
|
-
color:
|
|
373
|
+
color: var(--text-muted);
|
|
362
374
|
line-clamp: 1;
|
|
363
375
|
}
|
|
364
376
|
|
|
365
377
|
& .card-icon {
|
|
366
|
-
color:
|
|
378
|
+
color: var(--text-muted);
|
|
367
379
|
}
|
|
368
380
|
}
|
|
369
381
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { type UiLanguageKeys, useTranslations } from 'studiocms:i18n';
|
|
3
3
|
import type { SiteConfigCacheObject } from 'studiocms:sdk/types';
|
|
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';
|
|
5
9
|
import PageList from './PageList.astro';
|
|
6
10
|
|
|
7
11
|
interface Props {
|
|
@@ -17,7 +21,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
|
|
|
17
21
|
|
|
18
22
|
<div class="inner-sidebar-header">
|
|
19
23
|
<Button variant="solid" color="primary" size='md' id="back-to-outer" class="mobile-btn mid-size-btn">
|
|
20
|
-
<Icon name="arrow-left" width={24} height={24} slot="start-content" />
|
|
24
|
+
<Icon name="heroicons:arrow-left" width={24} height={24} slot="start-content" />
|
|
21
25
|
</Button>
|
|
22
26
|
<form id="search-form">
|
|
23
27
|
<Input name='search' placeholder={t('input-placeholder-search')} type='search' required />
|
|
@@ -27,12 +31,12 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
|
|
|
27
31
|
options={[
|
|
28
32
|
{
|
|
29
33
|
label: t('dropdown-create-page'),
|
|
30
|
-
icon: 'document',
|
|
34
|
+
icon: 'heroicons:document',
|
|
31
35
|
value: Astro.locals.StudioCMS.routeMap.mainLinks.contentManagementCreate
|
|
32
36
|
},
|
|
33
37
|
{
|
|
34
38
|
label: t('dropdown-create-folder'),
|
|
35
|
-
icon: 'folder',
|
|
39
|
+
icon: 'heroicons:folder',
|
|
36
40
|
value: Astro.locals.StudioCMS.routeMap.mainLinks.contentManagementFolderCreate
|
|
37
41
|
},
|
|
38
42
|
]}
|
|
@@ -40,11 +44,11 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
|
|
|
40
44
|
offset={8}
|
|
41
45
|
>
|
|
42
46
|
<Button variant="solid" color="primary" size='md' class="add-button">
|
|
43
|
-
<Icon name="plus" width={24} height={24} slot="start-content" />
|
|
47
|
+
<Icon name="heroicons:plus" width={24} height={24} slot="start-content" />
|
|
44
48
|
</Button>
|
|
45
49
|
</Dropdown>
|
|
46
50
|
<Button variant="solid" color="primary" size='md' class="mobile-btn" id="show-page">
|
|
47
|
-
<Icon name="x-mark" width={24} height={24} slot="start-content" />
|
|
51
|
+
<Icon name="heroicons:x-mark" width={24} height={24} slot="start-content" />
|
|
48
52
|
</Button>
|
|
49
53
|
</div>
|
|
50
54
|
|
|
@@ -133,7 +137,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
|
|
|
133
137
|
</script>
|
|
134
138
|
|
|
135
139
|
<script>
|
|
136
|
-
import { DropdownHelper } from 'studiocms:ui/components';
|
|
140
|
+
import { DropdownHelper } from 'studiocms:ui/components/dropdown';
|
|
137
141
|
|
|
138
142
|
const createNewDropdown = new DropdownHelper('create-new-dropdown');
|
|
139
143
|
|
|
@@ -177,14 +181,18 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
|
|
|
177
181
|
}
|
|
178
182
|
|
|
179
183
|
const itemTemplate = (item: SearchItem, searchTerm: string) => {
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
const base = document.getElementById('inner-sidebar-items-search') as HTMLDivElement;
|
|
185
|
+
const safeSearch = encodeURIComponent(searchTerm);
|
|
186
|
+
const safeId = encodeURIComponent(item.id);
|
|
187
|
+
const url = item.type === 'folder'
|
|
188
|
+
? `${base?.dataset.editfolder}?folder=${safeId}&search=${safeSearch}`
|
|
189
|
+
: `${base?.dataset.editpage}/?edit=${safeId}&search=${safeSearch}`;
|
|
190
|
+
const safeName = DOMPurify.sanitize(item.name, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] });
|
|
183
191
|
return `
|
|
184
|
-
<div id="search-selector" data-href
|
|
192
|
+
<div id="search-selector" data-href="${url}" class="inner-sidebar-link">
|
|
185
193
|
${ getIcon(item) }
|
|
186
194
|
<span class="sidebar-link-text">
|
|
187
|
-
${
|
|
195
|
+
${safeName}
|
|
188
196
|
</span>
|
|
189
197
|
</div>
|
|
190
198
|
`;
|
|
@@ -239,9 +247,9 @@ const t = useTranslations(lang, '@studiocms/dashboard:content-sidebar');
|
|
|
239
247
|
|
|
240
248
|
console.log(`Search Results (${results.length}) `, results);
|
|
241
249
|
|
|
242
|
-
searchItems.innerHTML =
|
|
243
|
-
|
|
244
|
-
|
|
250
|
+
searchItems.innerHTML = DOMPurify.sanitize(
|
|
251
|
+
results.map(({ item }) => itemTemplate(item, searchTerm)).join('')
|
|
252
|
+
);
|
|
245
253
|
|
|
246
254
|
document.getElementById('inner-sidebar-items')!.style.display = 'none';
|
|
247
255
|
searchItems.style.display = 'block';
|
|
@@ -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 { Center } from 'studiocms:ui/components/center';
|
|
6
|
+
import { Group } from 'studiocms:ui/components/group';
|
|
7
|
+
import { Icon } from 'studiocms:ui/components/icon';
|
|
8
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
9
|
+
import { Modal } from 'studiocms:ui/components/modal';
|
|
5
10
|
|
|
6
11
|
interface Props {
|
|
7
12
|
lang: UiLanguageKeys;
|
|
@@ -28,6 +33,10 @@ const editId = urlParams.get('edit') || '';
|
|
|
28
33
|
if (editId) {
|
|
29
34
|
const res = await runSDK(SDKCoreJs.GET.page.byId(editId));
|
|
30
35
|
|
|
36
|
+
if (!res) {
|
|
37
|
+
return new Response(null, { status: 404, statusText: 'Page Not Found' });
|
|
38
|
+
}
|
|
39
|
+
|
|
31
40
|
if (editPage) {
|
|
32
41
|
pageTitle = `${res.data.title}`;
|
|
33
42
|
pageSlug = res.data.slug;
|
|
@@ -62,7 +71,7 @@ const currentMode = editPage
|
|
|
62
71
|
<header class="page-header">
|
|
63
72
|
<div class="page-title-container">
|
|
64
73
|
<Button color='primary' id='nav-open' class='mobile-btn'>
|
|
65
|
-
<Icon name="bars-3" height={24} width={24} slot="start-content" />
|
|
74
|
+
<Icon name="heroicons:bars-3" height={24} width={24} slot="start-content" />
|
|
66
75
|
</Button>
|
|
67
76
|
<h1 class="page-title" data-link={Astro.locals.StudioCMS.routeMap.sdk.pages}>
|
|
68
77
|
{currentMode === 'none' ? (
|
|
@@ -89,13 +98,13 @@ const currentMode = editPage
|
|
|
89
98
|
{ editPage && (
|
|
90
99
|
<Group>
|
|
91
100
|
<Button id="delete-page-modal-trigger" color="danger" type="submit" size="sm">
|
|
92
|
-
<Icon name="trash-20-solid" width={20} height={20} />
|
|
101
|
+
<Icon name="heroicons:trash-20-solid" width={20} height={20} />
|
|
93
102
|
<t-content-header key="delete-button">
|
|
94
103
|
{t('delete-button')}
|
|
95
104
|
</t-content-header>
|
|
96
105
|
</Button>
|
|
97
106
|
<Button id="edit-button" variant="solid" size="sm" color="primary" type="submit" form="edit-page-form">
|
|
98
|
-
<Icon slot="start-content" name="check-20-solid" width={20} height={20} />
|
|
107
|
+
<Icon slot="start-content" name="heroicons:check-20-solid" width={20} height={20} />
|
|
99
108
|
<t-content-header key="save-button">
|
|
100
109
|
{t('save-button')}
|
|
101
110
|
</t-content-header>
|
|
@@ -126,7 +135,7 @@ const currentMode = editPage
|
|
|
126
135
|
|
|
127
136
|
<Input name="slug-confirm" placeholder={`${pageSlug?.slice(0, pageSlug.length-2)}...`} isRequired />
|
|
128
137
|
|
|
129
|
-
<span style="color:
|
|
138
|
+
<span style="color: var(--danger-base)"><t-content-header key="delete-modal-warning">
|
|
130
139
|
{t('delete-modal-warning')}
|
|
131
140
|
</t-content-header></span>
|
|
132
141
|
</div>
|
|
@@ -137,13 +146,13 @@ const currentMode = editPage
|
|
|
137
146
|
{ editFolder && (
|
|
138
147
|
<Group>
|
|
139
148
|
<Button id="delete-folder-modal-trigger" color="danger" type="submit" size="sm">
|
|
140
|
-
<Icon name="trash-20-solid" width={20} height={20} />
|
|
149
|
+
<Icon name="heroicons:trash-20-solid" width={20} height={20} />
|
|
141
150
|
<t-content-header key="delete-button">
|
|
142
151
|
{t('delete-button')}
|
|
143
152
|
</t-content-header>
|
|
144
153
|
</Button>
|
|
145
154
|
<Button id="edit-button" variant="solid" size="sm" color="primary" type="submit" form="edit-folder-form">
|
|
146
|
-
<Icon slot="start-content" name="check-20-solid" width={20} height={20} />
|
|
155
|
+
<Icon slot="start-content" name="heroicons:check-20-solid" width={20} height={20} />
|
|
147
156
|
<t-content-header key="save-button">
|
|
148
157
|
{t('save-button')}
|
|
149
158
|
</t-content-header>
|
|
@@ -174,7 +183,7 @@ const currentMode = editPage
|
|
|
174
183
|
|
|
175
184
|
<Input name="confirm-folder-name" placeholder={`${folderName.slice(0, folderName.length-2)}...`} isRequired />
|
|
176
185
|
|
|
177
|
-
<span style="color:
|
|
186
|
+
<span style="color: var(--danger-base)"><t-content-header key="delete-modal-warning">
|
|
178
187
|
{t('delete-modal-warning')}
|
|
179
188
|
</t-content-header></span>
|
|
180
189
|
</div>
|
|
@@ -184,7 +193,7 @@ const currentMode = editPage
|
|
|
184
193
|
|
|
185
194
|
{ createFolder && (
|
|
186
195
|
<Button id="edit-button" variant="solid" size="sm" color="primary" type="submit" form="create-folder-form">
|
|
187
|
-
<Icon slot="start-content" name="check-20-solid" width={20} height={20} />
|
|
196
|
+
<Icon slot="start-content" name="heroicons:check-20-solid" width={20} height={20} />
|
|
188
197
|
<t-content-header key="create-button">
|
|
189
198
|
{t('create-button')}
|
|
190
199
|
</t-content-header>
|
|
@@ -194,13 +203,13 @@ const currentMode = editPage
|
|
|
194
203
|
{createPage && (
|
|
195
204
|
<Group>
|
|
196
205
|
<Button id="draft-button" variant="outlined" size="sm" color="primary" type="submit" form="page-create-form">
|
|
197
|
-
<Icon slot="start-content" name="document-text-20-solid" width={20} height={20} />
|
|
206
|
+
<Icon slot="start-content" name="heroicons:document-text-20-solid" width={20} height={20} />
|
|
198
207
|
<t-content-header key="draft-button">
|
|
199
208
|
{t('draft-button')}
|
|
200
209
|
</t-content-header>
|
|
201
210
|
</Button>
|
|
202
211
|
<Button id="publish-button" variant="solid" size="sm" color="primary" type="submit" form="page-create-form" disabled>
|
|
203
|
-
<Icon slot="start-content" name="check-20-solid" width={20} height={20} />
|
|
212
|
+
<Icon slot="start-content" name="heroicons:check-20-solid" width={20} height={20} />
|
|
204
213
|
<t-content-header key="publish-button">
|
|
205
214
|
{t('publish-button')}
|
|
206
215
|
</t-content-header>
|
|
@@ -233,8 +242,8 @@ const currentMode = editPage
|
|
|
233
242
|
</script>
|
|
234
243
|
|
|
235
244
|
<script>
|
|
236
|
-
import { ModalHelper } from 'studiocms:ui/components';
|
|
237
|
-
import { toast } from "studiocms:ui/components";
|
|
245
|
+
import { ModalHelper } from 'studiocms:ui/components/modal';
|
|
246
|
+
import { toast } from "studiocms:ui/components/toaster";
|
|
238
247
|
|
|
239
248
|
const mode = (document.getElementById('current-mode-selector') as HTMLDivElement).dataset.mode;
|
|
240
249
|
|
|
@@ -445,7 +454,7 @@ const currentMode = editPage
|
|
|
445
454
|
}
|
|
446
455
|
|
|
447
456
|
code {
|
|
448
|
-
background-color:
|
|
457
|
+
background-color: var(--background-step-3);
|
|
449
458
|
padding: .25rem;
|
|
450
459
|
border-radius: 4px;
|
|
451
460
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { SettingsField } from 'studiocms:plugin-helpers';
|
|
3
|
-
import { Checkbox
|
|
3
|
+
import { Checkbox } from 'studiocms:ui/components/checkbox';
|
|
4
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
5
|
+
import { RadioGroup } from 'studiocms:ui/components/radiogroup';
|
|
6
|
+
import { Row } from 'studiocms:ui/components/row';
|
|
7
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
8
|
+
import { Textarea } from 'studiocms:ui/components/textarea';
|
|
4
9
|
|
|
5
10
|
interface Props {
|
|
6
11
|
fields: SettingsField[];
|
|
@@ -30,14 +30,14 @@ const sortedData = sortTree(data);
|
|
|
30
30
|
|
|
31
31
|
function getIcon(pageData: CombinedPageData | null) {
|
|
32
32
|
if (pageData?.slug === 'index') {
|
|
33
|
-
return 'home-modern';
|
|
33
|
+
return 'heroicons:home-modern';
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
if (pageData?.draft) {
|
|
37
|
-
return 'pencil';
|
|
37
|
+
return 'heroicons:pencil';
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
return 'document-text';
|
|
40
|
+
return 'heroicons:document-text';
|
|
41
41
|
}
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ function getIcon(pageData: CombinedPageData | null) {
|
|
|
52
52
|
) : (
|
|
53
53
|
<TreeSidebarFolder
|
|
54
54
|
{name}
|
|
55
|
-
icon="folder"
|
|
55
|
+
icon="heroicons:folder"
|
|
56
56
|
href={`${Astro.locals.StudioCMS.routeMap.mainLinks.contentManagementFolderEdit}/?folder=${id}`}
|
|
57
57
|
>
|
|
58
58
|
{children && children.length > 0 && (
|
|
@@ -64,10 +64,10 @@ function getIcon(pageData: CombinedPageData | null) {
|
|
|
64
64
|
)
|
|
65
65
|
))}
|
|
66
66
|
{isNewPage && (
|
|
67
|
-
<TreeSidebarLink icon="document-plus" href='#'>
|
|
67
|
+
<TreeSidebarLink icon="heroicons:document-plus" href='#'>
|
|
68
68
|
New Page...
|
|
69
69
|
</TreeSidebarLink>
|
|
70
70
|
)}
|
|
71
71
|
{isNewFolder && (
|
|
72
|
-
<TreeSidebarFolder name="New Folder..." icon="folder-plus" href="#" />
|
|
72
|
+
<TreeSidebarFolder name="New Folder..." icon="heroicons:folder-plus" href="#" />
|
|
73
73
|
)}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
name: string;
|
|
12
12
|
href: string;
|
|
13
13
|
}
|
|
@@ -32,7 +32,7 @@ const compId = crypto.randomUUID();
|
|
|
32
32
|
height={24}
|
|
33
33
|
/>
|
|
34
34
|
<Icon
|
|
35
|
-
name={activeIcon as
|
|
35
|
+
name={activeIcon as AvailableIcons}
|
|
36
36
|
id="selected-icon"
|
|
37
37
|
class="sidebar-link-icon selected"
|
|
38
38
|
width={24}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
|
@@ -31,7 +31,7 @@ const compId = crypto.randomUUID();
|
|
|
31
31
|
height={24}
|
|
32
32
|
/>
|
|
33
33
|
<Icon
|
|
34
|
-
name={activeIcon as
|
|
34
|
+
name={activeIcon as AvailableIcons}
|
|
35
35
|
id="selected-icon"
|
|
36
36
|
class="sidebar-link-icon selected"
|
|
37
37
|
width={24}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { SettingsField } from 'studiocms:plugin-helpers';
|
|
3
|
-
import { Checkbox
|
|
3
|
+
import { Checkbox } from 'studiocms:ui/components/checkbox';
|
|
4
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
5
|
+
import { RadioGroup } from 'studiocms:ui/components/radiogroup';
|
|
6
|
+
import { Row } from 'studiocms:ui/components/row';
|
|
7
|
+
import { Select } from 'studiocms:ui/components/select';
|
|
8
|
+
import { Textarea } from 'studiocms:ui/components/textarea';
|
|
4
9
|
|
|
5
10
|
interface Props {
|
|
6
11
|
fields: SettingsField[];
|
|
@@ -3,7 +3,12 @@ import type { UserSessionData } from 'studiocms:auth/lib/types';
|
|
|
3
3
|
import { FormattedDate } from 'studiocms:components';
|
|
4
4
|
import { useTranslations } from 'studiocms:i18n';
|
|
5
5
|
import { runSDK, SDKCoreJs } from 'studiocms:sdk';
|
|
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';
|
|
10
|
+
import { Input } from 'studiocms:ui/components/input';
|
|
11
|
+
import { Modal } from 'studiocms:ui/components/modal';
|
|
7
12
|
|
|
8
13
|
interface Props {
|
|
9
14
|
userSession: UserSessionData | null;
|
|
@@ -36,7 +41,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
36
41
|
color='primary'
|
|
37
42
|
size='sm'
|
|
38
43
|
>
|
|
39
|
-
<Icon slot="start-content" name="plus" width={24} height={24} />
|
|
44
|
+
<Icon slot="start-content" name="heroicons:plus" width={24} height={24} />
|
|
40
45
|
<t-profile-tokens key="api-tokens-create">
|
|
41
46
|
{t('api-tokens-create')}
|
|
42
47
|
</t-profile-tokens>
|
|
@@ -53,11 +58,11 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
53
58
|
<div slot="header" class="token-list-item-header">
|
|
54
59
|
<div class="token-list-item-header-row">
|
|
55
60
|
<h4>
|
|
56
|
-
<Icon name="key" width={24} height={24} />
|
|
61
|
+
<Icon name="heroicons:key" width={24} height={24} />
|
|
57
62
|
{token.description}
|
|
58
63
|
</h4>
|
|
59
64
|
<Button type="submit" variant="solid" color="danger" size="sm" data-token={token.id} data-user={user.id} disabled>
|
|
60
|
-
<Icon slot="start-content" name="trash" width={24} height={24} />
|
|
65
|
+
<Icon slot="start-content" name="heroicons:trash" width={24} height={24} />
|
|
61
66
|
<t-profile-tokens key="api-tokens-delete-button">{t('api-tokens-delete-button')}</t-profile-tokens>
|
|
62
67
|
</Button>
|
|
63
68
|
</div>
|
|
@@ -137,7 +142,8 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
137
142
|
</script>
|
|
138
143
|
|
|
139
144
|
<script>
|
|
140
|
-
import { ModalHelper
|
|
145
|
+
import { ModalHelper } from 'studiocms:ui/components/modal';
|
|
146
|
+
import { toast } from 'studiocms:ui/components/toaster';
|
|
141
147
|
|
|
142
148
|
const createAPITokenModal = new ModalHelper('create-api-token-modal', 'create-api-token');
|
|
143
149
|
const createTokenResponseModal = new ModalHelper('create-token-response-modal');
|
|
@@ -260,13 +266,13 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
260
266
|
gap: .5rem;
|
|
261
267
|
|
|
262
268
|
.description {
|
|
263
|
-
color:
|
|
269
|
+
color: var(--text-muted);
|
|
264
270
|
}
|
|
265
271
|
|
|
266
272
|
.token-list-item {
|
|
267
273
|
display: flex;
|
|
268
274
|
flex-direction: column;
|
|
269
|
-
background-color:
|
|
275
|
+
background-color: var(--background-step-2);
|
|
270
276
|
|
|
271
277
|
.token-list-item-header {
|
|
272
278
|
display: flex;
|
|
@@ -296,7 +302,7 @@ const t = useTranslations(lang, '@studiocms/dashboard:profile');
|
|
|
296
302
|
|
|
297
303
|
.created-at {
|
|
298
304
|
font-size: 0.75rem;
|
|
299
|
-
color:
|
|
305
|
+
color: var(--text-muted);
|
|
300
306
|
}
|
|
301
307
|
}
|
|
302
308
|
}
|