wip
This commit is contained in:
parent
b3779875d0
commit
bb3e2c123a
17 changed files with 129 additions and 136 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="fdidabkb" :class="{ slim: narrow, thin }" :key="key">
|
<div class="fdidabkb" :class="{ slim: narrow, thin }" :style="{ background: bg }">
|
||||||
<template v-if="info">
|
<template v-if="info">
|
||||||
<div class="titleContainer" @click="showTabsPopup">
|
<div class="titleContainer" @click="showTabsPopup">
|
||||||
<i v-if="info.icon" class="icon" :class="info.icon"></i>
|
<i v-if="info.icon" class="icon" :class="info.icon"></i>
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { popupMenu } from '@client/os';
|
import { popupMenu } from '@client/os';
|
||||||
import { url } from '@client/config';
|
import { url } from '@client/config';
|
||||||
|
import * as tinycolor from 'tinycolor2';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
@ -54,9 +55,9 @@ export default defineComponent({
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
bg: null,
|
||||||
narrow: false,
|
narrow: false,
|
||||||
height: 0,
|
height: 0,
|
||||||
key: 0,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -75,13 +76,12 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
|
||||||
info() {
|
|
||||||
this.key++;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
const rawBg = this.info.bg || 'var(--bg)';
|
||||||
|
const bg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
|
||||||
|
bg.setAlpha(0.85);
|
||||||
|
this.bg = bg.toRgbString();
|
||||||
|
|
||||||
if (this.$el.parentElement == null) return;
|
if (this.$el.parentElement == null) return;
|
||||||
this.narrow = this.$el.parentElement.offsetWidth < 500;
|
this.narrow = this.$el.parentElement.offsetWidth < 500;
|
||||||
new ResizeObserver((entries, observer) => {
|
new ResizeObserver((entries, observer) => {
|
||||||
|
@ -145,7 +145,12 @@ export default defineComponent({
|
||||||
.fdidabkb {
|
.fdidabkb {
|
||||||
--height: 60px;
|
--height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1000;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
-webkit-backdrop-filter: var(--blur, blur(15px));
|
||||||
|
backdrop-filter: var(--blur, blur(15px));
|
||||||
|
|
||||||
&.thin {
|
&.thin {
|
||||||
--height: 50px;
|
--height: 50px;
|
|
@ -13,6 +13,7 @@ import i18n from './global/i18n';
|
||||||
import loading from './global/loading.vue';
|
import loading from './global/loading.vue';
|
||||||
import error from './global/error.vue';
|
import error from './global/error.vue';
|
||||||
import ad from './global/ad.vue';
|
import ad from './global/ad.vue';
|
||||||
|
import header from './global/header.vue';
|
||||||
|
|
||||||
export default function(app: App) {
|
export default function(app: App) {
|
||||||
app.component('I18n', i18n);
|
app.component('I18n', i18n);
|
||||||
|
@ -28,4 +29,5 @@ export default function(app: App) {
|
||||||
app.component('MkLoading', loading);
|
app.component('MkLoading', loading);
|
||||||
app.component('MkError', error);
|
app.component('MkError', error);
|
||||||
app.component('MkAd', ad);
|
app.component('MkAd', ad);
|
||||||
|
app.component('MkHeader', header);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button>
|
<button class="_button" @click="$refs.modal.close()"><i class="fas fa-times"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="body _flat_">
|
<div class="body _flat_">
|
||||||
<XHeader v-if="!pageInfo?.hide" :info="pageInfo"/>
|
<MkHeader v-if="!pageInfo?.hide" :info="pageInfo"/>
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="component" v-bind="props" :ref="changePage"/>
|
<component :is="component" v-bind="props" :ref="changePage"/>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
|
@ -23,7 +23,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import MkModal from '@client/components/ui/modal.vue';
|
import MkModal from '@client/components/ui/modal.vue';
|
||||||
import XHeader from '@client/ui/_common_/header.vue';
|
|
||||||
import { popout } from '@client/scripts/popout';
|
import { popout } from '@client/scripts/popout';
|
||||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||||
import { resolve } from '@client/router';
|
import { resolve } from '@client/router';
|
||||||
|
@ -34,7 +33,6 @@ import * as os from '@client/os';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
MkModal,
|
MkModal,
|
||||||
XHeader,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
inject: {
|
inject: {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<button v-if="history.length > 0" class="_button" @click="back()"><i class="fas fa-arrow-left"></i></button>
|
<button v-if="history.length > 0" class="_button" @click="back()"><i class="fas fa-arrow-left"></i></button>
|
||||||
</template>
|
</template>
|
||||||
<div class="yrolvcoq _flat_">
|
<div class="yrolvcoq _flat_">
|
||||||
<XHeader :info="pageInfo"/>
|
<MkHeader :info="pageInfo"/>
|
||||||
<component :is="component" v-bind="props" :ref="changePage"/>
|
<component :is="component" v-bind="props" :ref="changePage"/>
|
||||||
</div>
|
</div>
|
||||||
</XWindow>
|
</XWindow>
|
||||||
|
@ -25,7 +25,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import XWindow from '@client/components/ui/window.vue';
|
import XWindow from '@client/components/ui/window.vue';
|
||||||
import XHeader from '@client/ui/_common_/header.vue';
|
|
||||||
import { popout } from '@client/scripts/popout';
|
import { popout } from '@client/scripts/popout';
|
||||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||||
import { resolve } from '@client/router';
|
import { resolve } from '@client/router';
|
||||||
|
@ -35,7 +34,6 @@ import * as symbols from '@client/symbols';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XWindow,
|
XWindow,
|
||||||
XHeader,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
inject: {
|
inject: {
|
||||||
|
|
|
@ -1,72 +1,76 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="lznhrdub _root">
|
<div>
|
||||||
<div>
|
<MkHeader :info="header"/>
|
||||||
<div class="_isolated">
|
|
||||||
<MkInput v-model="query" :debounce="true" type="search">
|
|
||||||
<template #prefix><i class="fas fa-search"></i></template>
|
|
||||||
<template #label>{{ $ts.searchUser }}</template>
|
|
||||||
</MkInput>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<XUserList v-if="query" class="_gap" :pagination="searchPagination" ref="search"/>
|
<div class="lznhrdub _root">
|
||||||
|
<div>
|
||||||
<div class="localfedi7 _block _isolated" v-if="meta && stats && tag == null" :style="{ backgroundImage: meta.bannerUrl ? `url(${meta.bannerUrl})` : null }">
|
<div class="_isolated">
|
||||||
<header><span>{{ $t('explore', { host: meta.name || 'Misskey' }) }}</span></header>
|
<MkInput v-model="query" :debounce="true" type="search">
|
||||||
<div><span>{{ $t('exploreUsersCount', { count: num(stats.originalUsersCount) }) }}</span></div>
|
<template #prefix><i class="fas fa-search"></i></template>
|
||||||
</div>
|
<template #label>{{ $ts.searchUser }}</template>
|
||||||
|
</MkInput>
|
||||||
<template v-if="tag == null">
|
|
||||||
<MkFolder class="_gap" persist-key="explore-pinned-users">
|
|
||||||
<template #header><i class="fas fa-bookmark fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.pinnedUsers }}</template>
|
|
||||||
<XUserList :pagination="pinnedUsers"/>
|
|
||||||
</MkFolder>
|
|
||||||
<MkFolder class="_gap" persist-key="explore-popular-users">
|
|
||||||
<template #header><i class="fas fa-chart-line fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.popularUsers }}</template>
|
|
||||||
<XUserList :pagination="popularUsers"/>
|
|
||||||
</MkFolder>
|
|
||||||
<MkFolder class="_gap" persist-key="explore-recently-updated-users">
|
|
||||||
<template #header><i class="fas fa-comment-alt fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyUpdatedUsers }}</template>
|
|
||||||
<XUserList :pagination="recentlyUpdatedUsers"/>
|
|
||||||
</MkFolder>
|
|
||||||
<MkFolder class="_gap" persist-key="explore-recently-registered-users">
|
|
||||||
<template #header><i class="fas fa-plus fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyRegisteredUsers }}</template>
|
|
||||||
<XUserList :pagination="recentlyRegisteredUsers"/>
|
|
||||||
</MkFolder>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div class="localfedi7 _block _isolated" v-if="tag == null" :style="{ backgroundImage: `url(/static-assets/client/fedi.jpg)` }">
|
|
||||||
<header><span>{{ $ts.exploreFediverse }}</span></header>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<MkFolder :foldable="true" :expanded="false" ref="tags" class="_gap">
|
|
||||||
<template #header><i class="fas fa-hashtag fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.popularTags }}</template>
|
|
||||||
|
|
||||||
<div class="vxjfqztj">
|
|
||||||
<MkA v-for="tag in tagsLocal" :to="`/explore/tags/${tag.tag}`" :key="'local:' + tag.tag" class="local">{{ tag.tag }}</MkA>
|
|
||||||
<MkA v-for="tag in tagsRemote" :to="`/explore/tags/${tag.tag}`" :key="'remote:' + tag.tag">{{ tag.tag }}</MkA>
|
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
|
||||||
|
|
||||||
<MkFolder v-if="tag != null" :key="`${tag}`" class="_gap">
|
<XUserList v-if="query" class="_gap" :pagination="searchPagination" ref="search"/>
|
||||||
<template #header><i class="fas fa-hashtag fa-fw" style="margin-right: 0.5em;"></i>{{ tag }}</template>
|
|
||||||
<XUserList :pagination="tagUsers"/>
|
|
||||||
</MkFolder>
|
|
||||||
|
|
||||||
<template v-if="tag == null">
|
<div class="localfedi7 _block _isolated" v-if="meta && stats && tag == null" :style="{ backgroundImage: meta.bannerUrl ? `url(${meta.bannerUrl})` : null }">
|
||||||
<MkFolder class="_gap">
|
<header><span>{{ $t('explore', { host: meta.name || 'Misskey' }) }}</span></header>
|
||||||
<template #header><i class="fas fa-chart-line fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.popularUsers }}</template>
|
<div><span>{{ $t('exploreUsersCount', { count: num(stats.originalUsersCount) }) }}</span></div>
|
||||||
<XUserList :pagination="popularUsersF"/>
|
</div>
|
||||||
|
|
||||||
|
<template v-if="tag == null">
|
||||||
|
<MkFolder class="_gap" persist-key="explore-pinned-users">
|
||||||
|
<template #header><i class="fas fa-bookmark fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.pinnedUsers }}</template>
|
||||||
|
<XUserList :pagination="pinnedUsers"/>
|
||||||
|
</MkFolder>
|
||||||
|
<MkFolder class="_gap" persist-key="explore-popular-users">
|
||||||
|
<template #header><i class="fas fa-chart-line fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.popularUsers }}</template>
|
||||||
|
<XUserList :pagination="popularUsers"/>
|
||||||
|
</MkFolder>
|
||||||
|
<MkFolder class="_gap" persist-key="explore-recently-updated-users">
|
||||||
|
<template #header><i class="fas fa-comment-alt fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyUpdatedUsers }}</template>
|
||||||
|
<XUserList :pagination="recentlyUpdatedUsers"/>
|
||||||
|
</MkFolder>
|
||||||
|
<MkFolder class="_gap" persist-key="explore-recently-registered-users">
|
||||||
|
<template #header><i class="fas fa-plus fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyRegisteredUsers }}</template>
|
||||||
|
<XUserList :pagination="recentlyRegisteredUsers"/>
|
||||||
|
</MkFolder>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="localfedi7 _block _isolated" v-if="tag == null" :style="{ backgroundImage: `url(/static-assets/client/fedi.jpg)` }">
|
||||||
|
<header><span>{{ $ts.exploreFediverse }}</span></header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<MkFolder :foldable="true" :expanded="false" ref="tags" class="_gap">
|
||||||
|
<template #header><i class="fas fa-hashtag fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.popularTags }}</template>
|
||||||
|
|
||||||
|
<div class="vxjfqztj">
|
||||||
|
<MkA v-for="tag in tagsLocal" :to="`/explore/tags/${tag.tag}`" :key="'local:' + tag.tag" class="local">{{ tag.tag }}</MkA>
|
||||||
|
<MkA v-for="tag in tagsRemote" :to="`/explore/tags/${tag.tag}`" :key="'remote:' + tag.tag">{{ tag.tag }}</MkA>
|
||||||
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
<MkFolder class="_gap">
|
|
||||||
<template #header><i class="fas fa-comment-alt fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyUpdatedUsers }}</template>
|
<MkFolder v-if="tag != null" :key="`${tag}`" class="_gap">
|
||||||
<XUserList :pagination="recentlyUpdatedUsersF"/>
|
<template #header><i class="fas fa-hashtag fa-fw" style="margin-right: 0.5em;"></i>{{ tag }}</template>
|
||||||
|
<XUserList :pagination="tagUsers"/>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
<MkFolder class="_gap">
|
|
||||||
<template #header><i class="fas fa-rocket fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyDiscoveredUsers }}</template>
|
<template v-if="tag == null">
|
||||||
<XUserList :pagination="recentlyRegisteredUsersF"/>
|
<MkFolder class="_gap">
|
||||||
</MkFolder>
|
<template #header><i class="fas fa-chart-line fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.popularUsers }}</template>
|
||||||
</template>
|
<XUserList :pagination="popularUsersF"/>
|
||||||
|
</MkFolder>
|
||||||
|
<MkFolder class="_gap">
|
||||||
|
<template #header><i class="fas fa-comment-alt fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyUpdatedUsers }}</template>
|
||||||
|
<XUserList :pagination="recentlyUpdatedUsersF"/>
|
||||||
|
</MkFolder>
|
||||||
|
<MkFolder class="_gap">
|
||||||
|
<template #header><i class="fas fa-rocket fa-fw" style="margin-right: 0.5em;"></i>{{ $ts.recentlyDiscoveredUsers }}</template>
|
||||||
|
<XUserList :pagination="recentlyRegisteredUsersF"/>
|
||||||
|
</MkFolder>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -100,6 +104,10 @@ export default defineComponent({
|
||||||
title: this.$ts.explore,
|
title: this.$ts.explore,
|
||||||
icon: 'fas fa-hashtag'
|
icon: 'fas fa-hashtag'
|
||||||
},
|
},
|
||||||
|
header: {
|
||||||
|
title: this.$ts.explore,
|
||||||
|
icon: 'fas fa-hashtag'
|
||||||
|
},
|
||||||
pinnedUsers: { endpoint: 'pinned-users' },
|
pinnedUsers: { endpoint: 'pinned-users' },
|
||||||
popularUsers: { endpoint: 'users', limit: 10, noPaging: true, params: {
|
popularUsers: { endpoint: 'users', limit: 10, noPaging: true, params: {
|
||||||
state: 'alive',
|
state: 'alive',
|
||||||
|
|
|
@ -79,7 +79,8 @@ export default defineComponent({
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
const indexInfo = {
|
const indexInfo = {
|
||||||
title: i18n.locale.instance,
|
title: i18n.locale.instance,
|
||||||
icon: 'fas fa-cog'
|
icon: 'fas fa-cog',
|
||||||
|
bg: 'var(--bg)',
|
||||||
};
|
};
|
||||||
const INFO = ref(indexInfo);
|
const INFO = ref(indexInfo);
|
||||||
const page = ref(props.initialPage);
|
const page = ref(props.initialPage);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="clupoqwt" v-size="{ min: [800] }">
|
<div>
|
||||||
<XNotifications class="notifications" @before="before" @after="after" page/>
|
<MkHeader :info="header"/>
|
||||||
|
<div class="clupoqwt" v-size="{ min: [800] }">
|
||||||
|
<XNotifications class="notifications" @before="before" @after="after" page/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -22,6 +25,11 @@ export default defineComponent({
|
||||||
title: this.$ts.notifications,
|
title: this.$ts.notifications,
|
||||||
icon: 'fas fa-bell',
|
icon: 'fas fa-bell',
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
title: this.$ts.notifications,
|
||||||
|
icon: 'fas fa-bell',
|
||||||
|
bg: 'var(--bg)',
|
||||||
actions: [{
|
actions: [{
|
||||||
text: this.$ts.markAllAsRead,
|
text: this.$ts.markAllAsRead,
|
||||||
icon: 'fas fa-check',
|
icon: 'fas fa-check',
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<component :is="component" :key="page" @info="onInfo" v-bind="pageProps"/>
|
<component :is="component" :key="page" v-bind="pageProps"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -74,16 +74,13 @@ export default defineComponent({
|
||||||
title: i18n.locale.settings,
|
title: i18n.locale.settings,
|
||||||
icon: 'fas fa-cog',
|
icon: 'fas fa-cog',
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
hide: true,
|
|
||||||
};
|
};
|
||||||
const INFO = ref(indexInfo);
|
const INFO = ref(indexInfo);
|
||||||
const page = ref(props.initialPage);
|
const page = ref(props.initialPage);
|
||||||
const narrow = ref(false);
|
const narrow = ref(false);
|
||||||
const view = ref(null);
|
const view = ref(null);
|
||||||
const el = ref(null);
|
const el = ref(null);
|
||||||
const onInfo = (viewInfo) => {
|
|
||||||
INFO.value = viewInfo;
|
|
||||||
};
|
|
||||||
const pageProps = ref({});
|
const pageProps = ref({});
|
||||||
const component = computed(() => {
|
const component = computed(() => {
|
||||||
if (page.value == null) return null;
|
if (page.value == null) return null;
|
||||||
|
@ -176,7 +173,6 @@ export default defineComponent({
|
||||||
narrow,
|
narrow,
|
||||||
view,
|
view,
|
||||||
el,
|
el,
|
||||||
onInfo,
|
|
||||||
pageProps,
|
pageProps,
|
||||||
component,
|
component,
|
||||||
emailNotConfigured,
|
emailNotConfigured,
|
||||||
|
|
|
@ -78,7 +78,6 @@ export default defineComponent({
|
||||||
title: this.$ts.profile,
|
title: this.$ts.profile,
|
||||||
icon: 'fas fa-user',
|
icon: 'fas fa-user',
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
hide: true,
|
|
||||||
},
|
},
|
||||||
host,
|
host,
|
||||||
langs,
|
langs,
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="cmuxhskf" v-hotkey.global="keymap" v-size="{ min: [800] }">
|
<div v-hotkey.global="keymap">
|
||||||
<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/>
|
<MkHeader :info="header"/>
|
||||||
<XPostForm v-if="$store.reactiveState.showFixedPostForm.value" class="post-form _block" fixed/>
|
<div class="cmuxhskf" v-size="{ min: [800] }">
|
||||||
|
<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/>
|
||||||
|
<XPostForm v-if="$store.reactiveState.showFixedPostForm.value" class="post-form _block" fixed/>
|
||||||
|
|
||||||
<div class="new" v-if="queue > 0"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div>
|
<div class="new" v-if="queue > 0"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div>
|
||||||
<div class="tl _block">
|
<div class="tl _block">
|
||||||
<XTimeline ref="tl" class="tl"
|
<XTimeline ref="tl" class="tl"
|
||||||
:key="src"
|
:key="src"
|
||||||
:src="src"
|
:src="src"
|
||||||
:sound="true"
|
:sound="true"
|
||||||
@before="before()"
|
@before="before()"
|
||||||
@after="after()"
|
@after="after()"
|
||||||
@queue="queueUpdated"
|
@queue="queueUpdated"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -43,6 +46,11 @@ export default defineComponent({
|
||||||
title: this.$ts.timeline,
|
title: this.$ts.timeline,
|
||||||
icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home',
|
icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home',
|
||||||
bg: 'var(--bg)',
|
bg: 'var(--bg)',
|
||||||
|
})),
|
||||||
|
header: computed(() => ({
|
||||||
|
title: this.$ts.timeline,
|
||||||
|
icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home',
|
||||||
|
bg: 'var(--bg)',
|
||||||
actions: [{
|
actions: [{
|
||||||
icon: 'fas fa-list-ul',
|
icon: 'fas fa-list-ul',
|
||||||
text: this.$ts.lists,
|
text: this.$ts.lists,
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
<main class="main" @contextmenu.stop="onContextmenu">
|
<main class="main" @contextmenu.stop="onContextmenu">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<XHeader class="header" :info="pageInfo" :menu="menu" :center="false" @click="onHeaderClick"/>
|
<MkHeader class="header" :info="pageInfo" :menu="menu" :center="false" @click="onHeaderClick"/>
|
||||||
</header>
|
</header>
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
|
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
|
||||||
|
@ -101,7 +101,6 @@ import XSidebar from '@client/ui/_common_/sidebar.vue';
|
||||||
import XWidgets from './widgets.vue';
|
import XWidgets from './widgets.vue';
|
||||||
import XCommon from '../_common_/common.vue';
|
import XCommon from '../_common_/common.vue';
|
||||||
import XSide from './side.vue';
|
import XSide from './side.vue';
|
||||||
import XHeader from '../_common_/header.vue';
|
|
||||||
import XHeaderClock from './header-clock.vue';
|
import XHeaderClock from './header-clock.vue';
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
import { router } from '@client/router';
|
import { router } from '@client/router';
|
||||||
|
@ -117,7 +116,6 @@ export default defineComponent({
|
||||||
XSidebar,
|
XSidebar,
|
||||||
XWidgets,
|
XWidgets,
|
||||||
XSide, // NOTE: dynamic importするとAsyncComponentWrapperが間に入るせいでref取得できなくて面倒になる
|
XSide, // NOTE: dynamic importするとAsyncComponentWrapperが間に入るせいでref取得できなくて面倒になる
|
||||||
XHeader,
|
|
||||||
XHeaderClock,
|
XHeaderClock,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mrajymqm _narrow_" v-if="component">
|
<div class="mrajymqm _narrow_" v-if="component">
|
||||||
<header class="header" @contextmenu.prevent.stop="onContextmenu">
|
<header class="header" @contextmenu.prevent.stop="onContextmenu">
|
||||||
<XHeader class="title" :info="pageInfo" :center="false"/>
|
<MkHeader class="title" :info="pageInfo" :center="false"/>
|
||||||
</header>
|
</header>
|
||||||
<component :is="component" v-bind="props" :ref="changePage" class="body _flat_"/>
|
<component :is="component" v-bind="props" :ref="changePage" class="body _flat_"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import XHeader from '../_common_/header.vue';
|
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||||
import { resolve } from '@client/router';
|
import { resolve } from '@client/router';
|
||||||
|
@ -18,7 +17,6 @@ import * as symbols from '@client/symbols';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XHeader
|
|
||||||
},
|
},
|
||||||
|
|
||||||
provide() {
|
provide() {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<XHeader :info="pageInfo"/>
|
<MkHeader :info="pageInfo"/>
|
||||||
<router-view v-slot="{ Component }" class="_flat_">
|
<router-view v-slot="{ Component }" class="_flat_">
|
||||||
<transition>
|
<transition>
|
||||||
<keep-alive :include="['timeline']">
|
<keep-alive :include="['timeline']">
|
||||||
|
@ -21,7 +21,6 @@
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import XColumn from './column.vue';
|
import XColumn from './column.vue';
|
||||||
import XNotes from '@client/components/notes.vue';
|
import XNotes from '@client/components/notes.vue';
|
||||||
import XHeader from '@client/ui/_common_/header.vue';
|
|
||||||
import { deckStore } from '@client/ui/deck/deck-store';
|
import { deckStore } from '@client/ui/deck/deck-store';
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
import * as symbols from '@client/symbols';
|
import * as symbols from '@client/symbols';
|
||||||
|
@ -29,7 +28,6 @@ import * as symbols from '@client/symbols';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XColumn,
|
XColumn,
|
||||||
XHeader,
|
|
||||||
XNotes
|
XNotes
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<span class="title">{{ pageInfo.title }}</span>
|
<span class="title">{{ pageInfo.title }}</span>
|
||||||
<button class="_button" @click="close()"><i class="fas fa-times"></i></button>
|
<button class="_button" @click="close()"><i class="fas fa-times"></i></button>
|
||||||
</header>
|
</header>
|
||||||
<XHeader class="pageHeader" :info="pageInfo"/>
|
<MkHeader class="pageHeader" :info="pageInfo"/>
|
||||||
<component :is="component" v-bind="props" :ref="changePage"/>
|
<component :is="component" v-bind="props" :ref="changePage"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import XHeader from './_common_/header.vue';
|
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||||
import { resolve } from '@client/router';
|
import { resolve } from '@client/router';
|
||||||
|
@ -23,10 +22,6 @@ import { url } from '@client/config';
|
||||||
import * as symbols from '@client/symbols';
|
import * as symbols from '@client/symbols';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
|
||||||
XHeader
|
|
||||||
},
|
|
||||||
|
|
||||||
provide() {
|
provide() {
|
||||||
return {
|
return {
|
||||||
navHook: (path) => {
|
navHook: (path) => {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }">
|
<main class="main" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }">
|
||||||
<header class="header" @click="onHeaderClick">
|
<header class="header" @click="onHeaderClick">
|
||||||
<XHeader :info="pageInfo" v-get-size="(w, h) => headerHeight = h" :thin="true"/>
|
<MkHeader :info="pageInfo" v-get-size="(w, h) => headerHeight = h" :thin="true"/>
|
||||||
</header>
|
</header>
|
||||||
<div class="content" :class="{ _flat_: !fullView }">
|
<div class="content" :class="{ _flat_: !fullView }">
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
|
@ -67,7 +67,6 @@ import { StickySidebar } from '@client/scripts/sticky-sidebar';
|
||||||
import XSidebar from './default.sidebar.vue';
|
import XSidebar from './default.sidebar.vue';
|
||||||
import XDrawerSidebar from '@client/ui/_common_/sidebar.vue';
|
import XDrawerSidebar from '@client/ui/_common_/sidebar.vue';
|
||||||
import XCommon from './_common_/common.vue';
|
import XCommon from './_common_/common.vue';
|
||||||
import XHeader from './_common_/header.vue';
|
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
import { menuDef } from '@client/menu';
|
import { menuDef } from '@client/menu';
|
||||||
import * as symbols from '@client/symbols';
|
import * as symbols from '@client/symbols';
|
||||||
|
@ -80,7 +79,6 @@ export default defineComponent({
|
||||||
XCommon,
|
XCommon,
|
||||||
XSidebar,
|
XSidebar,
|
||||||
XDrawerSidebar,
|
XDrawerSidebar,
|
||||||
XHeader,
|
|
||||||
XHeaderMenu: defineAsyncComponent(() => import('./default.header.vue')),
|
XHeaderMenu: defineAsyncComponent(() => import('./default.header.vue')),
|
||||||
XWidgets: defineAsyncComponent(() => import('./default.widgets.vue')),
|
XWidgets: defineAsyncComponent(() => import('./default.widgets.vue')),
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mk-app" :class="{ wallpaper }" :style="`--headerHeight:` + headerHeight + 'px'">
|
<div class="mk-app" :class="{ wallpaper }">
|
||||||
<XSidebar ref="nav" class="sidebar"/>
|
<XSidebar ref="nav" class="sidebar"/>
|
||||||
|
|
||||||
<div class="contents" ref="contents" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }">
|
<div class="contents" ref="contents" @contextmenu.stop="onContextmenu" :style="{ background: pageInfo?.bg }">
|
||||||
<header class="header" ref="header" @click="onHeaderClick" :style="{ background: pageInfo?.bg }">
|
|
||||||
<XHeader v-if="!pageInfo?.hide" :info="pageInfo" v-get-size="(w, h) => headerHeight = h"/>
|
|
||||||
</header>
|
|
||||||
<main ref="main">
|
<main ref="main">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
|
@ -58,7 +55,6 @@ import { instanceName } from '@client/config';
|
||||||
import { StickySidebar } from '@client/scripts/sticky-sidebar';
|
import { StickySidebar } from '@client/scripts/sticky-sidebar';
|
||||||
import XSidebar from '@client/ui/_common_/sidebar.vue';
|
import XSidebar from '@client/ui/_common_/sidebar.vue';
|
||||||
import XCommon from './_common_/common.vue';
|
import XCommon from './_common_/common.vue';
|
||||||
import XHeader from './_common_/header.vue';
|
|
||||||
import XSide from './default.side.vue';
|
import XSide from './default.side.vue';
|
||||||
import * as os from '@client/os';
|
import * as os from '@client/os';
|
||||||
import { menuDef } from '@client/menu';
|
import { menuDef } from '@client/menu';
|
||||||
|
@ -70,7 +66,6 @@ export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XCommon,
|
XCommon,
|
||||||
XSidebar,
|
XSidebar,
|
||||||
XHeader,
|
|
||||||
XWidgets: defineAsyncComponent(() => import('./universal.widgets.vue')),
|
XWidgets: defineAsyncComponent(() => import('./universal.widgets.vue')),
|
||||||
XSide, // NOTE: dynamic importするとAsyncComponentWrapperが間に入るせいでref取得できなくて面倒になる
|
XSide, // NOTE: dynamic importするとAsyncComponentWrapperが間に入るせいでref取得できなくて面倒になる
|
||||||
},
|
},
|
||||||
|
@ -86,7 +81,6 @@ export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageInfo: null,
|
pageInfo: null,
|
||||||
headerHeight: 0,
|
|
||||||
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
isDesktop: window.innerWidth >= DESKTOP_THRESHOLD,
|
||||||
menuDef: menuDef,
|
menuDef: menuDef,
|
||||||
navHidden: false,
|
navHidden: false,
|
||||||
|
@ -152,9 +146,6 @@ export default defineComponent({
|
||||||
adjustUI() {
|
adjustUI() {
|
||||||
const navWidth = this.$refs.nav.$el.offsetWidth;
|
const navWidth = this.$refs.nav.$el.offsetWidth;
|
||||||
this.navHidden = navWidth === 0;
|
this.navHidden = navWidth === 0;
|
||||||
if (this.$refs.contents == null) return;
|
|
||||||
const width = this.$refs.contents.offsetWidth;
|
|
||||||
if (this.$refs.header) this.$refs.header.style.width = `${width}px`;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
showNav() {
|
showNav() {
|
||||||
|
@ -184,10 +175,6 @@ export default defineComponent({
|
||||||
if (window._scroll) window._scroll();
|
if (window._scroll) window._scroll();
|
||||||
},
|
},
|
||||||
|
|
||||||
onHeaderClick() {
|
|
||||||
window.scroll({ top: 0, behavior: 'smooth' });
|
|
||||||
},
|
|
||||||
|
|
||||||
onContextmenu(e) {
|
onContextmenu(e) {
|
||||||
const isLink = (el: HTMLElement) => {
|
const isLink = (el: HTMLElement) => {
|
||||||
if (el.tagName === 'A') return true;
|
if (el.tagName === 'A') return true;
|
||||||
|
@ -263,8 +250,6 @@ export default defineComponent({
|
||||||
> .contents {
|
> .contents {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
--stickyTop: var(--headerHeight);
|
|
||||||
padding-top: var(--headerHeight);
|
|
||||||
background: var(--panel);
|
background: var(--panel);
|
||||||
|
|
||||||
> .header {
|
> .header {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="mk-app">
|
<div class="mk-app">
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<XHeader :info="pageInfo"/>
|
<MkHeader :info="pageInfo"/>
|
||||||
</header>
|
</header>
|
||||||
<main ref="main">
|
<main ref="main">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -24,14 +24,12 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||||
import { host } from '@client/config';
|
import { host } from '@client/config';
|
||||||
import XHeader from './_common_/header.vue';
|
|
||||||
import XCommon from './_common_/common.vue';
|
import XCommon from './_common_/common.vue';
|
||||||
import * as symbols from '@client/symbols';
|
import * as symbols from '@client/symbols';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XCommon,
|
XCommon,
|
||||||
XHeader,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
Loading…
Reference in a new issue