Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v2023.10.1-kakurega.1.20.2 #86

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ temp

# VSCode addon
.favorites.json

.env
2 changes: 2 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,8 @@ export interface Locale {
"showOldMuteWords": string;
"showMutedInfo": string;
"showMutedInfoDescription": string;
"optoutStatistics": string;
"optoutStatisticsDescription": string;
"_announcement": {
"forExistingUsers": string;
"forExistingUsersDescription": string;
Expand Down
2 changes: 2 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,8 @@ tosAndPrivacyPolicy: "利用規約・プライバシーポリシー"
showOldMuteWords: "ソフトワードミュートに設定していた情報を表示する"
showMutedInfo: "「○○が何か言いました」を表示する"
showMutedInfoDescription: "オンにすると以前のソフトミュートと同様の挙動になります。オフで以前のハードミュートの挙動になります。"
optoutStatistics: "エラー情報の送信をやめる"
optoutStatisticsDescription: "{instance}では、不具合の原因の特定を行えるよう、問題が発生したときにエラーの詳細情報を取得しています。ONにすることで、エラー情報の送信をしないようにします。"

_announcement:
forExistingUsers: "既存ユーザーのみ"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2023.10.1-kakurega.1.20.1",
"version": "2023.10.1-kakurega.1.20.2",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
"acorn": "8.10.0",
"cross-env": "7.0.3",
"cypress": "13.3.0",
"dotenv": "^16.3.1",
"eslint": "8.51.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-vue": "9.17.0",
Expand All @@ -133,6 +134,7 @@
"storybook": "7.4.6",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly",
"vite-plugin-sentry": "^1.3.0",
"vite-plugin-turbosnap": "1.0.3",
"vitest": "0.34.6",
"vitest-fetch-mock": "0.2.2",
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/boot/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,12 @@ export async function common(createVue: () => App<Element>) {

const app = createVue();

if (!_DEV_) {
const uri = new URL(location.href);
if (!_DEV_ && uri.hostname === 'misskey.yukineko.me' && !defaultStore.state.optoutStatistics) {
Sentry.init({
app,
dsn: 'https://4787e38fa976cc8ffc3b9348fb96a2e1@sentry.yukineko.dev/2',
release: version,
});
}

Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/pages/settings/other.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch>
-->

<!--
<MkSwitch v-model="reportError">{{ i18n.ts.sendErrorReports }}<template #caption>{{ i18n.ts.sendErrorReportsDescription }}</template></MkSwitch>
-->
<MkSwitch v-if="host === 'misskey.yukineko.me'" v-model="reportError">{{ i18n.ts.optoutStatistics }}<template #caption>{{ i18n.t('optoutStatisticsDescription', { instance: instance.name || host }) }}</template></MkSwitch>

<FormSection first>
<div class="_gaps_s">
Expand Down Expand Up @@ -88,11 +86,13 @@ import * as os from '@/os.js';
import { defaultStore } from '@/store.js';
import { signout, $i } from '@/account.js';
import { i18n } from '@/i18n.js';
import { instance } from '@/instance.js';
import { host } from '@/config.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { unisonReload } from '@/scripts/unison-reload.js';
import FormSection from '@/components/form/section.vue';

const reportError = computed(defaultStore.makeGetterSetter('reportError'));
const reportError = computed(defaultStore.makeGetterSetter('optoutStatistics'));
const enableCondensedLineForAcct = computed(defaultStore.makeGetterSetter('enableCondensedLineForAcct'));
const devMode = computed(defaultStore.makeGetterSetter('devMode'));

Expand Down
4 changes: 4 additions & 0 deletions packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: false,
},
optoutStatistics: {
where: 'account',
default: false,
},
}));

// TODO: 他のタブと永続化されたstateを同期
Expand Down
17 changes: 16 additions & 1 deletion packages/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ import pluginVue from '@vitejs/plugin-vue';
import { type UserConfig, defineConfig } from 'vite';
// @ts-expect-error https://github.com/sxzz/unplugin-vue-macros/issues/257#issuecomment-1410752890
import ReactivityTransform from '@vue-macros/reactivity-transform/vite';
import viteSentry from 'vite-plugin-sentry';
import dotenv from 'dotenv';

import locales from '../../locales';
import meta from '../../package.json';
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name';
import pluginJson5 from './vite.json5';

dotenv.config();

const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.json', '.json5', '.svg', '.sass', '.scss', '.css', '.vue'];

const hash = (str: string, seed = 0): number => {
Expand Down Expand Up @@ -58,6 +62,17 @@ export function getConfig(): UserConfig {
pluginJson5(),
...process.env.NODE_ENV === 'production'
? [
process.env.SENTRY_AUTH_TOKEN ? viteSentry({
url: 'https://sentry.yukineko.dev',
org: 'sentry',
project: 'misskey-kakurega',
authToken: process.env.SENTRY_AUTH_TOKEN,
release: meta.version,
sourceMaps: {
urlPrefix: '~/vite',
include: ['../../built/_vite_'],
},
}) : null,
pluginReplace({
preventAssignment: true,
values: {
Expand Down Expand Up @@ -134,7 +149,7 @@ export function getConfig(): UserConfig {
outDir: __dirname + '/../../built/_vite_',
assetsDir: '.',
emptyOutDir: false,
sourcemap: process.env.NODE_ENV === 'development',
sourcemap: true,
reportCompressedSize: false,

// https://vitejs.dev/guide/dep-pre-bundling.html#monorepos-and-linked-dependencies
Expand Down
47 changes: 46 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading