-
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.
feat: reworked ui for selector proposals
- Loading branch information
Showing
9 changed files
with
342 additions
and
145 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,72 @@ | ||
<script lang="ts" setup> | ||
import {ClickProposal} from "../gtm-proposals/ClickProposal.js"; | ||
import ProposalDetails from "./ProposalDetails.vue"; | ||
import {getMessage} from 'vite-plugin-vue-chrome-i18n/getMessage.js' | ||
import {IconMouse} from "@iconify-prerendered/vue-mdi"; | ||
defineProps<{ | ||
proposal: ClickProposal | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<ProposalDetails :icon="{color: 'oklch(0.734 0.145 234.615)', component: IconMouse}" :label="getMessage('label')"> | ||
<div class="grid-container"> | ||
<div class="bordered">Click Element</div> | ||
<div class="bordered">{{ getMessage('match_css_selector') }}</div> | ||
<input :value="proposal.selectorValue" class="bordered" readonly type="text"> | ||
</div> | ||
</ProposalDetails> | ||
</template> | ||
|
||
|
||
<chrome-i18n locale="uk"> | ||
{ | ||
"$schema": "https://json.schemastore.org/browser.i18n.json", | ||
"label": { | ||
"message": "Клік: усі елементи" | ||
}, | ||
"match_css_selector": { | ||
"message": "відповідає вибору CSS" | ||
} | ||
} | ||
</chrome-i18n> | ||
|
||
|
||
<chrome-i18n locale="en"> | ||
{ | ||
"$schema": "https://json.schemastore.org/browser.i18n.json", | ||
"label": { | ||
"message": "Click: All Elements" | ||
}, | ||
"match_css_selector": { | ||
"message": "matches CSS selector" | ||
} | ||
} | ||
</chrome-i18n> | ||
|
||
|
||
<style scoped> | ||
.grid-container { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
gap: 5px; | ||
} | ||
.bordered { | ||
height: 40px; | ||
border: solid 1px oklch(0.894 0.006 264.53); | ||
border-radius: 4px; | ||
padding-left: 12px; | ||
padding-right: 12px; | ||
line-height: 38px; | ||
width: 100%; | ||
font-size: 15px; | ||
} | ||
input { | ||
grid-column-start: 1; | ||
grid-column-end: -1; | ||
} | ||
</style> |
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,74 @@ | ||
<script lang="ts" setup> | ||
import {ClickLinkProposal} from "../gtm-proposals/ClickLinkProposal.js"; | ||
import {VisibilityProposal} from "../gtm-proposals/VisibilityProposal.js"; | ||
import {FormProposal} from "../gtm-proposals/FormProposal.js"; | ||
import {ClickProposal} from "../gtm-proposals/ClickProposal.js"; | ||
import ProposalDetails from "./ProposalDetails.vue"; | ||
import {getMessage} from 'vite-plugin-vue-chrome-i18n/getMessage.js' | ||
import {IconLink, IconMouse} from "@iconify-prerendered/vue-mdi"; | ||
defineProps<{ | ||
proposal: ClickLinkProposal | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<ProposalDetails :icon="{color: 'oklch(0.734 0.145 234.615)', component: IconLink}" :label="getMessage('label')"> | ||
<div class="grid-container"> | ||
<div class="bordered">Click Element</div> | ||
<div class="bordered">{{ getMessage('match_css_selector') }}</div> | ||
<input :value="proposal.selectorValue" class="bordered" readonly type="text"> | ||
</div> | ||
</ProposalDetails> | ||
</template> | ||
|
||
|
||
<chrome-i18n locale="uk"> | ||
{ | ||
"$schema": "https://json.schemastore.org/browser.i18n.json", | ||
"label": { | ||
"message": "Клік: лише посилання" | ||
}, | ||
"match_css_selector": { | ||
"message": "відповідає вибору CSS" | ||
} | ||
} | ||
</chrome-i18n> | ||
|
||
|
||
<chrome-i18n locale="en"> | ||
{ | ||
"$schema": "https://json.schemastore.org/browser.i18n.json", | ||
"label": { | ||
"message": "Click: Just Links" | ||
}, | ||
"match_css_selector": { | ||
"message": "matches CSS selector" | ||
} | ||
} | ||
</chrome-i18n> | ||
|
||
<style scoped> | ||
.grid-container { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
gap: 5px; | ||
} | ||
.bordered { | ||
height: 40px; | ||
border: solid 1px oklch(0.894 0.006 264.53); | ||
border-radius: 4px; | ||
padding-left: 12px; | ||
padding-right: 12px; | ||
line-height: 38px; | ||
width: 100%; | ||
font-size: 15px; | ||
} | ||
input { | ||
grid-column-start: 1; | ||
grid-column-end: -1; | ||
} | ||
</style> |
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,73 @@ | ||
<script lang="ts" setup> | ||
import {ClickProposal} from "../gtm-proposals/ClickProposal.js"; | ||
import ProposalDetails from "./ProposalDetails.vue"; | ||
import {getMessage} from 'vite-plugin-vue-chrome-i18n/getMessage.js' | ||
import {IconPlaylistCheck} from "@iconify-prerendered/vue-mdi"; | ||
defineProps<{ | ||
proposal: ClickProposal | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<ProposalDetails :icon="{color: 'oklch(0.754 0.163 130.502)', component: IconPlaylistCheck}" | ||
:label="getMessage('label')"> | ||
<div class="grid-container"> | ||
<div class="bordered">Form Element</div> | ||
<div class="bordered">{{ getMessage('match_css_selector') }}</div> | ||
<input :value="proposal.selectorValue" class="bordered" readonly type="text"> | ||
</div> | ||
</ProposalDetails> | ||
</template> | ||
|
||
|
||
<chrome-i18n locale="uk"> | ||
{ | ||
"$schema": "https://json.schemastore.org/browser.i18n.json", | ||
"label": { | ||
"message": "Надсилання форми" | ||
}, | ||
"match_css_selector": { | ||
"message": "відповідає вибору CSS" | ||
} | ||
} | ||
</chrome-i18n> | ||
|
||
|
||
<chrome-i18n locale="en"> | ||
{ | ||
"$schema": "https://json.schemastore.org/browser.i18n.json", | ||
"label": { | ||
"message": "Form Submission" | ||
}, | ||
"match_css_selector": { | ||
"message": "matches CSS selector" | ||
} | ||
} | ||
</chrome-i18n> | ||
|
||
|
||
<style scoped> | ||
.grid-container { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
gap: 5px; | ||
} | ||
.bordered { | ||
height: 40px; | ||
border: solid 1px oklch(0.894 0.006 264.53); | ||
border-radius: 4px; | ||
padding-left: 12px; | ||
padding-right: 12px; | ||
line-height: 38px; | ||
width: 100%; | ||
font-size: 15px; | ||
} | ||
input { | ||
grid-column-start: 1; | ||
grid-column-end: -1; | ||
} | ||
</style> |
Oops, something went wrong.