Compare commits

...

42 Commits

Author SHA1 Message Date
dd94392317 2.24.2 2018-05-30 05:02:56 +09:00
baa2845916 Merge pull request #1663 from syuilo/l10n_master
New Crowdin translations
2018-05-30 05:02:17 +09:00
97ae4ea13e New translations ja.yml (English) 2018-05-30 05:00:58 +09:00
d1c5f0c70f New translations ja.yml (Portuguese) 2018-05-30 04:51:38 +09:00
95bff3005f New translations ja.yml (Korean) 2018-05-30 04:51:36 +09:00
c0b06496b1 New translations ja.yml (Polish) 2018-05-30 04:51:34 +09:00
2105e1f259 New translations ja.yml (Chinese Simplified) 2018-05-30 04:51:32 +09:00
e546414c2f New translations ja.yml (Italian) 2018-05-30 04:51:30 +09:00
1f4660a930 New translations ja.yml (Russian) 2018-05-30 04:51:28 +09:00
a2165c2e01 New translations ja.yml (English) 2018-05-30 04:51:26 +09:00
1af920739f New translations ja.yml (Spanish) 2018-05-30 04:51:24 +09:00
868e8228f0 New translations ja.yml (German) 2018-05-30 04:51:22 +09:00
2bbc74560d New translations ja.yml (French) 2018-05-30 04:51:20 +09:00
5d2caa456d 🎨 2018-05-30 04:46:50 +09:00
9069a99a15 wip 2018-05-30 04:45:27 +09:00
fa56a44d85 🎨 2018-05-30 04:07:23 +09:00
248acaee75 2.24.1 2018-05-30 00:16:03 +09:00
ef75f12abe Fix bug 2018-05-30 00:15:32 +09:00
854814c226 2.24.0 2018-05-29 23:57:25 +09:00
b6a322f447 Merge branch 'master' of https://github.com/syuilo/misskey 2018-05-29 23:56:52 +09:00
161b9602f4 Fix bug 2018-05-29 23:56:44 +09:00
62669bff07 Merge pull request #1662 from syuilo/l10n_master
New Crowdin translations
2018-05-29 23:55:19 +09:00
02bd299714 New translations ja.yml (English) 2018-05-29 23:52:22 +09:00
f71dabfbfa New translations ja.yml (Portuguese) 2018-05-29 23:45:17 +09:00
8d31cedafc New translations ja.yml (Korean) 2018-05-29 23:45:11 +09:00
a88d6c1c47 New translations ja.yml (Polish) 2018-05-29 23:45:09 +09:00
d35a13fc0b New translations ja.yml (Chinese Simplified) 2018-05-29 23:45:05 +09:00
8e4029c1cd New translations ja.yml (Italian) 2018-05-29 23:44:59 +09:00
9a9f852540 New translations ja.yml (Russian) 2018-05-29 23:44:57 +09:00
c66497a4de New translations ja.yml (English) 2018-05-29 23:44:55 +09:00
1f9ecbf0be New translations ja.yml (Spanish) 2018-05-29 23:44:53 +09:00
423a6f7013 New translations ja.yml (German) 2018-05-29 23:44:51 +09:00
ef0ca38362 New translations ja.yml (French) 2018-05-29 23:44:48 +09:00
ae9bfd69b0 Add analog clock widget 2018-05-29 23:13:39 +09:00
3d231c3456 Fix 2018-05-29 22:56:05 +09:00
95d0d0047a 時計をSVG化 2018-05-29 22:43:03 +09:00
d05aee19f2 2.23.2 2018-05-29 21:46:30 +09:00
125765faa6 Fix bug 2018-05-29 21:46:02 +09:00
70c0b1d8c0 🎨 2018-05-29 19:13:49 +09:00
72e8660ae3 🎨 2018-05-29 19:03:03 +09:00
2127bf32c2 2.23.1 2018-05-29 17:11:48 +09:00
2b9acc239e Fix bug 2018-05-29 17:10:59 +09:00
33 changed files with 402 additions and 136 deletions

View File

@ -48,6 +48,7 @@ common:
update-available: "Eine neue Version von Misskey ist verfügbar ({newer}, aktuell ist {current}). Lade die Seite neu um die aktuelle Version zu laden"
my-token-regenerated: "Dein Token wurde generiert. Du wirst jetzt abgemeldet."
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "A new version of Misskey is now available({newer}, current is {current}). Reload the page to apply the update."
my-token-regenerated: "Your token has been generated. You will now get logged out."
widgets:
analog-clock: "Analog clock"
profile: "Profile"
calendar: "Calendar"
timemachine: "Calendar (Time Machine)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "No notes"
load-more: "More"
mobile/views/components/ui.nav.vue:
home: "Home"
timeline: "Timeline"
notifications: "Notifications"
messaging: "Messages"
search: "Search"
drive: "Drive"
favorites: "Favorites"
user-lists: "Lists"
widgets: "Widgets"
game: "Games"
darkmode: "Dark mode"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "More"
mobile/views/pages/favorites.vue:
title: "Favorites"
mobile/views/pages/user-lists.vue:
title: "Lists"
enter-list-name: "Enter list name"
mobile/views/pages/drive.vue:
drive: "Drive"
more: "Load more"

View File

@ -48,6 +48,7 @@ common:
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Une nouvelle version de Misskey est disponible({newer}, version actuelle: {current}). Recharger la page pour appliquer la mise à jour."
my-token-regenerated: "Votre token vient d'être généré, vous allez maintenant être déconnecté."
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "Pas de notes"
load-more: "Afficher plus"
mobile/views/components/ui.nav.vue:
home: "Accueil"
timeline: "タイムライン"
notifications: "Notifications"
messaging: "Messages"
search: "Rechercher"
drive: "Drive"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "Afficher plus"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "Drive"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -54,6 +54,7 @@ common:
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -837,12 +838,13 @@ mobile/views/components/timeline.vue:
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -862,6 +864,10 @@ mobile/views/components/users-list.vue:
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Nowa wersja Misskey jest dostępna ({newer}, obecna to {current}). Odśwież stronę, aby zastosować aktualizację."
my-token-regenerated: "Twój token został wygenerowany. Zostaniesz wylogowany."
widgets:
analog-clock: "アナログ時計"
profile: "Profil"
calendar: "Kalendarz"
timemachine: "Kalendarz (wehikuł czasu)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "Brak wpisów"
load-more: "Więcej"
mobile/views/components/ui.nav.vue:
home: "Strona główna"
timeline: "タイムライン"
notifications: "Powiadomienia"
messaging: "Wiadomości"
search: "Szukaj"
drive: "Dysk"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "Więcej"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "Dysk"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -48,6 +48,7 @@ common:
update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。"
my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。"
widgets:
analog-clock: "アナログ時計"
profile: "プロフィール"
calendar: "カレンダー"
timemachine: "カレンダー(タイムマシン)"
@ -708,12 +709,13 @@ mobile/views/components/timeline.vue:
empty: "投稿がありません"
load-more: "もっと"
mobile/views/components/ui.nav.vue:
home: "ホーム"
timeline: "タイムライン"
notifications: "通知"
messaging: "メッセージ"
search: "検索"
drive: "ドライブ"
favorites: "お気に入り"
user-lists: "リスト"
widgets: "ウィジェット"
game: "ゲーム"
darkmode: "ダークモード"
@ -729,6 +731,9 @@ mobile/views/components/users-list.vue:
load-more: "もっと"
mobile/views/pages/favorites.vue:
title: "お気に入り"
mobile/views/pages/user-lists.vue:
title: "リスト"
enter-list-name: "リスト名を入力してください"
mobile/views/pages/drive.vue:
drive: "ドライブ"
more: "もっと見る"

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "2.23.0",
"clientVersion": "1.0.5993",
"version": "2.24.2",
"clientVersion": "1.0.6035",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,

View File

@ -20,6 +20,7 @@ init(launch => {
// Init router
const router = new VueRouter({
mode: 'history',
base: '/auth/',
routes: [
{ path: '/:token', component: Index },
]

View File

@ -62,7 +62,7 @@ export default Vue.extend({
// 既に連携していた場合
if (this.session.app.isAuthorized) {
this.$root.$data.os.api('auth/accept', {
(this as any).api('auth/accept', {
token: this.session.token
}).then(() => {
this.accepted();

View File

@ -32,9 +32,9 @@
//#region Detect app name
let app = null;
if (url.pathname == '/docs') app = 'docs';
if (url.pathname == '/dev') app = 'dev';
if (url.pathname == '/auth') app = 'auth';
if (url.pathname == '/docs' || url.pathname.startsWith('/docs/')) app = 'docs';
if (url.pathname == '/dev' || url.pathname.startsWith('/dev/')) app = 'dev';
if (url.pathname == '/auth' || url.pathname.startsWith('/auth/')) app = 'auth';
//#endregion
//#region Detect the user language

View File

@ -0,0 +1,127 @@
<template>
<svg class="mk-analog-clock" viewBox="0 0 10 10" preserveAspectRatio="none">
<circle v-for="angle, i in graduations"
:cx="5 + (Math.sin(angle) * (5 - graduationsPadding))"
:cy="5 - (Math.cos(angle) * (5 - graduationsPadding))"
:r="i % 5 == 0 ? 0.125 : 0.05"
:fill="i % 5 == 0 ? majorGraduationColor : minorGraduationColor"/>
<line
:x1="5 - (Math.sin(sAngle) * (sHandLengthRatio * handsTailLength))"
:y1="5 + (Math.cos(sAngle) * (sHandLengthRatio * handsTailLength))"
:x2="5 + (Math.sin(sAngle) * ((sHandLengthRatio * 5) - handsPadding))"
:y2="5 - (Math.cos(sAngle) * ((sHandLengthRatio * 5) - handsPadding))"
:stroke="sHandColor"
stroke-width="0.05"/>
<line
:x1="5 - (Math.sin(mAngle) * (mHandLengthRatio * handsTailLength))"
:y1="5 + (Math.cos(mAngle) * (mHandLengthRatio * handsTailLength))"
:x2="5 + (Math.sin(mAngle) * ((mHandLengthRatio * 5) - handsPadding))"
:y2="5 - (Math.cos(mAngle) * ((mHandLengthRatio * 5) - handsPadding))"
:stroke="mHandColor"
stroke-width="0.1"/>
<line
:x1="5 - (Math.sin(hAngle) * (hHandLengthRatio * handsTailLength))"
:y1="5 + (Math.cos(hAngle) * (hHandLengthRatio * handsTailLength))"
:x2="5 + (Math.sin(hAngle) * ((hHandLengthRatio * 5) - handsPadding))"
:y2="5 - (Math.cos(hAngle) * ((hHandLengthRatio * 5) - handsPadding))"
:stroke="hHandColor"
stroke-width="0.1"/>
</svg>
</template>
<script lang="ts">
import Vue from 'vue';
import { themeColor } from '../../../config';
export default Vue.extend({
props: {
dark: {
type: Boolean,
default: false
}
},
data() {
return {
now: new Date(),
clock: null,
graduationsPadding: 0.5,
handsPadding: 1,
handsTailLength: 0.7,
hHandLengthRatio: 0.75,
mHandLengthRatio: 1,
sHandLengthRatio: 1
};
},
computed: {
majorGraduationColor(): string {
return this.dark ? 'rgba(255, 255, 255, 0.3)' : 'rgba(0, 0, 0, 0.3)';
},
minorGraduationColor(): string {
return this.dark ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
},
sHandColor(): string {
return this.dark ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.3)';
},
mHandColor(): string {
return this.dark ? '#fff' : '#777';
},
hHandColor(): string {
return themeColor;
},
s(): number {
return this.now.getSeconds();
},
m(): number {
return this.now.getMinutes();
},
h(): number {
return this.now.getHours();
},
hAngle(): number {
return Math.PI * (this.h % 12 + this.m / 60) / 6;
},
mAngle(): number {
return Math.PI * (this.m + this.s / 60) / 30;
},
sAngle(): number {
return Math.PI * this.s / 30;
},
graduations(): any {
const angles = [];
for (let i = 0; i < 60; i++) {
const angle = Math.PI * i / 30;
angles.push(angle);
}
return angles;
}
},
mounted() {
this.clock = setInterval(this.tick, 1000);
},
beforeDestroy() {
clearInterval(this.clock);
},
methods: {
tick() {
this.now = new Date();
}
}
});
</script>
<style lang="stylus" scoped>
.mk-analog-clock
display block
</style>

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import analogClock from './analog-clock.vue';
import signin from './signin.vue';
import signup from './signup.vue';
import forkit from './forkit.vue';
@ -27,6 +28,7 @@ import Switch from './switch.vue';
import Othello from './othello.vue';
import welcomeTimeline from './welcome-timeline.vue';
Vue.component('mk-analog-clock', analogClock);
Vue.component('mk-signin', signin);
Vue.component('mk-signup', signup);
Vue.component('mk-forkit', forkit);

View File

@ -0,0 +1,41 @@
<template>
<div class="mkw-analog-clock">
<mk-widget-container :naked="props.naked" :show-header="false">
<div class="mkw-analog-clock--body">
<mk-analog-clock :dark="$store.state.device.darkmode"/>
</div>
</mk-widget-container>
</div>
</template>
<script lang="ts">
import define from '../../../common/define-widget';
export default define({
name: 'analog-clock',
props: () => ({
naked: false
})
}).extend({
methods: {
func() {
this.props.naked = !this.props.naked;
this.save();
}
}
});
</script>
<style lang="stylus" scoped>
@import '~const.styl'
root(isDark)
.mkw-analog-clock--body
padding 8px
.mkw-analog-clock[data-darkmode]
root(true)
.mkw-analog-clock:not([data-darkmode])
root(false)
</style>

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import wAnalogClock from './analog-clock.vue';
import wVersion from './version.vue';
import wRss from './rss.vue';
import wServer from './server.vue';
@ -12,6 +13,7 @@ import wTips from './tips.vue';
import wDonation from './donation.vue';
import wNav from './nav.vue';
Vue.component('mkw-analog-clock', wAnalogClock);
Vue.component('mkw-nav', wNav);
Vue.component('mkw-calendar', wCalendar);
Vue.component('mkw-photo-stream', wPhotoStream);

View File

@ -73,6 +73,7 @@ root(isDark)
background isDark ? #282c37 : #fff
border none
border-bottom solid 1px isDark ? #1c2023 : #eee
border-radius 0
> button
display block

View File

@ -1,108 +0,0 @@
<template>
<canvas class="mk-analog-clock" ref="canvas" width="256" height="256"></canvas>
</template>
<script lang="ts">
import Vue from 'vue';
import { themeColor } from '../../../config';
const Vec2 = function(this: any, x, y) {
this.x = x;
this.y = y;
};
export default Vue.extend({
data() {
return {
clock: null
};
},
mounted() {
this.tick();
this.clock = setInterval(this.tick, 1000);
},
beforeDestroy() {
clearInterval(this.clock);
},
methods: {
tick() {
const canv = this.$refs.canvas as any;
const now = new Date();
const s = now.getSeconds();
const m = now.getMinutes();
const h = now.getHours();
const ctx = canv.getContext('2d');
const canvW = canv.width;
const canvH = canv.height;
ctx.clearRect(0, 0, canvW, canvH);
{ // 背景
const center = Math.min((canvW / 2), (canvH / 2));
const lineStart = center * 0.90;
const shortLineEnd = center * 0.87;
const longLineEnd = center * 0.84;
for (let i = 0; i < 60; i++) {
const angle = Math.PI * i / 30;
const uv = new Vec2(Math.sin(angle), -Math.cos(angle));
ctx.beginPath();
ctx.lineWidth = 1;
ctx.moveTo((canvW / 2) + uv.x * lineStart, (canvH / 2) + uv.y * lineStart);
if (i % 5 == 0) {
ctx.strokeStyle = 'rgba(255, 255, 255, 0.2)';
ctx.lineTo((canvW / 2) + uv.x * longLineEnd, (canvH / 2) + uv.y * longLineEnd);
} else {
ctx.strokeStyle = 'rgba(255, 255, 255, 0.1)';
ctx.lineTo((canvW / 2) + uv.x * shortLineEnd, (canvH / 2) + uv.y * shortLineEnd);
}
ctx.stroke();
}
}
{ // 分
const angle = Math.PI * (m + s / 60) / 30;
const length = Math.min(canvW, canvH) / 2.6;
const uv = new Vec2(Math.sin(angle), -Math.cos(angle));
ctx.beginPath();
ctx.strokeStyle = '#ffffff';
ctx.lineWidth = 2;
ctx.moveTo(canvW / 2 - uv.x * length / 5, canvH / 2 - uv.y * length / 5);
ctx.lineTo(canvW / 2 + uv.x * length, canvH / 2 + uv.y * length);
ctx.stroke();
}
{ // 時
const angle = Math.PI * (h % 12 + m / 60) / 6;
const length = Math.min(canvW, canvH) / 4;
const uv = new Vec2(Math.sin(angle), -Math.cos(angle));
ctx.beginPath();
ctx.strokeStyle = themeColor;
ctx.lineWidth = 2;
ctx.moveTo(canvW / 2 - uv.x * length / 5, canvH / 2 - uv.y * length / 5);
ctx.lineTo(canvW / 2 + uv.x * length, canvH / 2 + uv.y * length);
ctx.stroke();
}
{ // 秒
const angle = Math.PI * s / 30;
const length = Math.min(canvW, canvH) / 2.6;
const uv = new Vec2(Math.sin(angle), -Math.cos(angle));
ctx.beginPath();
ctx.strokeStyle = 'rgba(255, 255, 255, 0.5)';
ctx.lineWidth = 1;
ctx.moveTo(canvW / 2 - uv.x * length / 5, canvH / 2 - uv.y * length / 5);
ctx.lineTo(canvW / 2 + uv.x * length, canvH / 2 + uv.y * length);
ctx.stroke();
}
}
}
});
</script>
<style lang="stylus" scoped>
.mk-analog-clock
display block
width 256px
height 256px
</style>

View File

@ -62,7 +62,7 @@ export default Vue.extend({
onContextmenu(e) {
this.isContextmenuShowing = true;
contextmenu(e, [{
contextmenu((this as any).os)(e, [{
type: 'item',
text: '%i18n:@contextmenu.rename%',
icon: '%fa:i-cursor%',

View File

@ -52,7 +52,7 @@ export default Vue.extend({
onContextmenu(e) {
this.isContextmenuShowing = true;
contextmenu(e, [{
contextmenu((this as any).os)(e, [{
type: 'item',
text: '%i18n:@contextmenu.move-to-this-folder%',
icon: '%fa:arrow-right%',

View File

@ -136,7 +136,7 @@ export default Vue.extend({
},
methods: {
onContextmenu(e) {
contextmenu(e, [{
contextmenu((this as any).os)(e, [{
type: 'item',
text: '%i18n:@contextmenu.create-folder%',
icon: '%fa:R folder%',

View File

@ -7,6 +7,7 @@
<p>%i18n:@add-widget%</p>
<select v-model="widgetAdderSelected">
<option value="profile">%i18n:common.widgets.profile%</option>
<option value="analog-clock">%i18n:common.widgets.analog-clock%</option>
<option value="calendar">%i18n:common.widgets.calendar%</option>
<option value="timemachine">%i18n:common.widgets.timemachine%</option>
<option value="activity">%i18n:common.widgets.activity%</option>

View File

@ -9,7 +9,6 @@ import subNoteContent from './sub-note-content.vue';
import window from './window.vue';
import noteFormWindow from './post-form-window.vue';
import renoteFormWindow from './renote-form-window.vue';
import analogClock from './analog-clock.vue';
import ellipsisIcon from './ellipsis-icon.vue';
import mediaImage from './media-image.vue';
import mediaImageDialog from './media-image-dialog.vue';
@ -40,7 +39,6 @@ Vue.component('mk-sub-note-content', subNoteContent);
Vue.component('mk-window', window);
Vue.component('mk-post-form-window', noteFormWindow);
Vue.component('mk-renote-form-window', renoteFormWindow);
Vue.component('mk-analog-clock', analogClock);
Vue.component('mk-ellipsis-icon', ellipsisIcon);
Vue.component('mk-media-image', mediaImage);
Vue.component('mk-media-image-dialog', mediaImageDialog);

View File

@ -8,7 +8,7 @@
</time>
</div>
<div class="content">
<mk-analog-clock/>
<mk-analog-clock :dark="true"/>
</div>
</div>
</template>

View File

@ -80,6 +80,8 @@ export default Vue.extend({
<style lang="stylus" scoped>
@import '~const.styl'
@import url(https://fonts.googleapis.com/earlyaccess/notosansjp.css);
root(isDark)
display flex
flex-direction column
@ -103,6 +105,7 @@ root(isDark)
text-align center
&.about
font-family 'Noto Sans JP'
color isDark ? #fff : #627574
> article
@ -114,7 +117,7 @@ root(isDark)
> h1
margin 0
font-variant small-caps
font-weight 900
> p
margin 20px 0

View File

@ -37,6 +37,8 @@ import MkSearch from './views/pages/search.vue';
import MkFollowers from './views/pages/followers.vue';
import MkFollowing from './views/pages/following.vue';
import MkFavorites from './views/pages/favorites.vue';
import MkUserLists from './views/pages/user-lists.vue';
import MkUserList from './views/pages/user-list.vue';
import MkSettings from './views/pages/settings.vue';
import MkOthello from './views/pages/othello.vue';
@ -74,6 +76,8 @@ init((launch) => {
{ path: '/i/settings', name: 'settings', component: MkSettings },
{ path: '/i/notifications', name: 'notifications', component: MkNotifications },
{ path: '/i/favorites', name: 'favorites', component: MkFavorites },
{ path: '/i/lists', name: 'user-lists', component: MkUserLists },
{ path: '/i/lists/:list', name: 'user-list', component: MkUserList },
{ path: '/i/widgets', name: 'widgets', component: MkWidgets },
{ path: '/i/messaging', name: 'messaging', component: MkMessaging },
{ path: '/i/messaging/:user', component: MkMessagingRoom },

View File

@ -15,14 +15,15 @@
</router-link>
<div class="links">
<ul>
<li><router-link to="/" :data-active="$route.name == 'index'">%fa:home%%i18n:@home%%fa:angle-right%</router-link></li>
<li><router-link to="/" :data-active="$route.name == 'index'">%fa:home%%i18n:@timeline%%fa:angle-right%</router-link></li>
<li><router-link to="/i/notifications" :data-active="$route.name == 'notifications'">%fa:R bell%%i18n:@notifications%<template v-if="hasUnreadNotification">%fa:circle%</template>%fa:angle-right%</router-link></li>
<li><router-link to="/i/messaging" :data-active="$route.name == 'messaging'">%fa:R comments%%i18n:@messaging%<template v-if="hasUnreadMessagingMessage">%fa:circle%</template>%fa:angle-right%</router-link></li>
<li><router-link to="/othello" :data-active="$route.name == 'othello'">%fa:gamepad%%i18n:@game%<template v-if="hasGameInvitation">%fa:circle%</template>%fa:angle-right%</router-link></li>
</ul>
<ul>
<li><router-link to="/i/widgets" :data-active="$route.name == 'widgets'">%fa:quidditch%%i18n:@widgets%%fa:angle-right%</router-link></li>
<li><router-link to="/i/widgets" :data-active="$route.name == 'widgets'">%fa:R calendar-alt%%i18n:@widgets%%fa:angle-right%</router-link></li>
<li><router-link to="/i/favorites" :data-active="$route.name == 'favorites'">%fa:star%%i18n:@favorites%%fa:angle-right%</router-link></li>
<li><router-link to="/i/lists" :data-active="$route.name == 'user-lists'">%fa:list%%i18n:@user-lists%%fa:angle-right%</router-link></li>
<li><router-link to="/i/drive" :data-active="$route.name == 'drive'">%fa:cloud%%i18n:@drive%%fa:angle-right%</router-link></li>
</ul>
<ul>
@ -157,7 +158,10 @@ root(isDark)
&:first-child
margin-top 0
li
&:last-child
margin-bottom 0
> li
display block
font-size 1em
line-height 1em
@ -180,6 +184,8 @@ root(isDark)
> [data-fa]:first-child
margin-right 0.5em
width 20px
text-align center
> [data-fa].circle
margin-left 6px
@ -197,7 +203,7 @@ root(isDark)
opacity 0.5
.about
margin 0
margin 0 0 8px 0
padding 1em 0
text-align center
font-size 0.8em

View File

@ -0,0 +1,63 @@
<template>
<mk-ui>
<span slot="header" v-if="!fetching">%fa:list%{{ list.title }}</span>
<main v-if="!fetching">
<ul>
<li v-for="user in list.users" :key="user.id"><router-link :to="user | userPage">{{ user | userName }}</router-link></li>
</ul>
</main>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
export default Vue.extend({
data() {
return {
fetching: true,
list: null
};
},
watch: {
$route: 'fetch'
},
created() {
this.fetch();
},
methods: {
fetch() {
Progress.start();
this.fetching = true;
(this as any).api('users/lists/show', {
listId: this.$route.params.list
}).then(list => {
this.list = list;
this.fetching = false;
Progress.done();
});
}
}
});
</script>
<style lang="stylus" scoped>
@import '~const.styl'
main
width 100%
max-width 680px
margin 0 auto
padding 8px
@media (min-width 500px)
padding 16px
@media (min-width 600px)
padding 32px
</style>

View File

@ -0,0 +1,68 @@
<template>
<mk-ui>
<span slot="header">%fa:list%%i18n:@title%</span>
<template slot="func"><button @click="fn">%fa:plus%</button></template>
<main>
<ul>
<li v-for="list in lists" :key="list.id"><router-link :to="`/i/lists/${list.id}`">{{ list.title }}</router-link></li>
</ul>
</main>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
export default Vue.extend({
data() {
return {
fetching: true,
lists: []
};
},
mounted() {
document.title = 'Misskey | %i18n:@title%';
Progress.start();
(this as any).api('users/lists/list').then(lists => {
this.fetching = false;
this.lists = lists;
Progress.done();
});
},
methods: {
fn() {
(this as any).apis.input({
title: '%i18n:@enter-list-name%',
}).then(async title => {
const list = await (this as any).api('users/lists/create', {
title
});
this.$router.push('/i/lists/' + list.id);
});
}
}
});
</script>
<style lang="stylus" scoped>
@import '~const.styl'
main
width 100%
max-width 680px
margin 0 auto
padding 8px
@media (min-width 500px)
padding 16px
@media (min-width 600px)
padding 32px
</style>

View File

@ -9,6 +9,7 @@
<header>
<select v-model="widgetAdderSelected">
<option value="profile">%i18n:common.widgets.profile%</option>
<option value="analog-clock">%i18n:common.widgets.analog-clock%</option>
<option value="calendar">%i18n:common.widgets.calendar%</option>
<option value="activity">%i18n:common.widgets.activity%</option>
<option value="rss">%i18n:common.widgets.rss%</option>