diff --git a/components.d.ts b/components.d.ts index a1c9154e..56fc2fc9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -67,6 +67,6 @@ declare module 'vue' { VolumeIcon: typeof import('./src/components/icon/VolumeIcon.vue')['default'] VolumeSetting: typeof import('./src/components/Toolbar/VolumeSetting.vue')['default'] WordList: typeof import('./src/components/WordList.vue')['default'] - WordListModal: typeof import('./src/components/WordListModal.vue')['default'] + WordListModal: typeof import('./src/components/Modal/WordListModal.vue')['default'] } } diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index f7166b4e..55598913 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -271,4 +271,12 @@ footer { color: transparent !important; text-shadow: #b0b0b0 0 0 8rem; user-select: none; +} + + +.common-title { + font-size: 20rem; + color: var(--color-font-1); + text-align: center; + margin-bottom: 10rem; } \ No newline at end of file diff --git a/src/components/BaseIcon.vue b/src/components/BaseIcon.vue index 378adfc7..ef66c7fd 100644 --- a/src/components/BaseIcon.vue +++ b/src/components/BaseIcon.vue @@ -7,7 +7,7 @@ import {Icon} from "@iconify/vue"; defineProps<{ title?: string, icon: string, - className: string + className?: string }>() defineEmits(['click']) diff --git a/src/components/Modal/AddWordDialog.vue b/src/components/Modal/AddWordDialog.vue index 48e3c305..b44fff64 100644 --- a/src/components/Modal/AddWordDialog.vue +++ b/src/components/Modal/AddWordDialog.vue @@ -1,15 +1,29 @@ @@ -106,22 +309,124 @@ function close() { #AddWordDialog { position: fixed; - width: 400rem; - height: 300rem; + width: 600rem; + height: 70vh; left: 50%; top: 50%; transform: translate3D(-50%, -50%, 0); z-index: 9999999; background: var(--color-second-bg); + transition: all .3s; - display: flex; - align-items: center; - justify-content: center; - $header-height: 60rem; + &.add-word-mode { + width: 800rem; - .form { - width: 90%; + .more-info { + display: grid; + grid-template-columns: repeat(2, 1fr); + } } + $header-height: 60rem; + + header { + color: var(--color-font-3); + display: flex; + justify-content: space-between; + align-items: center; + height: $header-height; + + .left { + cursor: pointer; + display: flex; + gap: 10rem; + align-items: center; + } + } + + .dict-list-page { + padding: 0 $space; + box-sizing: border-box; + } + + .add-page { + color: var(--color-font-1); + //display: flex; + //flex-direction: column; + + header { + padding: 0 $space; + } + + .detail { + flex: 1; + height: calc(100% - $header-height); + display: flex; + position: relative; + + .dict { + flex: 1; + border-radius: 10rem; + background: var(--color-second-bg); + color: var(--color-font-1); + padding-left: $space; + box-sizing: border-box; + + .info { + border-radius: 8rem; + background: var(--color-item-bg); + padding: 20rem; + position: relative; + + :deep(.edit-icon) { + position: absolute; + top: 10rem; + right: 10rem; + } + + .name { + font-size: 24rem; + margin-bottom: 10rem; + } + + .desc { + font-size: 18rem; + margin-bottom: 30rem; + } + + .item { + margin-top: 10rem; + } + } + + .add { + margin-top: 20rem; + } + } + + .list { + width: 350rem; + display: flex; + flex-direction: column; + font-size: 14rem; + padding-bottom: 20rem; + + .list-header { + min-height: 50rem; + padding: 10rem 24rem; + box-sizing: border-box; + display: flex; + justify-content: space-between; + align-items: center; + font-size: 16rem; + color: var(--color-font-3); + + .name { + font-size: 18rem; + } + } + } + } + } } \ No newline at end of file diff --git a/src/components/Modal/DictModal.vue b/src/components/Modal/DictModal.vue index 1829dcaa..014db094 100644 --- a/src/components/Modal/DictModal.vue +++ b/src/components/Modal/DictModal.vue @@ -13,7 +13,7 @@ import {v4 as uuidv4} from "uuid"; import {ActivityCalendar} from "vue-activity-calendar"; import "vue-activity-calendar/style.css"; import ChapterList from "@/components/ChapterList.vue"; -import WordListModal from "@/components/WordListModal.vue"; +import WordListModal from "@/components/Modal/WordListModal.vue"; import {isArticle} from "@/hooks/article.ts"; import {useRuntimeStore} from "@/stores/runtime.ts"; import {useSettingStore} from "@/stores/setting.ts"; @@ -490,13 +490,6 @@ $header-height: 60rem; position: relative; gap: $space; - .common-title { - font-size: 20rem; - color: var(--color-font-1); - text-align: center; - margin-bottom: 10rem; - } - .detail { overflow: auto; flex: 3; diff --git a/src/components/WordListModal.vue b/src/components/Modal/WordListModal.vue similarity index 98% rename from src/components/WordListModal.vue rename to src/components/Modal/WordListModal.vue index 7eb48fe6..27c9e5ad 100644 --- a/src/components/WordListModal.vue +++ b/src/components/Modal/WordListModal.vue @@ -130,7 +130,7 @@ onUnmounted(() => {