From 295d81db29bdcba746a0c7d1488364b927e4dc24 Mon Sep 17 00:00:00 2001 From: asadahimeka Date: Wed, 10 May 2023 22:13:21 +0800 Subject: [PATCH 01/10] fix: adjust styles --- src/App.vue | 43 +++++++++++- src/api/index.js | 3 +- src/assets/style/base.styl | 16 +++-- src/components/Nav.vue | 12 +++- src/icons/svg/discovery.svg | 2 +- src/icons/svg/to_top.svg | 1 + src/views/Artwork/components/ImageView.vue | 2 +- src/views/Discovery/Discovery.vue | 2 +- src/views/Discovery/RecommendIllust.vue | 2 +- src/views/Home/HomeManga.vue | 4 -- src/views/Home/HomeNovel.vue | 4 -- src/views/Home/index.vue | 33 +++++++--- src/views/Setting/RecommendApp.vue | 10 +-- src/views/Setting/RecommendLink.vue | 77 ++++++++++++++-------- src/views/Spotlights/SpotlightCard.vue | 5 +- src/views/Spotlights/Spotlights.vue | 2 +- src/views/Users/AuthorIllustsFull.vue | 4 +- src/views/Users/AuthorNovelsFull.vue | 4 +- src/views/Users/FavoriteIllustsFull.vue | 4 +- src/views/Users/FavoriteNovelsFull.vue | 4 +- src/views/Users/index.vue | 2 +- 21 files changed, 161 insertions(+), 75 deletions(-) create mode 100644 src/icons/svg/to_top.svg diff --git a/src/App.vue b/src/App.vue index 9acf6fce..6d6a7085 100644 --- a/src/App.vue +++ b/src/App.vue @@ -52,7 +52,7 @@ html,body display none .Home - padding-top 1.1rem + padding-top 1.2rem .com_sel_tabs position fixed z-index 1 @@ -61,4 +61,45 @@ html,body top 0.3rem margin-bottom 0 padding 0 + +@media screen and (min-width: 1280px) + .Home, + .search .tags, + .search .result-list, + .rank-list, + .users .user-tabs .van-tab__pane, + .user-illusts, + #app .related, + #app .Spotlights, + #app .Discovery, + #app .HomeRecommIllust + padding-left 5vw + padding-right 5vw + #app + .nav-container + left unset + right 0 + bottom 42px + width 1.2rem + height auto + transform: translateX(100%); + &.showNav + transform: translateX(0); + .nav-bar + flex-direction: column + justify-content: center + align-items: center + padding-top 15px + border-top-left-radius: 0.21333rem; + border-top-right-radius: 0; + border-bottom-left-radius: 0.21333rem; + li + width 100% + margin-bottom 25px + &.nav_to_top + display list-item + .icon + font-size 0.72rem + span + display none diff --git a/src/api/index.js b/src/api/index.js index 8b9c960b..bc53c125 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1227,7 +1227,8 @@ const api = { } } else { ugoira = { - zip: imgProxy(res.ugoira_metadata.zip_urls.medium), + // zip: imgProxy(res.ugoira_metadata.zip_urls.medium), + zip: imgProxy(res.ugoira_metadata.zip_urls.medium.replace('_ugoira600x600', '_ugoira1920x1080')), frames: res.ugoira_metadata.frames, } } diff --git a/src/assets/style/base.styl b/src/assets/style/base.styl index 80bed1d6..bcbb75e2 100644 --- a/src/assets/style/base.styl +++ b/src/assets/style/base.styl @@ -229,7 +229,7 @@ html, body color #fff .user-wrap, - .illust-wrap + .user-illusts height auto .sup_tags .van-tag @@ -240,8 +240,6 @@ html, body border 1px solid #aaa border-radius: 0.26667rem; - .nav-container - height 1rem .nav-container .nav-bar box-shadow 0 0 0.26667rem #555 background rgba(0,0,0,0.8) @@ -252,6 +250,8 @@ html, body color #fff .icon display none + span + display inline-block .com_sel_tab, .rank .nav a @@ -280,8 +280,8 @@ html, body .search .search-bar-wrap .search-bar, .search .search-bar-wrap .van-search__content, - .rank .top, - .com_sel_tabs + .search .com_sel_tabs, + .rank .top background rgba(0,0,0,0.8) .search-dropdown background #16161a @@ -292,8 +292,10 @@ html, body .van-cell background-color: transparent !important - .rank .top .calendar .date - color #fff + .rank .top + left 0 + .calendar .date + color #fff .image-card .meta::before height 100% diff --git a/src/components/Nav.vue b/src/components/Nav.vue index 6d8076f3..bc227644 100644 --- a/src/components/Nav.vue +++ b/src/components/Nav.vue @@ -39,6 +39,10 @@ {{ $t('nav.setting') }} + @@ -87,9 +91,12 @@ export default { this.notMobile && removeEventListener('scroll', this.scrollFn) }, methods: { + scrollToTop() { + document.documentElement.scrollTo({ top: 0, behavior: 'smooth' }) + }, navigateTo(name, params) { if (this.$route.name.startsWith(name)) { - document.documentElement.scrollTo({ top: 0, behavior: 'smooth' }) + this.scrollToTop() } else { this.$router.push({ name, params }) } @@ -99,6 +106,9 @@ export default { diff --git a/src/views/Home/HomeNovel.vue b/src/views/Home/HomeNovel.vue index 94df2bbf..f3bc8cba 100644 --- a/src/views/Home/HomeNovel.vue +++ b/src/views/Home/HomeNovel.vue @@ -61,8 +61,4 @@ export default { margin-right 10px vertical-align -0.15rem - ::v-deep .discovery-icon - font-size: 0.8rem - vertical-align: -0.2rem - diff --git a/src/views/Home/index.vue b/src/views/Home/index.vue index 7904534e..5d2a3b29 100644 --- a/src/views/Home/index.vue +++ b/src/views/Home/index.vue @@ -6,13 +6,18 @@
- - +
+ + +
diff --git a/src/views/Spotlights/SpotlightCard.vue b/src/views/Spotlights/SpotlightCard.vue index e041c871..a26d9ba6 100644 --- a/src/views/Spotlights/SpotlightCard.vue +++ b/src/views/Spotlights/SpotlightCard.vue @@ -50,7 +50,7 @@ export default { swiperOption: { freeMode: true, slidesPerView: 'auto', - // mousewheel: true, + mousewheel: true, scrollbar: { el: '.swiper-scrollbar', draggable: true, @@ -110,6 +110,9 @@ export default { diff --git a/src/views/Setting/index.vue b/src/views/Setting/index.vue index b780fedd..b415295a 100644 --- a/src/views/Setting/index.vue +++ b/src/views/Setting/index.vue @@ -22,7 +22,7 @@ - +
diff --git a/vue.config.js b/vue.config.js index 70a36cdc..ea484db5 100644 --- a/vue.config.js +++ b/vue.config.js @@ -143,19 +143,27 @@ module.exports = { options: { cacheName: 'html-cache', cacheableResponse: { statuses: [200] } }, }, { - urlPattern: /\.(?:css|js)$/, + urlPattern: /^https:\/\/cdn\.staticfile\.org/, + handler: 'StaleWhileRevalidate', + options: { cacheName: 'cdn-cache', cacheableResponse: { statuses: [200] } }, + }, + { + urlPattern: /.*\.(css|js)$/, handler: 'CacheFirst', options: { cacheName: 'css-js-cache', cacheableResponse: { statuses: [200] } }, }, { - urlPattern: /\.(?:png|gif|jpg|jpeg|svg)$/, + urlPattern: /.*\.(png|jpg|jpeg|ico|svg|zip)$/, handler: 'CacheFirst', options: { cacheName: 'image-cache', cacheableResponse: { statuses: [200] } }, }, { - urlPattern: /^https:\/\/cdn\.staticfile\.org/, - handler: 'StaleWhileRevalidate', - options: { cacheName: 'cdn-cache', cacheableResponse: { statuses: [200] } }, + urlPattern: /^https:\/\/(.*pximg.*)\/.*/, + handler: 'CacheFirst', + options: { + cacheName: 'pximg-cache', + cacheableResponse: { statuses: [0, 200] }, + }, }, ], }, From c713b76d0a8ba43fba1c8ef57c5619b981b2bf95 Mon Sep 17 00:00:00 2001 From: asadahimeka Date: Sat, 13 May 2023 23:24:31 +0800 Subject: [PATCH 07/10] chore: release v1.8.15 --- package.json | 2 +- src/views/Setting/About.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 89cf4e09..df53edd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixiv-viewer", - "version": "1.8.14", + "version": "1.8.15", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/views/Setting/About.vue b/src/views/Setting/About.vue index 8fc4b0ca..d2479385 100644 --- a/src/views/Setting/About.vue +++ b/src/views/Setting/About.vue @@ -2,7 +2,7 @@

{{ $t('about.title') }}

- + Date: Sat, 13 May 2023 23:33:50 +0800 Subject: [PATCH 08/10] fix: illust filter --- src/utils/filter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/filter.js b/src/utils/filter.js index 9233e42b..bb27016a 100644 --- a/src/utils/filter.js +++ b/src/utils/filter.js @@ -35,13 +35,13 @@ export function filterCensoredIllust(artwork) { if (artwork.x_restrict == 1) { if (artwork.illust_ai_type == 2) { - return store.state.SETTING.r18 || store.state.SETTING.ai + return store.state.SETTING.r18 && store.state.SETTING.ai } return store.state.SETTING.r18 } if (artwork.x_restrict == 2) { if (artwork.illust_ai_type == 2) { - return store.state.SETTING.r18g || store.state.SETTING.ai + return store.state.SETTING.r18g && store.state.SETTING.ai } return store.state.SETTING.r18g } From 515f8423339af474627d55ace27cdc677a4391fe Mon Sep 17 00:00:00 2001 From: asadahimeka Date: Sun, 14 May 2023 23:52:34 +0800 Subject: [PATCH 09/10] Update index.html --- public/index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/index.html b/public/index.html index a5e6e8a0..76bff2ea 100644 --- a/public/index.html +++ b/public/index.html @@ -29,9 +29,6 @@ - <% if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_UMAMI_SRC) { %> - - <% } %> @@ -50,6 +47,12 @@ <% } %> <% } %> + <% if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_CF_BEACON) { %> + + <% } %> + <% if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_UMAMI_SRC) { %> + + <% } %> From 6cff29fe6ea5420643f8faacda42310644430d58 Mon Sep 17 00:00:00 2001 From: asadahimeka Date: Tue, 16 May 2023 22:56:34 +0800 Subject: [PATCH 10/10] artwork title wrap --- src/views/Artwork/components/Meta.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/views/Artwork/components/Meta.vue b/src/views/Artwork/components/Meta.vue index 45bc85b7..fd3ed50f 100644 --- a/src/views/Artwork/components/Meta.vue +++ b/src/views/Artwork/components/Meta.vue @@ -14,7 +14,7 @@ >
{{ artwork.series.title }}
-

{{ artwork.title }}

+

{{ artwork.title }}

{{ artwork.author.name }}
@@ -403,12 +403,13 @@ export default { } .author-info { - height: 86px; + display flex + // height: 86px; margin: 10px 0 20px 0; .avatar { - float: left; width: 86px; + min-width: 86px; height: 86px; border-radius: 50%; overflow: hidden; @@ -417,21 +418,21 @@ export default { .name-box { height: 100%; - white-space: nowrap; + // white-space: nowrap; .title { padding-top: 4px; margin-bottom: 8px; font-size: 32px; - overflow: hidden; - text-overflow: ellipsis; + // overflow: hidden; + // text-overflow: ellipsis; } .author { font-size: 22px; color: #9b9b9b; - overflow: hidden; - text-overflow: ellipsis; + // overflow: hidden; + // text-overflow: ellipsis; } .series {