Skip to content

Commit

Permalink
mouseDown to mousedown
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed May 26, 2024
1 parent 7a81c58 commit 74ac73f
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion components/ving/CopyToClipboard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Button v-if="isBrowserSupported" :class="buttonClass" alt="copy to clipboard" title="Copy to Clipboard" @mouseDown="copyToClipboard(text)">
<Button v-if="isBrowserSupported" :class="buttonClass" alt="copy to clipboard" title="Copy to Clipboard" @mousedown="copyToClipboard(text)">
<Icon name="fa-regular:copy" />
</Button>
</template>
Expand Down
6 changes: 3 additions & 3 deletions components/ving/ManageButton.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<Button v-if="items.length == 1" @mouseDown="takeAction($event, firstItem)" :severity="severity" class="white-space-nowrap">
<Button v-if="items.length == 1" @mousedown="takeAction($event, firstItem)" :severity="severity" class="white-space-nowrap">
<Icon :name="firstItem.icon" class="mr-1 vertical-align-middle" />
<span class="vertical-align-middle">{{ firstItem.label }}</span>
</Button>
<SplitButton v-else-if="items.length > 1" :severity="severity" :model="otherItems" @mouseDown="takeAction($event, firstItem)" class="white-space-nowrap">
<SplitButton v-else-if="items.length > 1" :severity="severity" :model="otherItems" @mousedown="takeAction($event, firstItem)" class="white-space-nowrap">
<span>
<Icon :name="firstItem.icon" :title="firstItem.label" class="mr-1 vertical-align-middle" />
<span class="vertical-align-middle">{{ firstItem.label }}</span>
</span>
<template #item="{ item }">
<span @mouseDown="takeAction($event, item)" class="flex p-2 align-items-center" :title="item.label">
<span @mousedown="takeAction($event, item)" class="flex p-2 align-items-center" :title="item.label">
<Icon :name="item.icon" class="mr-1" />
{{ item.label }}
</span>
Expand Down
2 changes: 1 addition & 1 deletion components/ving/PanelNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</li>
<li v-if="links.length && buttons.length"><hr class="mt-2 mb-3 border-50 hidden lg:block"></li>
<li v-for="item in buttons" :key="item.label" class="lg:mb-2 p-fluid">
<Button @mouseDown="takeAction($event, item)" :severity="item.severity" :title="item.label">
<Button @mousedown="takeAction($event, item)" :severity="item.severity" :title="item.label">
<Icon :name="item.icon" class="mr-1" /> <span class="hidden md:block white-space-nowrap">{{ item.label }}</span>
</Button>
</li>
Expand Down
2 changes: 1 addition & 1 deletion error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p class="text-700 text-3xl mt-0 mb-6">{{ error?.message || "" }}</p>
<p class="text-700 text-3xl mt-0 mb-6">{{ error?.description || "" }}</p>
<NuxtLink to="/" v-slot="{ navigate }" custom>
<Button @mouseDown="navigate" type="button" label="Go back to home page"></Button>
<Button @mousedown="navigate" type="button" label="Go back to home page"></Button>
</NuxtLink>
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Title>{{ config.public?.site?.name }}</Title>
homepage goes here
<Button @mouseDown="doit()">Doit</Button>
<Button @mousedown="doit()">Doit</Button>
</template>

<script setup>
Expand Down
4 changes: 2 additions & 2 deletions pages/system-wide-alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</div>
</div>

<Button @mouseDown="swa.post()" severity="success" class="mr-2">Save System Wide Alert</Button>
<Button v-if="swa.message" @mouseDown="swa.delete()" severity="danger" class="mr-2">Delete System Wide Alert</Button>
<Button @mousedown="swa.post()" severity="success" class="mr-2">Save System Wide Alert</Button>
<Button v-if="swa.message" @mousedown="swa.delete()" severity="danger" class="mr-2">Delete System Wide Alert</Button>

</PanelZone>
</template>
Expand Down
4 changes: 2 additions & 2 deletions pages/user/admin/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
</FieldsetItem>

<FieldsetItem name="Actions">
<Button @mouseDown="user.delete()" severity="danger" class="mr-2 mb-2" title="Delete" alt="Delete User"><Icon
<Button @mousedown="user.delete()" severity="danger" class="mr-2 mb-2" title="Delete" alt="Delete User"><Icon
name="ph:trash" class="mr-1"/> Delete</Button>
<Button @mouseDown="become" severity="warning" class="mr-2 mb-2" title="Become" alt="Become User">
<Button @mousedown="become" severity="warning" class="mr-2 mb-2" title="Become" alt="Become User">
<Icon name="bi:arrow-left-right" class="mr-1"/> Become</Button>
<NuxtLink :to="'/user/' + user.props.id + '/profile'" v-ripple>
<Button severity="primary" class="mr-2 mb-2" title="View Profile">
Expand Down
2 changes: 1 addition & 1 deletion pages/user/admin/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</InputGroupAddon>
<InputText type="text" placeholder="Search Users" class="w-full" v-model="users.query.search"
@keydown.enter="users.search()" />
<Button label="Search" @mouseDown="users.search()" />
<Button label="Search" @mousedown="users.search()" />
</InputGroup>

<DataTable :value="users.records" stripedRows @sort="users.sortDataTable">
Expand Down
2 changes: 1 addition & 1 deletion pages/user/logout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>You are now logged out.</p>

<NuxtLink to="/" v-slot="{ navigate }" custom>
<Button @mouseDown="navigate" type="button" label="Return to home page" class="p-button-outlined mt-5"></Button>
<Button @mousedown="navigate" type="button" label="Return to home page" class="p-button-outlined mt-5"></Button>
</NuxtLink>
</template>

Expand Down
2 changes: 1 addition & 1 deletion pages/user/settings/apikeys.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</InputGroupAddon>
<InputText type="text" placeholder="Search API Keys" class="w-full"
v-model="apikeys.query.search" @keydown.enter="apikeys.search()" />
<Button label="Search" @mouseDown="apikeys.search()" />
<Button label="Search" @mousedown="apikeys.search()" />
</InputGroup>

<DataTable :value="apikeys.records" stripedRows
Expand Down
2 changes: 1 addition & 1 deletion ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ outline: deep
## May 2024

### 2024-05-26
* Implemented: @click should become @mouseDown #154
* Implemented: @click should become @mousedown #154

### 2024-05-22
* Fixed: leaking id in robot avatar #153
Expand Down
6 changes: 3 additions & 3 deletions ving/generator/nuxtpages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const indexTemplate = ({ name, schema }) =>
</InputGroupAddon>
<InputText type="text" placeholder="${makeWords(name)}s" class="w-full"
v-model="${schema.tableName}.query.search" @keydown.enter="${schema.tableName}.search()" />
<Button label="Search" @mouseDown="${schema.tableName}.search()" />
<Button label="Search" @mousedown="${schema.tableName}.search()" />
</InputGroup>
<DataTable :value="${schema.tableName}.records" stripedRows @sort="(e) => ${schema.tableName}.sortDataTable(e)">
Expand Down Expand Up @@ -254,7 +254,7 @@ const viewTemplate = ({ name, schema }) =>
<NuxtLink :to="\`/${name.toLowerCase()}/\${${name.toLowerCase()}.props?.id}/edit\`" class="no-underline mr-2 mb-2">
<Button severity="success" title="Edit" alt="Edit ${makeWords(name)}"><Icon name="ph:pencil" class="mr-1"/> Edit</Button>
</NuxtLink>
<Button @mouseDown="${name.toLowerCase()}.delete()" severity="danger" title="Delete" alt="Delete ${makeWords(name)}"><Icon name="ph:trash" class="mr-1"/> Delete</Button>
<Button @mousedown="${name.toLowerCase()}.delete()" severity="danger" title="Delete" alt="Delete ${makeWords(name)}"><Icon name="ph:trash" class="mr-1"/> Delete</Button>
</div>
</template>
</PanelFrame>
Expand Down Expand Up @@ -346,7 +346,7 @@ const editTemplate = ({ name, schema }) =>
<NuxtLink :to="\`/${name.toLowerCase()}/\${${name.toLowerCase()}.props?.id}\`" class="no-underline">
<Button title="View" alt="View ${makeWords(name)}" class="mr-2 mb-2"><Icon name="ph:eye" class="mr-1"/> View</Button>
</NuxtLink>
<Button @mouseDown="${name.toLowerCase()}.delete()" severity="danger" class="mr-2 mb-2" title="Delete" alt="Delete ${makeWords(name)}"><Icon name="ph:trash" class="mr-1"/> Delete</Button>
<Button @mousedown="${name.toLowerCase()}.delete()" severity="danger" class="mr-2 mb-2" title="Delete" alt="Delete ${makeWords(name)}"><Icon name="ph:trash" class="mr-1"/> Delete</Button>
</FieldsetItem>
</FieldsetNav>
</template>
Expand Down

0 comments on commit 74ac73f

Please sign in to comment.