From 13de10463410e2ff7ea68846d83eaca28f9323f8 Mon Sep 17 00:00:00 2001 From: mattyatea Date: Sat, 23 Sep 2023 09:01:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=82=B2=E3=83=BC=E3=83=9F=E3=83=B3?= =?UTF-8?q?=E3=82=B0=E3=83=A2=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/server/api/endpoints/notes/create.ts | 5 +- packages/backend/src/server/web/style.css | 73 ++- packages/frontend/src/components/MkButton.vue | 62 +- .../src/components/MkChannelFollowButton.vue | 155 ++++- .../src/components/MkFollowButton.vue | 102 +-- .../frontend/src/components/MkLaunchPad.vue | 117 +++- .../frontend/src/components/MkMention.vue | 119 +++- packages/frontend/src/components/MkMenu.vue | 207 ++++++- .../src/components/MkNoteDetailed.vue | 83 ++- packages/frontend/src/components/MkRadio.vue | 141 ++++- packages/frontend/src/components/MkRange.vue | 146 ++++- .../components/MkReactionsViewer.reaction.vue | 123 +++- .../src/components/MkSignupDialog.form.vue | 579 +++++++++++------- .../src/components/MkSignupDialog.rules.vue | 128 +++- .../frontend/src/components/MkSuperMenu.vue | 121 +++- .../src/components/MkSwitch.button.vue | 288 ++++----- packages/frontend/src/components/MkTab.vue | 116 +++- .../src/components/MkUserSetupDialog.vue | 115 +++- .../src/components/MkVisitorDashboard.vue | 75 ++- .../src/components/global/MkLoading.vue | 2 +- .../components/global/MkPageHeader.tabs.vue | 17 +- .../frontend/src/pages/explore.featured.vue | 2 +- .../frontend/src/pages/welcome.entrance.a.vue | 75 ++- packages/frontend/src/style.scss | 8 + .../src/ui/_common_/navbar-for-mobile.vue | 480 ++++++++------- packages/frontend/src/ui/_common_/navbar.vue | 284 +++++---- packages/frontend/src/ui/universal.vue | 24 +- .../frontend/src/ui/universal.widgets.vue | 135 +++- 28 files changed, 2917 insertions(+), 865 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 8deb7ebf38..519243c688 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -244,10 +244,7 @@ export default class extends Endpoint { // eslint- } else if (reply.renoteId && !reply.text && !reply.fileIds && !reply.hasPoll) { throw new ApiError(meta.errors.cannotReplyToPureRenote); } - // ノートがリプライでパブリック投稿の場合はホームにする - if (ps.visibility != 'home' && ps.visibility!== 'followers' && ps.visibility!=='specified' ){ - visibility = 'home'; - } + // Check blocking if (reply.userId !== me.id) { const blockExist = await this.blockingsRepository.exist({ diff --git a/packages/backend/src/server/web/style.css b/packages/backend/src/server/web/style.css index 952be9bf0b..6919bf39aa 100644 --- a/packages/backend/src/server/web/style.css +++ b/packages/backend/src/server/web/style.css @@ -45,7 +45,13 @@ html { width: 28px; height: 28px; transform: translateY(70px); - color: var(--accent); + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); + background-size: 1800% 1800%; + -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite; + -moz-animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite; + animation: AnimationDark 44s cubic-bezier(0, 0.25, 0.25, 1) infinite; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; } #splashSpinner > .spinner { position: absolute; @@ -74,3 +80,68 @@ html { transform: rotate(360deg); } } +@-webkit-keyframes AnimationLight { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} +@-moz-keyframes AnimationLight { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} @keyframes AnimationLight { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } + } +@-webkit-keyframes AnimationDark { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} +@-moz-keyframes AnimationDark { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} +@keyframes AnimationDark { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} diff --git a/packages/frontend/src/components/MkButton.vue b/packages/frontend/src/components/MkButton.vue index 993cf7a39e..82b94140aa 100644 --- a/packages/frontend/src/components/MkButton.vue +++ b/packages/frontend/src/components/MkButton.vue @@ -20,8 +20,8 @@ SPDX-License-Identifier: AGPL-3.0-only [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike, - [$style.gamingDark]: gaming === 'dark', // gamingが1の場合にgamingDarkクラスを追加 - [$style.gamingLight]: gaming === 'light', // gamingが2の場合にgamingLightクラスを追加 + [$style.gamingDark]: gaming === 'dark', + [$style.gamingLight]: gaming === 'light', } ]" :type="type" @@ -50,8 +50,8 @@ SPDX-License-Identifier: AGPL-3.0-only [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike, - [$style.gamingDark]: gaming === 'dark', // gamingが1の場合にgamingDarkクラスを追加 - [$style.gamingLight]: gaming === 'light', // gamingが2の場合にgamingLightクラスを追加 + [$style.gamingDark]: gaming === 'dark', + [$style.gamingLight]: gaming === 'light', } ]" :to="to" @@ -96,18 +96,18 @@ const gamingMode = computed(defaultStore.makeGetterSetter('gamingMode')); let gaming = ref(''); // 0-off , 1-dark , 2-light // gaming.valueに新しい値を代入する -if (darkMode.value && gamingMode.value && props.primary) { +if (darkMode.value && gamingMode.value && props.primary || props.gradate ) { gaming.value = 'dark'; -} else if (!darkMode.value && gamingMode.value && props.primary) { +} else if (!darkMode.value && gamingMode.value && props.primary|| props.gradate ) { gaming.value = 'light'; }else{ gaming.value = ''; } watch(darkMode, () => { - if (darkMode.value && gamingMode.value && props.primary) { + if (darkMode.value && gamingMode.value && props.primary || props.gradate || props.large || props.small || props.full ) { gaming.value = 'dark'; - } else if (!darkMode.value && gamingMode.value && props.primary) { + } else if (!darkMode.value && gamingMode.value && props.primary || props.gradate || props.large || props.small || props.full ) { gaming.value = 'light'; }else{ gaming.value = ''; @@ -115,9 +115,9 @@ watch(darkMode, () => { }) watch(gamingMode, () => { - if (darkMode.value && gamingMode.value && props.primary) { + if (darkMode.value && gamingMode.value && props.primary || props.gradate || props.large || props.small || props.full ) { gaming.value = 'dark'; - } else if (!darkMode.value && gamingMode.value && props.primary) { + } else if (!darkMode.value && gamingMode.value && props.primary || props.gradate || props.large || props.small || props.full ) { gaming.value = 'light'; }else{ gaming.value = ''; @@ -290,53 +290,53 @@ function onMousedown(evt: MouseEvent): void { } &.gamingLight { - background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); background-size: 1800% 1800%; - - -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; - -moz-animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; - animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; + color: white !important; + -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; + -moz-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; + animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; &:not(:disabled):hover { - background: linear-gradient(270deg, #d08c8c, #cfb28c, #dbdb8b, #95d08e, #8bdbdb, #94a9cf, #b09ecf, #cfa0cf, #e0a0bd); + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); background-size: 1800% 1800%; - - -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; - -moz-animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; - animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; + color: white !important; + -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; + -moz-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; + animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; } &:not(:disabled):active { - background: linear-gradient(270deg, #d08c8c, #cfb28c, #dbdb8b, #95d08e, #8bdbdb, #94a9cf, #b09ecf, #cfa0cf, #e0a0bd); + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); background-size: 1800% 1800% !important; - - -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; - -moz-animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite ; - animation: AnimationLight 45s cubic-bezier(0, 0.45, 0.30, 1) infinite ; + color: white !important; + -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite; + -moz-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite ; + animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite ; } } &.gamingDark { - background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); + background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); background-size: 1800% 1800%; - + color: white !important; -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.45, 0.30, 1) infinite; -moz-animation: AnimationDark 44s cubic-bezier(0, 0.45, 0.30, 1) infinite; animation: AnimationDark 44s cubic-bezier(0, 0.45, 0.30, 1) infinite; &:not(:disabled):hover { - background: linear-gradient(270deg, #a84f4f, #a88c4f, #9aa24b, #6da85c, #53a8a6, #7597b5, #8679b5, #b579b5, #b56d96); + background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); background-size: 1800% 1800% ; - + color: white !important; -webkit-animation: AnimationDark 45s cubic-bezier(0, 0.45, 0.30, 1) infinite ; -moz-animation: AnimationDark 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; animation: AnimationDark 45s cubic-bezier(0, 0.45, 0.30, 1) infinite ; } &:not(:disabled):active { - background: linear-gradient(270deg, #a84f4f, #a88c4f, #9aa24b, #6da85c, #53a8a6, #7597b5, #8679b5, #b579b5, #b56d96); + background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); background-size: 1800% 1800% !important; - + color: white !important; -webkit-animation: AnimationDark 45s cubic-bezier(0, 0.45, 0.30, 1) infinite ; -moz-animation: AnimationDark 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; animation: AnimationDark 45s cubic-bezier(0, 0.45, 0.30, 1) infinite; diff --git a/packages/frontend/src/components/MkChannelFollowButton.vue b/packages/frontend/src/components/MkChannelFollowButton.vue index 41b02a7e3f..cf485e7892 100644 --- a/packages/frontend/src/components/MkChannelFollowButton.vue +++ b/packages/frontend/src/components/MkChannelFollowButton.vue @@ -6,28 +6,29 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index ec8383fe84..2d123385f5 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -14,44 +14,44 @@ SPDX-License-Identifier: AGPL-3.0-only > - + {{ i18n.ts.none }} @@ -62,14 +62,51 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -294,10 +331,32 @@ onBeforeUnmount(() => { &:not(:disabled):hover { color: var(--accent); text-decoration: none; + &:before { + background: var(--accentedBg); + } + &.gamingDark{ + color:black !important; + } + &.gamingLight{ + color:white !important; + } + &.gamingDark:before{ + color:black !important; + background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); background-size: 1800% 1800%; + -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + -moz-animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + + } + &.gamingLight:before{ + color:white !important; + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); background-size: 1800% 1800% !important; + -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + -moz-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + + } - &:before { - background: var(--accentedBg); - } } &.danger { @@ -322,12 +381,32 @@ onBeforeUnmount(() => { &:active, &.active { - color: var(--fgOnAccent) !important; + color: var(--fgOnAccent); opacity: 1; - + &.gamingDark{ + color:black !important; + } + &.gamingLight{ + color:white !important; + } &:before { - background: var(--accent) !important; + background: var(--accent); } + &.gamingDark:before{ + color:black !important; + background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); background-size: 1800% 1800%; + -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + -moz-animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + } + + &.gamingLight:before{ + color:white !important; + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); background-size: 1800% 1800% !important; + -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + -moz-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + } } &:not(:active):focus-visible { @@ -364,9 +443,32 @@ onBeforeUnmount(() => { color: var(--accent); text-decoration: none; - &:before { - background: var(--accentedBg); - } + &:before { + background: var(--accentedBg); + } + &.gamingDark{ + color:black !important; + } + &.gamingLight{ + color:white !important; + } + &.gamingDark:before{ + color:black !important; + background: linear-gradient(270deg, #e7a2a2, #e3cfa2, #ebefa1, #b3e7a6, #a6ebe7, #aec5e3, #cabded, #e0b9e3, #f4bddd); background-size: 1800% 1800%; + -webkit-animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + -moz-animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + animation: AnimationDark 44s cubic-bezier(0, 0.2, 0.90, 1) infinite; + } + + &.gamingLight:before{ + color:white !important; + background: linear-gradient(270deg, #c06161, #c0a567, #b6ba69, #81bc72, #63c3be, #8bacd6, #9f8bd6, #d18bd6, #d883b4); background-size: 1800% 1800% !important; + -webkit-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + -moz-animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + animation: AnimationLight 45s cubic-bezier(0, 0.2, 0.90, 1) infinite !important; + + } + } } } @@ -429,4 +531,69 @@ onBeforeUnmount(() => { margin: 8px 0; border-top: solid 0.5px var(--divider); } +@-webkit-keyframes AnimationLight { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} +@-moz-keyframes AnimationLight { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} @keyframes AnimationLight { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } + } +@-webkit-keyframes AnimationDark { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} +@-moz-keyframes AnimationDark { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} +@keyframes AnimationDark { + 0% { + background-position: 0% 50% + } + 50% { + background-position: 100% 50% + } + 100% { + background-position: 0% 50% + } +} diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 0bcf98cca2..cab62c9308 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -131,9 +131,9 @@ SPDX-License-Identifier: AGPL-3.0-only
- - - + + +
@@ -180,7 +180,7 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index aa4a184d7b..b4633f419d 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only