Skip to content

Commit

Permalink
template内のコンポーネントの名称をPascalCaseに変更 (VOICEVOX#1874)
Browse files Browse the repository at this point in the history
* use vue/component-name-in-template-casing rule

* change component name to PascalCase

* 設定変更

* vuedraggableのimportエラーが出てた

* SequencerPitch

* Fix QLayout and QPageContainer casing in wrapQPage function

---------

Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
cm-ayf and Hiroshiba authored Feb 26, 2024
1 parent aa1fdb6 commit d0fcc10
Show file tree
Hide file tree
Showing 57 changed files with 1,213 additions and 1,213 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ module.exports = {
ignoreRestSiblings: true,
},
],
"vue/component-name-in-template-casing": [
"error",
"PascalCase",
{
registeredComponentsOnly: false,
ignores: [],
},
],
"vue/component-tags-order": [
"error",
{
Expand Down
14 changes: 7 additions & 7 deletions src/components/App.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<error-boundary>
<ErrorBoundary>
<!-- TODO: メニューバーをEditorHomeから移動する -->
<router-view v-slot="{ Component }">
<keep-alive>
<component
<RouterView v-slot="{ Component }">
<KeepAlive>
<Component
:is="Component"
:is-engines-ready="isEnginesReady"
:project-file-path="projectFilePath"
/>
</keep-alive>
</router-view>
</error-boundary>
</KeepAlive>
</RouterView>
</ErrorBoundary>
</template>

<script setup lang="ts">
Expand Down
90 changes: 45 additions & 45 deletions src/components/CharacterButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<q-btn
<QBtn
ref="buttonRef"
flat
class="q-pa-none character-button"
Expand All @@ -15,39 +15,39 @@
:src="selectedStyleInfo.iconPath"
:alt="selectedVoiceInfoText"
/>
<q-avatar v-else-if="!emptiable" rounded size="2rem" color="primary"
><span color="text-display-on-primary">?</span></q-avatar
<QAvatar v-else-if="!emptiable" rounded size="2rem" color="primary"
><span color="text-display-on-primary">?</span></QAvatar
>
</div>
<div v-if="loading" class="loading">
<q-spinner color="primary" size="1.6rem" :thickness="7" />
<QSpinner color="primary" size="1.6rem" :thickness="7" />
</div>
<q-menu
<QMenu
class="character-menu"
transition-show="none"
transition-hide="none"
:max-height="maxMenuHeight"
@before-show="updateMenuHeight"
>
<q-list style="min-width: max-content" class="character-item-container">
<q-item
<QList style="min-width: max-content" class="character-item-container">
<QItem
v-if="selectedStyleInfo == undefined && !emptiable"
class="warning-item row no-wrap items-center"
>
<span class="text-warning vertical-middle"
>有効なスタイルが選択されていません</span
>
</q-item>
<q-item
</QItem>
<QItem
v-if="characterInfos.length === 0"
class="warning-item row no-wrap items-center"
>
<span class="text-warning vertical-middle"
>選択可能なスタイルがありません</span
>
</q-item>
<q-item v-if="emptiable" class="to-unselect-item q-pa-none">
<q-btn
</QItem>
<QItem v-if="emptiable" class="to-unselect-item q-pa-none">
<QBtn
v-close-popup
flat
no-caps
Expand All @@ -56,16 +56,16 @@
@click="$emit('update:selectedVoice', undefined)"
>
<span>選択解除</span>
</q-btn>
</q-item>
<q-item
</QBtn>
</QItem>
<QItem
v-for="(characterInfo, characterIndex) in characterInfos"
:key="characterIndex"
class="q-pa-none"
:class="isSelectedItem(characterInfo) && 'selected-character-item'"
>
<q-btn-group flat class="col full-width">
<q-btn
<QBtnGroup flat class="col full-width">
<QBtn
v-close-popup
flat
no-caps
Expand All @@ -74,8 +74,8 @@
@mouseover="reassignSubMenuOpen(-1)"
@mouseleave="reassignSubMenuOpen.cancel()"
>
<q-avatar rounded size="2rem" class="q-mr-md">
<q-img
<QAvatar rounded size="2rem" class="q-mr-md">
<QImg
v-if="characterInfo"
no-spinner
no-transition
Expand All @@ -84,7 +84,7 @@
getDefaultStyle(characterInfo.metas.speakerUuid).iconPath
"
/>
<q-avatar
<QAvatar
v-if="showEngineInfo && characterInfo.metas.styles.length < 2"
class="engine-icon"
rounded
Expand All @@ -97,13 +97,13 @@
]
"
/>
</q-avatar>
</q-avatar>
</QAvatar>
</QAvatar>
<div>{{ characterInfo.metas.speakerName }}</div>
</q-btn>
</QBtn>
<!-- スタイルが2つ以上あるものだけ、スタイル選択ボタンを表示する-->
<template v-if="characterInfo.metas.styles.length >= 2">
<q-separator vertical />
<QSeparator vertical />

<div
class="flex items-center q-px-sm q-py-none cursor-pointer"
Expand All @@ -117,8 +117,8 @@
@mouseleave="reassignSubMenuOpen.cancel()"
@keyup.right="reassignSubMenuOpen(characterIndex)"
>
<q-icon name="keyboard_arrow_right" color="grey-6" size="sm" />
<q-menu
<QIcon name="keyboard_arrow_right" color="grey-6" size="sm" />
<QMenu
v-model="subMenuOpenFlags[characterIndex]"
no-parent-event
anchor="top end"
Expand All @@ -127,8 +127,8 @@
transition-hide="none"
class="character-menu"
>
<q-list style="min-width: max-content">
<q-item
<QList style="min-width: max-content">
<QItem
v-for="(style, styleIndex) in characterInfo.metas.styles"
:key="styleIndex"
v-close-popup
Expand All @@ -151,14 +151,14 @@
})
"
>
<q-avatar rounded size="2rem" class="q-mr-md">
<q-img
<QAvatar rounded size="2rem" class="q-mr-md">
<QImg
no-spinner
no-transition
:ratio="1"
:src="characterInfo.metas.styles[styleIndex].iconPath"
/>
<q-avatar
<QAvatar
v-if="showEngineInfo"
rounded
class="engine-icon"
Expand All @@ -170,26 +170,26 @@
]
"
/>
</q-avatar>
</q-avatar>
<q-item-section v-if="style.styleName"
</QAvatar>
</QAvatar>
<QItemSection v-if="style.styleName"
>{{ characterInfo.metas.speakerName }}({{
style.styleName
}})</q-item-section
}})</QItemSection
>
<q-item-section v-else>{{
<QItemSection v-else>{{
characterInfo.metas.speakerName
}}</q-item-section>
</q-item>
</q-list>
</q-menu>
}}</QItemSection>
</QItem>
</QList>
</QMenu>
</div>
</template>
</q-btn-group>
</q-item>
</q-list>
</q-menu>
</q-btn>
</QBtnGroup>
</QItem>
</QList>
</QMenu>
</QBtn>
</template>

<script setup lang="ts">
Expand Down
46 changes: 23 additions & 23 deletions src/components/Dialog/AcceptRetrieveTelemetryDialog.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<template>
<q-dialog
<QDialog
v-model="modelValueComputed"
maximized
transition-show="jump-up"
transition-hide="jump-down"
class="accept-retrieve-telemetry-dialog transparent-backdrop"
>
<q-layout container view="hHh Lpr lff" class="bg-background">
<q-header class="q-py-sm">
<q-toolbar>
<QLayout container view="hHh Lpr lff" class="bg-background">
<QHeader class="q-py-sm">
<QToolbar>
<div class="column">
<q-toolbar-title class="text-display"
>使いやすさ向上のためのお願い</q-toolbar-title
<QToolbarTitle class="text-display"
>使いやすさ向上のためのお願い</QToolbarTitle
>
</div>

<q-space />
<QSpace />

<div class="row items-center no-wrap">
<q-btn
<QBtn
unelevated
label="拒否"
color="toolbar-button"
Expand All @@ -27,7 +27,7 @@
@click="handler(false)"
/>

<q-btn
<QBtn
unelevated
label="許可"
color="toolbar-button"
Expand All @@ -36,32 +36,32 @@
@click="handler(true)"
/>
</div>
</q-toolbar>
</q-header>
</QToolbar>
</QHeader>

<q-page-container>
<q-page>
<QPageContainer>
<QPage>
<p class="text-body1 q-mb-lg">
VOICEVOXはより使いやすいソフトウェアを目指して開発されています。<br /><br />
ボタンの配置換えなどの方針を決める際は、各UIの利用率などの情報が重要になります。<br />
もしよろしければ、ソフトウェアの利用状況のデータ収集にご協力お願いします。<br />
<br />
(入力されたテキストデータや音声データの情報は収集しておりませんのでご安心ください。)
</p>
<q-card flat bordered>
<q-card-section>
<QCard flat bordered>
<QCardSection>
<div class="text-h5">プライバシーポリシー</div>
</q-card-section>
</QCardSection>

<q-card-section class="text-body1">
<QCardSection class="text-body1">
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="privacyPolicy"></div>
</q-card-section>
</q-card>
</q-page>
</q-page-container>
</q-layout>
</q-dialog>
</QCardSection>
</QCard>
</QPage>
</QPageContainer>
</QLayout>
</QDialog>
</template>

<script setup lang="ts">
Expand Down
Loading

0 comments on commit d0fcc10

Please sign in to comment.