Merge branch 'develop' into sw-notification-action

This commit is contained in:
tamaina 2021-04-14 02:18:13 +09:00
commit 5052603c40
207 changed files with 2790 additions and 1242 deletions

View file

@ -687,6 +687,7 @@ textColor: "文字"
saveAs: "名前を付けて保存"
advanced: "高度"
value: "値"
createdAt: "作成日時"
updatedAt: "更新日時"
saveConfirm: "保存しますか?"
deleteConfirm: "削除しますか?"
@ -710,6 +711,11 @@ typingUsers: "{users}が入力中"
jumpToSpecifiedDate: "特定の日付にジャンプ"
showingPastTimeline: "過去のタイムラインを表示しています"
clear: "クリア"
markAllAsRead: "全て既読にする"
goBack: "戻る"
unlikeConfirm: "いいね解除しますか?"
fullView: "フルビュー"
quitFullView: "フルビュー解除"
_email:
_follow:

View file

@ -88,6 +88,7 @@
"@types/parsimmon": "1.10.6",
"@types/portscanner": "2.1.0",
"@types/pug": "2.0.4",
"@types/punycode": "2.1.0",
"@types/qrcode": "1.4.0",
"@types/random-seed": "0.3.3",
"@types/ratelimiter": "3.4.1",
@ -180,7 +181,7 @@
"markdown-it": "12.0.4",
"markdown-it-anchor": "7.1.0",
"matter-js": "0.16.1",
"mfm-js": "0.12.0",
"mfm-js": "0.14.0",
"mocha": "8.3.2",
"moji": "0.5.1",
"ms": "2.1.3",
@ -252,6 +253,7 @@
"vue-prism-editor": "2.0.0-alpha.2",
"vue-router": "4.0.5",
"vue-style-loader": "4.1.3",
"vue-svg-loader": "0.17.0-beta.2",
"vuedraggable": "4.0.1",
"web-push": "3.4.4",
"webpack": "5.27.2",

View file

@ -8,21 +8,17 @@
</template>
</I18n>
</template>
<div class="dpvffvvy">
<div class="dpvffvvy _monolithic_">
<div class="_section">
<div class="_content">
<MkTextarea v-model:value="comment">
<span>{{ $ts.details }}</span>
<template #desc>{{ $ts.fillAbuseReportDescription }}</template>
</MkTextarea>
</div>
</div>
<div class="_section">
<div class="_content">
<MkButton @click="send" primary full :disabled="comment.length === 0">{{ $ts.send }}</MkButton>
</div>
</div>
</div>
</XWindow>
</template>
@ -80,6 +76,6 @@ export default defineComponent({
<style lang="scss" scoped>
.dpvffvvy {
--section-padding: 16px;
--root-margin: 16px;
}
</style>

View file

@ -123,7 +123,7 @@ export default defineComponent({
> footer {
padding: 12px 16px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
> span {
opacity: 0.7;

View file

@ -37,14 +37,16 @@ export default defineComponent({
});
}
const noGap = [...document.querySelectorAll('._noGap_')].some(el => el.contains(this.$parent.$el));
return h(this.$store.state.animation ? TransitionGroup : 'div', this.$store.state.animation ? {
class: 'sqadhkmv _list_',
class: 'sqadhkmv' + (noGap ? ' _block' : ''),
name: 'list',
tag: 'div',
'data-direction': this.direction,
'data-reversed': this.reversed ? 'true' : 'false',
} : {
class: 'sqadhkmv _list_',
class: 'sqadhkmv',
}, this.items.map((item, i) => {
const el = this.$slots.default({
item: item
@ -117,11 +119,7 @@ export default defineComponent({
transform: translateY(-64px);
}
}
}
</style>
<style lang="scss">
.sqadhkmv {
> .separator {
text-align: center;
@ -155,4 +153,25 @@ export default defineComponent({
}
}
}
._noGap_ .sqadhkmv {
> * {
margin: 0 !important;
border: none;
border-radius: 0;
box-shadow: none;
&:not(:last-child) {
border-bottom: solid 0.5px var(--divider);
}
}
}
._inContainer_ .sqadhkmv > * {
margin: 0 !important;
border: none;
border-bottom: solid 0.5px var(--divider);
border-radius: 0;
box-shadow: none;
}
</style>

View file

@ -330,8 +330,8 @@ export default defineComponent({
}
> .thumbnail {
width: 128px;
height: 128px;
width: 110px;
height: 110px;
margin: auto;
}

View file

@ -11,7 +11,7 @@
<span class="folder current" v-if="folder != null">{{ folder.name }}</span>
</div>
</nav>
<div class="main _section" :class="{ uploading: uploadings.length > 0, fetching }"
<div class="main" :class="{ uploading: uploadings.length > 0, fetching }"
ref="main"
@dragover.prevent.stop="onDragover"
@dragenter="onDragenter"
@ -704,6 +704,7 @@ export default defineComponent({
> .main {
flex: 1;
overflow: auto;
padding: var(--margin);
&, * {
user-select: none;
@ -735,7 +736,7 @@ export default defineComponent({
> .folder,
> .file {
flex-grow: 1;
width: 144px;
width: 128px;
margin: 4px;
box-sizing: border-box;
}
@ -743,7 +744,7 @@ export default defineComponent({
> .padding {
flex-grow: 1;
pointer-events: none;
width: 144px + 8px;
width: 128px + 8px;
}
}

View file

@ -123,7 +123,7 @@ export default defineComponent({
> .index {
min-height: var(--height);
position: relative;
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
> .arrow {
position: absolute;
@ -181,7 +181,7 @@ export default defineComponent({
}
&.result {
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
&:empty {
display: none;

View file

@ -119,7 +119,7 @@ export default defineComponent({
> .index {
min-height: var(--height);
position: relative;
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
> .arrow {
position: absolute;
@ -177,7 +177,7 @@ export default defineComponent({
}
&.result {
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
&:empty {
display: none;

View file

@ -402,7 +402,7 @@ export default defineComponent({
> .tab {
flex: 1;
height: 38px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
&.active {
border-top: solid 1px var(--accent);
@ -425,7 +425,7 @@ export default defineComponent({
> div {
&:not(.index) {
padding: 4px 0 8px 0;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
> header {
@ -492,7 +492,7 @@ export default defineComponent({
}
&.result {
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
&:empty {
display: none;

View file

@ -20,12 +20,16 @@ export default defineComponent({
<style lang="scss" scoped>
.rbusrurv {
line-height: 1.4em;
// CSS
--formXPadding: 32px;
--formYPadding: 32px;
line-height: 1.3em;
background: var(--bg);
padding: 32px;
padding: var(--formYPadding) var(--formXPadding);
&:not(.wide).max-width_400px {
padding: 32px 0;
--formXPadding: 0px;
> ::v-deep(*) {
._formPanel {

View file

@ -1,32 +1,48 @@
._formPanel {
background: var(--panel);
border-radius: var(--radius);
transition: background 0.2s ease;
&._formClickable {
&:hover {
//background: var(--panelHighlight);
}
&:active {
background: var(--panelHighlight);
transition: background 0s;
}
}
}
._formLabel,
._formCaption {
font-size: 80%;
color: var(--fgTransparentWeak);
&:empty {
display: none;
}
}
._formLabel {
font-size: 80%;
padding: 0 16px 8px 16px;
opacity: 0.8;
&:empty {
display: none;
position: sticky;
top: var(--stickyTop, 0px);
z-index: 2;
margin: -8px calc(var(--formXPadding) * -1) 0 calc(var(--formXPadding) * -1);
padding: 8px calc(16px + var(--formXPadding)) 8px calc(16px + var(--formXPadding));
background: var(--X17);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
._themeChanging_ ._formLabel {
transition: none !important;
background: transparent;
}
._formCaption {
font-size: 80%;
padding: 8px 16px 0 16px;
opacity: 0.8;
&:empty {
display: none;
}
}
._formItem {

View file

@ -0,0 +1,49 @@
<template>
<div class="fzenkabp _formItem">
<div class="_formPanel" :class="{ warn }">
<i v-if="warn"><Fa :icon="faExclamationTriangle"/></i>
<i v-else><Fa :icon="faInfoCircle"/></i>
<slot></slot>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { faInfoCircle, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
export default defineComponent({
props: {
warn: {
type: Boolean,
required: false,
default: false
},
},
data() {
return {
faInfoCircle, faExclamationTriangle
};
}
});
</script>
<style lang="scss" scoped>
.fzenkabp {
> div {
padding: 14px 16px;
font-size: 90%;
background: var(--infoBg);
color: var(--infoFg);
&.warn {
background: var(--infoWarnBg);
color: var(--infoWarnFg);
}
> i {
margin-right: 4px;
}
}
}
</style>

View file

@ -215,7 +215,7 @@ export default defineComponent({
}
> .input {
$height: 52px;
$height: 48px;
position: relative;
> input {

View file

@ -66,6 +66,7 @@ export default defineComponent({
&.active {
color: var(--accent);
background: var(--panelHighlight);
}
> .icon {

View file

@ -69,8 +69,8 @@ export default defineComponent({
display: inline-block;
vertical-align: bottom;
position: relative;
width: 20px;
height: 20px;
width: 16px;
height: 16px;
margin-right: 8px;
background: none;
border: 2px solid var(--inputBorder);

View file

@ -69,7 +69,7 @@ export default defineComponent({
position: relative;
> .main {
padding: 24px 16px;
padding: 22px 16px;
> input {
display: block;

View file

@ -97,7 +97,7 @@ export default defineComponent({
font: inherit;
font-weight: normal;
font-size: 1em;
height: 52px;
height: 48px;
background: none;
border: none;
border-radius: 0;

View file

@ -57,7 +57,7 @@ export default defineComponent({
> .main {
position: relative;
display: flex;
padding: 16px;
padding: 14px 16px;
cursor: pointer;
> * {

View file

@ -93,6 +93,10 @@ export default defineComponent({
os.pageWindow(this.to);
},
modalWindow() {
os.modalPageWindow(this.to);
},
popout() {
popout(this.to);
},
@ -111,6 +115,8 @@ export default defineComponent({
if (this.behavior) {
if (this.behavior === 'window') {
return this.window();
} else if (this.behavior === 'modalWindow') {
return this.modalWindow();
}
}

View file

@ -1,5 +1,5 @@
<template>
<span class="mk-acct" v-once>
<span class="mk-acct">
<span class="name">@{{ user.username }}</span>
<span class="host" v-if="user.host || detail || $store.state.showFullAcct">@{{ user.host || host }}</span>
</span>
@ -7,11 +7,20 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { host } from '@client/config';
export default defineComponent({
props: ['user', 'detail'],
props: {
user: {
type: Object,
required: true
},
detail: {
type: Boolean,
default: false
},
},
data() {
return {
host: toUnicode(host),

View file

@ -22,7 +22,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { faExternalLinkSquareAlt } from '@fortawesome/free-solid-svg-icons';
import { toUnicode as decodePunycode } from 'punycode';
import { toUnicode as decodePunycode } from 'punycode/';
import { url as local } from '@client/config';
import { isDeviceTouch } from '@client/scripts/is-device-touch';
import * as os from '@client/os';

View file

@ -146,7 +146,7 @@ export default defineComponent({
> .sub {
margin-top: 8px;
padding-top: 8px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
}
</style>

View file

@ -123,7 +123,7 @@ export default defineComponent({
.gqnyydlz {
position: relative;
border: solid 1px var(--divider);
border: solid 0.5px var(--divider);
> i {
display: block;

View file

@ -16,7 +16,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { host as localHost } from '@client/config';
import { wellKnownServices } from '../../well-known-services';
import * as os from '@client/os';

View file

@ -0,0 +1,213 @@
<template>
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
<div class="hrmcaedk _popup _narrow_" :style="{ width: `${width}px`, height: (height ? `min(${height}px, 100%)` : '100%') }">
<div class="header">
<button class="_button" @click="back()" v-if="history.length > 0"><Fa :icon="faChevronLeft"/></button>
<button class="_button" style="pointer-events: none;" v-else><!-- マージンのバランスを取るためのダミー --></button>
<span class="title">
<XHeader :info="pageInfo" :with-back="false"/>
</span>
<button class="_button" @click="$refs.modal.close()"><Fa :icon="faTimes"/></button>
</div>
<div class="body _flat_">
<keep-alive>
<component :is="component" v-bind="props" :ref="changePage"/>
</keep-alive>
</div>
</div>
</MkModal>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { faExternalLinkAlt, faExpandAlt, faLink, faChevronLeft, faColumns, faTimes } from '@fortawesome/free-solid-svg-icons';
import MkModal from '@client/components/ui/modal.vue';
import XHeader from '@client/ui/_common_/header.vue';
import { popout } from '@client/scripts/popout';
import copyToClipboard from '@client/scripts/copy-to-clipboard';
import { resolve } from '@client/router';
import { url } from '@client/config';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
MkModal,
XHeader,
},
inject: {
sideViewHook: {
default: null
}
},
provide() {
return {
navHook: (path) => {
this.navigate(path);
}
};
},
props: {
initialPath: {
type: String,
required: true,
},
initialComponent: {
type: Object,
required: true,
},
initialProps: {
type: Object,
required: false,
default: () => {},
},
},
emits: ['closed'],
data() {
return {
width: 860,
height: 660,
pageInfo: null,
path: this.initialPath,
component: this.initialComponent,
props: this.initialProps,
history: [],
faChevronLeft, faTimes,
};
},
computed: {
url(): string {
return url + this.path;
},
contextmenu() {
return [{
type: 'label',
text: this.path,
}, {
icon: faExpandAlt,
text: this.$ts.showInPage,
action: this.expand
}, this.sideViewHook ? {
icon: faColumns,
text: this.$ts.openInSideView,
action: () => {
this.sideViewHook(this.path);
this.$refs.window.close();
}
} : undefined, {
icon: faExternalLinkAlt,
text: this.$ts.popout,
action: this.popout
}, null, {
icon: faExternalLinkAlt,
text: this.$ts.openInNewTab,
action: () => {
window.open(this.url, '_blank');
this.$refs.window.close();
}
}, {
icon: faLink,
text: this.$ts.copyLink,
action: () => {
copyToClipboard(this.url);
}
}];
},
},
methods: {
changePage(page) {
if (page == null) return;
if (page[symbols.PAGE_INFO]) {
this.pageInfo = page[symbols.PAGE_INFO];
}
},
navigate(path, record = true) {
if (record) this.history.push(this.path);
this.path = path;
const { component, props } = resolve(path);
this.component = component;
this.props = props;
},
back() {
this.navigate(this.history.pop(), false);
},
expand() {
this.$router.push(this.path);
this.$refs.window.close();
},
popout() {
popout(this.path, this.$el);
this.$refs.window.close();
},
},
});
</script>
<style lang="scss" scoped>
.hrmcaedk {
overflow: hidden;
display: flex;
flex-direction: column;
contain: content;
--root-margin: 24px;
@media (max-width: 500px) {
--root-margin: 16px;
}
> .header {
$height: 52px;
$height-narrow: 42px;
display: flex;
flex-shrink: 0;
box-shadow: 0px 1px var(--divider);
> button {
height: $height;
width: $height;
@media (max-width: 500px) {
height: $height-narrow;
width: $height-narrow;
}
}
> .title {
flex: 1;
line-height: $height;
padding-left: 32px;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
pointer-events: none;
@media (max-width: 500px) {
line-height: $height-narrow;
padding-left: 16px;
}
}
> button + .title {
padding-left: 0;
}
}
> .body {
overflow: auto;
background: var(--bg);
}
}
</style>

View file

@ -1,6 +1,6 @@
<template>
<div
class="note _panel"
class="note _block"
v-if="!muted"
v-show="!isDeleted"
:tabindex="!isDeleted ? '-1' : null"
@ -121,7 +121,7 @@
<script lang="ts">
import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip, faShareAlt } from '@fortawesome/free-solid-svg-icons';
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
import * as mfm from 'mfm-js';
import { sum } from '../../prelude/array';
@ -625,6 +625,11 @@ export default defineComponent({
window.open(this.appearNote.url || this.appearNote.uri, '_blank');
}
} : undefined,
{
icon: faShareAlt,
text: this.$ts.share,
action: this.share
},
null,
statePromise.then(state => state.isFavorited ? {
icon: faStar,
@ -850,6 +855,14 @@ export default defineComponent({
});
},
share() {
navigator.share({
title: this.$t('noteOf', { user: this.appearNote.user.name }),
text: this.appearNote.text,
url: `${url}/notes/${this.appearNote.id}`
});
},
focus() {
this.$el.focus();
},
@ -1007,7 +1020,7 @@ export default defineComponent({
margin: 0 0.5em;
padding: 4px 6px;
font-size: 80%;
border: solid 1px var(--divider);
border: solid 0.5px var(--divider);
border-radius: 4px;
}
@ -1110,7 +1123,7 @@ export default defineComponent({
}
> .reply {
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
&.max-width_500px {

View file

@ -78,7 +78,7 @@ export default defineComponent({
margin: 0 .5em 0 0;
padding: 1px 6px;
font-size: 80%;
border: solid 1px var(--divider);
border: solid 0.5px var(--divider);
border-radius: 3px;
}

View file

@ -139,7 +139,7 @@ export default defineComponent({
}
> .reply {
border-left: solid 1px var(--divider);
border-left: solid 0.5px var(--divider);
margin-top: 10px;
}
}

View file

@ -1,6 +1,6 @@
<template>
<div
class="tkcbzcuz _panel"
class="tkcbzcuz"
v-if="!muted"
v-show="!isDeleted"
:tabindex="!isDeleted ? '-1' : null"
@ -90,7 +90,7 @@
</div>
</article>
</div>
<div v-else class="_panel muted" @click="muted = false">
<div v-else class="muted" @click="muted = false">
<I18n :src="$ts.userSaysSomething" tag="small">
<template #name>
<MkA class="name" :to="userPage(appearNote.user)" v-user-preview="appearNote.userId">
@ -103,7 +103,7 @@
<script lang="ts">
import { defineAsyncComponent, defineComponent, markRaw } from 'vue';
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip } from '@fortawesome/free-solid-svg-icons';
import { faSatelliteDish, faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle, faBiohazard, faPlug, faExclamationCircle, faPaperclip, faShareAlt } from '@fortawesome/free-solid-svg-icons';
import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
import * as mfm from 'mfm-js';
import { sum } from '../../prelude/array';
@ -600,6 +600,11 @@ export default defineComponent({
window.open(this.appearNote.url || this.appearNote.uri, '_blank');
}
} : undefined,
{
icon: faShareAlt,
text: this.$ts.share,
action: this.share
},
null,
statePromise.then(state => state.isFavorited ? {
icon: faStar,
@ -825,6 +830,14 @@ export default defineComponent({
});
},
share() {
navigator.share({
title: this.$t('noteOf', { user: this.appearNote.user.name }),
text: this.appearNote.text,
url: `${url}/notes/${this.appearNote.id}`
});
},
focus() {
this.$el.focus();
},
@ -850,7 +863,7 @@ export default defineComponent({
.tkcbzcuz {
position: relative;
transition: box-shadow 0.1s ease;
overflow: hidden;
overflow: clip;
contain: content;
//
@ -981,11 +994,12 @@ export default defineComponent({
> .avatar {
flex-shrink: 0;
display: block;
//position: sticky;
//top: 72px;
margin: 0 14px 8px 0;
width: 58px;
height: 58px;
position: sticky;
top: calc(22px + var(--stickyTop, 0px));
left: 0;
}
> .main {
@ -1106,7 +1120,7 @@ export default defineComponent({
}
> .reply {
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
&.max-width_500px {
@ -1129,6 +1143,7 @@ export default defineComponent({
margin: 0 10px 8px 0;
width: 50px;
height: 50px;
top: calc(14px + var(--stickyTop, 0px));
}
}
}

View file

@ -1,5 +1,5 @@
<template>
<div class="_list_">
<div>
<div class="_fullinfo" v-if="empty">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<div>{{ $ts.noNotes }}</div>
@ -15,7 +15,7 @@
</div>
<XList ref="notes" :items="notes" v-slot="{ item: note }" :direction="reversed ? 'up' : 'down'" :reversed="reversed">
<XNote :note="note" @update:note="updated(note, $event)" :key="note._featuredId_ || note._prId_ || note.id"/>
<XNote :note="note" class="_block" @update:note="updated(note, $event)" :key="note._featuredId_ || note._prId_ || note.id"/>
</XList>
<div v-show="more && !reversed" style="margin-top: var(--margin);">

View file

@ -9,6 +9,7 @@
@closed="$emit('closed')"
>
<template #header>{{ $ts.notificationSetting }}</template>
<div class="_monolithic_">
<div v-if="showGlobalToggle" class="_section">
<MkSwitch v-model:value="useGlobalSetting">
{{ $ts.useGlobalSetting }}
@ -21,6 +22,7 @@
<MkButton inline @click="enableAll">{{ $ts.enableAll }}</MkButton>
<MkSwitch v-for="type in notificationTypes" :key="type" v-model:value="typesMap[type]">{{ $t(`_notification._types.${type}`) }}</MkSwitch>
</div>
</div>
</XModalWindow>
</template>

View file

@ -1,5 +1,5 @@
<template>
<MkA :to="`/@${page.user.username}/pages/${page.name}`" class="vhpxefrj _panel" tabindex="-1">
<MkA :to="`/@${page.user.username}/pages/${page.name}`" class="vhpxefrj _block _isolated" tabindex="-1">
<div class="thumbnail" v-if="page.eyeCatchingImage" :style="`background-image: url('${page.eyeCatchingImage.thumbnailUrl}')`"></div>
<article>
<header>
@ -35,7 +35,6 @@ export default defineComponent({
<style lang="scss" scoped>
.vhpxefrj {
display: block;
width: 100%;
&:hover {
text-decoration: none;

View file

@ -14,7 +14,7 @@
<button class="_button" @click="back()" v-if="history.length > 0"><Fa :icon="faChevronLeft"/></button>
<button class="_button" style="pointer-events: none;" v-else><!-- マージンのバランスを取るためのダミー --></button>
</template>
<div class="yrolvcoq" style="min-height: 100%; background: var(--bg);">
<div class="yrolvcoq _flat_">
<component :is="component" v-bind="props" :ref="changePage"/>
</div>
</XWindow>
@ -29,6 +29,7 @@ import { popout } from '@client/scripts/popout';
import copyToClipboard from '@client/scripts/copy-to-clipboard';
import { resolve } from '@client/router';
import { url } from '@client/config';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -123,8 +124,8 @@ export default defineComponent({
methods: {
changePage(page) {
if (page == null) return;
if (page.INFO) {
this.pageInfo = page.INFO;
if (page[symbols.PAGE_INFO]) {
this.pageInfo = page[symbols.PAGE_INFO];
}
},
@ -155,6 +156,7 @@ export default defineComponent({
<style lang="scss" scoped>
.yrolvcoq {
--section-padding: 16px;
min-height: 100%;
background: var(--bg);
}
</style>

View file

@ -110,7 +110,7 @@ export default defineComponent({
position: relative;
margin: 4px 0;
padding: 4px 8px;
border: solid 1px var(--divider);
border: solid 0.5px var(--divider);
border-radius: 4px;
overflow: hidden;
cursor: pointer;

View file

@ -56,12 +56,12 @@ import { faReply, faQuoteRight, faPaperPlane, faTimes, faUpload, faPollH, faGlob
import { faEyeSlash, faLaughSquint } from '@fortawesome/free-regular-svg-icons';
import insertTextAtCursor from 'insert-text-at-cursor';
import { length } from 'stringz';
import { toASCII } from 'punycode';
import { toASCII } from 'punycode/';
import XNotePreview from './note-preview.vue';
import * as mfm from 'mfm-js';
import { host, url } from '@client/config';
import { erase, unique } from '../../prelude/array';
import extractMentions from '@/misc/extract-mentions';
import { extractMentions } from '@/misc/extract-mentions';
import getAcct from '@/misc/acct/render';
import { formatTimeString } from '@/misc/format-time-string';
import { Autocomplete } from '@client/scripts/autocomplete';
@ -793,7 +793,7 @@ export default defineComponent({
> .cw {
z-index: 1;
padding-bottom: 8px;
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
}
> .text {

View file

@ -1,5 +1,5 @@
<template>
<div class="jmgmzlwq _panel"><Fa :icon="faExclamationTriangle" style="margin-right: 8px;"/>{{ $ts.remoteUserCaution }}<a :href="href" rel="nofollow noopener" target="_blank">{{ $ts.showOnRemote }}</a></div>
<div class="jmgmzlwq _block"><Fa :icon="faExclamationTriangle" style="margin-right: 8px;"/>{{ $ts.remoteUserCaution }}<a :href="href" rel="nofollow noopener" target="_blank">{{ $ts.showOnRemote }}</a></div>
</template>
<script lang="ts">

View file

@ -1,5 +1,5 @@
<template>
<form class="eppvobhk" :class="{ signing, totpLogin }" @submit.prevent="onSubmit">
<form class="eppvobhk _monolithic_" :class="{ signing, totpLogin }" @submit.prevent="onSubmit">
<div class="auth _section">
<div class="avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null }" v-show="withAvatar"></div>
<div class="normal-signin" v-if="!totpLogin">
@ -39,16 +39,16 @@
</div>
</div>
<div class="social _section">
<a class="_borderButton _vMargin" v-if="meta && meta.enableTwitterIntegration" :href="`${apiUrl}/signin/twitter`"><Fa :icon="faTwitter" style="margin-right: 4px;"/>{{ $t('signinWith', { x: 'Twitter' }) }}</a>
<a class="_borderButton _vMargin" v-if="meta && meta.enableGithubIntegration" :href="`${apiUrl}/signin/github`"><Fa :icon="faGithub" style="margin-right: 4px;"/>{{ $t('signinWith', { x: 'GitHub' }) }}</a>
<a class="_borderButton _vMargin" v-if="meta && meta.enableDiscordIntegration" :href="`${apiUrl}/signin/discord`"><Fa :icon="faDiscord" style="margin-right: 4px;"/>{{ $t('signinWith', { x: 'Discord' }) }}</a>
<a class="_borderButton _gap" v-if="meta && meta.enableTwitterIntegration" :href="`${apiUrl}/signin/twitter`"><Fa :icon="faTwitter" style="margin-right: 4px;"/>{{ $t('signinWith', { x: 'Twitter' }) }}</a>
<a class="_borderButton _gap" v-if="meta && meta.enableGithubIntegration" :href="`${apiUrl}/signin/github`"><Fa :icon="faGithub" style="margin-right: 4px;"/>{{ $t('signinWith', { x: 'GitHub' }) }}</a>
<a class="_borderButton _gap" v-if="meta && meta.enableDiscordIntegration" :href="`${apiUrl}/signin/discord`"><Fa :icon="faDiscord" style="margin-right: 4px;"/>{{ $t('signinWith', { x: 'Discord' }) }}</a>
</div>
</form>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { faLock, faGavel } from '@fortawesome/free-solid-svg-icons';
import { faTwitter, faDiscord, faGithub } from '@fortawesome/free-brands-svg-icons';
import MkButton from './ui/button.vue';

View file

@ -7,9 +7,11 @@
>
<template #header>{{ $ts.signup }}</template>
<div class="_monolithic_">
<div class="_section">
<XSignup :auto-set="autoSet" @signup="onSignup"/>
</div>
</div>
</XModalWindow>
</template>

View file

@ -55,7 +55,7 @@
import { defineComponent, defineAsyncComponent } from 'vue';
import { faLock, faExclamationTriangle, faSpinner, faCheck, faKey } from '@fortawesome/free-solid-svg-icons';
const getPasswordStrength = require('syuilo-password-strength');
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import { host, url } from '@client/config';
import MkButton from './ui/button.vue';
import MkInput from './ui/input.vue';

View file

@ -9,7 +9,7 @@
<template #header>Req Viewer</template>
<div class="rlkneywz">
<MkTab v-model:value="tab" style="border-bottom: solid 1px var(--divider);">
<MkTab v-model:value="tab" style="border-bottom: solid 0.5px var(--divider);">
<option value="req">Request</option>
<option value="res">Response</option>
</MkTab>

View file

@ -4,7 +4,7 @@
<Fa :icon="faTerminal" style="margin-right: 0.5em;"/>Task Manager
</template>
<div class="qljqmnzj _monospace">
<MkTab v-model:value="tab" style="border-bottom: solid 1px var(--divider);">
<MkTab v-model:value="tab" style="border-bottom: solid 0.5px var(--divider);">
<option value="windows">Windows</option>
<option value="stream">Stream</option>
<option value="streamPool">Stream (Pool)</option>
@ -215,7 +215,7 @@ export default defineComponent({
width: 100%;
padding: 8px 16px;
box-sizing: border-box;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
font-size: 0.9em;
> div {

View file

@ -56,6 +56,7 @@ export default defineComponent({
includeLocalRenotes: this.$store.state.showLocalRenotes
},
query: {},
date: null
};
},
@ -157,7 +158,7 @@ export default defineComponent({
endpoint: endpoint,
limit: 10,
params: init => ({
untilDate: init ? undefined : (this.date ? this.date.getTime() : undefined),
untilDate: this.date?.getTime(),
...this.baseQuery, ...this.query
})
};
@ -171,6 +172,11 @@ export default defineComponent({
methods: {
focus() {
this.$refs.tl.focus();
},
timetravel(date?: Date) {
this.date = date;
this.$refs.tl.reload();
}
}
});

View file

@ -1,5 +1,5 @@
<template>
<div class="ukygtjoj _panel" :class="{ naked, hideHeader: !showHeader, scrollable, closed: !showBody }" v-size="{ max: [380] }">
<div class="ukygtjoj _block" :class="{ naked, hideHeader: !showHeader, scrollable, closed: !showBody }" v-size="{ max: [380] }">
<header v-if="showHeader" ref="header">
<div class="title"><slot name="header"></slot></div>
<div class="sub">
@ -116,7 +116,7 @@ export default defineComponent({
.ukygtjoj {
position: relative;
overflow: hidden;
overflow: clip;
&.naked {
background: transparent !important;
@ -133,10 +133,12 @@ export default defineComponent({
}
> header {
position: relative;
position: sticky;
top: var(--stickyTop, 0px);
left: 0;
color: var(--panelHeaderFg);
background: var(--panelHeaderBg);
box-shadow: 0 1px 0 0 var(--panelHeaderDivider);
border-bottom: solid 0.5px var(--panelHeaderDivider);
z-index: 2;
line-height: 1.4em;
@ -172,7 +174,7 @@ export default defineComponent({
padding: 24px;
& + ._content {
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
}
}

View file

@ -137,4 +137,8 @@ export default defineComponent({
}
}
}
._flat_ .ssazuxis {
margin: var(--margin);
}
</style>

View file

@ -53,4 +53,8 @@ export default defineComponent({
margin-right: 4px;
}
}
._flat_ .fpezltsf {
border-radius: 0;
}
</style>

View file

@ -1,6 +1,6 @@
<template>
<MkModal ref="modal" @click="$emit('click')" @closed="$emit('closed')">
<div class="ebkgoccj _popup _narrow_" @keydown="onKeydown" :style="{ width: `${width}px`, height: height ? `${height}px` : null }">
<div class="ebkgoccj _popup _narrow_" @keydown="onKeydown" :style="{ width: `${width}px`, height: scroll ? (height ? `${height}px` : null) : (height ? `min(${height}px, 100%)` : '100%') }">
<div class="header">
<button class="_button" v-if="withOkButton" @click="$emit('close')"><Fa :icon="faTimes"/></button>
<span class="title">
@ -61,6 +61,11 @@ export default defineComponent({
required: false,
default: true,
},
scroll: {
type: Boolean,
required: false,
default: true,
},
},
emits: ['click', 'close', 'closed', 'ok'],
@ -94,10 +99,10 @@ export default defineComponent({
flex-direction: column;
contain: content;
--section-padding: 24px;
--root-margin: 24px;
@media (max-width: 500px) {
--section-padding: 16px;
--root-margin: 16px;
}
> .header {

View file

@ -395,7 +395,7 @@ export default defineComponent({
position: fixed;
top: 0;
left: 0;
z-index: 5000;
z-index: 10000; // mk-modal
&.front {
z-index: 11000; // frontmk-modal

View file

@ -104,7 +104,7 @@ export default defineComponent({
> .description {
padding: 16px;
font-size: 0.8em;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
> .mfm {
display: -webkit-box;
@ -116,7 +116,7 @@ export default defineComponent({
> .status {
padding: 10px 16px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
> div {
display: inline-block;

View file

@ -153,7 +153,7 @@ export default defineComponent({
> .user {
display: flex;
align-items: center;
padding: 8px var(--section-padding);
padding: 8px var(--root-margin);
font-size: 14px;
&:hover {

View file

@ -97,7 +97,7 @@ export default defineComponent({
> .divider {
margin: 8px 0;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
> button {

View file

@ -47,7 +47,7 @@ if (localStorage.getItem('accounts') != null) {
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';
import { createApp, toRaw, watch } from 'vue';
import { computed, createApp, watch } from 'vue';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import widgets from '@client/widgets';
@ -66,7 +66,6 @@ import { fetchInstance, instance } from '@client/instance';
import { makeHotkey } from '@client/scripts/hotkey';
import { search } from '@client/scripts/search';
import { isMobile } from '@client/scripts/is-mobile';
import { getThemes } from '@client/theme-store';
import { initializeSw } from '@client/scripts/initialize-sw';
import { reload, reloadChannel } from '@client/scripts/unison-reload';
import { reactionPicker } from '@client/scripts/reaction-picker';
@ -79,6 +78,13 @@ console.info(`Misskey v${version}`);
window.onerror = null;
window.onunhandledrejection = null;
// 後方互換性のため。
// TODO: そのうち消す
if ((typeof ColdDeviceStorage.get('lightTheme') === 'string') || (typeof ColdDeviceStorage.get('darkTheme') === 'string')) {
ColdDeviceStorage.set('lightTheme', require('@client/themes/l-light.json5'));
ColdDeviceStorage.set('darkTheme', require('@client/themes/d-dark.json5'));
}
if (_DEV_) {
console.warn('Development mode!!!');
@ -222,6 +228,7 @@ const app = createApp(await (
ui === 'deck' ? import('@client/ui/deck.vue') :
ui === 'desktop' ? import('@client/ui/desktop.vue') :
ui === 'chat' ? import('@client/ui/chat/index.vue') :
ui === 'pope' ? import('@client/ui/universal.vue') :
import('@client/ui/default.vue')
).then(x => x.default));
@ -265,12 +272,24 @@ if (splash) {
}
watch(defaultStore.reactiveState.darkMode, (darkMode) => {
import('@client/scripts/theme').then(({ builtinThemes }) => {
const themes = builtinThemes.concat(getThemes());
applyTheme(themes.find(x => x.id === (darkMode ? ColdDeviceStorage.get('darkTheme') : ColdDeviceStorage.get('lightTheme'))));
});
applyTheme(darkMode ? ColdDeviceStorage.get('darkTheme') : ColdDeviceStorage.get('lightTheme'));
}, { immediate: localStorage.theme == null });
const darkTheme = computed(ColdDeviceStorage.makeGetterSetter('darkTheme'));
const lightTheme = computed(ColdDeviceStorage.makeGetterSetter('lightTheme'));
watch(darkTheme, (theme) => {
if (defaultStore.state.darkMode) {
applyTheme(theme);
}
});
watch(lightTheme, (theme) => {
if (!defaultStore.state.darkMode) {
applyTheme(theme);
}
});
//#region Sync dark mode
if (ColdDeviceStorage.get('syncDeviceDarkMode')) {
defaultStore.set('darkMode', isDeviceDarkmode());

View file

@ -203,6 +203,15 @@ export function pageWindow(path: string) {
}, {}, 'closed');
}
export function modalPageWindow(path: string) {
const { component, props } = resolve(path);
popup(import('@client/components/modal-page-window.vue'), {
initialPath: path,
initialComponent: markRaw(component),
initialProps: props,
}, {}, 'closed');
}
export function dialog(props: Record<string, any>) {
return new Promise((resolve, reject) => {
popup(import('@client/components/dialog.vue'), props, {

View file

@ -14,6 +14,7 @@
import { defineComponent } from 'vue';
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
import MkButton from '@client/components/ui/button.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -21,7 +22,7 @@ export default defineComponent({
},
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.error,
icon: faExclamationTriangle
},

View file

@ -1,5 +1,5 @@
<template>
<div style="overflow: hidden;">
<div style="overflow: clip;">
<FormBase class="znqjceqz">
<div id="debug"></div>
<section class="_formItem about">
@ -64,6 +64,7 @@ import FormKeyValueView from '@client/components/form/key-value-view.vue';
import MkLink from '@client/components/link.vue';
import { physics } from '@client/scripts/physics.ts';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
const patrons = [
'Satsuki Yanagi',
@ -115,7 +116,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.aboutMisskey,
icon: null
},

View file

@ -48,6 +48,7 @@ import FormGroup from '@client/components/form/group.vue';
import FormKeyValueView from '@client/components/form/key-value-view.vue';
import * as os from '@client/os';
import number from '@client/filters/number';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -59,7 +60,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.instanceInfo,
icon: faInfoCircle
},

View file

@ -12,7 +12,7 @@
</div>
</section>
<section class="_section">
<div class="_content _card _vMargin">
<div class="_content _card _gap">
<div class="_content">
<MkInput v-model:value="name" required><span>{{ $ts.name }}</span></MkInput>
<MkInput v-model:value="author" required><span>{{ $ts.author }}</span></MkInput>
@ -24,7 +24,7 @@
</div>
</div>
</div>
<div class="_content _card _vMargin">
<div class="_content _card _gap">
<div class="list-view _content">
<div class="item" v-for="([ k, v ], i) in theme" :key="k">
<div class="_inputs">
@ -94,7 +94,7 @@
import { defineComponent } from 'vue';
import { faPalette, faChevronDown, faKeyboard } from '@fortawesome/free-solid-svg-icons';
import * as JSON5 from 'json5';
import { toUnicode } from 'punycode';
import { toUnicode } from 'punycode/';
import MkRadio from '@client/components/ui/radio.vue';
import MkButton from '@client/components/ui/button.vue';
@ -109,6 +109,7 @@ import { host } from '@client/config';
import * as os from '@client/os';
import { ColdDeviceStorage } from '@client/store';
import { addTheme } from '@client/theme-store';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -122,7 +123,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.themeEditor,
icon: faPalette,
},

View file

@ -1,7 +1,7 @@
<template>
<div class="_section">
<MkPagination :pagination="pagination" #default="{items}" class="ruryvtyk _content">
<section class="_card announcement _vMargin" v-for="(announcement, i) in items" :key="announcement.id">
<section class="_card announcement _gap" v-for="(announcement, i) in items" :key="announcement.id">
<div class="_title"><span v-if="$i && !announcement.isRead">🆕 </span>{{ announcement.title }}</div>
<div class="_content">
<Mfm :text="announcement.text"/>
@ -21,6 +21,7 @@ import { faCheck, faBroadcastTower } from '@fortawesome/free-solid-svg-icons';
import MkPagination from '@client/components/ui/pagination.vue';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -30,7 +31,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.announcements,
icon: faBroadcastTower
},

View file

@ -1,6 +1,6 @@
<template>
<div>
<section class="_section">
<div class="_root">
<div class="_block" style="padding: 24px;">
<MkInput v-model:value="endpoint" :datalist="endpoints" @update:value="onEndpointChange()">
<span>Endpoint</span>
</MkInput>
@ -14,12 +14,12 @@
<template v-if="sending"><MkEllipsis/></template>
<template v-else><Fa :icon="faPaperPlane"/> Send</template>
</MkButton>
</section>
<section class="_section" v-if="res">
</div>
<div v-if="res" class="_block" style="padding: 24px;">
<MkTextarea v-model:value="res" code readonly tall>
<span>Response</span>
</MkTextarea>
</section>
</div>
</div>
</template>
@ -32,6 +32,7 @@ import MkInput from '@client/components/ui/input.vue';
import MkTextarea from '@client/components/ui/textarea.vue';
import MkSwitch from '@client/components/ui/switch.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -40,7 +41,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: 'API console',
icon: faTerminal
},

View file

@ -30,6 +30,7 @@ import MkButton from '@client/components/ui/button.vue';
import MkInput from '@client/components/ui/input.vue';
import { selectFile } from '@client/scripts/select-file';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -45,7 +46,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.channelId ? {
[symbols.PAGE_INFO]: computed(() => this.channelId ? {
title: this.$ts._channel.edit,
icon: faSatelliteDish,
} : {

View file

@ -1,6 +1,6 @@
<template>
<div v-if="channel" class="_section">
<div class="wpgynlbz _content _panel _vMargin" :class="{ hide: !showBanner }">
<div class="wpgynlbz _content _panel _gap" :class="{ hide: !showBanner }">
<XChannelFollowButton :channel="channel" :full="true" class="subscribe"/>
<button class="_button toggle" @click="() => showBanner = !showBanner">
<template v-if="showBanner"><Fa :icon="faAngleUp"/></template>
@ -20,9 +20,9 @@
</div>
</div>
<XPostForm :channel="channel" class="post-form _content _panel _vMargin" fixed v-if="$i"/>
<XPostForm :channel="channel" class="post-form _content _panel _gap" fixed v-if="$i"/>
<XTimeline class="_content _vMargin _noGap_" src="channel" :key="channelId" :channel="channelId" @before="before" @after="after"/>
<XTimeline class="_content _gap _noGap_" src="channel" :key="channelId" :channel="channelId" @before="before" @after="after"/>
</div>
</template>
@ -35,6 +35,7 @@ import XPostForm from '@client/components/post-form.vue';
import XTimeline from '@client/components/timeline.vue';
import XChannelFollowButton from '@client/components/channel-follow-button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -53,7 +54,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.channel ? {
[symbols.PAGE_INFO]: computed(() => this.channel ? {
title: this.channel.name,
icon: faSatelliteDish,
} : null),

View file

@ -11,20 +11,20 @@
<div class="_section">
<div class="_content grwlizim featured" v-if="tab === 'featured'">
<MkPagination :pagination="featuredPagination" #default="{items}">
<MkChannelPreview v-for="channel in items" class="_vMargin" :channel="channel" :key="channel.id"/>
<MkChannelPreview v-for="channel in items" class="_gap" :channel="channel" :key="channel.id"/>
</MkPagination>
</div>
<div class="_content grwlizim following" v-if="tab === 'following'">
<MkPagination :pagination="followingPagination" #default="{items}">
<MkChannelPreview v-for="channel in items" class="_vMargin" :channel="channel" :key="channel.id"/>
<MkChannelPreview v-for="channel in items" class="_gap" :channel="channel" :key="channel.id"/>
</MkPagination>
</div>
<div class="_content grwlizim owned" v-if="tab === 'owned'">
<MkButton class="new" @click="create()"><Fa :icon="faPlus"/></MkButton>
<MkPagination :pagination="ownedPagination" #default="{items}">
<MkChannelPreview v-for="channel in items" class="_vMargin" :channel="channel" :key="channel.id"/>
<MkChannelPreview v-for="channel in items" class="_gap" :channel="channel" :key="channel.id"/>
</MkPagination>
</div>
</div>
@ -39,6 +39,7 @@ import MkChannelPreview from '@client/components/channel-preview.vue';
import MkPagination from '@client/components/ui/pagination.vue';
import MkButton from '@client/components/ui/button.vue';
import MkTab from '@client/components/tab.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -46,7 +47,7 @@ export default defineComponent({
},
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.channel,
icon: faSatelliteDish,
action: {

View file

@ -1,6 +1,6 @@
<template>
<div v-if="clip" class="_section">
<div class="okzinsic _content _panel _vMargin">
<div class="okzinsic _content _panel _gap">
<div class="description" v-if="clip.description">
<Mfm :text="clip.description" :is-note="false" :i="$i"/>
</div>
@ -9,7 +9,7 @@
</div>
</div>
<XNotes class="_content _vMargin" :pagination="pagination" :detail="true"/>
<XNotes class="_content _gap" :pagination="pagination" :detail="true"/>
</div>
</template>
@ -20,6 +20,7 @@ import MkContainer from '@client/components/ui/container.vue';
import XPostForm from '@client/components/post-form.vue';
import XNotes from '@client/components/notes.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -37,7 +38,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.clip ? {
[symbols.PAGE_INFO]: computed(() => this.clip ? {
title: this.clip.name,
icon: faPaperclip,
action: {
@ -142,7 +143,7 @@ export default defineComponent({
> .user {
$height: 32px;
padding: 16px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
line-height: $height;
> .avatar {

View file

@ -15,6 +15,7 @@ import MarkdownIt from 'markdown-it';
import MarkdownItAnchor from 'markdown-it-anchor';
import { url, lang } from '@client/config';
import MkLink from '@client/components/link.vue';
import * as symbols from '@client/symbols';
const markdown = MarkdownIt({
html: true
@ -38,7 +39,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.title ? {
[symbols.PAGE_INFO]: computed(() => this.title ? {
title: this.title,
icon: faQuestionCircle,
} : null),
@ -150,7 +151,7 @@ export default defineComponent({
font-size: 1.25em;
padding: 0 0 0.5em 0;
margin: 1.5em 0 1em 0;
border-bottom: solid 1px var(--divider);
border-bottom: solid 0.5px var(--divider);
}
::v-deep(table) {
@ -170,7 +171,7 @@ export default defineComponent({
::v-deep(kbd.key) {
display: inline-block;
padding: 6px 8px;
border: solid 1px var(--divider);
border: solid 0.5px var(--divider);
border-radius: 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

View file

@ -16,11 +16,12 @@
import { defineComponent } from 'vue';
import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'
import { url, lang } from '@client/config';
import * as symbols from '@client/symbols';
export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.help,
icon: faQuestionCircle
},

View file

@ -6,9 +6,10 @@
<script lang="ts">
import { computed, defineComponent } from 'vue';
import { faCloud, faEllipsisH } from '@fortawesome/free-solid-svg-icons';
import { faCloud } from '@fortawesome/free-solid-svg-icons';
import XDrive from '@client/components/drive.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -17,22 +18,13 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: computed(() => this.folder ? this.folder.name : this.$ts.drive),
icon: faCloud,
action: {
icon: faEllipsisH,
handler: this.menu
}
menu: () => this.$refs.drive.getMenu()
},
folder: null,
};
},
methods: {
menu(ev) {
os.modalMenu(this.$refs.drive.getMenu(), ev.currentTarget || ev.target);
}
}
});
</script>

View file

@ -1,40 +1,40 @@
<template>
<div class="lznhrdub">
<div class="lznhrdub _root">
<div class="_section">
<MkInput v-model:value="query" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $ts.searchUser }}</span></MkInput>
<XUserList v-if="query" class="_vMargin" :pagination="searchPagination" ref="search"/>
<XUserList v-if="query" class="_gap" :pagination="searchPagination" ref="search"/>
<div class="localfedi7 _panel _vMargin" v-if="meta && stats && tag == null" :style="{ backgroundImage: meta.bannerUrl ? `url(${meta.bannerUrl})` : null }">
<div class="localfedi7 _panel _gap" v-if="meta && stats && tag == null" :style="{ backgroundImage: meta.bannerUrl ? `url(${meta.bannerUrl})` : null }">
<header><span>{{ $t('explore', { host: meta.name || 'Misskey' }) }}</span></header>
<div><span>{{ $t('exploreUsersCount', { count: num(stats.originalUsersCount) }) }}</span></div>
</div>
<template v-if="tag == null">
<MkFolder class="_vMargin" persist-key="explore-pinned-users">
<MkFolder class="_gap" persist-key="explore-pinned-users">
<template #header><Fa :icon="faBookmark" fixed-width style="margin-right: 0.5em;"/>{{ $ts.pinnedUsers }}</template>
<XUserList :pagination="pinnedUsers"/>
</MkFolder>
<MkFolder class="_vMargin" persist-key="explore-popular-users">
<MkFolder class="_gap" persist-key="explore-popular-users">
<template #header><Fa :icon="faChartLine" fixed-width style="margin-right: 0.5em;"/>{{ $ts.popularUsers }}</template>
<XUserList :pagination="popularUsers"/>
</MkFolder>
<MkFolder class="_vMargin" persist-key="explore-recently-updated-users">
<MkFolder class="_gap" persist-key="explore-recently-updated-users">
<template #header><Fa :icon="faCommentAlt" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyUpdatedUsers }}</template>
<XUserList :pagination="recentlyUpdatedUsers"/>
</MkFolder>
<MkFolder class="_vMargin" persist-key="explore-recently-registered-users">
<MkFolder class="_gap" persist-key="explore-recently-registered-users">
<template #header><Fa :icon="faPlus" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyRegisteredUsers }}</template>
<XUserList :pagination="recentlyRegisteredUsers"/>
</MkFolder>
</template>
</div>
<div class="_section">
<div class="localfedi7 _panel _vMargin" v-if="tag == null" :style="{ backgroundImage: `url(/static-assets/client/fedi.jpg)` }">
<div class="localfedi7 _panel _gap" v-if="tag == null" :style="{ backgroundImage: `url(/static-assets/client/fedi.jpg)` }">
<header><span>{{ $ts.exploreFediverse }}</span></header>
</div>
<MkFolder :body-togglable="true" :expanded="false" ref="tags" class="_vMargin">
<MkFolder :body-togglable="true" :expanded="false" ref="tags" class="_gap">
<template #header><Fa :icon="faHashtag" fixed-width style="margin-right: 0.5em;"/>{{ $ts.popularTags }}</template>
<div class="vxjfqztj">
@ -43,21 +43,21 @@
</div>
</MkFolder>
<MkFolder v-if="tag != null" :key="`${tag}`" class="_vMargin">
<MkFolder v-if="tag != null" :key="`${tag}`" class="_gap">
<template #header><Fa :icon="faHashtag" fixed-width style="margin-right: 0.5em;"/>{{ tag }}</template>
<XUserList :pagination="tagUsers"/>
</MkFolder>
<template v-if="tag == null">
<MkFolder class="_vMargin">
<MkFolder class="_gap">
<template #header><Fa :icon="faChartLine" fixed-width style="margin-right: 0.5em;"/>{{ $ts.popularUsers }}</template>
<XUserList :pagination="popularUsersF"/>
</MkFolder>
<MkFolder class="_vMargin">
<MkFolder class="_gap">
<template #header><Fa :icon="faCommentAlt" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyUpdatedUsers }}</template>
<XUserList :pagination="recentlyUpdatedUsersF"/>
</MkFolder>
<MkFolder class="_vMargin">
<MkFolder class="_gap">
<template #header><Fa :icon="faRocket" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyDiscoveredUsers }}</template>
<XUserList :pagination="recentlyRegisteredUsersF"/>
</MkFolder>
@ -75,6 +75,7 @@ import MkFolder from '@client/components/ui/folder.vue';
import MkInput from '@client/components/ui/input.vue';
import number from '@client/filters/number';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -92,7 +93,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.explore,
icon: faHashtag
},

View file

@ -10,6 +10,7 @@ import { faStar } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import XNotes from '@client/components/notes.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -18,7 +19,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.favorites,
icon: faStar
},

View file

@ -9,6 +9,7 @@ import { defineComponent } from 'vue';
import { faFireAlt } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import XNotes from '@client/components/notes.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -17,7 +18,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.featured,
icon: faFireAlt
},

View file

@ -35,6 +35,7 @@ import { faUserClock, faCheck, faTimes } from '@fortawesome/free-solid-svg-icons
import MkPagination from '@client/components/ui/pagination.vue';
import { userPage, acct } from '../filters/user';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -43,7 +44,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.followRequests,
icon: faUserClock,
},

View file

@ -34,7 +34,7 @@
-->
<MkPagination :pagination="pagination" #default="{items}" ref="reports" style="margin-top: var(--margin);">
<div class="bcekxzvu _card _vMargin" v-for="report in items" :key="report.id">
<div class="bcekxzvu _card _gap" v-for="report in items" :key="report.id">
<div class="_content target">
<MkAvatar class="avatar" :user="report.targetUser"/>
<div class="info">
@ -72,6 +72,7 @@ import MkSelect from '@client/components/ui/select.vue';
import MkPagination from '@client/components/ui/pagination.vue';
import { acct } from '../../filters/user';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -83,7 +84,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.abuseReports,
icon: faExclamationCircle
},

View file

@ -3,7 +3,7 @@
<div class="_section">
<div class="_content">
<MkButton @click="add()" primary style="margin: 0 auto 16px auto;"><Fa :icon="faPlus"/> {{ $ts.add }}</MkButton>
<section class="_card _vMargin announcements" v-for="announcement in announcements">
<section class="_card _gap announcements" v-for="announcement in announcements">
<div class="_content announcement">
<MkInput v-model:value="announcement.title">
<span>{{ $ts.title }}</span>
@ -34,6 +34,7 @@ import MkButton from '@client/components/ui/button.vue';
import MkInput from '@client/components/ui/input.vue';
import MkTextarea from '@client/components/ui/textarea.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -44,7 +45,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.announcements,
icon: faBroadcastTower
},

View file

@ -59,6 +59,7 @@ import MkPagination from '@client/components/ui/pagination.vue';
import MkTab from '@client/components/tab.vue';
import { selectFile } from '@client/scripts/select-file';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -70,7 +71,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.customEmojis,
icon: faLaugh,
action: {

View file

@ -67,6 +67,7 @@ import MkSelect from '@client/components/ui/select.vue';
import MkPagination from '@client/components/ui/pagination.vue';
import MkInstanceInfo from './instance.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -78,7 +79,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.federation,
icon: faGlobe
},

View file

@ -35,7 +35,7 @@
</MkInput>
</div>
<MkPagination :pagination="pagination" #default="{items}" class="urempief" ref="files">
<button class="file _panel _button _vMargin" v-for="file in items" :key="file.id" @click="show(file, $event)">
<button class="file _panel _button _gap" v-for="file in items" :key="file.id" @click="show(file, $event)">
<MkDriveFileThumbnail class="thumbnail" :file="file" fit="contain"/>
<div class="body">
<div>
@ -71,6 +71,7 @@ import MkPagination from '@client/components/ui/pagination.vue';
import MkDriveFileThumbnail from '@client/components/drive-file-thumbnail.vue';
import bytes from '@client/filters/bytes';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -83,7 +84,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.files,
icon: faCloud
},

View file

@ -4,7 +4,7 @@
<template #header><Fa :icon="faHeartbeat"/> {{ $ts.metrics }}</template>
<div class="_section" style="padding: 0 var(--margin);">
<div class="_content">
<MkContainer :body-togglable="false" class="_vMargin">
<MkContainer :body-togglable="false" class="_gap">
<template #header><Fa :icon="faMicrochip"/>{{ $ts.cpuAndMemory }}</template>
<!--
<template #func>
@ -27,7 +27,7 @@
</div>
</MkContainer>
<MkContainer :body-togglable="false" class="_vMargin">
<MkContainer :body-togglable="false" class="_gap">
<template #header><Fa :icon="faHdd"/> {{ $ts.disk }}</template>
<!--
<template #func>
@ -50,7 +50,7 @@
</div>
</MkContainer>
<MkContainer :body-togglable="false" class="_vMargin">
<MkContainer :body-togglable="false" class="_gap">
<template #header><Fa :icon="faExchangeAlt"/> {{ $ts.network }}</template>
<!--
<template #func>

View file

@ -4,9 +4,9 @@
<template #header><Fa :icon="faTachometerAlt"/> {{ $ts.overview }}</template>
<div class="sboqnrfi" :style="{ gridTemplateRows: overviewHeight }">
<MkInstanceStats :chart-limit="300" :detailed="true" class="_vMargin" ref="stats"/>
<MkInstanceStats :chart-limit="300" :detailed="true" class="_gap" ref="stats"/>
<MkContainer :body-togglable="true" class="_vMargin">
<MkContainer :body-togglable="true" class="_gap">
<template #header><Fa :icon="faInfoCircle"/>{{ $ts.instanceInfo }}</template>
<div class="_content">
@ -19,7 +19,7 @@
</div>
</MkContainer>
<MkContainer :body-togglable="true" :scrollable="true" class="_vMargin" style="height: 300px;">
<MkContainer :body-togglable="true" :scrollable="true" class="_gap" style="height: 300px;">
<template #header><Fa :icon="faDatabase"/>{{ $ts.database }}</template>
<div class="_content" v-if="dbInfo">
@ -70,6 +70,7 @@ import number from '../../filters/number';
import MkInstanceInfo from './instance.vue';
import XMetrics from './index.metrics.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -85,7 +86,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
tabs: [{
id: 'index',
title: null,

View file

@ -500,12 +500,12 @@ export default defineComponent({
}
&:not(:first-child) {
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
}
> .chart {
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
padding: 16px 0 12px 0;
> .header {

View file

@ -37,6 +37,7 @@ import MkInput from '@client/components/ui/input.vue';
import MkSelect from '@client/components/ui/select.vue';
import MkTextarea from '@client/components/ui/textarea.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -48,7 +49,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.serverLogs,
icon: faStream
},

View file

@ -21,6 +21,7 @@ import { faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import MkButton from '@client/components/ui/button.vue';
import XQueue from './queue.chart.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -30,7 +31,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.jobQueue,
icon: faExchangeAlt,
},

View file

@ -28,6 +28,7 @@ import { faSave, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import MkButton from '@client/components/ui/button.vue';
import MkInput from '@client/components/ui/input.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -37,7 +38,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.relays,
icon: faProjectDiagram,
},

View file

@ -1,6 +1,6 @@
<template>
<div v-if="meta" class="_section">
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faInfoCircle"/> {{ $ts.basicInfo }}</div>
<div class="_content">
<MkInput v-model:value="name">{{ $ts.instanceName }}</MkInput>
@ -20,7 +20,7 @@
<MkInput v-model:value="pinnedClipId">{{ $ts.pinnedClipId }}</MkInput>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_content">
<MkInput v-model:value="maxNoteTextLength" type="number" :save="() => save()"><template #icon><Fa :icon="faPencilAlt"/></template>{{ $ts.maxNoteTextLength }}</MkInput>
</div>
@ -34,7 +34,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faUser"/> {{ $ts.registration }}</div>
<div class="_content">
<MkSwitch v-model:value="enableRegistration" @update:value="save()">{{ $ts.enableRegistration }}</MkSwitch>
@ -42,7 +42,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faShieldAlt"/> {{ $ts.hcaptcha }}</div>
<div class="_content">
<MkSwitch v-model:value="enableHcaptcha">{{ $ts.enableHcaptcha }}</MkSwitch>
@ -60,7 +60,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faShieldAlt"/> {{ $ts.recaptcha }}</div>
<div class="_content">
<MkSwitch v-model:value="enableRecaptcha" ref="enableRecaptcha">{{ $ts.enableRecaptcha }}</MkSwitch>
@ -78,7 +78,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faEnvelope" /> {{ $ts.emailConfig }}</div>
<div class="_content">
<MkSwitch v-model:value="enableEmail" @update:value="save()">{{ $ts.enableEmail }}<template #desc>{{ $ts.emailConfigInfo }}</template></MkSwitch>
@ -101,7 +101,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faBolt"/> {{ $ts.serviceworker }}</div>
<div class="_content">
<MkSwitch v-model:value="enableServiceWorker">{{ $ts.enableServiceworker }}<template #desc>{{ $ts.serviceworkerInfo }}</template></MkSwitch>
@ -117,7 +117,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faThumbtack"/> {{ $ts.pinnedUsers }}</div>
<div class="_content">
<MkTextarea v-model:value="pinnedUsers">
@ -129,7 +129,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faThumbtack"/> {{ $ts.pinnedPages }}</div>
<div class="_content">
<MkTextarea v-model:value="pinnedPages">
@ -141,7 +141,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faCloud"/> {{ $ts.files }}</div>
<div class="_content">
<MkSwitch v-model:value="cacheRemoteFiles">{{ $ts.cacheRemoteFiles }}<template #desc>{{ $ts.cacheRemoteFilesDescription }}</template></MkSwitch>
@ -154,7 +154,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faCloud"/> {{ $ts.objectStorage }}</div>
<div class="_content">
<MkSwitch v-model:value="useObjectStorage">{{ $ts.useObjectStorage }}</MkSwitch>
@ -183,7 +183,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faGhost"/> {{ $ts.proxyAccount }}</div>
<div class="_content">
<MkInput :value="proxyAccount ? proxyAccount.username : null" disabled><template #prefix>@</template>{{ $ts.proxyAccount }}<template #desc>{{ $ts.proxyAccountDescription }}</template></MkInput>
@ -191,7 +191,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faBan"/> {{ $ts.blockedInstances }}</div>
<div class="_content">
<MkTextarea v-model:value="blockedHosts">
@ -203,7 +203,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faShareAlt"/> {{ $ts.integration }}</div>
<div class="_content">
<header><Fa :icon="faTwitter"/> Twitter</header>
@ -237,7 +237,7 @@
</div>
</section>
<section class="_card _vMargin">
<section class="_card _gap">
<div class="_title"><Fa :icon="faArchway" /> Summaly Proxy</div>
<div class="_content">
<MkInput v-model:value="summalyProxy">URL</MkInput>
@ -261,6 +261,7 @@ import { url } from '@client/config';
import getAcct from '@/misc/acct/render';
import * as os from '@client/os';
import { fetchInstance } from '@client/instance';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -274,7 +275,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.instance,
icon: faCog,
},

View file

@ -53,7 +53,7 @@
</div>
<MkPagination :pagination="pagination" #default="{items}" class="users" ref="users">
<button class="user _panel _button _vMargin" v-for="user in items" :key="user.id" @click="show(user)">
<button class="user _panel _button _gap" v-for="user in items" :key="user.id" @click="show(user)">
<MkAvatar class="avatar" :user="user" :disable-link="true"/>
<div class="body">
<header>
@ -89,6 +89,7 @@ import MkSelect from '@client/components/ui/select.vue';
import MkPagination from '@client/components/ui/pagination.vue';
import { acct } from '../../filters/user';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -100,7 +101,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.users,
icon: faUsers,
action: {

View file

@ -9,6 +9,7 @@ import { defineComponent } from 'vue';
import { faAt } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import XNotes from '@client/components/notes.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -17,7 +18,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.mentions,
icon: faAt
},

View file

@ -9,6 +9,7 @@ import { defineComponent } from 'vue';
import { faEnvelope } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import XNotes from '@client/components/notes.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -17,7 +18,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.directNotes,
icon: faEnvelope
},

View file

@ -1,11 +1,10 @@
<template>
<div class="_section">
<div class="mk-messaging _content" v-size="{ max: [400] }">
<div class="yweeujhr _root" v-size="{ max: [400] }">
<MkButton @click="start" primary class="start"><Fa :icon="faPlus"/> {{ $ts.startMessaging }}</MkButton>
<div class="history" v-if="messages.length > 0">
<MkA v-for="(message, i) in messages"
class="message _panel"
class="message _block"
:class="{ isMe: isMe(message), isRead: message.groupId ? message.reads.includes($i.id) : message.isRead }"
:to="message.groupId ? `/my/messaging/group/${message.groupId}` : `/my/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`"
:data-index="i"
@ -35,7 +34,6 @@
</div>
<MkLoading v-if="fetching"/>
</div>
</div>
</template>
<script lang="ts">
@ -45,6 +43,7 @@ import getAcct from '@/misc/acct/render';
import MkButton from '@client/components/ui/button.vue';
import { acct } from '../../filters/user';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -53,7 +52,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.messaging,
icon: faComments
},
@ -167,10 +166,10 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.mk-messaging {
.yweeujhr {
> .start {
margin: 0 auto var(--margin) auto;
margin: var(--margin) auto var(--margin) auto;
}
> .history {

View file

@ -1,5 +1,5 @@
<template>
<div class="mk-messaging-form _panel"
<div class="pemppnzi _block"
@dragover.stop="onDragover"
@drop.stop="onDrop"
>
@ -230,7 +230,7 @@ export default defineComponent({
</script>
<style lang="scss" scoped>
.mk-messaging-form {
.pemppnzi {
position: relative;
> textarea {

View file

@ -47,6 +47,7 @@ import { isBottom, onScrollBottom, scroll } from '@client/scripts/scroll';
import * as os from '@client/os';
import { popout } from '@client/scripts/popout';
import * as sound from '@client/scripts/sound';
import * as symbols from '@client/symbols';
const Component = defineComponent({
components: {
@ -70,7 +71,7 @@ const Component = defineComponent({
data() {
return {
INFO: computed(() => !this.fetching ? this.user ? {
[symbols.PAGE_INFO]: computed(() => !this.fetching ? this.user ? {
userName: this.user,
avatar: this.user,
action: {

View file

@ -272,6 +272,7 @@
import { defineComponent } from 'vue';
import { faQuestionCircle } from '@fortawesome/free-regular-svg-icons';
import MkTextarea from '@client/components/ui/textarea.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -280,7 +281,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts._mfm.cheatSheet,
icon: faQuestionCircle,
},

View file

@ -18,6 +18,7 @@ import { faSatellite, faPlus } from '@fortawesome/free-solid-svg-icons';
import MkPagination from '@client/components/ui/pagination.vue';
import MkButton from '@client/components/ui/button.vue';
import XAntenna from './index.antenna.vue';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -28,7 +29,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.manageAntennas,
icon: faSatellite,
action: {

View file

@ -4,7 +4,7 @@
<div class="_content">
<MkPagination :pagination="pagination" #default="{items}" ref="list" class="list">
<MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _vMargin">
<MkA v-for="item in items" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _gap">
<b>{{ item.name }}</b>
<div v-if="item.description" class="description">{{ item.description }}</div>
</MkA>
@ -19,6 +19,7 @@ import { faPlus, faPaperclip } from '@fortawesome/free-solid-svg-icons';
import MkPagination from '@client/components/ui/pagination.vue';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -28,7 +29,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.clip,
icon: faPaperclip,
action: {
@ -96,7 +97,7 @@ export default defineComponent({
> .description {
margin-top: 8px;
padding-top: 8px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
}
}
}

View file

@ -12,7 +12,7 @@
</transition>
<transition name="zoom" mode="out-in">
<div v-if="group" class="_section members _vMargin">
<div v-if="group" class="_section members _gap">
<div class="_title">{{ $ts.members }}</div>
<div class="_content">
<div class="users">
@ -39,6 +39,7 @@ import { faTimes, faUsers } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -54,7 +55,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.group ? {
[symbols.PAGE_INFO]: computed(() => this.group ? {
title: this.group.name,
icon: faUsers,
} : null),

View file

@ -54,6 +54,7 @@ import MkContainer from '@client/components/ui/container.vue';
import MkAvatars from '@client/components/avatars.vue';
import MkTab from '@client/components/tab.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -66,7 +67,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.groups,
icon: faUsers
},

View file

@ -16,6 +16,7 @@ import { faListUl, faPlus } from '@fortawesome/free-solid-svg-icons';
import MkPagination from '@client/components/ui/pagination.vue';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -25,7 +26,7 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.manageLists,
icon: faListUl,
action: {

View file

@ -11,7 +11,7 @@
</transition>
<transition name="zoom" mode="out-in">
<div v-if="list" class="_section members _vMargin">
<div v-if="list" class="_section members _gap">
<div class="_title">{{ $ts.members }}</div>
<div class="_content">
<div class="users">
@ -38,6 +38,7 @@ import { faTimes, faListUl } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -46,7 +47,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.list ? {
[symbols.PAGE_INFO]: computed(() => this.list ? {
title: this.list.name,
icon: faListUl,
} : null),

View file

@ -11,11 +11,12 @@
import { defineComponent } from 'vue';
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.notFound,
icon: faExclamationTriangle
},

View file

@ -1,19 +1,19 @@
<template>
<div class="fcuexfpr">
<div class="fcuexfpr _root">
<div v-if="note" class="note" v-anim>
<div class="_section" v-if="showNext">
<div class="_gap" v-if="showNext">
<XNotes class="_content _noGap_" :pagination="next"/>
</div>
<div class="_section main">
<MkButton v-if="!showNext && hasNext" class="load next _content" @click="showNext = true"><Fa :icon="faChevronUp"/></MkButton>
<div class="_content _vMargin">
<MkRemoteCaution v-if="note.user.host != null" :href="note.url || note.uri" class="_vMargin"/>
<XNoteDetailed v-model:note="note" :key="note.id" class="_vMargin"/>
<div class="main _gap">
<MkButton v-if="!showNext && hasNext" class="load next" @click="showNext = true"><Fa :icon="faChevronUp"/></MkButton>
<div class="_content _gap">
<MkRemoteCaution v-if="note.user.host != null" :href="note.url || note.uri" class="_gap"/>
<XNoteDetailed v-model:note="note" :key="note.id" class="_gap"/>
</div>
<div class="_content clips _vMargin" v-if="clips && clips.length > 0">
<div class="_content clips _gap" v-if="clips && clips.length > 0">
<div class="title">{{ $ts.clip }}</div>
<MkA v-for="item in clips" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _vMargin">
<MkA v-for="item in clips" :key="item.id" :to="`/clips/${item.id}`" class="item _panel _gap">
<b>{{ item.name }}</b>
<div v-if="item.description" class="description">{{ item.description }}</div>
<div class="user">
@ -21,10 +21,10 @@
</div>
</MkA>
</div>
<MkButton v-if="!showPrev && hasPrev" class="load prev _content" @click="showPrev = true"><Fa :icon="faChevronDown"/></MkButton>
<MkButton v-if="!showPrev && hasPrev" class="load prev" @click="showPrev = true"><Fa :icon="faChevronDown"/></MkButton>
</div>
<div class="_section" v-if="showPrev">
<div class="_gap" v-if="showPrev">
<XNotes class="_content _noGap_" :pagination="prev"/>
</div>
</div>
@ -44,6 +44,7 @@ import XNotes from '@client/components/notes.vue';
import MkRemoteCaution from '@client/components/remote-caution.vue';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -61,9 +62,14 @@ export default defineComponent({
},
data() {
return {
INFO: computed(() => this.note ? {
[symbols.PAGE_INFO]: computed(() => this.note ? {
title: this.$ts.note,
avatar: this.note.user,
path: `/notes/${this.note.id}`,
share: {
title: this.$t('noteOf', { user: this.note.user.name }),
text: this.note.text,
},
} : null),
note: null,
clips: null,
@ -137,6 +143,7 @@ export default defineComponent({
> .main {
> .load {
min-width: 0;
margin: 0 auto;
border-radius: 999px;
&.next {
@ -165,7 +172,7 @@ export default defineComponent({
> .user {
$height: 32px;
padding-top: 16px;
border-top: solid 1px var(--divider);
border-top: solid 0.5px var(--divider);
line-height: $height;
> .avatar {

View file

@ -1,17 +1,16 @@
<template>
<div>
<div class="_section">
<div class="_root">
<XNotifications class="_content" @before="before" @after="after" page/>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { faBell } from '@fortawesome/free-solid-svg-icons';
import { faBell, faCheck } from '@fortawesome/free-solid-svg-icons';
import Progress from '@client/scripts/loading';
import XNotifications from '@client/components/notifications.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -20,9 +19,16 @@ export default defineComponent({
data() {
return {
INFO: {
[symbols.PAGE_INFO]: {
title: this.$ts.notifications,
icon: faBell
icon: faBell,
actions: [{
text: this.$ts.markAllAsRead,
icon: faCheck,
handler: () => {
os.apiWithDialog('notifications/mark-all-as-read');
}
}]
},
};
},

View file

@ -1,17 +1,16 @@
<template>
<div class="_section">
<div class="_content">
<div class="_root">
<MkA class="view" v-if="pageId" :to="`/@${ author.username }/pages/${ currentName }`"><Fa :icon="faExternalLinkSquareAlt"/> {{ $ts._pages.viewPage }}</MkA>
<div class="buttons" style="margin: 16px 0;">
<div class="buttons" style="margin: 16px;">
<MkButton inline @click="save" primary class="save" v-if="!readonly"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
<MkButton inline @click="duplicate" class="duplicate" v-if="pageId"><Fa :icon="faCopy"/> {{ $ts.duplicate }}</MkButton>
<MkButton inline @click="del" class="delete" v-if="pageId && !readonly"><Fa :icon="faTrashAlt"/> {{ $ts.delete }}</MkButton>
</div>
<MkContainer :body-togglable="true" :expanded="true" class="_vMargin">
<MkContainer :body-togglable="true" :expanded="true" class="_gap">
<template #header><Fa :icon="faCog"/> {{ $ts._pages.pageSetting }}</template>
<div class="_section">
<div style="padding: 16px;">
<MkInput v-model:value="title">
<span>{{ $ts._pages.title }}</span>
</MkInput>
@ -45,16 +44,16 @@
</div>
</MkContainer>
<MkContainer :body-togglable="true" :expanded="true" class="_vMargin">
<MkContainer :body-togglable="true" :expanded="true" class="_gap">
<template #header><Fa :icon="faStickyNote"/> {{ $ts._pages.contents }}</template>
<div class="_section">
<div style="padding: 16px;">
<XBlocks class="content" v-model:value="content" :hpml="hpml"/>
<MkButton @click="add()" v-if="!readonly"><Fa :icon="faPlus"/></MkButton>
</div>
</MkContainer>
<MkContainer :body-togglable="true" class="_vMargin">
<MkContainer :body-togglable="true" class="_gap">
<template #header><Fa :icon="faMagic"/> {{ $ts._pages.variables }}</template>
<div class="qmuvgica">
<XDraggable tag="div" class="variables" v-show="variables.length > 0" v-model="variables" item-key="name" handle=".drag-handle" :group="{ name: 'variables' }" animation="150" swap-threshold="0.5">
@ -75,14 +74,13 @@
</div>
</MkContainer>
<MkContainer :body-togglable="true" :expanded="true" class="_vMargin">
<MkContainer :body-togglable="true" :expanded="true" class="_gap">
<template #header><Fa :icon="faCode"/> {{ $ts.script }}</template>
<div>
<MkTextarea class="_code" v-model:value="script"/>
</div>
</MkContainer>
</div>
</div>
</template>
<script lang="ts">
@ -110,6 +108,7 @@ import { url } from '@client/config';
import { collectPageVars } from '@client/scripts/collect-page-vars';
import * as os from '@client/os';
import { selectFile } from '@client/scripts/select-file';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
@ -134,7 +133,7 @@ export default defineComponent({
data() {
return {
INFO: computed(() => {
[symbols.PAGE_INFO]: computed(() => {
let title = this.$ts._pages.newPage;
if (this.initPageId) {
title = this.$ts._pages.editPage;

View file

@ -1,25 +1,25 @@
<template>
<div class="xcukqgmh" v-if="page" :key="page.id">
<div class="_section main">
<div class="_content">
<div class="xcukqgmh _root" v-if="page" :key="page.id" v-size="{ max: [450] }">
<div class="_magnet"></div>
<div class="_block main">
<!--
<div class="header">
<h1>{{ page.title }}</h1>
</div>
-->
<div class="banner">
<img :src="page.eyeCatchingImage.url" v-if="page.eyeCatchingImageId"/>
</div>
<div>
<div class="content">
<XPage :page="page"/>
<small style="display: block; opacity: 0.7; margin-top: 1em;">@{{ page.user.username }}</small>
</div>
<div class="like">
<MkButton class="button" @click="unlike()" v-if="page.isLiked" v-tooltip="$ts._pages.unlike" primary><Fa :icon="faHeartS"/><span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span></MkButton>
<MkButton class="button" @click="like()" v-else v-tooltip="$ts._pages.like"><Fa :icon="faHeartR"/><span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span></MkButton>
</div>
</div>
<div class="_section like">
<div class="_content">
<button class="_button" @click="unlike()" v-if="page.isLiked" :title="$ts._pages.unlike"><Fa :icon="faHeartS"/></button>
<button class="_button" @click="like()" v-else :title="$ts._pages.like"><Fa :icon="faHeartR"/></button>
<span class="count" v-if="page.likedCount > 0">{{ page.likedCount }}</span>
</div>
</div>
<div class="_section links">
<div class="_content">
<div class="links">
<MkA :to="`/@${username}/pages/${pageName}/view-source`" class="link">{{ $ts._pages.viewSource }}</MkA>
<template v-if="$i && $i.id === page.userId">
<MkA :to="`/pages/edit/${page.id}`" class="link">{{ $ts._pages.editThisPage }}</MkA>
@ -28,19 +28,26 @@
</template>
</div>
</div>
<div class="footer">
<div><Fa :icon="faClock"/> {{ $ts.createdAt }}: <MkTime :time="page.createdAt" mode="detail"/></div>
<div v-if="page.createdAt != page.updatedAt"><Fa :icon="faClock"/> {{ $ts.updatedAt }}: <MkTime :time="page.updatedAt" mode="detail"/></div>
</div>
</div>
</template>
<script lang="ts">
import { computed, defineComponent } from 'vue';
import { faHeart as faHeartS } from '@fortawesome/free-solid-svg-icons';
import { faHeart as faHeartR } from '@fortawesome/free-regular-svg-icons';
import { faHeart as faHeartR, faClock } from '@fortawesome/free-regular-svg-icons';
import XPage from '@client/components/page/page.vue';
import MkButton from '@client/components/ui/button.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';
export default defineComponent({
components: {
XPage
XPage,
MkButton,
},
props: {
@ -56,12 +63,17 @@ export default defineComponent({
data() {
return {
INFO: computed(() => this.page ? {
[symbols.PAGE_INFO]: computed(() => this.page ? {
title: computed(() => this.page.title || this.page.name),
avatar: this.page.user,
path: `/@${this.page.user.username}/pages/${this.page.name}`,
share: {
title: this.page.title || this.page.name,
text: this.page.summary,
},
} : null),
page: null,
faHeartS, faHeartR
faHeartS, faHeartR, faClock,
};
},
@ -92,7 +104,7 @@ export default defineComponent({
},
like() {
os.api('pages/like', {
os.apiWithDialog('pages/like', {
pageId: this.page.id,
}).then(() => {
this.page.isLiked = true;
@ -100,8 +112,14 @@ export default defineComponent({
});
},
unlike() {
os.api('pages/unlike', {
async unlike() {
const confirm = await os.dialog({
type: 'warning',
showCancelButton: true,
text: this.$ts.unlikeConfirm,
});
if (confirm.canceled) return;
os.apiWithDialog('pages/unlike', {
pageId: this.page.id,
}).then(() => {
this.page.isLiked = false;
@ -120,8 +138,21 @@ export default defineComponent({
<style lang="scss" scoped>
.xcukqgmh {
--padding: 32px;
&.max-width_450px {
--padding: 16px;
}
> .main {
> ._content {
> .header {
padding: 16px;
> h1 {
margin: 0;
}
}
> .banner {
> img {
display: block;
@ -130,15 +161,41 @@ export default defineComponent({
object-fit: cover;
}
}
> .content {
padding: var(--padding);
}
> .like {
padding: var(--padding);
border-top: solid 0.5px var(--divider);
> .button {
--accent: rgb(216 71 106);
--X8: rgb(241 92 128);
--buttonBg: rgb(216 71 106 / 5%);
--buttonHoverBg: rgb(216 71 106 / 10%);
::v-deep(.count) {
margin-left: 0.5em;
}
}
}
> .links {
> ._content {
padding: var(--padding);
border-top: solid 0.5px var(--divider);
> .link {
margin-right: 0.75em;
}
}
}
> .footer {
margin: var(--padding);
font-size: 85%;
opacity: 0.75;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show more