From 4dd85b837cd1c0290bb1f01d445d6e797ac7941d Mon Sep 17 00:00:00 2001 From: jdkfx Date: Wed, 21 Aug 2024 13:09:17 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E7=B7=A8=E9=9B=86=E3=81=AB=E9=96=A2?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=A8=E5=87=A6=E7=90=86=E3=82=92=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialog/DictionaryEditWordDialog.vue | 479 ++++++++++++++++++ .../Dialog/DictionaryManageDialog.vue | 462 ++--------------- 2 files changed, 530 insertions(+), 411 deletions(-) create mode 100644 src/components/Dialog/DictionaryEditWordDialog.vue diff --git a/src/components/Dialog/DictionaryEditWordDialog.vue b/src/components/Dialog/DictionaryEditWordDialog.vue new file mode 100644 index 0000000000..a54cb44c11 --- /dev/null +++ b/src/components/Dialog/DictionaryEditWordDialog.vue @@ -0,0 +1,479 @@ + + + + + diff --git a/src/components/Dialog/DictionaryManageDialog.vue b/src/components/Dialog/DictionaryManageDialog.vue index 2d4c1dcfb0..91c01b5d6f 100644 --- a/src/components/Dialog/DictionaryManageDialog.vue +++ b/src/components/Dialog/DictionaryManageDialog.vue @@ -117,168 +117,32 @@ -
-
-
単語
- - - -
-
-
読み
- - - - -
-
アクセント調整
-
- 語尾のアクセントを考慮するため、「が」が自動で挿入されます。 -
-
-
- - -
-
-
- - -
-
-
-
単語優先度
-
- 単語を登録しても反映されない場合は優先度を高くしてください。 -
-
- -
-
- - リセット - キャンセル - 保存 -
-
+ @@ -287,12 +151,8 @@ From b30df751d2d5b908dd67d625e833dc183291388e Mon Sep 17 00:00:00 2001 From: jdkfx Date: Wed, 21 Aug 2024 13:24:15 +0900 Subject: [PATCH 2/3] =?UTF-8?q?style=E9=83=A8=E5=88=86=E3=82=92=E6=88=BB?= =?UTF-8?q?=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialog/DictionaryEditWordDialog.vue | 85 ------------------- .../Dialog/DictionaryManageDialog.vue | 80 +++++++++++++++++ 2 files changed, 80 insertions(+), 85 deletions(-) diff --git a/src/components/Dialog/DictionaryEditWordDialog.vue b/src/components/Dialog/DictionaryEditWordDialog.vue index a54cb44c11..9a3063c1d4 100644 --- a/src/components/Dialog/DictionaryEditWordDialog.vue +++ b/src/components/Dialog/DictionaryEditWordDialog.vue @@ -392,88 +392,3 @@ const { endContextMenuOperation: endYomiContextMenuOperation, } = useRightClickContextMenu(yomiContextMenu, yomiInput, yomiRef); - - diff --git a/src/components/Dialog/DictionaryManageDialog.vue b/src/components/Dialog/DictionaryManageDialog.vue index 91c01b5d6f..0ef14df891 100644 --- a/src/components/Dialog/DictionaryManageDialog.vue +++ b/src/components/Dialog/DictionaryManageDialog.vue @@ -498,4 +498,84 @@ const toDialogClosedState = () => { position: absolute; z-index: 10; } + +.word-editor { + display: flex; + flex-flow: column; + height: calc( + 100vh - #{vars.$menubar-height + vars.$toolbar-height + + vars.$window-border-width} + ) !important; + overflow: auto; +} + +.word-input { + padding-left: 10px; + width: calc(66vw - 80px); + + :deep(.q-field__control) { + height: 2rem; + } + + :deep(.q-placeholder) { + padding: 0; + font-size: 20px; + } + + :deep(.q-field__after) { + height: 2rem; + } +} + +.desc-row { + color: rgba(colors.$display-rgb, 0.5); + font-size: 12px; +} + +.play-button { + margin: auto 0; + padding-right: 16px; +} + +.accent-phrase-table { + flex-grow: 1; + align-self: stretch; + + display: flex; + height: 130px; + overflow-x: scroll; + width: calc(66vw - 140px); + + .mora-table { + display: inline-grid; + align-self: stretch; + grid-template-rows: 1fr 60px 30px; + + .text-cell { + padding: 0; + min-width: 20px; + max-width: 20px; + grid-row-start: 3; + text-align: center; + white-space: nowrap; + color: colors.$display; + position: relative; + } + + .splitter-cell { + min-width: 20px; + max-width: 20px; + grid-row: 3 / span 1; + z-index: vars.$detail-view-splitter-cell-z-index; + } + } +} + +.save-delete-reset-buttons { + padding: 20px; + + display: flex; + flex: 1; + align-items: flex-end; +} From 595a694a5669d6da1e1f6ad4493c4ed25304bbba Mon Sep 17 00:00:00 2001 From: jdkfx Date: Wed, 21 Aug 2024 15:21:07 +0900 Subject: [PATCH 3/3] =?UTF-8?q?props=E3=81=A7=E6=B8=A1=E3=81=99=E5=A4=89?= =?UTF-8?q?=E6=95=B0=E3=81=AE=E5=9E=8B=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialog/DictionaryEditWordDialog.vue | 115 ++++++++++++++++-- .../Dialog/DictionaryManageDialog.vue | 111 +++-------------- 2 files changed, 122 insertions(+), 104 deletions(-) diff --git a/src/components/Dialog/DictionaryEditWordDialog.vue b/src/components/Dialog/DictionaryEditWordDialog.vue index 9a3063c1d4..4934817f06 100644 --- a/src/components/Dialog/DictionaryEditWordDialog.vue +++ b/src/components/Dialog/DictionaryEditWordDialog.vue @@ -4,10 +4,11 @@
単語
読み + + diff --git a/src/components/Dialog/DictionaryManageDialog.vue b/src/components/Dialog/DictionaryManageDialog.vue index 0ef14df891..aeb285a775 100644 --- a/src/components/Dialog/DictionaryManageDialog.vue +++ b/src/components/Dialog/DictionaryManageDialog.vue @@ -129,16 +129,17 @@ :wordPriority :uiLocked :userDict - @setYomi="setYomi" - @createUILockAction="createUILockAction" - @loadingDictProcess="loadingDictProcess" - @computeRegisteredAccent="computeRegisteredAccent" - @discardOrNotDialog="discardOrNotDialog" - @toWordEditingState="toWordEditingState" - @cancel="cancel" - @toInitialState="toInitialState" + :setYomi + :createUILockAction + :loadingDictProcess + :computeRegisteredAccent + :discardOrNotDialog + :toWordEditingState + :cancel + :toInitialState @updateSelectedId="updateSelectedId" - @updateSurface="updateSurface" + @updateSurface="onUpdateSurface" + @onUpdateYomi="onUpdateYomi" @updateAccentPhraseValue="updateAccentPhraseValueAccent" @updateAccentPhrase="updateAccentPhrase" @updateWordPriority="updateWordPriority" @@ -235,8 +236,16 @@ const updateSelectedId = (newId: string) => { selectedId.value = newId; }; -const updateSurface = (newSurface: string) => { - surface.value = newSurface; +const onUpdateSurface = (newSurface: string | number | null) => { + if (typeof newSurface === "string") { + surface.value = newSurface; + } +}; + +const onUpdateYomi = (newYomi: string | number | null) => { + if (typeof newYomi === "string") { + yomi.value = newYomi; + } }; const voiceComputed = computed(() => { @@ -498,84 +507,4 @@ const toDialogClosedState = () => { position: absolute; z-index: 10; } - -.word-editor { - display: flex; - flex-flow: column; - height: calc( - 100vh - #{vars.$menubar-height + vars.$toolbar-height + - vars.$window-border-width} - ) !important; - overflow: auto; -} - -.word-input { - padding-left: 10px; - width: calc(66vw - 80px); - - :deep(.q-field__control) { - height: 2rem; - } - - :deep(.q-placeholder) { - padding: 0; - font-size: 20px; - } - - :deep(.q-field__after) { - height: 2rem; - } -} - -.desc-row { - color: rgba(colors.$display-rgb, 0.5); - font-size: 12px; -} - -.play-button { - margin: auto 0; - padding-right: 16px; -} - -.accent-phrase-table { - flex-grow: 1; - align-self: stretch; - - display: flex; - height: 130px; - overflow-x: scroll; - width: calc(66vw - 140px); - - .mora-table { - display: inline-grid; - align-self: stretch; - grid-template-rows: 1fr 60px 30px; - - .text-cell { - padding: 0; - min-width: 20px; - max-width: 20px; - grid-row-start: 3; - text-align: center; - white-space: nowrap; - color: colors.$display; - position: relative; - } - - .splitter-cell { - min-width: 20px; - max-width: 20px; - grid-row: 3 / span 1; - z-index: vars.$detail-view-splitter-cell-z-index; - } - } -} - -.save-delete-reset-buttons { - padding: 20px; - - display: flex; - flex: 1; - align-items: flex-end; -}