mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 08:14:30 -04:00
feat: public recipe access (#1610)
* initial public explorer API endpoint * public API endpoint * cleanup recipe page * wip: init explorer page * use public URLs for shared recipes * refactor private share tokens to use shared page
This commit is contained in:
@@ -1,6 +1,21 @@
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { alert } from "./use-toast";
|
||||
|
||||
export function useCopy() {
|
||||
const { copy, copied, isSupported } = useClipboard();
|
||||
|
||||
function copyText(text: string) {
|
||||
if (!isSupported) {
|
||||
alert.error("Clipboard not supported");
|
||||
return;
|
||||
}
|
||||
copy(text);
|
||||
alert.success("Copied to clipboard");
|
||||
}
|
||||
|
||||
return { copyText, copied };
|
||||
}
|
||||
|
||||
export function useCopyList() {
|
||||
const { copy, isSupported } = useClipboard();
|
||||
|
||||
@@ -46,4 +61,3 @@ export function useCopyList() {
|
||||
copyMarkdownCheckList,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user