diff --git a/cypress/e2e/basic.cy.js b/cypress/e2e/basic.cy.js index b0c3d4c19a..e271894ec1 100644 --- a/cypress/e2e/basic.cy.js +++ b/cypress/e2e/basic.cy.js @@ -53,7 +53,6 @@ describe('After setup instance', () => { cy.get('[data-cy-signup]').click(); cy.get('[data-cy-signup-rules-continue]').should('be.disabled'); - cy.get('[data-cy-signup-rules-notes] [data-cy-folder-header]').click(); cy.get('[data-cy-signup-rules-notes-agree] [data-cy-switch-toggle]').click(); cy.get('[data-cy-signup-rules-continue]').should('not.be.disabled'); cy.get('[data-cy-signup-rules-continue]').click(); @@ -78,7 +77,6 @@ describe('After setup instance', () => { // ユーザー名が重複している場合の挙動確認 cy.get('[data-cy-signup]').click(); cy.get('[data-cy-signup-rules-continue]').should('be.disabled'); - cy.get('[data-cy-signup-rules-notes] [data-cy-folder-header]').click(); cy.get('[data-cy-signup-rules-notes-agree] [data-cy-switch-toggle]').click(); cy.get('[data-cy-signup-rules-continue]').should('not.be.disabled'); cy.get('[data-cy-signup-rules-continue]').click(); diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index cd9521a9f8..8c1334c6a8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1013,6 +1013,7 @@ horizontal: "横" position: "位置" serverRules: "サーバールール" pleaseConfirmBelowBeforeSignup: "このサーバーに登録する前に、以下を確認してください。" +pleaseAgreeAllToContinue: "続けるには、全ての「同意する」にチェックが入っている必要があります。" continue: "続ける" _serverRules: diff --git a/packages/frontend/src/components/MkRetentionHeatmap.vue b/packages/frontend/src/components/MkRetentionHeatmap.vue index 85c009f746..f33f68cab7 100644 --- a/packages/frontend/src/components/MkRetentionHeatmap.vue +++ b/packages/frontend/src/components/MkRetentionHeatmap.vue @@ -44,7 +44,13 @@ async function renderChart() { const data = []; for (const record of raw) { - let i = 0; + data.push({ + x: 0, + y: record.createdAt, + v: record.users, + }); + + let i = 1; for (const date of Object.keys(record.data).sort((a, b) => new Date(a).getTime() - new Date(b).getTime())) { data.push({ x: i, @@ -61,8 +67,14 @@ async function renderChart() { const color = defaultStore.state.darkMode ? '#b4e900' : '#86b300'; - // 視覚上の分かりやすさのため上から最も大きい3つの値の平均を最大値とする - const max = raw.map(x => x.users).slice().sort((a, b) => b - a).slice(0, 3).reduce((a, b) => a + b, 0) / 3; + const getYYYYMMDD = (date: Date) => { + const y = date.getFullYear().toString().padStart(2, '0'); + const m = (date.getMonth() + 1).toString().padStart(2, '0'); + const d = date.getDate().toString().padStart(2, '0'); + return `${y}/${m}/${d}`; + }; + + const max = (createdAt: string) => raw.find(x => x.createdAt === createdAt)!.users; const marginEachCell = 12; @@ -78,7 +90,7 @@ async function renderChart() { borderRadius: 3, backgroundColor(c) { const value = c.dataset.data[c.dataIndex].v; - const a = value / max; + const a = value / max(c.dataset.data[c.dataIndex].y); return alpha(color, a); }, fill: true, @@ -115,7 +127,7 @@ async function renderChart() { maxRotation: 0, autoSkipPadding: 0, autoSkip: false, - callback: (value, index, values) => value + 1, + callback: (value, index, values) => value, }, }, y: { @@ -150,11 +162,11 @@ async function renderChart() { callbacks: { title(context) { const v = context[0].dataset.data[context[0].dataIndex]; - return v.d; + return getYYYYMMDD(new Date(new Date(v.y).getTime() + (v.x * 86400000))); }, label(context) { const v = context.dataset.data[context.dataIndex]; - return ['Active: ' + v.v]; + return [`Active: ${v.v} (${Math.round((v.v / max(v.y)) * 100)}%)`]; }, }, //mode: 'index', diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index be1c7f8c35..ed179ffdeb 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -18,7 +18,7 @@ {{ i18n.ts.agree }} - + @@ -27,7 +27,7 @@ {{ i18n.ts.agree }} - + @@ -36,7 +36,12 @@ {{ i18n.ts.agree }} - {{ i18n.ts.continue }} +
{{ i18n.ts.pleaseAgreeAllToContinue }}
+ +
+ {{ i18n.ts.cancel }} + {{ i18n.ts.continue }} +
@@ -62,7 +67,8 @@ const agreed = computed(() => { }); const emit = defineEmits<{ - (ev: 'accept'): void; + (ev: 'cancel'): void; + (ev: 'done'): void; }>(); diff --git a/packages/frontend/src/components/MkSignupDialog.vue b/packages/frontend/src/components/MkSignupDialog.vue index b4fc564d36..17f8b86425 100644 --- a/packages/frontend/src/components/MkSignupDialog.vue +++ b/packages/frontend/src/components/MkSignupDialog.vue @@ -17,7 +17,7 @@ :leave-to-class="$style.transition_x_leaveTo" >