@commonpub/layer 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/app.vue +7 -0
- package/components/AnnouncementBand.vue +117 -0
- package/components/AppToast.vue +108 -0
- package/components/AuthorCard.vue +119 -0
- package/components/AuthorRow.vue +81 -0
- package/components/CommentSection.vue +330 -0
- package/components/ContentCard.vue +340 -0
- package/components/ContentPicker.vue +240 -0
- package/components/ContentStarterForm.vue +214 -0
- package/components/ContentTypeBadge.vue +46 -0
- package/components/CountdownTimer.vue +68 -0
- package/components/CpubEditor.vue +87 -0
- package/components/DiscussionItem.vue +191 -0
- package/components/EditorPropertiesPanel.vue +393 -0
- package/components/EngagementBar.vue +131 -0
- package/components/FederatedContentCard.vue +291 -0
- package/components/FeedItem.vue +283 -0
- package/components/FilterChip.vue +21 -0
- package/components/HeatmapGrid.vue +92 -0
- package/components/ImageUpload.vue +219 -0
- package/components/MemberCard.vue +163 -0
- package/components/MessageThread.vue +120 -0
- package/components/NotificationItem.vue +103 -0
- package/components/ProgressTracker.vue +41 -0
- package/components/PublishErrorsModal.vue +116 -0
- package/components/RemoteActorCard.vue +206 -0
- package/components/RemoteUserSearch.vue +117 -0
- package/components/SearchFilters.vue +188 -0
- package/components/SearchSidebar.vue +181 -0
- package/components/SectionHeader.vue +17 -0
- package/components/ShareToHubModal.vue +189 -0
- package/components/SiteLogo.vue +21 -0
- package/components/SkillBar.vue +57 -0
- package/components/SortSelect.vue +30 -0
- package/components/StatBar.vue +14 -0
- package/components/TOCNav.vue +69 -0
- package/components/TimelineItem.vue +82 -0
- package/components/VideoCard.vue +106 -0
- package/components/blocks/BlockBuildStepView.vue +92 -0
- package/components/blocks/BlockCalloutView.vue +82 -0
- package/components/blocks/BlockCheckpointView.vue +50 -0
- package/components/blocks/BlockCodeView.vue +212 -0
- package/components/blocks/BlockContentRenderer.vue +143 -0
- package/components/blocks/BlockDividerView.vue +11 -0
- package/components/blocks/BlockDownloadsView.vue +126 -0
- package/components/blocks/BlockEmbedView.vue +61 -0
- package/components/blocks/BlockGalleryView.vue +57 -0
- package/components/blocks/BlockHeadingView.vue +29 -0
- package/components/blocks/BlockImageView.vue +34 -0
- package/components/blocks/BlockMarkdownView.vue +118 -0
- package/components/blocks/BlockMathView.vue +45 -0
- package/components/blocks/BlockPartsListView.vue +104 -0
- package/components/blocks/BlockQuizView.vue +239 -0
- package/components/blocks/BlockQuoteView.vue +41 -0
- package/components/blocks/BlockSectionHeaderView.vue +58 -0
- package/components/blocks/BlockSliderView.vue +236 -0
- package/components/blocks/BlockTextView.vue +41 -0
- package/components/blocks/BlockToolListView.vue +87 -0
- package/components/blocks/BlockVideoView.vue +89 -0
- package/components/editors/ArticleEditor.vue +545 -0
- package/components/editors/BlockCanvas.vue +487 -0
- package/components/editors/BlockInsertZone.vue +84 -0
- package/components/editors/BlockPicker.vue +285 -0
- package/components/editors/BlockWrapper.vue +192 -0
- package/components/editors/BlogEditor.vue +567 -0
- package/components/editors/EditorBlocks.vue +248 -0
- package/components/editors/EditorSection.vue +81 -0
- package/components/editors/EditorShell.vue +168 -0
- package/components/editors/EditorTagInput.vue +114 -0
- package/components/editors/EditorVisibility.vue +110 -0
- package/components/editors/ExplainerEditor.vue +503 -0
- package/components/editors/MarkdownImportDialog.vue +249 -0
- package/components/editors/ProjectEditor.vue +446 -0
- package/components/editors/blocks/BuildStepBlock.vue +102 -0
- package/components/editors/blocks/CalloutBlock.vue +122 -0
- package/components/editors/blocks/CheckpointBlock.vue +27 -0
- package/components/editors/blocks/CodeBlock.vue +177 -0
- package/components/editors/blocks/DividerBlock.vue +22 -0
- package/components/editors/blocks/DownloadsBlock.vue +41 -0
- package/components/editors/blocks/EmbedBlock.vue +20 -0
- package/components/editors/blocks/GalleryBlock.vue +236 -0
- package/components/editors/blocks/HeadingBlock.vue +96 -0
- package/components/editors/blocks/ImageBlock.vue +271 -0
- package/components/editors/blocks/MarkdownBlock.vue +258 -0
- package/components/editors/blocks/MathBlock.vue +37 -0
- package/components/editors/blocks/PartsListBlock.vue +358 -0
- package/components/editors/blocks/QuizBlock.vue +47 -0
- package/components/editors/blocks/QuoteBlock.vue +101 -0
- package/components/editors/blocks/SectionHeaderBlock.vue +130 -0
- package/components/editors/blocks/SliderBlock.vue +318 -0
- package/components/editors/blocks/TextBlock.vue +201 -0
- package/components/editors/blocks/ToolListBlock.vue +70 -0
- package/components/editors/blocks/VideoBlock.vue +22 -0
- package/components/hub/HubDiscussions.vue +47 -0
- package/components/hub/HubFeed.vue +199 -0
- package/components/hub/HubHero.vue +185 -0
- package/components/hub/HubLayout.vue +103 -0
- package/components/hub/HubMembers.vue +40 -0
- package/components/hub/HubProducts.vue +93 -0
- package/components/hub/HubProjects.vue +207 -0
- package/components/hub/HubSidebar.vue +12 -0
- package/components/hub/HubSidebarCard.vue +35 -0
- package/components/views/ArticleView.vue +771 -0
- package/components/views/BlogView.vue +667 -0
- package/components/views/ExplainerView.vue +688 -0
- package/components/views/ProjectView.vue +1500 -0
- package/composables/useApiError.ts +39 -0
- package/composables/useAuth.ts +87 -0
- package/composables/useBlockEditor.ts +187 -0
- package/composables/useContentSave.ts +253 -0
- package/composables/useContentTypes.ts +37 -0
- package/composables/useEngagement.ts +196 -0
- package/composables/useFeatures.ts +33 -0
- package/composables/useFederation.ts +72 -0
- package/composables/useJsonLd.ts +183 -0
- package/composables/useMarkdownImport.ts +77 -0
- package/composables/useMirrorContent.ts +105 -0
- package/composables/useNotifications.ts +73 -0
- package/composables/usePublishValidation.ts +65 -0
- package/composables/useSanitize.ts +34 -0
- package/composables/useSiteName.ts +4 -0
- package/composables/useTheme.ts +34 -0
- package/composables/useToast.ts +35 -0
- package/error.vue +129 -0
- package/layouts/admin.vue +213 -0
- package/layouts/auth.vue +63 -0
- package/layouts/default.vue +269 -0
- package/layouts/editor.vue +129 -0
- package/middleware/auth.ts +6 -0
- package/nuxt.config.ts +83 -0
- package/package.json +59 -0
- package/pages/[type]/[slug]/edit.vue +676 -0
- package/pages/[type]/[slug]/index.vue +313 -0
- package/pages/[type]/index.vue +118 -0
- package/pages/about.vue +100 -0
- package/pages/admin/audit.vue +66 -0
- package/pages/admin/content.vue +116 -0
- package/pages/admin/federation.vue +446 -0
- package/pages/admin/index.vue +62 -0
- package/pages/admin/reports.vue +88 -0
- package/pages/admin/settings.vue +167 -0
- package/pages/admin/users.vue +145 -0
- package/pages/auth/forgot-password.vue +103 -0
- package/pages/auth/login.vue +216 -0
- package/pages/auth/oauth/authorize.vue +178 -0
- package/pages/auth/register.vue +246 -0
- package/pages/auth/reset-password.vue +124 -0
- package/pages/auth/verify-email.vue +80 -0
- package/pages/cert/[code].vue +154 -0
- package/pages/contests/[slug]/edit.vue +153 -0
- package/pages/contests/[slug]/index.vue +556 -0
- package/pages/contests/[slug]/judge.vue +160 -0
- package/pages/contests/create.vue +192 -0
- package/pages/contests/index.vue +69 -0
- package/pages/create.vue +219 -0
- package/pages/dashboard.vue +521 -0
- package/pages/docs/[siteSlug]/[...pagePath].vue +704 -0
- package/pages/docs/[siteSlug]/edit.vue +480 -0
- package/pages/docs/[siteSlug]/index.vue +380 -0
- package/pages/docs/create.vue +60 -0
- package/pages/docs/index.vue +181 -0
- package/pages/explore.vue +422 -0
- package/pages/federated-hubs/[id]/index.vue +385 -0
- package/pages/federated-hubs/[id]/posts/[postId].vue +309 -0
- package/pages/federation/index.vue +157 -0
- package/pages/federation/search.vue +43 -0
- package/pages/federation/users/[handle].vue +221 -0
- package/pages/feed.vue +135 -0
- package/pages/hubs/[slug]/index.vue +513 -0
- package/pages/hubs/[slug]/members.vue +134 -0
- package/pages/hubs/[slug]/posts/[postId].vue +352 -0
- package/pages/hubs/[slug]/settings.vue +254 -0
- package/pages/hubs/create.vue +201 -0
- package/pages/hubs/index.vue +207 -0
- package/pages/index.vue +1005 -0
- package/pages/learn/[slug]/[lessonSlug]/edit.vue +413 -0
- package/pages/learn/[slug]/[lessonSlug]/index.vue +438 -0
- package/pages/learn/[slug]/edit.vue +414 -0
- package/pages/learn/[slug]/index.vue +341 -0
- package/pages/learn/create.vue +71 -0
- package/pages/learn/index.vue +360 -0
- package/pages/messages/[conversationId].vue +113 -0
- package/pages/messages/index.vue +303 -0
- package/pages/mirror/[id].vue +115 -0
- package/pages/notifications.vue +91 -0
- package/pages/products/[slug].vue +128 -0
- package/pages/products/index.vue +122 -0
- package/pages/search.vue +692 -0
- package/pages/settings/account.vue +170 -0
- package/pages/settings/appearance.vue +80 -0
- package/pages/settings/index.vue +81 -0
- package/pages/settings/notifications.vue +68 -0
- package/pages/settings/profile.vue +838 -0
- package/pages/tags/[slug].vue +111 -0
- package/pages/tags/index.vue +73 -0
- package/pages/u/[username]/followers.vue +86 -0
- package/pages/u/[username]/following.vue +94 -0
- package/pages/u/[username]/index.vue +837 -0
- package/pages/videos/[id].vue +212 -0
- package/pages/videos/index.vue +327 -0
- package/pages/videos/submit.vue +112 -0
- package/plugins/auth.ts +23 -0
- package/server/api/admin/audit.get.ts +17 -0
- package/server/api/admin/content/[id].delete.ts +15 -0
- package/server/api/admin/content/[id].patch.ts +37 -0
- package/server/api/admin/federation/activity.get.ts +31 -0
- package/server/api/admin/federation/clients.get.ts +9 -0
- package/server/api/admin/federation/clients.post.ts +16 -0
- package/server/api/admin/federation/hub-mirrors/index.get.ts +10 -0
- package/server/api/admin/federation/hub-mirrors/index.post.ts +42 -0
- package/server/api/admin/federation/mirrors/[id]/backfill.post.ts +39 -0
- package/server/api/admin/federation/mirrors/[id].delete.ts +11 -0
- package/server/api/admin/federation/mirrors/[id].get.ts +15 -0
- package/server/api/admin/federation/mirrors/[id].put.ts +22 -0
- package/server/api/admin/federation/mirrors/index.get.ts +9 -0
- package/server/api/admin/federation/mirrors/index.post.ts +30 -0
- package/server/api/admin/federation/pending.get.ts +22 -0
- package/server/api/admin/federation/refederate.post.ts +92 -0
- package/server/api/admin/federation/repair-types.post.ts +57 -0
- package/server/api/admin/federation/retry.post.ts +41 -0
- package/server/api/admin/federation/stats.get.ts +26 -0
- package/server/api/admin/reports/[id]/resolve.post.ts +12 -0
- package/server/api/admin/reports.get.ts +17 -0
- package/server/api/admin/settings.get.ts +22 -0
- package/server/api/admin/settings.put.ts +11 -0
- package/server/api/admin/stats.get.ts +9 -0
- package/server/api/admin/users/[id]/role.put.ts +12 -0
- package/server/api/admin/users/[id]/status.put.ts +12 -0
- package/server/api/admin/users/[id].delete.ts +10 -0
- package/server/api/admin/users.get.ts +18 -0
- package/server/api/auth/federated/callback.get.ts +67 -0
- package/server/api/auth/federated/login.post.ts +60 -0
- package/server/api/auth/oauth2/authorize.get.ts +30 -0
- package/server/api/auth/oauth2/authorize.post.ts +51 -0
- package/server/api/auth/oauth2/register.post.ts +41 -0
- package/server/api/auth/oauth2/token.post.ts +48 -0
- package/server/api/cert/[code].get.ts +13 -0
- package/server/api/content/[id]/build.post.ts +9 -0
- package/server/api/content/[id]/fork.post.ts +10 -0
- package/server/api/content/[id]/index.delete.ts +18 -0
- package/server/api/content/[id]/index.get.ts +15 -0
- package/server/api/content/[id]/index.put.ts +23 -0
- package/server/api/content/[id]/products/[productId].delete.ts +28 -0
- package/server/api/content/[id]/products-sync.post.ts +29 -0
- package/server/api/content/[id]/products.get.ts +9 -0
- package/server/api/content/[id]/products.post.ts +31 -0
- package/server/api/content/[id]/publish.post.ts +17 -0
- package/server/api/content/[id]/report.post.ts +17 -0
- package/server/api/content/[id]/versions.get.ts +9 -0
- package/server/api/content/[id]/view.post.ts +34 -0
- package/server/api/content/index.get.ts +23 -0
- package/server/api/content/index.post.ts +11 -0
- package/server/api/contests/[slug]/entries.get.ts +18 -0
- package/server/api/contests/[slug]/entries.post.ts +23 -0
- package/server/api/contests/[slug]/index.delete.ts +21 -0
- package/server/api/contests/[slug]/index.get.ts +11 -0
- package/server/api/contests/[slug]/index.put.ts +15 -0
- package/server/api/contests/[slug]/judge.post.ts +12 -0
- package/server/api/contests/[slug]/transition.post.ts +24 -0
- package/server/api/contests/index.get.ts +10 -0
- package/server/api/contests/index.post.ts +28 -0
- package/server/api/docs/[siteSlug]/index.delete.ts +14 -0
- package/server/api/docs/[siteSlug]/index.get.ts +17 -0
- package/server/api/docs/[siteSlug]/index.put.ts +20 -0
- package/server/api/docs/[siteSlug]/nav.get.ts +26 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].delete.ts +14 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].get.ts +31 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].put.ts +15 -0
- package/server/api/docs/[siteSlug]/pages/index.get.ts +34 -0
- package/server/api/docs/[siteSlug]/pages/index.post.ts +28 -0
- package/server/api/docs/[siteSlug]/pages/reorder.post.ts +26 -0
- package/server/api/docs/[siteSlug]/search.get.ts +20 -0
- package/server/api/docs/[siteSlug]/versions.post.ts +11 -0
- package/server/api/docs/index.get.ts +6 -0
- package/server/api/docs/index.post.ts +10 -0
- package/server/api/federated-hubs/[id]/posts/[postId].get.ts +16 -0
- package/server/api/federated-hubs/[id]/posts.get.ts +15 -0
- package/server/api/federated-hubs/[id].get.ts +16 -0
- package/server/api/federation/boost.post.ts +21 -0
- package/server/api/federation/content/[id].get.ts +15 -0
- package/server/api/federation/follow.post.ts +16 -0
- package/server/api/federation/health.get.ts +56 -0
- package/server/api/federation/hub-follow.post.ts +27 -0
- package/server/api/federation/hub-post-like.post.ts +115 -0
- package/server/api/federation/hub-post-likes.get.ts +24 -0
- package/server/api/federation/hub-post-reply.post.ts +42 -0
- package/server/api/federation/hub-post.post.ts +33 -0
- package/server/api/federation/like.post.ts +21 -0
- package/server/api/federation/remote-actor.get.ts +22 -0
- package/server/api/federation/reply.post.ts +22 -0
- package/server/api/federation/search.post.ts +17 -0
- package/server/api/federation/timeline.get.ts +22 -0
- package/server/api/federation/unfollow.post.ts +17 -0
- package/server/api/files/[id].delete.ts +35 -0
- package/server/api/files/mine.get.ts +31 -0
- package/server/api/files/upload-from-url.post.ts +68 -0
- package/server/api/files/upload.post.ts +105 -0
- package/server/api/health.get.ts +4 -0
- package/server/api/hubs/[slug]/bans/[userId].delete.ts +13 -0
- package/server/api/hubs/[slug]/bans.get.ts +20 -0
- package/server/api/hubs/[slug]/bans.post.ts +23 -0
- package/server/api/hubs/[slug]/feed.xml.get.ts +60 -0
- package/server/api/hubs/[slug]/gallery.get.ts +21 -0
- package/server/api/hubs/[slug]/index.delete.ts +18 -0
- package/server/api/hubs/[slug]/index.get.ts +14 -0
- package/server/api/hubs/[slug]/index.put.ts +22 -0
- package/server/api/hubs/[slug]/invites.get.ts +20 -0
- package/server/api/hubs/[slug]/invites.post.ts +27 -0
- package/server/api/hubs/[slug]/join.post.ts +17 -0
- package/server/api/hubs/[slug]/leave.post.ts +13 -0
- package/server/api/hubs/[slug]/members/[userId].delete.ts +13 -0
- package/server/api/hubs/[slug]/members/[userId].put.ts +16 -0
- package/server/api/hubs/[slug]/members.get.ts +20 -0
- package/server/api/hubs/[slug]/posts/[postId]/like.post.ts +21 -0
- package/server/api/hubs/[slug]/posts/[postId]/lock.post.ts +17 -0
- package/server/api/hubs/[slug]/posts/[postId]/pin.post.ts +17 -0
- package/server/api/hubs/[slug]/posts/[postId]/replies.get.ts +16 -0
- package/server/api/hubs/[slug]/posts/[postId]/replies.post.ts +21 -0
- package/server/api/hubs/[slug]/posts/[postId].delete.ts +23 -0
- package/server/api/hubs/[slug]/posts/[postId].get.ts +16 -0
- package/server/api/hubs/[slug]/posts/index.get.ts +16 -0
- package/server/api/hubs/[slug]/posts/index.post.ts +36 -0
- package/server/api/hubs/[slug]/products.get.ts +26 -0
- package/server/api/hubs/[slug]/products.post.ts +18 -0
- package/server/api/hubs/[slug]/share.post.ts +39 -0
- package/server/api/hubs/index.get.ts +15 -0
- package/server/api/hubs/index.post.ts +11 -0
- package/server/api/image-proxy.get.ts +91 -0
- package/server/api/learn/[slug]/[lessonSlug]/complete.post.ts +13 -0
- package/server/api/learn/[slug]/[lessonSlug]/index.get.ts +68 -0
- package/server/api/learn/[slug]/enroll.post.ts +12 -0
- package/server/api/learn/[slug]/index.delete.ts +12 -0
- package/server/api/learn/[slug]/index.get.ts +14 -0
- package/server/api/learn/[slug]/index.put.ts +19 -0
- package/server/api/learn/[slug]/lessons/[lessonId].delete.ts +14 -0
- package/server/api/learn/[slug]/lessons/[lessonId].put.ts +24 -0
- package/server/api/learn/[slug]/lessons.post.ts +10 -0
- package/server/api/learn/[slug]/modules/[moduleId].delete.ts +14 -0
- package/server/api/learn/[slug]/modules/[moduleId].put.ts +15 -0
- package/server/api/learn/[slug]/modules.post.ts +14 -0
- package/server/api/learn/[slug]/publish.post.ts +13 -0
- package/server/api/learn/[slug]/unenroll.post.ts +12 -0
- package/server/api/learn/certificates.get.ts +9 -0
- package/server/api/learn/enrollments.get.ts +9 -0
- package/server/api/learn/index.get.ts +17 -0
- package/server/api/learn/index.post.ts +11 -0
- package/server/api/me.get.ts +13 -0
- package/server/api/messages/[conversationId]/info.get.ts +43 -0
- package/server/api/messages/[conversationId]/stream.get.ts +73 -0
- package/server/api/messages/[conversationId].get.ts +13 -0
- package/server/api/messages/[conversationId].post.ts +12 -0
- package/server/api/messages/index.get.ts +39 -0
- package/server/api/messages/index.post.ts +58 -0
- package/server/api/notifications/[id].delete.ts +11 -0
- package/server/api/notifications/count.get.ts +10 -0
- package/server/api/notifications/index.get.ts +24 -0
- package/server/api/notifications/read.post.ts +15 -0
- package/server/api/notifications/stream.get.ts +59 -0
- package/server/api/openapi.get.ts +5 -0
- package/server/api/products/[id].delete.ts +15 -0
- package/server/api/products/[id].put.ts +18 -0
- package/server/api/products/[slug]/content.get.ts +21 -0
- package/server/api/products/[slug].get.ts +16 -0
- package/server/api/products/index.get.ts +28 -0
- package/server/api/profile.get.ts +15 -0
- package/server/api/profile.put.ts +24 -0
- package/server/api/resolve-identity.post.ts +34 -0
- package/server/api/search/index.get.ts +24 -0
- package/server/api/search/trending.get.ts +22 -0
- package/server/api/social/bookmark.get.ts +16 -0
- package/server/api/social/bookmark.post.ts +15 -0
- package/server/api/social/bookmarks.get.ts +16 -0
- package/server/api/social/comments/[id].delete.ts +13 -0
- package/server/api/social/comments.get.ts +18 -0
- package/server/api/social/comments.post.ts +11 -0
- package/server/api/social/like.get.ts +17 -0
- package/server/api/social/like.post.ts +35 -0
- package/server/api/stats.get.ts +8 -0
- package/server/api/user/hubs.get.ts +22 -0
- package/server/api/users/[username]/content.get.ts +21 -0
- package/server/api/users/[username]/feed.xml.get.ts +65 -0
- package/server/api/users/[username]/follow.delete.ts +15 -0
- package/server/api/users/[username]/follow.post.ts +15 -0
- package/server/api/users/[username]/followers.get.ts +22 -0
- package/server/api/users/[username]/following.get.ts +22 -0
- package/server/api/users/[username]/learning.get.ts +18 -0
- package/server/api/users/[username].get.ts +25 -0
- package/server/api/users/index.get.ts +78 -0
- package/server/api/videos/[id].get.ts +18 -0
- package/server/api/videos/categories/[id].delete.ts +15 -0
- package/server/api/videos/categories/[id].put.ts +17 -0
- package/server/api/videos/categories.get.ts +7 -0
- package/server/api/videos/categories.post.ts +11 -0
- package/server/api/videos/index.get.ts +20 -0
- package/server/api/videos/index.post.ts +11 -0
- package/server/middleware/auth.ts +180 -0
- package/server/middleware/features.ts +31 -0
- package/server/middleware/security.ts +54 -0
- package/server/plugins/auto-admin.ts +69 -0
- package/server/plugins/federation-delivery.ts +74 -0
- package/server/routes/.well-known/nodeinfo.ts +15 -0
- package/server/routes/.well-known/webfinger.ts +86 -0
- package/server/routes/actor/followers.ts +34 -0
- package/server/routes/actor/following.ts +34 -0
- package/server/routes/actor/outbox.ts +31 -0
- package/server/routes/actor.ts +30 -0
- package/server/routes/feed.xml.ts +59 -0
- package/server/routes/hubs/[slug]/followers.ts +39 -0
- package/server/routes/hubs/[slug]/inbox.ts +35 -0
- package/server/routes/hubs/[slug]/outbox.ts +43 -0
- package/server/routes/hubs/[slug]/posts/[postId].ts +63 -0
- package/server/routes/hubs/[slug].ts +29 -0
- package/server/routes/inbox.ts +34 -0
- package/server/routes/nodeinfo/2.1.ts +27 -0
- package/server/routes/robots.txt.ts +19 -0
- package/server/routes/sitemap.xml.ts +105 -0
- package/server/routes/users/[username]/followers.ts +33 -0
- package/server/routes/users/[username]/following.ts +33 -0
- package/server/routes/users/[username]/inbox.ts +34 -0
- package/server/routes/users/[username]/outbox.ts +35 -0
- package/server/routes/users/[username].ts +62 -0
- package/server/utils/auth.ts +36 -0
- package/server/utils/db.ts +34 -0
- package/server/utils/errors.ts +24 -0
- package/server/utils/inbox.ts +122 -0
- package/server/utils/validate.ts +82 -0
- package/theme/base.css +283 -0
- package/theme/components.css +322 -0
- package/theme/dark.css +87 -0
- package/theme/editor-panels.css +63 -0
- package/theme/forms.css +216 -0
- package/theme/generics.css +68 -0
- package/theme/layouts.css +415 -0
- package/theme/prose.css +342 -0
- package/types/hub.ts +61 -0
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
definePageMeta({ middleware: 'auth' });
|
|
3
|
+
|
|
4
|
+
useSeoMeta({
|
|
5
|
+
title: `Dashboard — ${useSiteName()}`,
|
|
6
|
+
description: 'Your personal CommonPub dashboard.',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const { user } = useAuth();
|
|
10
|
+
const { learning: learningEnabled } = useFeatures();
|
|
11
|
+
const reqHeaders = import.meta.server ? useRequestHeaders(['cookie']) : {};
|
|
12
|
+
|
|
13
|
+
const activeTab = ref<'content' | 'bookmarks' | 'learning'>('content');
|
|
14
|
+
|
|
15
|
+
// My content (all statuses)
|
|
16
|
+
const { data: myContent, status: contentStatus } = await useFetch('/api/content', {
|
|
17
|
+
query: { authorId: user.value?.id },
|
|
18
|
+
headers: reqHeaders,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Bookmarks
|
|
22
|
+
const { data: bookmarkData } = await useFetch('/api/social/bookmarks', {
|
|
23
|
+
query: { limit: 10 },
|
|
24
|
+
headers: reqHeaders,
|
|
25
|
+
lazy: true,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Learning enrollments
|
|
29
|
+
const { data: enrollments } = await useFetch('/api/learn/enrollments', {
|
|
30
|
+
headers: reqHeaders,
|
|
31
|
+
lazy: true,
|
|
32
|
+
immediate: learningEnabled.value,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Notification count
|
|
36
|
+
const { data: notifCount } = await useFetch('/api/notifications/count', {
|
|
37
|
+
headers: reqHeaders,
|
|
38
|
+
lazy: true,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const toast = useToast();
|
|
42
|
+
|
|
43
|
+
const drafts = computed(() =>
|
|
44
|
+
(myContent.value?.items ?? []).filter((i) => i.status === 'draft'),
|
|
45
|
+
);
|
|
46
|
+
const published = computed(() =>
|
|
47
|
+
(myContent.value?.items ?? []).filter((i) => i.status === 'published'),
|
|
48
|
+
);
|
|
49
|
+
const totalViews = computed(() =>
|
|
50
|
+
published.value.reduce((sum, item) => sum + (item.viewCount ?? 0), 0),
|
|
51
|
+
);
|
|
52
|
+
const totalLikes = computed(() =>
|
|
53
|
+
published.value.reduce((sum, item) => sum + (item.likeCount ?? 0), 0),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// Content actions
|
|
57
|
+
const actionLoading = ref<string | null>(null);
|
|
58
|
+
|
|
59
|
+
async function unpublishItem(id: string): Promise<void> {
|
|
60
|
+
if (!confirm('Unpublish this content? It will revert to draft.')) return;
|
|
61
|
+
actionLoading.value = id;
|
|
62
|
+
try {
|
|
63
|
+
await $fetch(`/api/content/${id}`, { method: 'PUT', body: { status: 'draft' } });
|
|
64
|
+
toast.success('Content unpublished');
|
|
65
|
+
await refreshNuxtData();
|
|
66
|
+
} catch {
|
|
67
|
+
toast.error('Failed to unpublish');
|
|
68
|
+
} finally {
|
|
69
|
+
actionLoading.value = null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function deleteItem(id: string, title: string): Promise<void> {
|
|
74
|
+
if (!confirm(`Delete "${title}"? This cannot be undone.`)) return;
|
|
75
|
+
actionLoading.value = id;
|
|
76
|
+
try {
|
|
77
|
+
await $fetch(`/api/content/${id}`, { method: 'DELETE' });
|
|
78
|
+
toast.success('Content deleted');
|
|
79
|
+
await refreshNuxtData();
|
|
80
|
+
} catch {
|
|
81
|
+
toast.error('Failed to delete');
|
|
82
|
+
} finally {
|
|
83
|
+
actionLoading.value = null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<div class="cpub-dash">
|
|
90
|
+
<div class="cpub-dash-header">
|
|
91
|
+
<h1 class="cpub-dash-title">Dashboard</h1>
|
|
92
|
+
<NuxtLink to="/create" class="cpub-dash-create-btn">
|
|
93
|
+
<i class="fa-solid fa-plus"></i> Create
|
|
94
|
+
</NuxtLink>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<!-- Stats row -->
|
|
98
|
+
<div class="cpub-dash-stats">
|
|
99
|
+
<div class="cpub-dash-stat">
|
|
100
|
+
<span class="cpub-dash-stat-n">{{ published.length }}</span>
|
|
101
|
+
<span class="cpub-dash-stat-l">Published</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="cpub-dash-stat">
|
|
104
|
+
<span class="cpub-dash-stat-n">{{ drafts.length }}</span>
|
|
105
|
+
<span class="cpub-dash-stat-l">Drafts</span>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="cpub-dash-stat">
|
|
108
|
+
<span class="cpub-dash-stat-n">{{ totalViews.toLocaleString() }}</span>
|
|
109
|
+
<span class="cpub-dash-stat-l">Views</span>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="cpub-dash-stat">
|
|
112
|
+
<span class="cpub-dash-stat-n">{{ totalLikes }}</span>
|
|
113
|
+
<span class="cpub-dash-stat-l">Likes</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="cpub-dash-stat">
|
|
116
|
+
<span class="cpub-dash-stat-n">{{ notifCount?.count ?? 0 }}</span>
|
|
117
|
+
<span class="cpub-dash-stat-l">Unread</span>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<!-- Tabs -->
|
|
122
|
+
<div class="cpub-dash-tabs">
|
|
123
|
+
<button
|
|
124
|
+
:class="['cpub-dash-tab', { active: activeTab === 'content' }]"
|
|
125
|
+
@click="activeTab = 'content'"
|
|
126
|
+
>
|
|
127
|
+
My Content
|
|
128
|
+
</button>
|
|
129
|
+
<button
|
|
130
|
+
:class="['cpub-dash-tab', { active: activeTab === 'bookmarks' }]"
|
|
131
|
+
@click="activeTab = 'bookmarks'"
|
|
132
|
+
>
|
|
133
|
+
Bookmarks
|
|
134
|
+
</button>
|
|
135
|
+
<button
|
|
136
|
+
v-if="learningEnabled"
|
|
137
|
+
:class="['cpub-dash-tab', { active: activeTab === 'learning' }]"
|
|
138
|
+
@click="activeTab = 'learning'"
|
|
139
|
+
>
|
|
140
|
+
Learning
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<!-- Loading state -->
|
|
145
|
+
<div v-if="contentStatus === 'pending'" class="cpub-dash-panel" style="padding: 32px; text-align: center;">
|
|
146
|
+
<i class="fa-solid fa-circle-notch fa-spin" style="color: var(--text-faint); font-size: 16px;"></i>
|
|
147
|
+
<p style="font-size: 12px; color: var(--text-faint); margin-top: 8px;">Loading your content...</p>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- Content tab -->
|
|
151
|
+
<div v-else-if="activeTab === 'content'" class="cpub-dash-panel">
|
|
152
|
+
<!-- Drafts section -->
|
|
153
|
+
<div v-if="drafts.length" class="cpub-dash-section">
|
|
154
|
+
<h2 class="cpub-dash-section-title">Drafts</h2>
|
|
155
|
+
<div class="cpub-dash-list">
|
|
156
|
+
<div v-for="item in drafts" :key="item.id" class="cpub-dash-row">
|
|
157
|
+
<NuxtLink :to="`/${item.type}/${item.slug}/edit`" class="cpub-dash-row-title">
|
|
158
|
+
{{ item.title }}
|
|
159
|
+
</NuxtLink>
|
|
160
|
+
<span class="cpub-dash-row-meta">
|
|
161
|
+
<ContentTypeBadge :type="item.type" />
|
|
162
|
+
<time>{{ new Date(item.createdAt).toLocaleDateString('en-US', { month: 'short', day: 'numeric' }) }}</time>
|
|
163
|
+
</span>
|
|
164
|
+
<div class="cpub-dash-row-actions">
|
|
165
|
+
<NuxtLink :to="`/${item.type}/${item.slug}/edit`" class="cpub-dash-action-btn" aria-label="Edit" title="Edit">
|
|
166
|
+
<i class="fa-solid fa-pen"></i> Edit
|
|
167
|
+
</NuxtLink>
|
|
168
|
+
<button class="cpub-dash-action-btn cpub-dash-action-btn--danger" aria-label="Delete" title="Delete" :disabled="actionLoading === item.id" @click="deleteItem(item.id, item.title)">
|
|
169
|
+
<i :class="actionLoading === item.id ? 'fa-solid fa-circle-notch fa-spin' : 'fa-solid fa-trash'"></i> Delete
|
|
170
|
+
</button>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<!-- Published section -->
|
|
177
|
+
<div class="cpub-dash-section">
|
|
178
|
+
<h2 class="cpub-dash-section-title">Published</h2>
|
|
179
|
+
<div class="cpub-dash-list">
|
|
180
|
+
<div v-for="item in published" :key="item.id" class="cpub-dash-row">
|
|
181
|
+
<NuxtLink :to="`/${item.type}/${item.slug}`" class="cpub-dash-row-title">
|
|
182
|
+
{{ item.title }}
|
|
183
|
+
</NuxtLink>
|
|
184
|
+
<span class="cpub-dash-row-meta">
|
|
185
|
+
<ContentTypeBadge :type="item.type" />
|
|
186
|
+
<span><i class="fa-regular fa-eye"></i> {{ (item.viewCount ?? 0).toLocaleString() }}</span>
|
|
187
|
+
<span><i class="fa-regular fa-heart"></i> {{ item.likeCount ?? 0 }}</span>
|
|
188
|
+
</span>
|
|
189
|
+
<div class="cpub-dash-row-actions">
|
|
190
|
+
<NuxtLink :to="`/${item.type}/${item.slug}/edit`" class="cpub-dash-action-btn" aria-label="Edit" title="Edit">
|
|
191
|
+
<i class="fa-solid fa-pen"></i> Edit
|
|
192
|
+
</NuxtLink>
|
|
193
|
+
<button class="cpub-dash-action-btn cpub-dash-action-btn--warn" aria-label="Unpublish" title="Unpublish" :disabled="actionLoading === item.id" @click="unpublishItem(item.id)">
|
|
194
|
+
<i :class="actionLoading === item.id ? 'fa-solid fa-circle-notch fa-spin' : 'fa-solid fa-eye-slash'"></i> Unpublish
|
|
195
|
+
</button>
|
|
196
|
+
<button class="cpub-dash-action-btn cpub-dash-action-btn--danger" aria-label="Delete" title="Delete" :disabled="actionLoading === item.id" @click="deleteItem(item.id, item.title)">
|
|
197
|
+
<i :class="actionLoading === item.id ? 'fa-solid fa-circle-notch fa-spin' : 'fa-solid fa-trash'"></i> Delete
|
|
198
|
+
</button>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
<p v-if="!published.length" class="cpub-dash-empty">No published content yet.</p>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<!-- Bookmarks tab -->
|
|
207
|
+
<div v-if="activeTab === 'bookmarks'" class="cpub-dash-panel">
|
|
208
|
+
<div class="cpub-dash-list">
|
|
209
|
+
<div v-for="bm in bookmarkData?.items ?? []" :key="bm.id" class="cpub-dash-row">
|
|
210
|
+
<template v-if="bm.content">
|
|
211
|
+
<NuxtLink :to="`/${bm.content.type}/${bm.content.slug}`" class="cpub-dash-row-title">
|
|
212
|
+
{{ bm.content.title }}
|
|
213
|
+
</NuxtLink>
|
|
214
|
+
<span class="cpub-dash-row-meta">
|
|
215
|
+
<ContentTypeBadge :type="bm.content.type" />
|
|
216
|
+
<span v-if="bm.content.author">by {{ bm.content.author.displayName || bm.content.author.username }}</span>
|
|
217
|
+
</span>
|
|
218
|
+
</template>
|
|
219
|
+
<template v-else>
|
|
220
|
+
<span class="cpub-dash-row-title cpub-dash-row-removed">Removed content</span>
|
|
221
|
+
</template>
|
|
222
|
+
</div>
|
|
223
|
+
<p v-if="!bookmarkData?.items?.length" class="cpub-dash-empty">
|
|
224
|
+
No bookmarks yet. Bookmark content you want to revisit!
|
|
225
|
+
</p>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<!-- Learning tab -->
|
|
230
|
+
<div v-if="learningEnabled && activeTab === 'learning'" class="cpub-dash-panel">
|
|
231
|
+
<div class="cpub-dash-list">
|
|
232
|
+
<div v-for="enrollment in enrollments ?? []" :key="enrollment.path?.id ?? enrollment.id" class="cpub-dash-row">
|
|
233
|
+
<NuxtLink :to="`/learn/${enrollment.path?.slug}`" class="cpub-dash-row-title">
|
|
234
|
+
{{ enrollment.path?.title ?? 'Learning Path' }}
|
|
235
|
+
</NuxtLink>
|
|
236
|
+
<span class="cpub-dash-row-meta">
|
|
237
|
+
<span v-if="enrollment.completedAt" class="cpub-dash-badge cpub-dash-badge--green">
|
|
238
|
+
<i class="fa-solid fa-check"></i> Complete
|
|
239
|
+
</span>
|
|
240
|
+
<span v-else class="cpub-dash-badge">
|
|
241
|
+
{{ enrollment.progress ?? 0 }}% progress
|
|
242
|
+
</span>
|
|
243
|
+
</span>
|
|
244
|
+
</div>
|
|
245
|
+
<p v-if="!enrollments?.length" class="cpub-dash-empty">
|
|
246
|
+
Not enrolled in any learning paths. <NuxtLink to="/learn" class="cpub-link">Browse paths</NuxtLink>
|
|
247
|
+
</p>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
</template>
|
|
252
|
+
|
|
253
|
+
<style scoped>
|
|
254
|
+
.cpub-dash {
|
|
255
|
+
max-width: var(--content-max-width, 960px);
|
|
256
|
+
margin: 0 auto;
|
|
257
|
+
padding: var(--space-8) var(--space-6);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.cpub-dash-header {
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: space-between;
|
|
264
|
+
margin-bottom: 24px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.cpub-dash-title {
|
|
268
|
+
font-size: 22px;
|
|
269
|
+
font-weight: 700;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.cpub-dash-create-btn {
|
|
273
|
+
display: inline-flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
gap: 6px;
|
|
276
|
+
padding: 6px 16px;
|
|
277
|
+
background: var(--accent);
|
|
278
|
+
color: var(--color-text-inverse);
|
|
279
|
+
border: var(--border-width-default) solid var(--border);
|
|
280
|
+
font-size: 12px;
|
|
281
|
+
font-weight: 600;
|
|
282
|
+
text-decoration: none;
|
|
283
|
+
box-shadow: var(--shadow-md);
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.cpub-dash-create-btn:hover {
|
|
288
|
+
box-shadow: var(--shadow-sm);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Stats */
|
|
292
|
+
.cpub-dash-stats {
|
|
293
|
+
display: flex;
|
|
294
|
+
gap: 0;
|
|
295
|
+
border: var(--border-width-default) solid var(--border);
|
|
296
|
+
background: var(--surface);
|
|
297
|
+
margin-bottom: 24px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.cpub-dash-stat {
|
|
301
|
+
flex: 1;
|
|
302
|
+
display: flex;
|
|
303
|
+
flex-direction: column;
|
|
304
|
+
align-items: center;
|
|
305
|
+
gap: 2px;
|
|
306
|
+
padding: 16px 12px;
|
|
307
|
+
border-right: var(--border-width-default) solid var(--border);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.cpub-dash-stat:last-child {
|
|
311
|
+
border-right: none;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.cpub-dash-stat-n {
|
|
315
|
+
font-size: 20px;
|
|
316
|
+
font-weight: 700;
|
|
317
|
+
font-family: var(--font-mono);
|
|
318
|
+
color: var(--text);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.cpub-dash-stat-l {
|
|
322
|
+
font-size: 10px;
|
|
323
|
+
font-family: var(--font-mono);
|
|
324
|
+
color: var(--text-faint);
|
|
325
|
+
letter-spacing: 0.06em;
|
|
326
|
+
text-transform: uppercase;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* Tabs */
|
|
330
|
+
.cpub-dash-tabs {
|
|
331
|
+
display: flex;
|
|
332
|
+
gap: 0;
|
|
333
|
+
border-bottom: var(--border-width-default) solid var(--border);
|
|
334
|
+
margin-bottom: 0;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.cpub-dash-tab {
|
|
338
|
+
padding: 10px 18px;
|
|
339
|
+
font-family: var(--font-mono);
|
|
340
|
+
font-size: 11px;
|
|
341
|
+
font-weight: 600;
|
|
342
|
+
letter-spacing: 0.06em;
|
|
343
|
+
text-transform: uppercase;
|
|
344
|
+
color: var(--text-dim);
|
|
345
|
+
background: none;
|
|
346
|
+
border: none;
|
|
347
|
+
border-bottom: 3px solid transparent;
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
transition: color 0.1s;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.cpub-dash-tab:hover {
|
|
353
|
+
color: var(--text);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.cpub-dash-tab.active {
|
|
357
|
+
color: var(--accent);
|
|
358
|
+
border-bottom-color: var(--accent);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* Panel */
|
|
362
|
+
.cpub-dash-panel {
|
|
363
|
+
background: var(--surface);
|
|
364
|
+
border: var(--border-width-default) solid var(--border);
|
|
365
|
+
border-top: none;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.cpub-dash-section {
|
|
369
|
+
border-bottom: var(--border-width-default) solid var(--border);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.cpub-dash-section:last-child {
|
|
373
|
+
border-bottom: none;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.cpub-dash-section-title {
|
|
377
|
+
font-size: 10px;
|
|
378
|
+
font-family: var(--font-mono);
|
|
379
|
+
font-weight: 700;
|
|
380
|
+
letter-spacing: 0.12em;
|
|
381
|
+
text-transform: uppercase;
|
|
382
|
+
color: var(--text-faint);
|
|
383
|
+
padding: 12px 16px 8px;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.cpub-dash-list {
|
|
387
|
+
display: flex;
|
|
388
|
+
flex-direction: column;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.cpub-dash-row {
|
|
392
|
+
display: flex;
|
|
393
|
+
align-items: center;
|
|
394
|
+
gap: 12px;
|
|
395
|
+
padding: 10px 16px;
|
|
396
|
+
border-bottom: var(--border-width-default) solid var(--border2);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.cpub-dash-row:last-child {
|
|
400
|
+
border-bottom: none;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.cpub-dash-row-title {
|
|
404
|
+
flex: 1;
|
|
405
|
+
font-size: 13px;
|
|
406
|
+
font-weight: 500;
|
|
407
|
+
color: var(--text);
|
|
408
|
+
text-decoration: none;
|
|
409
|
+
min-width: 0;
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
text-overflow: ellipsis;
|
|
412
|
+
white-space: nowrap;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.cpub-dash-row-title:hover {
|
|
416
|
+
color: var(--accent);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.cpub-dash-row-removed {
|
|
420
|
+
color: var(--text-faint);
|
|
421
|
+
font-style: italic;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.cpub-dash-row-meta {
|
|
425
|
+
display: flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
gap: 8px;
|
|
428
|
+
font-size: 10px;
|
|
429
|
+
font-family: var(--font-mono);
|
|
430
|
+
color: var(--text-faint);
|
|
431
|
+
flex-shrink: 0;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.cpub-dash-row-actions {
|
|
435
|
+
display: flex;
|
|
436
|
+
align-items: center;
|
|
437
|
+
gap: 4px;
|
|
438
|
+
flex-shrink: 0;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.cpub-dash-action-btn {
|
|
442
|
+
display: inline-flex;
|
|
443
|
+
align-items: center;
|
|
444
|
+
gap: 4px;
|
|
445
|
+
padding: 3px 10px;
|
|
446
|
+
font-family: var(--font-mono);
|
|
447
|
+
font-size: 10px;
|
|
448
|
+
font-weight: 600;
|
|
449
|
+
letter-spacing: 0.04em;
|
|
450
|
+
color: var(--text-faint);
|
|
451
|
+
text-decoration: none;
|
|
452
|
+
background: none;
|
|
453
|
+
border: var(--border-width-default) solid var(--border2);
|
|
454
|
+
cursor: pointer;
|
|
455
|
+
transition: color 0.1s, border-color 0.1s;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.cpub-dash-action-btn:hover {
|
|
459
|
+
color: var(--accent);
|
|
460
|
+
border-color: var(--accent);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.cpub-dash-action-btn--warn {
|
|
464
|
+
color: var(--text-dim);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.cpub-dash-action-btn--warn:hover {
|
|
468
|
+
color: var(--yellow);
|
|
469
|
+
border-color: var(--yellow);
|
|
470
|
+
background: var(--yellow-bg);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.cpub-dash-action-btn--danger:hover {
|
|
474
|
+
color: var(--red);
|
|
475
|
+
border-color: var(--red);
|
|
476
|
+
background: var(--red-bg);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.cpub-dash-action-btn:disabled {
|
|
480
|
+
opacity: 0.5;
|
|
481
|
+
cursor: not-allowed;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.cpub-dash-badge {
|
|
485
|
+
font-size: 10px;
|
|
486
|
+
font-family: var(--font-mono);
|
|
487
|
+
padding: 2px 8px;
|
|
488
|
+
border: var(--border-width-default) solid var(--border2);
|
|
489
|
+
background: var(--surface2);
|
|
490
|
+
color: var(--text-dim);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.cpub-dash-badge--green {
|
|
494
|
+
border-color: var(--green-border);
|
|
495
|
+
background: var(--green-bg);
|
|
496
|
+
color: var(--green);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.cpub-dash-empty {
|
|
500
|
+
padding: 32px 16px;
|
|
501
|
+
text-align: center;
|
|
502
|
+
font-size: 13px;
|
|
503
|
+
color: var(--text-faint);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
@media (max-width: 640px) {
|
|
507
|
+
.cpub-dash-stats {
|
|
508
|
+
flex-wrap: wrap;
|
|
509
|
+
}
|
|
510
|
+
.cpub-dash-stat {
|
|
511
|
+
min-width: 33%;
|
|
512
|
+
}
|
|
513
|
+
.cpub-dash-row {
|
|
514
|
+
flex-wrap: wrap;
|
|
515
|
+
}
|
|
516
|
+
.cpub-dash-row-actions {
|
|
517
|
+
width: 100%;
|
|
518
|
+
margin-top: 4px;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
</style>
|