-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply first submission modal changes (#584)
* apply first submission modal changes * Apply changes * fix submiussions url * fix lint * Fix nuxt versions issues * Add fixed version of nitropack * Attempt to fix build --------- Co-authored-by: Julien Nahum <[email protected]>
- Loading branch information
Showing
9 changed files
with
5,908 additions
and
5,140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<template> | ||
<div | ||
class="border border-nt-blue-light bg-blue-50 dark:bg-notion-dark-light rounded-md p-2 overflow-hidden" | ||
> | ||
<div class="flex items-center w-full gap-2"> | ||
<p class="select-all text-nt-blue flex-grow truncate overflow-hidden"> | ||
<a | ||
v-if="link" | ||
:href="share_url" | ||
target="_blank" | ||
> | ||
{{ share_url }} | ||
</a> | ||
<span v-else> | ||
{{ share_url }} | ||
</span> | ||
</p> | ||
<UButton | ||
class="shrink-0" | ||
size="sm" | ||
icon="i-heroicons-clipboard-document" | ||
label="Copy" | ||
@click="copyToClipboard" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, defineProps } from 'vue' | ||
const props = defineProps({ | ||
form: { | ||
type: Object, | ||
required: true, | ||
}, | ||
link: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
extraQueryParam: { | ||
type: String, | ||
default: '', | ||
}, | ||
}) | ||
const { copy } = useClipboard() | ||
const share_url = computed(() => { | ||
if (props.extraQueryParam) { | ||
return `${props.form.share_url}?${props.extraQueryParam}` | ||
} | ||
return props.form.share_url | ||
}) | ||
function copyToClipboard() { | ||
if (import.meta.server) | ||
return | ||
copy(share_url.value) | ||
if (props.form.visibility == 'draft') { | ||
useAlert().warning( | ||
'Copied! But other people won\'t be able to see the form since it\'s currently in draft mode', | ||
) | ||
} | ||
else { | ||
useAlert().success('Copied!') | ||
} | ||
} | ||
</script> | ||
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
Oops, something went wrong.