-
Notifications
You must be signed in to change notification settings - Fork 0
[feature] ApiClient + Posts Query #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0a2074e
work on http client
gocanto 30c40dd
wip
gocanto 747f898
extract profile fetcher
gocanto 40588b1
.env example
gocanto e9347e3
functions
gocanto b8433e8
move to pinia stores
gocanto 7648b3d
work on cache
gocanto 3f23e46
start working on posts
gocanto 49a807d
connect posts
gocanto 240320f
connect post
gocanto d8f3aed
TS
gocanto a732ae2
post social links
gocanto 3eee768
rock
gocanto 0ed695d
fix types + payloads
gocanto 51256f9
file
gocanto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,16 @@ | ||
| # --- The environment where the api is running under. | ||
| # example: production, local, staging, etc. | ||
| VITE_API_ENV= | ||
|
|
||
| # --- The oullin.io/api URL. | ||
| # https://github.com/oullin/api | ||
| VITE_API_URL= | ||
|
|
||
| # --- The given application registered account name | ||
| VITE_ACCOUNT_NAME= | ||
|
|
||
| # --- The given application public key | ||
| VITE_PUBLIC_KEY= | ||
|
|
||
| # --- The given application API's utilises public cryptography to validate the origin of the requesters. | ||
| VITE_PUBLIC_SIGNATURE= |
This file contains hidden or 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 hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,3 +1,14 @@ | ||
| <template> | ||
| <router-view /> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { onMounted } from 'vue'; | ||
| import { useApiStore } from '@api/store.ts'; | ||
|
|
||
| const apiStore = useApiStore(); | ||
|
|
||
| onMounted(() => { | ||
| apiStore.boot(); | ||
| }); | ||
| </script> |
This file contains hidden or 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,20 @@ | ||
| import { ref, watchEffect } from 'vue'; | ||
|
|
||
| const isDark = ref<boolean>(localStorage.getItem('dark-mode') === 'true'); | ||
|
|
||
| export function useDarkMode() { | ||
| watchEffect(() => { | ||
| localStorage.setItem('dark-mode', String(isDark.value)); | ||
|
|
||
| document.documentElement.classList.toggle('dark', isDark.value); | ||
| }); | ||
gocanto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| function toggleDarkMode(): void { | ||
| isDark.value = !isDark.value; | ||
| } | ||
|
|
||
| return { | ||
| isDark, | ||
| toggleDarkMode, | ||
| }; | ||
| } | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.