Skip to content

Commit

Permalink
refactor: 4a356f1 に対応
Browse files Browse the repository at this point in the history
  • Loading branch information
hideki0403 committed Oct 15, 2024
1 parent 14ec718 commit f15c8cc
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ watch([expiration, atDate, atTime, after, unit, isValid], () => {
}

.withAccent {
color: var(--accent);
color: var(--MI_THEME-accent);
}

.chevronOpening {
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/src/components/MkPostFormDrafts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ onMounted(async () => {
padding: 10px;
gap: 6px;
flex-grow: 1;
background-color: var(--buttonBg);
background-color: var(--MI_THEME-buttonBg);
&:hover:not([aria-disabled="true"]) {
background-color: var(--buttonHoverBg);
background-color: var(--MI_THEME-buttonHoverBg);
}
&[aria-disabled="true"] {
Expand Down Expand Up @@ -145,11 +145,11 @@ onMounted(async () => {
align-items: center;
justify-content: center;
padding: 16px;
background-color: var(--buttonBg);
color: var(--error);
background-color: var(--MI_THEME-buttonBg);
color: var(--MI_THEME-error);
&:hover {
background-color: var(--error);
background-color: var(--MI_THEME-error);
color: white;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ if (!mock) {

&.canToggleFallback:not(.canToggle):not(.reacted) {
box-sizing: border-box;
border: 2px dashed var(--switchBg);
border: 2px dashed var(--MI_THEME-switchBg);

&.small {
border-width: 1px;
border-color: var(--buttonBgSub);
border-color: var(--MI_THEME-buttonBgSub);
}

&:hover {
Expand Down
30 changes: 22 additions & 8 deletions packages/frontend/src/components/MkSignupDialog.choice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,24 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkSpacer :marginMin="20" :marginMax="28">
<div class="_gaps_m" :class="$style.root">
<MkInfo info>{{ i18n.tsx.registrationLimitDetails({ limit: instance.registrationLimitCooldown, count: instance.registrationLimit }) }}</MkInfo>
<MkInfo info>
{{ i18n.tsx.registrationLimitDetails({ limit: instance.registrationLimitCooldown, count:
instance.registrationLimit }) }}
</MkInfo>
<div>{{ i18n.ts.doYouHaveInviteCode }}</div>
<div class="_buttonsCenter">
<MkButton :class="$style.choiceButton" inline large style="color: var(--success);" @click="doneWithCode"><i class="ti ti-circle-check-filled"></i> {{ i18n.ts.hasInviteCode }}</MkButton>
<MkButton :class="$style.choiceButton" inline large style="color: var(--error);" @click="doneWithoutCode"><i class="ti ti-circle-x-filled"></i> {{ i18n.ts.doesNotHaveInviteCode }}</MkButton>
<MkButton
:class="$style.choiceButton" inline large style="color: var(--MI_THEME-success);"
@click="doneWithCode"
>
<i class="ti ti-circle-check-filled"></i> {{ i18n.ts.hasInviteCode }}
</MkButton>
<MkButton
:class="$style.choiceButton" inline large style="color: var(--MI_THEME-error);"
@click="doneWithoutCode"
>
<i class="ti ti-circle-x-filled"></i> {{ i18n.ts.doesNotHaveInviteCode }}
</MkButton>
</div>
<MkButton inline rounded @click="emit('cancel')">{{ i18n.ts.cancel }}</MkButton>
</div>
Expand Down Expand Up @@ -66,8 +79,8 @@ async function doneWithoutCode() {
padding: 16px;
text-align: center;
font-size: 26px;
background-color: var(--accentedBg);
color: var(--accent);
background-color: var(--MI_THEME-accentedBg);
color: var(--MI_THEME-accent);
}

.rules {
Expand All @@ -92,8 +105,8 @@ async function doneWithoutCode() {
width: 32px;
height: 32px;
line-height: 32px;
background-color: var(--accentedBg);
color: var(--accent);
background-color: var(--MI_THEME-accentedBg);
color: var(--MI_THEME-accent);
font-size: 13px;
font-weight: bold;
align-items: center;
Expand All @@ -104,4 +117,5 @@ async function doneWithoutCode() {

.ruleText {
padding-top: 6px;
}</style>
}
</style>
80 changes: 67 additions & 13 deletions packages/frontend/src/components/MkSignupDialog.rules.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,49 +24,103 @@ SPDX-License-Identifier: AGPL-3.0-only

<MkFolder v-if="availableServerRules" :defaultOpen="true">
<template #label>{{ i18n.ts.serverRules }}</template>
<template #suffix><i v-if="agreeServerRules" class="ti ti-check" style="color: var(--MI_THEME-success)"></i></template>
<template #suffix>
<i
v-if="agreeServerRules" class="ti ti-check"
style="color: var(--MI_THEME-success)"
></i>
</template>

<ol class="_gaps_s" :class="$style.rules">
<li v-for="item in instance.serverRules" :class="$style.rule"><div :class="$style.ruleText" v-html="item"></div></li>
<li v-for="item in instance.serverRules" :class="$style.rule">
<div :class="$style.ruleText" v-html="item"></div>
</li>
</ol>

<MkSwitch :modelValue="agreeServerRules" style="margin-top: 16px;" @update:modelValue="updateAgreeServerRules">{{ i18n.ts.agree }}</MkSwitch>
<MkSwitch
:modelValue="agreeServerRules" style="margin-top: 16px;"
@update:modelValue="updateAgreeServerRules"
>
{{ i18n.ts.agree }}
</MkSwitch>
</MkFolder>

<MkFolder v-if="availableTos || availablePrivacyPolicy" :defaultOpen="true">
<template #label>{{ tosPrivacyPolicyLabel }}</template>
<template #suffix><i v-if="agreeTosAndPrivacyPolicy" class="ti ti-check" style="color: var(--MI_THEME-success)"></i></template>
<template #suffix>
<i
v-if="agreeTosAndPrivacyPolicy" class="ti ti-check"
style="color: var(--MI_THEME-success)"
></i>
</template>
<div class="_gaps_s">
<div v-if="availableTos"><a :href="instance.tosUrl ?? undefined" class="_link" target="_blank">{{ i18n.ts.termsOfService }} <i class="ti ti-external-link"></i></a></div>
<div v-if="availablePrivacyPolicy"><a :href="instance.privacyPolicyUrl ?? undefined" class="_link" target="_blank">{{ i18n.ts.privacyPolicy }} <i class="ti ti-external-link"></i></a></div>
<div v-if="availableTos">
<a :href="instance.tosUrl ?? undefined" class="_link" target="_blank">{{
i18n.ts.termsOfService }} <i class="ti ti-external-link"></i></a>
</div>
<div v-if="availablePrivacyPolicy">
<a
:href="instance.privacyPolicyUrl ?? undefined" class="_link"
target="_blank"
>{{ i18n.ts.privacyPolicy }} <i class="ti ti-external-link"></i></a>
</div>
</div>

<MkSwitch :modelValue="agreeTosAndPrivacyPolicy" style="margin-top: 16px;" @update:modelValue="updateAgreeTosAndPrivacyPolicy">{{ i18n.ts.agree }}</MkSwitch>
<MkSwitch
:modelValue="agreeTosAndPrivacyPolicy" style="margin-top: 16px;"
@update:modelValue="updateAgreeTosAndPrivacyPolicy"
>
{{ i18n.ts.agree }}
</MkSwitch>
</MkFolder>

<MkFolder :defaultOpen="true">
<template #label>{{ i18n.ts.basicNotesBeforeCreateAccount }}</template>
<template #suffix><i v-if="agreeNote" class="ti ti-check" style="color: var(--MI_THEME-success)"></i></template>
<template #suffix>
<i
v-if="agreeNote" class="ti ti-check"
style="color: var(--MI_THEME-success)"
></i>
</template>

<a href="https://misskey-hub.net/docs/for-users/onboarding/warning/" class="_link" target="_blank">{{ i18n.ts.basicNotesBeforeCreateAccount }} <i class="ti ti-external-link"></i></a>
<a href="https://misskey-hub.net/docs/for-users/onboarding/warning/" class="_link" target="_blank">{{
i18n.ts.basicNotesBeforeCreateAccount }} <i class="ti ti-external-link"></i></a>

<MkSwitch :modelValue="agreeNote" style="margin-top: 16px;" data-cy-signup-rules-notes-agree @update:modelValue="updateAgreeNote">{{ i18n.ts.agree }}</MkSwitch>
<MkSwitch
:modelValue="agreeNote" style="margin-top: 16px;" data-cy-signup-rules-notes-agree
@update:modelValue="updateAgreeNote"
>
{{ i18n.ts.agree }}
</MkSwitch>
</MkFolder>

<MkFolder v-if="instance.enableAgeRestriction" :defaultOpen="true">
<template #label>{{ i18n.ts.ageCheck }}</template>
<template #suffix><i v-if="ageLimitAgreement" class="ti ti-check" style="color: var(--success)"></i></template>
<template #suffix>
<i
v-if="ageLimitAgreement" class="ti ti-check"
style="color: var(--MI_THEME-success)"
></i>
</template>

<span>{{ i18n.tsx.ageCheckDescription({ age: instance.ageRestrictionThreshold }) }}</span>

<MkSwitch v-model="ageLimitAgreement" style="margin-top: 16px;">{{ i18n.tsx.ageCheckYes({ age: instance.ageRestrictionThreshold }) }}</MkSwitch>
<MkSwitch v-model="ageLimitAgreement" style="margin-top: 16px;">
{{ i18n.tsx.ageCheckYes({ age:
instance.ageRestrictionThreshold }) }}
</MkSwitch>
</MkFolder>

<div v-if="!agreed" style="text-align: center;">{{ i18n.ts.pleaseAgreeAllToContinue }}</div>

<div class="_buttonsCenter">
<MkButton inline rounded @click="emit('cancel')">{{ i18n.ts.cancel }}</MkButton>
<MkButton inline primary rounded gradate :disabled="!agreed" data-cy-signup-rules-continue @click="emit('done')">{{ i18n.ts.continue }} <i class="ti ti-arrow-right"></i></MkButton>
<MkButton
inline primary rounded gradate :disabled="!agreed" data-cy-signup-rules-continue
@click="emit('done')"
>
{{ i18n.ts.continue }} <i class="ti ti-arrow-right"></i>
</MkButton>
</div>
</div>
</MkSpacer>
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/admin/supporter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ definePageMetadata({

<style lang="scss" module>
.footer {
-webkit-backdrop-filter: var(--blur, blur(15px));
backdrop-filter: var(--blur, blur(15px));
-webkit-backdrop-filter: var(--MI_THEME-blur, blur(15px));
backdrop-filter: var(--MI_THEME-blur, blur(15px));
}
</style>
59 changes: 30 additions & 29 deletions packages/frontend/src/pages/settings/notifications.note.vue
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<template>
<div class="_gaps_m">
<MkPagination :pagination="noteNotificationPagination">
<template #empty>
<div class="_fullinfo">
<img src="/static-assets/aira/info.png" class="_ghost"/>
<div>{{ i18n.ts.noUsers }}</div>
</div>
</template>

<template #default="{ items }">
<div class="_gaps_s">
<div v-for="item in items" :key="item.id" :class="[$style.userItem, { [$style.userItemOpend]: expandedNoteNotificationItems.includes(item.id) }]">
<div :class="$style.userItemMain">
<MkA :class="$style.userItemMainBody" :to="userPage(item.user)">
<MkUserCardMini :user="item.user"/>
</MkA>
<button class="_button" :class="$style.userToggle" @click="toggleNoteNotificationItem(item)"><i :class="$style.chevron" class="ti ti-chevron-down"></i></button>
<button class="_button" :class="$style.remove" @click="noteUnsubscribe(item.userId, $event)"><i class="ti ti-x"></i></button>
</div>
<div v-if="expandedNoteNotificationItems.includes(item.id)" :class="$style.userItemSub">
<div>
Created at:
<MkTime :time="item.createdAt" mode="detail"/>
</div>
<div class="_gaps_m">
<MkPagination :pagination="noteNotificationPagination">
<template #empty>
<div class="_fullinfo">
<img src="/static-assets/aira/info.png" class="_ghost"/>
<div>{{ i18n.ts.noUsers }}</div>
</div>
</template>

<template #default="{ items }">
<div class="_gaps_s">
<div v-for="item in items" :key="item.id" :class="[$style.userItem, { [$style.userItemOpend]: expandedNoteNotificationItems.includes(item.id) }]">
<div :class="$style.userItemMain">
<MkA :class="$style.userItemMainBody" :to="userPage(item.user)">
<MkUserCardMini :user="item.user"/>
</MkA>
<button class="_button" :class="$style.userToggle" @click="toggleNoteNotificationItem(item)"><i :class="$style.chevron" class="ti ti-chevron-down"></i></button>
<button class="_button" :class="$style.remove" @click="noteUnsubscribe(item.userId, $event)"><i class="ti ti-x"></i></button>
</div>
<div v-if="expandedNoteNotificationItems.includes(item.id)" :class="$style.userItemSub">
<div>
Created at:
<MkTime :time="item.createdAt" mode="detail"/>
</div>
</div>
</div>
</template>
</MkPagination>
</div>
</div>
</template>
</MkPagination>
</div>
</template>

<script lang="ts" setup>
Expand Down Expand Up @@ -83,7 +83,7 @@ definePageMetadata({
.userItemSub {
padding: 6px 12px;
font-size: 85%;
color: var(--fgTransparentWeak);
color: var(--MI_THEME-fgTransparentWeak);
}
.userItemMainBody {
Expand Down Expand Up @@ -112,4 +112,5 @@ definePageMetadata({
.chevron {
transform: rotateX(180deg);
}
}</style>
}
</style>
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/settings/post-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ definePageMetadata(() => ({
border-radius: 6px;
&:hover {
background: var(--X5);
background: var(--MI_THEME-X5);
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/pages/supporter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

<script lang="ts" setup>
import { onMounted, ref, computed } from 'vue';
import { host } from '@@/js/config.js';
import FormSection from '@/components/form/section.vue';
import { i18n } from '@/i18n.js';
import { host } from '@@/js/config.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { instance } from '@/instance.js';
import { userPage } from '@/filters/user.js';
Expand Down Expand Up @@ -81,12 +81,12 @@ definePageMetadata({
display: flex;
align-items: center;
padding: 12px;
background: var(--buttonBg);
background: var(--MI_THEME-buttonBg);
border-radius: 6px;
&:hover {
text-decoration: none;
background: var(--buttonHoverBg);
background: var(--MI_THEME-buttonHoverBg);
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/src/ui/_common_/connection-status.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ onUnmounted(() => {
display: flex;
gap: 4px;
z-index: v-bind(zIndex);
bottom: calc(var(--minBottomSpacing) + var(--margin));
bottom: calc(var(--MI_THEME-minBottomSpacing) + var(--margin));
right: var(--margin);
margin: 0;
padding: 6px 8px;
Expand All @@ -75,11 +75,11 @@ onUnmounted(() => {
}

.online {
color: var(--accent);
color: var(--MI_THEME-accent);
}

.offline {
color: var(--fg);
color: var(--MI_THEME-fg);
}

.icon {
Expand Down
Loading

0 comments on commit f15c8cc

Please sign in to comment.