-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
740 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<style lang="scss"> | ||
</style> | ||
|
||
<script lang="ts"> | ||
</script> | ||
|
||
<template> | ||
<slot name="toggle" ref="toggle"></slot> | ||
<slot name="dropdown" ref="dropdown" class="dropdown"></slot> | ||
</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,5 @@ | ||
<template> | ||
<div class="error"> | ||
<slot></slot> | ||
</div> | ||
</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
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,20 @@ | ||
const AUTHOR = "wrapper-offline"; | ||
const MAIN_REPO = "wrapper-offline"; | ||
|
||
async function get(tag:string) { | ||
const url = `https://api.github.com/repos/${AUTHOR}/${MAIN_REPO}/releases/${ | ||
tag == "latest" ? "latest" : "tags/" + tag | ||
}`; | ||
const response = await fetch(url); | ||
|
||
if (!response.ok) { | ||
throw new Error(`status:${response.status}`); | ||
} else { | ||
const release = await response.json(); | ||
return release; | ||
} | ||
} | ||
|
||
export default function useRelease() { | ||
return { get }; | ||
}; |
Oops, something went wrong.