Compare commits
1 Commits
v0.1.5
...
84138e09b1
| Author | SHA1 | Date | |
|---|---|---|---|
| 84138e09b1 |
@@ -1,65 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## v0.1.5
|
|
||||||
|
|
||||||
[compare changes](https://gitea.websimple.com/templates/wp-headless/compare/v0.1.4...v0.1.5)
|
|
||||||
|
|
||||||
### 🩹 Fixes
|
|
||||||
|
|
||||||
- Auth server utils upgrade to latest nuxt-graphql (fd61895)
|
|
||||||
- Immutable extractNodes (baa3061)
|
|
||||||
- Type issue with NodePage (3b706c0)
|
|
||||||
|
|
||||||
## v0.1.4
|
|
||||||
|
|
||||||
[compare changes](https://gitea.websimple.com/templates/wp-headless/compare/v0.1.2...v0.1.4)
|
|
||||||
|
|
||||||
### 🚀 Enhancements
|
|
||||||
|
|
||||||
- Initial NodeByUri logic and frontend (688c4e3)
|
|
||||||
- BuilderSections component (2b9a875)
|
|
||||||
- LaoutContained (c7f6cca)
|
|
||||||
- LayoutContained section wrapper (12048ff)
|
|
||||||
- Initial typography / prose styles (764bc6a)
|
|
||||||
- UiProse prose component with link highjacking (40becf1)
|
|
||||||
- TinyMCE WYSIWYG editor styles (8e26f19)
|
|
||||||
- Login / logout toast (2d0b176)
|
|
||||||
- Hide title on front page (5e0df22)
|
|
||||||
|
|
||||||
### 🩹 Fixes
|
|
||||||
|
|
||||||
- Fatal 404 (bfb5ae3)
|
|
||||||
|
|
||||||
### 💅 Refactors
|
|
||||||
|
|
||||||
- Update to nuxt-graphql 0.5.x (e383255)
|
|
||||||
- /api/login route (9d99770)
|
|
||||||
|
|
||||||
## v0.1.3
|
|
||||||
|
|
||||||
[compare changes](https://gitea.websimple.com/templates/wp-headless/compare/v0.1.2...v0.1.3)
|
|
||||||
|
|
||||||
### 🚀 Enhancements
|
|
||||||
|
|
||||||
- Initial NodeByUri logic and frontend (688c4e3)
|
|
||||||
- BuilderSections component (2b9a875)
|
|
||||||
- LaoutContained (c7f6cca)
|
|
||||||
- LayoutContained section wrapper (12048ff)
|
|
||||||
- Initial typography / prose styles (764bc6a)
|
|
||||||
- UiProse prose component with link highjacking (40becf1)
|
|
||||||
- TinyMCE WYSIWYG editor styles (8e26f19)
|
|
||||||
- Login / logout toast (2d0b176)
|
|
||||||
- Hide title on front page (5e0df22)
|
|
||||||
|
|
||||||
### 🩹 Fixes
|
|
||||||
|
|
||||||
- Fatal 404 (bfb5ae3)
|
|
||||||
|
|
||||||
### 💅 Refactors
|
|
||||||
|
|
||||||
- Update to nuxt-graphql 0.5.x (e383255)
|
|
||||||
- /api/login route (9d99770)
|
|
||||||
|
|
||||||
## v0.1.2
|
## v0.1.2
|
||||||
|
|
||||||
[compare changes](https://gitea.websimple.com/templates/wp-headless/compare/v0.1.1...v0.1.2)
|
[compare changes](https://gitea.websimple.com/templates/wp-headless/compare/v0.1.1...v0.1.2)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { BuilderSectionsFragment } from "#graphql/operations";
|
import type { BuilderSectionsFragment } from "#graphql/fragments";
|
||||||
|
|
||||||
const props = defineProps<BuilderSectionsFragment>();
|
const props = defineProps<BuilderSectionsFragment>();
|
||||||
const sections = computed(() => {
|
const sections = computed(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { LayoutContainedFragment } from "#graphql/operations";
|
import type { LayoutContainedFragment } from "#graphql/fragments";
|
||||||
import { tv, type VariantProps } from "tailwind-variants";
|
import { tv, type VariantProps } from "tailwind-variants";
|
||||||
|
|
||||||
const props = defineProps<LayoutContainedFragment>();
|
const props = defineProps<LayoutContainedFragment>();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { NodePageFragment } from "#graphql/operations";
|
import type { NodePageFragment } from "#graphql/fragments";
|
||||||
|
|
||||||
defineProps<NodePageFragment>();
|
defineProps<NodePageFragment>();
|
||||||
</script>
|
</script>
|
||||||
@@ -9,6 +9,6 @@ defineProps<NodePageFragment>();
|
|||||||
<h1 v-if="!isFrontPage" class="font-bold text-4xl">
|
<h1 v-if="!isFrontPage" class="font-bold text-4xl">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
<BuilderSections :sections="groupPostPage?.sections || []" />
|
<BuilderSections v-bind="groupPostPage" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { SectionTextBlockFragment } from "#graphql/operations";
|
import type { SectionTextBlockFragment } from "#graphql/fragments";
|
||||||
|
|
||||||
defineProps<SectionTextBlockFragment>();
|
defineProps<SectionTextBlockFragment>();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@lewebsimple/moonshine",
|
"name": "@lewebsimple/moonshine",
|
||||||
"description": "Headless WordPress theme based on Nuxt.",
|
"description": "Headless WordPress theme based on Nuxt.",
|
||||||
"version": "0.1.5",
|
"version": "0.1.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -12,12 +12,12 @@
|
|||||||
"postinstall": "pnpm --sequential /postinstall:.*/",
|
"postinstall": "pnpm --sequential /postinstall:.*/",
|
||||||
"postinstall:nuxt": "nuxt prepare",
|
"postinstall:nuxt": "nuxt prepare",
|
||||||
"preview": "nuxt preview",
|
"preview": "nuxt preview",
|
||||||
"release": "pnpm lint && changelogen --noAuthors --release --push",
|
"release": "pnpm lint && pnpm typecheck && changelogen --noAuthors --release --push",
|
||||||
"typecheck": "nuxt typecheck"
|
"typecheck": "nuxt typecheck"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify-json/lucide": "^1.2.86",
|
"@iconify-json/lucide": "^1.2.86",
|
||||||
"@lewebsimple/nuxt-graphql": "^0.5.10",
|
"@lewebsimple/nuxt-graphql": "^0.5.2",
|
||||||
"@nuxt/ui": "4.3.0",
|
"@nuxt/ui": "4.3.0",
|
||||||
"@nuxtjs/seo": "^3.3.0",
|
"@nuxtjs/seo": "^3.3.0",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
@@ -46,4 +46,4 @@
|
|||||||
"chore": false
|
"chore": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
687
wp-content/themes/moonshine/pnpm-lock.yaml
generated
687
wp-content/themes/moonshine/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,15 @@ import type { H3Event } from "h3";
|
|||||||
import { GraphQLClient } from "graphql-request";
|
import { GraphQLClient } from "graphql-request";
|
||||||
import { jwtDecode } from "jwt-decode";
|
import { jwtDecode } from "jwt-decode";
|
||||||
import type { User } from "#auth-utils";
|
import type { User } from "#auth-utils";
|
||||||
import type { AuthUserFragment, AuthLoginMutationResult } from "#graphql/operations";
|
import type { AuthUserFragment } from "#graphql/fragments";
|
||||||
import { AuthRefreshTokenDocument } from "#graphql/operations";
|
import { AuthRefreshTokenDocument, type AuthLoginResult } from "#graphql/operations";
|
||||||
|
|
||||||
// Handle login result and store user session
|
// Handle login result and store user session
|
||||||
export async function handleLogin(event: H3Event, loginResult: AuthLoginMutationResult) {
|
export async function handleLogin(event: H3Event, loginData: AuthLoginResult) {
|
||||||
if (!loginResult?.login) {
|
if (!loginData?.login) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const { user, authToken, refreshToken } = loginResult.login;
|
const { user, authToken, refreshToken } = loginData.login;
|
||||||
if (!user || !authToken || !refreshToken) {
|
if (!user || !authToken || !refreshToken) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
|
// Helper: Extracts nodes from a GraphQL connection object, returning an empty array if nodes are absent.
|
||||||
export function extractNodes<T>(connection: { nodes?: readonly T[] } | null | undefined): readonly T[] {
|
export function extractNodes<T>(connection: { nodes?: T[] } | null | undefined): T[] {
|
||||||
return connection?.nodes ?? [];
|
return connection?.nodes || [] as T[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user