File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 88 class =" input join-item w-full"
99 :placeholder =" inputPlaceholder"
1010 type =" text"
11+ ref =" input"
1112 />
1213 <button
1314 class =" btn btn-primary join-item"
2829
2930import { CogIcon } from ' @heroicons/vue/24/outline' ;
3031import { useMediaStore } from ' ../stores/media/media' ;
31- import { ref , computed } from ' vue' ;
32+ import { ref , computed , onMounted } from ' vue' ;
3233import { useClipboard } from ' ../composables/useClipboard' ;
3334import { useRouter } from ' vue-router' ;
3435import { useI18n } from ' vue-i18n' ;
@@ -46,6 +47,8 @@ const { content: clipboardContent } = useClipboard({
4647 doPolling ,
4748});
4849
50+ const input = ref <HTMLInputElement | null >(null );
51+
4952const inputPlaceholder = computed (() => {
5053 const defaultPlaceholder = t (' layout.header.placeholder' );
5154 if (clipboardHasValidUrl .value ) {
@@ -79,4 +82,8 @@ const submitUrl = () => {
7982 void router .push (' /' );
8083};
8184
85+ onMounted (() => {
86+ input .value ?.focus ();
87+ });
88+
8289 </script >
You can’t perform that action at this time.
0 commit comments