tweak client

This commit is contained in:
syuilo 2022-01-02 21:35:23 +09:00
parent 92d9ce8117
commit 41ed9a1a72
19 changed files with 37 additions and 323 deletions

View file

@ -11,8 +11,6 @@
},
"dependencies": {
"@discordapp/twemoji": "13.1.0",
"@sentry/browser": "5.29.2",
"@sentry/tracing": "5.29.2",
"@syuilo/aiscript": "0.11.1",
"@types/dateformat": "3.0.1",
"@types/escape-regexp": "0.0.0",

View file

@ -1,5 +1,5 @@
<template>
<div v-sticky-container v-panel class="adfeebaf _formBlock">
<div v-sticky-container class="adfeebaf _formBlock">
<div class="label"><slot name="label"></slot></div>
<div class="main _formRoot">
<slot></slot>
@ -17,6 +17,7 @@ export default defineComponent({
<style lang="scss" scoped>
.adfeebaf {
padding: 24px 24px;
border: solid 1px var(--divider);
border-radius: var(--radius);
> .label {

View file

@ -1,6 +1,6 @@
<template>
<div
v-panel
v-adaptive-border
class="novjtctn"
:class="{ disabled, checked }"
:aria-checked="checked"
@ -53,7 +53,10 @@ export default defineComponent({
display: inline-block;
text-align: left;
cursor: pointer;
padding: 11px 14px;
padding: 10px 12px;
background-color: var(--panel);
background-clip: padding-box !important;
border: solid 1px var(--panel);
border-radius: 6px;
transition: all 0.3s;
@ -69,9 +72,13 @@ export default defineComponent({
}
}
&:hover {
border-color: var(--inputBorderHover) !important;
}
&.checked {
background: var(--accentedBg) !important;
border-color: var(--accent);
background-color: var(--accentedBg) !important;
border-color: var(--accentedBg) !important;
color: var(--accent);
&, * {
@ -89,11 +96,6 @@ export default defineComponent({
}
}
&:hover {
border-color: var(--inputBorderHover);
color: var(--accent);
}
> input {
position: absolute;
width: 0;

View file

@ -13,8 +13,6 @@ if (localStorage.getItem('accounts') != null) {
}
//#endregion
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';
import { computed, createApp, watch, markRaw, version as vueVersion } from 'vue';
import * as compareVersions from 'compare-versions';
@ -74,18 +72,6 @@ if (_DEV_) {
});
}
if (defaultStore.state.reportError && !_DEV_) {
Sentry.init({
dsn: 'https://fd273254a07a4b61857607a9ea05d629@o501808.ingest.sentry.io/5583438',
tracesSampleRate: 1.0,
});
Sentry.setTag('misskey_version', version);
Sentry.setTag('ui', ui);
Sentry.setTag('lang', lang);
Sentry.setTag('host', host);
}
// タッチデバイスでCSSの:hoverを機能させる
document.addEventListener('touchend', () => {}, { passive: true });

View file

@ -4,7 +4,6 @@ import { Component, defineAsyncComponent, markRaw, reactive, Ref, ref } from 'vu
import { EventEmitter } from 'eventemitter3';
import insertTextAtCursor from 'insert-text-at-cursor';
import * as Misskey from 'misskey-js';
import * as Sentry from '@sentry/browser';
import { apiUrl, debug, url } from '@/config';
import MkPostFormDialog from '@/components/post-form-dialog.vue';
import MkWaitingDialog from '@/components/waiting-dialog.vue';
@ -70,19 +69,6 @@ export const api = ((endpoint: string, data: Record<string, any> = {}, token?: s
log!.res = markRaw(body.error);
log!.state = 'failed';
}
if (defaultStore.state.reportError && !_DEV_) {
Sentry.withScope((scope) => {
scope.setTag('api_endpoint', endpoint);
scope.setContext('api params', data);
scope.setContext('api error info', body.info);
scope.setTag('api_error_id', body.id);
scope.setTag('api_error_code', body.code);
scope.setTag('api_error_kind', body.kind);
scope.setLevel(Sentry.Severity.Error);
Sentry.captureMessage('API error');
});
}
}
}).catch(reject);
});

View file

@ -29,9 +29,6 @@
import { computed, defineAsyncComponent, defineComponent, isRef, nextTick, onMounted, reactive, ref, watch } from 'vue';
import { i18n } from '@/i18n';
import MkSuperMenu from '@/components/ui/super-menu.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormButton from '@/components/debobigego/button.vue';
import MkInfo from '@/components/ui/info.vue';
import { scroll } from '@/scripts/scroll';
import { instance } from '@/instance';
@ -41,10 +38,7 @@ import { lookupUser } from '@/scripts/lookup-user';
export default defineComponent({
components: {
FormBase,
MkSuperMenu,
FormGroup,
FormButton,
MkInfo,
},

View file

@ -67,7 +67,6 @@
<script lang="ts">
import { computed, defineComponent, markRaw, version as vueVersion } from 'vue';
import FormKeyValueView from '@/components/debobigego/key-value-view.vue';
import MkInstanceStats from '@/components/instance-stats.vue';
import MkButton from '@/components/ui/button.vue';
import MkSelect from '@/components/form/select.vue';
@ -87,7 +86,6 @@ import * as symbols from '@/symbols';
export default defineComponent({
components: {
MkNumberDiff,
FormKeyValueView,
MkInstanceStats,
MkContainer,
MkFolder,

View file

@ -1,29 +1,25 @@
<template>
<FormBase v-if="token">
<FormInput v-model="password" type="password">
<MkSpacer v-if="token" :content-max="700" :margin-min="16" :margin-max="32">
<div class="_formRoot">
<FormInput v-model="password" type="password" class="_formBlock">
<template #prefix><i class="fas fa-lock"></i></template>
<span>{{ $ts.newPassword }}</span>
<template #label>{{ $ts.newPassword }}</template>
</FormInput>
<FormButton primary @click="save">{{ $ts.save }}</FormButton>
</FormBase>
<FormButton primary class="_formBlock" @click="save">{{ $ts.save }}</FormButton>
</div>
</MkSpacer>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import FormLink from '@/components/debobigego/link.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormInput from '@/components/debobigego/input.vue';
import FormButton from '@/components/debobigego/button.vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import * as os from '@/os';
import * as symbols from '@/symbols';
export default defineComponent({
components: {
FormBase,
FormGroup,
FormLink,
FormInput,
FormButton,
},
@ -39,7 +35,8 @@ export default defineComponent({
return {
[symbols.PAGE_INFO]: {
title: this.$ts.resetPassword,
icon: 'fas fa-lock'
icon: 'fas fa-lock',
bg: 'var(--bg)',
},
password: '',
}

View file

@ -71,9 +71,6 @@ import MkButton from '@/components/ui/button.vue';
import MkInfo from '@/components/ui/info.vue';
import MkInput from '@/components/form/input.vue';
import MkSwitch from '@/components/form/switch.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormButton from '@/components/debobigego/button.vue';
import * as os from '@/os';
import * as symbols from '@/symbols';

View file

@ -41,8 +41,6 @@
<script lang="ts">
import { defineComponent, onMounted, ref, watch } from 'vue';
import FormButton from '@/components/debobigego/button.vue';
import FormLink from '@/components/debobigego/link.vue';
import FormSection from '@/components/form/section.vue';
import FormInput from '@/components/form/input.vue';
import FormSwitch from '@/components/form/switch.vue';
@ -54,8 +52,6 @@ import { i18n } from '@/i18n';
export default defineComponent({
components: {
FormSection,
FormLink,
FormButton,
FormSwitch,
FormInput,
},

View file

@ -1,52 +0,0 @@
<template>
<FormBase>
<FormButton @click="error()">error test</FormButton>
</FormBase>
</template>
<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue';
import FormSwitch from '@/components/form/switch.vue';
import FormSelect from '@/components/form/select.vue';
import FormLink from '@/components/debobigego/link.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormButton from '@/components/debobigego/button.vue';
import FormKeyValueView from '@/components/debobigego/key-value-view.vue';
import * as os from '@/os';
import * as symbols from '@/symbols';
export default defineComponent({
components: {
FormBase,
FormSelect,
FormSwitch,
FormButton,
FormLink,
FormGroup,
FormKeyValueView,
},
emits: ['info'],
data() {
return {
[symbols.PAGE_INFO]: {
title: this.$ts.experimentalFeatures,
icon: 'fas fa-flask'
},
stats: null
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
},
methods: {
error() {
throw new Error('Test error');
}
}
});
</script>

View file

@ -218,10 +218,8 @@ export default defineComponent({
case 'plugin/manage': return defineAsyncComponent(() => import('./plugin.manage.vue'));
case 'import-export': return defineAsyncComponent(() => import('./import-export.vue'));
case 'account-info': return defineAsyncComponent(() => import('./account-info.vue'));
case 'update': return defineAsyncComponent(() => import('./update.vue'));
case 'registry': return defineAsyncComponent(() => import('./registry.vue'));
case 'delete-account': return defineAsyncComponent(() => import('./delete-account.vue'));
case 'experimental-features': return defineAsyncComponent(() => import('./experimental-features.vue'));
}
if (page.value.startsWith('registry/keys/system/')) {
return defineAsyncComponent(() => import('./registry.keys.vue'));

View file

@ -1,7 +1,5 @@
<template>
<div class="_formRoot">
<FormLink to="/settings/update" class="_formBlock">Misskey Update</FormLink>
<FormSwitch :value="$i.injectFeaturedNote" @update:modelValue="onChangeInjectFeaturedNote" class="_formBlock">
{{ $ts.showFeaturedNotesInTimeline }}
</FormSwitch>
@ -9,7 +7,6 @@
<FormSwitch v-model="reportError" class="_formBlock">{{ $ts.sendErrorReports }}<template #desc>{{ $ts.sendErrorReportsDescription }}</template></FormSwitch>
<FormLink to="/settings/account-info" class="_formBlock">{{ $ts.accountInfo }}</FormLink>
<FormLink to="/settings/experimental-features" class="_formBlock">{{ $ts.experimentalFeatures }}</FormLink>
<FormSection>
<template #label>{{ $ts.developer }}</template>

View file

@ -40,7 +40,6 @@
<script lang="ts">
import { defineComponent } from 'vue';
import FormSection from '@/components/form/section.vue';
import FormLink from '@/components/debobigego/link.vue';
import FormSlot from '@/components/form/slot.vue';
import FormButton from '@/components/ui/button.vue';
import FormPagination from '@/components/form/pagination.vue';
@ -51,7 +50,6 @@ import * as symbols from '@/symbols';
export default defineComponent({
components: {
FormSection,
FormLink,
FormButton,
FormPagination,
FormSlot,

View file

@ -1,40 +1,29 @@
<template>
<FormBase>
<FormGroup>
<FormTextarea v-model="installThemeCode">
<span>{{ $ts._theme.code }}</span>
<div class="_formRoot">
<FormTextarea v-model="installThemeCode" class="_formBlock">
<template #label>{{ $ts._theme.code }}</template>
</FormTextarea>
<FormButton :disabled="installThemeCode == null" inline @click="() => preview(installThemeCode)"><i class="fas fa-eye"></i> {{ $ts.preview }}</FormButton>
</FormGroup>
<div class="_formBlock" style="display: flex; gap: var(--margin); flex-wrap: wrap;">
<FormButton :disabled="installThemeCode == null" inline @click="() => preview(installThemeCode)"><i class="fas fa-eye"></i> {{ $ts.preview }}</FormButton>
<FormButton :disabled="installThemeCode == null" primary inline @click="() => install(installThemeCode)"><i class="fas fa-check"></i> {{ $ts.install }}</FormButton>
</FormBase>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import * as JSON5 from 'json5';
import FormTextarea from '@/components/form/textarea.vue';
import FormSelect from '@/components/form/select.vue';
import FormRadios from '@/components/form/radios.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormLink from '@/components/debobigego/link.vue';
import FormButton from '@/components/debobigego/button.vue';
import FormButton from '@/components/ui/button.vue';
import { applyTheme, validateTheme } from '@/scripts/theme';
import * as os from '@/os';
import { ColdDeviceStorage } from '@/store';
import { addTheme, getThemes } from '@/theme-store';
import * as symbols from '@/symbols';
export default defineComponent({
components: {
FormTextarea,
FormSelect,
FormRadios,
FormBase,
FormGroup,
FormLink,
FormButton,
},

View file

@ -30,9 +30,6 @@ import { defineComponent } from 'vue';
import * as JSON5 from 'json5';
import FormTextarea from '@/components/form/textarea.vue';
import FormSelect from '@/components/form/select.vue';
import FormRadios from '@/components/form/radios.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import { Theme, builtinThemes } from '@/scripts/theme';
@ -46,9 +43,6 @@ export default defineComponent({
components: {
FormTextarea,
FormSelect,
FormRadios,
FormBase,
FormGroup,
FormInput,
FormButton,
},

View file

@ -1,95 +0,0 @@
<template>
<FormBase>
<template v-if="meta">
<FormInfo v-if="version === meta.version">{{ $ts.youAreRunningUpToDateClient }}</FormInfo>
<FormInfo v-else warn>{{ $ts.newVersionOfClientAvailable }}</FormInfo>
</template>
<FormGroup>
<template #label>{{ instanceName }}</template>
<FormKeyValueView>
<template #key>{{ $ts.currentVersion }}</template>
<template #value>{{ version }}</template>
</FormKeyValueView>
<FormKeyValueView>
<template #key>{{ $ts.latestVersion }}</template>
<template v-if="meta" #value>{{ meta.version }}</template>
<template v-else #value><MkEllipsis/></template>
</FormKeyValueView>
</FormGroup>
<FormGroup>
<template #label>Misskey</template>
<FormKeyValueView>
<template #key>{{ $ts.latestVersion }}</template>
<template v-if="releases" #value>{{ releases[0].tag_name }}</template>
<template v-else #value><MkEllipsis/></template>
</FormKeyValueView>
<template v-if="releases" #caption><MkTime :time="releases[0].published_at" mode="detail"/></template>
</FormGroup>
</FormBase>
</template>
<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue';
import FormSwitch from '@/components/form/switch.vue';
import FormSelect from '@/components/form/select.vue';
import FormLink from '@/components/debobigego/link.vue';
import FormBase from '@/components/debobigego/base.vue';
import FormGroup from '@/components/debobigego/group.vue';
import FormButton from '@/components/debobigego/button.vue';
import FormKeyValueView from '@/components/debobigego/key-value-view.vue';
import FormInfo from '@/components/debobigego/info.vue';
import * as os from '@/os';
import { version, instanceName } from '@/config';
import * as symbols from '@/symbols';
export default defineComponent({
components: {
FormBase,
FormSelect,
FormSwitch,
FormButton,
FormLink,
FormGroup,
FormKeyValueView,
FormInfo,
},
emits: ['info'],
data() {
return {
[symbols.PAGE_INFO]: {
title: 'Misskey Update',
icon: 'fas fa-sync-alt',
bg: 'var(--bg)',
},
version,
instanceName,
releases: null,
meta: null
}
},
mounted() {
this.$emit('info', this[symbols.PAGE_INFO]);
os.api('meta', {
detail: false
}).then(meta => {
this.meta = meta;
localStorage.setItem('v', meta.version);
});
fetch('https://api.github.com/repos/misskey-dev/misskey/releases', {
method: 'GET',
})
.then(res => res.json())
.then(res => {
this.releases = res;
});
},
methods: {
}
});
</script>

View file

@ -31,7 +31,6 @@
<script lang="ts">
import { defineComponent } from 'vue';
import FormTextarea from '@/components/form/textarea.vue';
import FormBase from '@/components/debobigego/base.vue';
import MkKeyValue from '@/components/key-value.vue';
import MkButton from '@/components/ui/button.vue';
import MkInfo from '@/components/ui/info.vue';
@ -42,7 +41,6 @@ import * as symbols from '@/symbols';
export default defineComponent({
components: {
FormBase,
MkButton,
FormTextarea,
MkKeyValue,

View file

@ -202,69 +202,6 @@
node-fetch "^2.6.1"
yaml-ast-parser "0.0.43"
"@sentry/browser@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.29.2.tgz#51adb4005511b1a4a70e4571880fc6653d651f91"
integrity sha512-uxZ7y7rp85tJll+RZtXRhXPbnFnOaxZqJEv05vJlXBtBNLQtlczV5iCtU9mZRLVHDtmZ5VVKUV8IKXntEqqDpQ==
dependencies:
"@sentry/core" "5.29.2"
"@sentry/types" "5.29.2"
"@sentry/utils" "5.29.2"
tslib "^1.9.3"
"@sentry/core@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.29.2.tgz#9e05fe197234161d57aabaf52fab336a7c520d81"
integrity sha512-7WYkoxB5IdlNEbwOwqSU64erUKH4laavPsM0/yQ+jojM76ErxlgEF0u//p5WaLPRzh3iDSt6BH+9TL45oNZeZw==
dependencies:
"@sentry/hub" "5.29.2"
"@sentry/minimal" "5.29.2"
"@sentry/types" "5.29.2"
"@sentry/utils" "5.29.2"
tslib "^1.9.3"
"@sentry/hub@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.29.2.tgz#208f10fe6674695575ad74182a1151f71d6df00a"
integrity sha512-LaAIo2hwUk9ykeh9RF0cwLy6IRw+DjEee8l1HfEaDFUM6TPGlNNGObMJNXb9/95jzWp7jWwOpQjoIE3jepdQJQ==
dependencies:
"@sentry/types" "5.29.2"
"@sentry/utils" "5.29.2"
tslib "^1.9.3"
"@sentry/minimal@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.29.2.tgz#420bebac8d03d30980fdb05c72d7b253d8aa541b"
integrity sha512-0aINSm8fGA1KyM7PavOBe1GDZDxrvnKt+oFnU0L+bTcw8Lr+of+v6Kwd97rkLRNOLw621xP076dL/7LSIzMuhw==
dependencies:
"@sentry/hub" "5.29.2"
"@sentry/types" "5.29.2"
tslib "^1.9.3"
"@sentry/tracing@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.29.2.tgz#6012788547d2ab7893799d82c4941bda145dcd47"
integrity sha512-iumYbVRpvoU3BUuIooxibydeaOOjl5ysc+mzsqhRs2NGW/C3uKAsFXdvyNfqt3bxtRQwJEhwJByLP2u3pLThpw==
dependencies:
"@sentry/hub" "5.29.2"
"@sentry/minimal" "5.29.2"
"@sentry/types" "5.29.2"
"@sentry/utils" "5.29.2"
tslib "^1.9.3"
"@sentry/types@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.29.2.tgz#ac87383df1222c2d9b9f8f9ed7a6b86ea41a098a"
integrity sha512-dM9wgt8wy4WRty75QkqQgrw9FV9F+BOMfmc0iaX13Qos7i6Qs2Q0dxtJ83SoR4YGtW8URaHzlDtWlGs5egBiMA==
"@sentry/utils@5.29.2":
version "5.29.2"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.29.2.tgz#99a5cdda2ea19d34a41932f138d470adcb3ee673"
integrity sha512-nEwQIDjtFkeE4k6yIk4Ka5XjGRklNLThWLs2xfXlL7uwrYOH2B9UBBOOIRUraBm/g/Xrra3xsam/kRxuiwtXZQ==
dependencies:
"@sentry/types" "5.29.2"
tslib "^1.9.3"
"@sideway/address@^4.1.0":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.2.tgz#811b84333a335739d3969cfc434736268170cad1"
@ -5961,11 +5898,6 @@ tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"