mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-17 12:35:37 +02:00
wip
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
props: ['data'],
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
function dragListen(fn) {
|
||||
window.addEventListener('mousemove', fn);
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faChartBar, faSort } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import XCalendar from './activity.calendar.vue';
|
||||
import XChart from './activity.chart.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'activity',
|
||||
@@ -55,7 +56,7 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$root.api('charts/user/notes', {
|
||||
os.api('charts/user/notes', {
|
||||
userId: this.$store.state.i.id,
|
||||
span: 'day',
|
||||
limit: 7 * 21
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'calendar',
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import define from './define';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkAnalogClock from '../components/analog-clock.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import MkAnalogClock from '@/components/analog-clock.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'clock',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { Form } from '../scripts/form';
|
||||
import { Form } from '@/scripts/form';
|
||||
|
||||
export default function <T extends Form>(data: {
|
||||
name: string;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'digitalClock',
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faGlobe } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import MkMiniChart from '../components/mini-chart.vue';
|
||||
import MkMiniChart from '@/components/mini-chart.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'federation',
|
||||
@@ -69,11 +70,11 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
async fetch() {
|
||||
const instances = await this.$root.api('federation/instances', {
|
||||
const instances = await os.api('federation/instances', {
|
||||
sort: '+lastCommunicatedAt',
|
||||
limit: 5
|
||||
});
|
||||
const charts = await Promise.all(instances.map(i => this.$root.api('charts/instance', { host: i.host, limit: 16, span: 'hour' })));
|
||||
const charts = await Promise.all(instances.map(i => os.api('charts/instance', { host: i.host, limit: 16, span: 'hour' })));
|
||||
this.instances = instances;
|
||||
this.charts = charts;
|
||||
this.fetching = false;
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faStickyNote } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'memo',
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faBell, faCog } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import XNotifications from '../components/notifications.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import XNotifications from '@/components/notifications.vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'notifications',
|
||||
@@ -50,7 +51,7 @@ export default defineComponent({
|
||||
|
||||
methods: {
|
||||
async configure() {
|
||||
this.$root.new(await import('../components/notification-setting-window.vue'), {
|
||||
this.$root.new(await import('@/components/notification-setting-window.vue'), {
|
||||
includingTypes: this.props.includingTypes,
|
||||
}).$on('ok', async ({ includingTypes }) => {
|
||||
this.props.includingTypes = includingTypes;
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faCamera } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import { getStaticImageUrl } from '../scripts/get-static-image-url';
|
||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'photos',
|
||||
@@ -53,7 +54,7 @@ export default defineComponent({
|
||||
|
||||
this.connection.on('driveFileCreated', this.onDriveFileCreated);
|
||||
|
||||
this.$root.api('drive/stream', {
|
||||
os.api('drive/stream', {
|
||||
type: 'image/*',
|
||||
limit: 9
|
||||
}).then(images => {
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faRssSquare, faCog } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'rss',
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { faAngleDown, faAngleUp, faHome, faShareAlt, faGlobe, faListUl, faSatellite } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faComments } from '@fortawesome/free-regular-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import XTimeline from '../components/timeline.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import XTimeline from '@/components/timeline.vue';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'timeline',
|
||||
@@ -69,8 +70,8 @@ export default defineComponent({
|
||||
async choose(ev) {
|
||||
this.menuOpened = true;
|
||||
const [antennas, lists] = await Promise.all([
|
||||
this.$root.api('antennas/list'),
|
||||
this.$root.api('users/lists/list')
|
||||
os.api('antennas/list'),
|
||||
os.api('users/lists/list')
|
||||
]);
|
||||
const antennaItems = antennas.map(antenna => ({
|
||||
text: antenna.name,
|
||||
@@ -88,7 +89,7 @@ export default defineComponent({
|
||||
this.setSrc('list');
|
||||
}
|
||||
}));
|
||||
this.$store.dispatch('showMenu', {
|
||||
os.menu({
|
||||
items: [{
|
||||
text: this.$t('_timelines.home'),
|
||||
icon: faHome,
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { faHashtag } from '@fortawesome/free-solid-svg-icons';
|
||||
import MkContainer from '../components/ui/container.vue';
|
||||
import MkContainer from '@/components/ui/container.vue';
|
||||
import define from './define';
|
||||
import MkMiniChart from '../components/mini-chart.vue';
|
||||
import MkMiniChart from '@/components/mini-chart.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'hashtags',
|
||||
@@ -55,7 +56,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
fetch() {
|
||||
this.$root.api('hashtags/trend').then(stats => {
|
||||
os.api('hashtags/trend').then(stats => {
|
||||
this.stats = stats;
|
||||
this.fetching = false;
|
||||
});
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { toUnicode } from 'punycode';
|
||||
import XSigninDialog from '../components/signin-dialog.vue';
|
||||
import XSignupDialog from '../components/signup-dialog.vue';
|
||||
import MkButton from '../components/ui/button.vue';
|
||||
import { host } from '../config';
|
||||
import XSigninDialog from '@/components/signin-dialog.vue';
|
||||
import XSignupDialog from '@/components/signup-dialog.vue';
|
||||
import MkButton from '@/components/ui/button.vue';
|
||||
import { host } from '@/config';
|
||||
import define from './define';
|
||||
import * as os from '@/os';
|
||||
|
||||
const widget = define({
|
||||
name: 'welcome',
|
||||
@@ -44,7 +45,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
created() {
|
||||
this.$root.api('stats').then(stats => {
|
||||
os.api('stats').then(stats => {
|
||||
this.stats = stats;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user