-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: support hybrid rendering (#104)
* feat: support hybrid rendering * chore: fixes
- Loading branch information
Showing
17 changed files
with
2,990 additions
and
1,606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<script setup lang="ts"> | ||
const { session } = useUserSession() | ||
</script> | ||
|
||
<template> | ||
<UPageBody> | ||
<pre>{{ session }}</pre> | ||
<AuthState> | ||
<template #default="{ session }"> | ||
<pre>{{ session }}</pre> | ||
</template> | ||
<template #placeholder> | ||
... | ||
</template> | ||
</AuthState> | ||
</UPageBody> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export default eventHandler(async (event) => { | ||
const { password } = await readBody(event) | ||
|
||
if (password !== '123456') { | ||
throw createError({ | ||
statusCode: 401, | ||
message: 'Wrong password', | ||
}) | ||
} | ||
await setUserSession(event, { | ||
user: { | ||
password: 'admin', | ||
}, | ||
loggedInAt: Date.now(), | ||
}) | ||
|
||
return {} | ||
}) |
Oops, something went wrong.