Compare commits
227 Commits
Author | SHA1 | Date | |
---|---|---|---|
ab4f97ff20 | |||
79640d6861 | |||
d305c7e401 | |||
8afaca36d9 | |||
9950fafff7 | |||
0d9857db63 | |||
10c932876d | |||
d5d7a527a0 | |||
9eb8595130 | |||
8c46e5b3d9 | |||
73bd877993 | |||
de6cbf8a22 | |||
89f618d732 | |||
4955df3911 | |||
6785f50a1f | |||
a549327170 | |||
1f018d87f2 | |||
769ee734fa | |||
6419185228 | |||
b77cbeca22 | |||
4cce10a7d7 | |||
1a6fd7d72e | |||
97ce939a73 | |||
3f2a7a561e | |||
332af15e3c | |||
fe184ce84a | |||
661c7f45ba | |||
01c0545409 | |||
c6492d3d58 | |||
638a2ab684 | |||
650f79d0fd | |||
a64817cea1 | |||
c32c3c1370 | |||
29ad7ab0cf | |||
11716fa9d3 | |||
210f11ffd8 | |||
814751d76a | |||
440cf139bb | |||
276d8ffc66 | |||
d9cdc1f079 | |||
414c600356 | |||
e37c19fdcd | |||
d69b919961 | |||
1311db8060 | |||
ed9e7520f1 | |||
8fe6da0cad | |||
b8eac630ed | |||
a5b9d7eb3b | |||
06c453c3bc | |||
97b7567770 | |||
34345ea8a7 | |||
fc166b7bee | |||
cf3112c7c0 | |||
e7dd74a443 | |||
b5acf15877 | |||
f62603fd9d | |||
d000b9e7cd | |||
0e1f858dfd | |||
bcf28282f6 | |||
abfbb068d7 | |||
9643a87320 | |||
b3817240b8 | |||
8d53f8639e | |||
f850283147 | |||
27f90b61e6 | |||
c9a57fe8fe | |||
9516f2fa63 | |||
7be88b7816 | |||
faabb039a5 | |||
15e4cf1243 | |||
75764e59e1 | |||
f664cf09c0 | |||
0c3e9dd5e0 | |||
0bc7d28f58 | |||
17bb34941b | |||
04cd3377ee | |||
326bd5e094 | |||
987799e9db | |||
19c846afaf | |||
ea9265b30b | |||
0516353afd | |||
5f1b726bab | |||
ed130ca82c | |||
9f22f924f1 | |||
a8083eb52b | |||
665afccb45 | |||
372bfaceda | |||
1625b37b44 | |||
72c1352acf | |||
2f2a945905 | |||
9870e73069 | |||
f2874d778a | |||
e9940c9221 | |||
7797a0746a | |||
6df010a71e | |||
671c5e7c12 | |||
ec4ed8fb2d | |||
34786130b7 | |||
6cb520cd2c | |||
47ce59d555 | |||
985a105930 | |||
52560dd986 | |||
de81502fdf | |||
51876bac62 | |||
a5b994259e | |||
c85c825bad | |||
1cd1c31467 | |||
8984e3131d | |||
93fa28991e | |||
b694bf1f41 | |||
0bbfbfc762 | |||
319f525199 | |||
ee62f6e356 | |||
0f27b62924 | |||
6274f6f2f6 | |||
32da569ef6 | |||
1625fdc2f4 | |||
a0795b1afe | |||
5d4b884528 | |||
bb204b2ef7 | |||
013851749f | |||
65c8b80fab | |||
f7c02819be | |||
03d09e9d24 | |||
6ab0c386cb | |||
bc8a0083e2 | |||
a2a3dd55ad | |||
3972e98f74 | |||
0616d29fd5 | |||
80cfa0f95d | |||
f801b05057 | |||
7ea42af0ba | |||
76c8e05e3a | |||
c2e053a208 | |||
3d9ac6387e | |||
4c9b4cb80d | |||
c7f80182c2 | |||
1ba5dfd79c | |||
1a13c7e0b1 | |||
070cd52c21 | |||
e14ea1fe61 | |||
7602e8f938 | |||
fd2c45cc02 | |||
03c824f893 | |||
9e74a3b8fa | |||
1131ce8a71 | |||
02bb99ac02 | |||
0b99483ccb | |||
8682fd21c4 | |||
a7cbdbc1f2 | |||
fd01b4d204 | |||
3a767f29be | |||
ed0885ce5c | |||
08b8d829f9 | |||
d2d3a7d52b | |||
4e032a9188 | |||
20e77196f2 | |||
45dcfc8a00 | |||
7ee0cad010 | |||
40849a5aa8 | |||
132c30e557 | |||
ee13d2382b | |||
3e1f7861a1 | |||
1aeeb1f073 | |||
0bb59bd73b | |||
a57a1d809b | |||
29a121f5b2 | |||
4cfb360d44 | |||
441796f845 | |||
3c80f0eaca | |||
86e1b792c2 | |||
decb257136 | |||
d670591713 | |||
dee2b77bdc | |||
6119312a74 | |||
b77a8af6e3 | |||
c9e9ecd699 | |||
4a0f9d8280 | |||
797b5d2311 | |||
b14d7b45ae | |||
d721a143a8 | |||
fde9c783ae | |||
c80b288db3 | |||
93898b7a5f | |||
a0a2335c16 | |||
716b41107b | |||
a9a7a89b8b | |||
4bf85a0e6b | |||
dd509333a3 | |||
8ccfbbf24c | |||
4953842ff1 | |||
8a8d97b8c7 | |||
5916fcca6a | |||
2105e4964b | |||
8ed30d1ff3 | |||
6f546efdb7 | |||
c4f62296a4 | |||
324477c1c0 | |||
160f441a95 | |||
63fdd0aec4 | |||
b3cb9c7537 | |||
8daa9c8062 | |||
9b3ee877a6 | |||
5ace37e3db | |||
2145730409 | |||
cba07d08d0 | |||
f2fea7f3cd | |||
d4a2c6cef4 | |||
51f0a5e30b | |||
25e4cebc0f | |||
5d0ded2a69 | |||
bd207b5012 | |||
38b9ed3f27 | |||
e2202b084b | |||
45b6a6bc54 | |||
d87e3a0ee3 | |||
a35b5eb279 | |||
7a270275ef | |||
f6a041559f | |||
6ea168485a | |||
c512c07630 | |||
105623e398 | |||
6c75bc6d51 | |||
a068741d05 | |||
4e83106853 | |||
0b688a909e | |||
fabcad6db9 |
@ -14,6 +14,7 @@
|
|||||||
"vue/no-unused-vars": false,
|
"vue/no-unused-vars": false,
|
||||||
"vue/attributes-order": false,
|
"vue/attributes-order": false,
|
||||||
"vue/require-prop-types": false,
|
"vue/require-prop-types": false,
|
||||||
|
"vue/require-default-prop": false,
|
||||||
"no-console": 0,
|
"no-console": 0,
|
||||||
"no-unused-vars": 0,
|
"no-unused-vars": 0,
|
||||||
"no-empty": 0
|
"no-empty": 0
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,4 +10,3 @@ npm-debug.log
|
|||||||
run.bat
|
run.bat
|
||||||
api-docs.json
|
api-docs.json
|
||||||
package-lock.json
|
package-lock.json
|
||||||
version.json
|
|
||||||
|
22
README.md
22
README.md
@ -18,10 +18,11 @@ ultimately sophisticated new type of mini-blog based SNS.
|
|||||||
|
|
||||||
:sparkles: Features
|
:sparkles: Features
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
* Automatically updated timeline
|
|
||||||
* Reactions
|
* Reactions
|
||||||
|
* User lists
|
||||||
* Private messages
|
* Private messages
|
||||||
* ServiceWorker support
|
* Mute
|
||||||
|
* Real time contents
|
||||||
* ActivityPub compatible
|
* ActivityPub compatible
|
||||||
|
|
||||||
and more! You can touch with your own eyes at https://misskey.xyz/.
|
and more! You can touch with your own eyes at https://misskey.xyz/.
|
||||||
@ -44,16 +45,16 @@ If you want to translate Misskey, please see [Translation guide](./docs/translat
|
|||||||
|
|
||||||
:mortar_board: Notable contributors
|
:mortar_board: Notable contributors
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
| ![syuilo][syuilo-icon] | ![Morisawa Aya][ayamorisawa-icon] | ![otofune][otofune-icon] | ![akihikodaki][akihikodaki-icon] | ![rinsuki][rinsuki-icon] |
|
| ![syuilo][syuilo-icon] | ![Morisawa Aya][ayamorisawa-icon] | ![otofune][otofune-icon] | ![akihikodaki][akihikodaki-icon] | ![tamaina][tamaina-icon] | ![rinsuki][rinsuki-icon] |
|
||||||
|:-:|:-:|:-:|:-:|:-:|
|
|:-:|:-:|:-:|:-:|:-:|:-:|
|
||||||
| [syuilo][syuilo-link]<br>Owner | [Aya Morisawa][ayamorisawa-link]<br>Collaborator | [otofune][otofune-link]<br>Collaborator | [akihikodaki][akihikodaki-link] | [rinsuki][rinsuki-link] |
|
| [syuilo][syuilo-link]<br>Owner | [Aya Morisawa][ayamorisawa-link]<br>Collaborator | [otofune][otofune-link]<br>Collaborator | [akihikodaki][akihikodaki-link] | [tamaina][tamaina-link] | [rinsuki][rinsuki-link] |
|
||||||
|
|
||||||
[List of all contributors](https://github.com/syuilo/misskey/graphs/contributors)
|
[List of all contributors](https://github.com/syuilo/misskey/graphs/contributors)
|
||||||
|
|
||||||
### :earth_americas: Translators
|
### :earth_americas: Translators
|
||||||
| ![][mirro-san-icon] | ![][Conan-kun-icon] |
|
| ![][mirro-san-icon] | ![][Conan-kun-icon] | ![][m4sk1n-icon] |
|
||||||
|:-:|:-:|
|
|:-:|:-:|:-:|
|
||||||
| [Mirro][mirro-san-link]<br>English, French | [Asriel][Conan-kun-link]<br>English, French |
|
| [Mirro][mirro-san-link]<br>English, French | [Asriel][Conan-kun-link]<br>English, French | [Marcin Mikołajczak][m4sk1n-link]<br>Polish |
|
||||||
|
|
||||||
:four_leaf_clover: Copyright
|
:four_leaf_clover: Copyright
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
@ -92,9 +93,12 @@ Misskey is an open-source software licensed under [GNU AGPLv3](LICENSE).
|
|||||||
[akihikodaki-icon]: https://avatars2.githubusercontent.com/u/17036990?s=70&v=4
|
[akihikodaki-icon]: https://avatars2.githubusercontent.com/u/17036990?s=70&v=4
|
||||||
[rinsuki-link]: https://github.com/rinsuki
|
[rinsuki-link]: https://github.com/rinsuki
|
||||||
[rinsuki-icon]: https://avatars0.githubusercontent.com/u/6533808?s=70&v=4
|
[rinsuki-icon]: https://avatars0.githubusercontent.com/u/6533808?s=70&v=4
|
||||||
|
[tamaina-link]: https://github.com/tamaina
|
||||||
|
[tamaina-icon]: https://avatars1.githubusercontent.com/u/7973572?s=70&v=4
|
||||||
|
|
||||||
[mirro-san-link]: https://github.com/mirro-san
|
[mirro-san-link]: https://github.com/mirro-san
|
||||||
[mirro-san-icon]: https://avatars1.githubusercontent.com/u/17948612?s=70&v=4
|
[mirro-san-icon]: https://avatars1.githubusercontent.com/u/17948612?s=70&v=4
|
||||||
[Conan-kun-link]: https://github.com/Conan-kun
|
[Conan-kun-link]: https://github.com/Conan-kun
|
||||||
[Conan-kun-icon]: https://avatars3.githubusercontent.com/u/30003708?s=70&v=4
|
[Conan-kun-icon]: https://avatars3.githubusercontent.com/u/30003708?s=70&v=4
|
||||||
|
[m4sk1n-link]: https://github.com/m4sk1n
|
||||||
|
[m4sk1n-icon]: https://avatars3.githubusercontent.com/u/21127288?s=70&v=4
|
||||||
|
101
cli/clean-cached-remote-files.js
Normal file
101
cli/clean-cached-remote-files.js
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
const chalk = require('chalk');
|
||||||
|
const log = require('single-line-log').stdout;
|
||||||
|
const sequential = require('promise-sequential');
|
||||||
|
const { default: DriveFile, DriveFileChunk } = require('../built/models/drive-file');
|
||||||
|
const { default: DriveFileThumbnail, DriveFileThumbnailChunk } = require('../built/models/drive-file-thumbnail');
|
||||||
|
const { default: User } = require('../built/models/user');
|
||||||
|
|
||||||
|
const q = {
|
||||||
|
'metadata._user.host': {
|
||||||
|
$ne: null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const promiseGens = [];
|
||||||
|
|
||||||
|
const count = await DriveFile.count(q);
|
||||||
|
|
||||||
|
let prev;
|
||||||
|
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
promiseGens.push(() => {
|
||||||
|
const promise = new Promise(async (res, rej) => {
|
||||||
|
const file = await DriveFile.findOne(prev ? Object.assign({
|
||||||
|
_id: { $lt: prev._id }
|
||||||
|
}, q) : q, {
|
||||||
|
sort: {
|
||||||
|
_id: -1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
prev = file;
|
||||||
|
|
||||||
|
function skip() {
|
||||||
|
res([i, file, false]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file == null) return skip();
|
||||||
|
|
||||||
|
log(chalk`{gray ${i}} scanning {bold ${file._id}} ${file.filename} ...`);
|
||||||
|
|
||||||
|
const attachingUsersCount = await User.count({
|
||||||
|
$or: [{
|
||||||
|
avatarId: file._id
|
||||||
|
}, {
|
||||||
|
bannerId: file._id
|
||||||
|
}]
|
||||||
|
}, { limit: 1 });
|
||||||
|
if (attachingUsersCount !== 0) return skip();
|
||||||
|
|
||||||
|
Promise.all([
|
||||||
|
// チャンクをすべて削除
|
||||||
|
DriveFileChunk.remove({
|
||||||
|
files_id: file._id
|
||||||
|
}),
|
||||||
|
|
||||||
|
DriveFile.update({ _id: file._id }, {
|
||||||
|
$set: {
|
||||||
|
'metadata.deletedAt': new Date(),
|
||||||
|
'metadata.isExpired': true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]).then(async () => {
|
||||||
|
res([i, file, true]);
|
||||||
|
|
||||||
|
//#region サムネイルもあれば削除
|
||||||
|
const thumbnail = await DriveFileThumbnail.findOne({
|
||||||
|
'metadata.originalId': file._id
|
||||||
|
});
|
||||||
|
|
||||||
|
if (thumbnail) {
|
||||||
|
DriveFileThumbnailChunk.remove({
|
||||||
|
files_id: thumbnail._id
|
||||||
|
});
|
||||||
|
|
||||||
|
DriveFileThumbnail.remove({ _id: thumbnail._id });
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
promise.then(([i, file, deleted]) => {
|
||||||
|
if (deleted) {
|
||||||
|
log(chalk`{gray ${i}} {red deleted: {bold ${file._id}} ${file.filename}}`);
|
||||||
|
} else {
|
||||||
|
log(chalk`{gray ${i}} {green skipped: {bold ${file._id}} ${file.filename}}`);
|
||||||
|
}
|
||||||
|
log.clear();
|
||||||
|
console.log();
|
||||||
|
});
|
||||||
|
|
||||||
|
return promise;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return await sequential(promiseGens);
|
||||||
|
}
|
||||||
|
|
||||||
|
main().then(() => {
|
||||||
|
console.log('ALL DONE');
|
||||||
|
}).catch(console.error);
|
80
cli/clean-unused-drive-files.js
Normal file
80
cli/clean-unused-drive-files.js
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
const chalk = require('chalk');
|
||||||
|
const log = require('single-line-log').stdout;
|
||||||
|
const sequential = require('promise-sequential');
|
||||||
|
const { default: DriveFile, deleteDriveFile } = require('../built/models/drive-file');
|
||||||
|
const { default: Note } = require('../built/models/note');
|
||||||
|
const { default: MessagingMessage } = require('../built/models/messaging-message');
|
||||||
|
const { default: User } = require('../built/models/user');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const promiseGens = [];
|
||||||
|
|
||||||
|
const count = await DriveFile.count({});
|
||||||
|
|
||||||
|
let prev;
|
||||||
|
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
promiseGens.push(() => {
|
||||||
|
const promise = new Promise(async (res, rej) => {
|
||||||
|
const file = await DriveFile.findOne(prev ? {
|
||||||
|
_id: { $lt: prev._id }
|
||||||
|
} : {}, {
|
||||||
|
sort: {
|
||||||
|
_id: -1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
prev = file;
|
||||||
|
|
||||||
|
function skip() {
|
||||||
|
res([i, file, false]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file == null) return skip();
|
||||||
|
|
||||||
|
log(chalk`{gray ${i}} scanning {bold ${file._id}} ${file.filename} ...`);
|
||||||
|
|
||||||
|
const attachingUsersCount = await User.count({
|
||||||
|
$or: [{
|
||||||
|
avatarId: file._id
|
||||||
|
}, {
|
||||||
|
bannerId: file._id
|
||||||
|
}]
|
||||||
|
}, { limit: 1 });
|
||||||
|
if (attachingUsersCount !== 0) return skip();
|
||||||
|
|
||||||
|
const attachingNotesCount = await Note.count({
|
||||||
|
mediaIds: file._id
|
||||||
|
}, { limit: 1 });
|
||||||
|
if (attachingNotesCount !== 0) return skip();
|
||||||
|
|
||||||
|
const attachingMessagesCount = await MessagingMessage.count({
|
||||||
|
fileId: file._id
|
||||||
|
}, { limit: 1 });
|
||||||
|
if (attachingMessagesCount !== 0) return skip();
|
||||||
|
|
||||||
|
deleteDriveFile(file).then(() => {
|
||||||
|
res([i, file, true]);
|
||||||
|
}).catch(rej);
|
||||||
|
});
|
||||||
|
|
||||||
|
promise.then(([i, file, deleted]) => {
|
||||||
|
if (deleted) {
|
||||||
|
log(chalk`{gray ${i}} {red deleted: {bold ${file._id}} ${file.filename}}`);
|
||||||
|
} else {
|
||||||
|
log(chalk`{gray ${i}} {green skipped: {bold ${file._id}} ${file.filename}}`);
|
||||||
|
}
|
||||||
|
log.clear();
|
||||||
|
console.log();
|
||||||
|
});
|
||||||
|
|
||||||
|
return promise;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return await sequential(promiseGens);
|
||||||
|
}
|
||||||
|
|
||||||
|
main().then(() => {
|
||||||
|
console.log('done');
|
||||||
|
}).catch(console.error);
|
@ -140,8 +140,8 @@ inquirer.prompt(form).then(as => {
|
|||||||
pass: as['es_pass'] || null
|
pass: as['es_pass'] || null
|
||||||
},
|
},
|
||||||
recaptcha: {
|
recaptcha: {
|
||||||
siteKey: as['recaptcha_site'],
|
site_key: as['recaptcha_site'],
|
||||||
secretKey: as['recaptcha_secret']
|
secret_key: as['recaptcha_secret']
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
18
cli/suspend.js
Normal file
18
cli/suspend.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
const mongo = require('mongodb');
|
||||||
|
const User = require('../built/models/user').default;
|
||||||
|
|
||||||
|
const args = process.argv.slice(2);
|
||||||
|
|
||||||
|
const userId = new mongo.ObjectID(args[0]);
|
||||||
|
|
||||||
|
console.log(`Suspending ${userId}...`);
|
||||||
|
|
||||||
|
User.update({ _id: userId }, {
|
||||||
|
$set: {
|
||||||
|
isSuspended: true
|
||||||
|
}
|
||||||
|
}).then(() => {
|
||||||
|
console.log(`Suspended ${userId}`);
|
||||||
|
}, e => {
|
||||||
|
console.error(e);
|
||||||
|
});
|
13
docs/manage.ja.md
Normal file
13
docs/manage.ja.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# 運営ガイド
|
||||||
|
|
||||||
|
## ジョブキューの状態を調べる
|
||||||
|
Misskeyのディレクトリで:
|
||||||
|
``` shell
|
||||||
|
node_modules/kue/bin/kue-dashboard -p 3050
|
||||||
|
```
|
||||||
|
ポート3050にアクセスするとUIが表示されます
|
||||||
|
|
||||||
|
## ユーザーを凍結する
|
||||||
|
``` shell
|
||||||
|
node cli/suspend (ユーザーID)
|
||||||
|
```
|
12
gulpfile.ts
12
gulpfile.ts
@ -21,7 +21,7 @@ import * as htmlmin from 'gulp-htmlmin';
|
|||||||
const uglifyes = require('uglify-es');
|
const uglifyes = require('uglify-es');
|
||||||
|
|
||||||
import { fa } from './src/build/fa';
|
import { fa } from './src/build/fa';
|
||||||
import version from './src/version';
|
const client = require('./built/client/meta.json');
|
||||||
import config from './src/config';
|
import config from './src/config';
|
||||||
|
|
||||||
const uglify = uglifyComposer(uglifyes, console);
|
const uglify = uglifyComposer(uglifyes, console);
|
||||||
@ -59,9 +59,15 @@ gulp.task('build:ts', () => {
|
|||||||
.pipe(gulp.dest('./built/'));
|
.pipe(gulp.dest('./built/'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('build:copy', () =>
|
gulp.task('build:copy:views', () =>
|
||||||
|
gulp.src('./src/server/web/views/**/*').pipe(gulp.dest('./built/server/web/views'))
|
||||||
|
);
|
||||||
|
|
||||||
|
gulp.task('build:copy', ['build:copy:views'], () =>
|
||||||
gulp.src([
|
gulp.src([
|
||||||
'./build/Release/crypto_key.node',
|
'./build/Release/crypto_key.node',
|
||||||
|
'./src/const.json',
|
||||||
|
'./src/server/web/views/**/*',
|
||||||
'./src/**/assets/**/*',
|
'./src/**/assets/**/*',
|
||||||
'!./src/client/app/**/assets/**/*'
|
'!./src/client/app/**/assets/**/*'
|
||||||
]).pipe(gulp.dest('./built/'))
|
]).pipe(gulp.dest('./built/'))
|
||||||
@ -113,7 +119,7 @@ gulp.task('build:client', [
|
|||||||
|
|
||||||
gulp.task('build:client:script', () =>
|
gulp.task('build:client:script', () =>
|
||||||
gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
||||||
.pipe(replace('VERSION', JSON.stringify(version)))
|
.pipe(replace('VERSION', JSON.stringify(client.version)))
|
||||||
.pipe(replace('API', JSON.stringify(config.api_url)))
|
.pipe(replace('API', JSON.stringify(config.api_url)))
|
||||||
.pipe(replace('ENV', JSON.stringify(env)))
|
.pipe(replace('ENV', JSON.stringify(env)))
|
||||||
.pipe(isProduction ? uglify({
|
.pipe(isProduction ? uglify({
|
||||||
|
@ -98,7 +98,9 @@ common/views/components/nav.vue:
|
|||||||
feedback: "Feedback"
|
feedback: "Feedback"
|
||||||
|
|
||||||
common/views/components/note-menu.vue:
|
common/views/components/note-menu.vue:
|
||||||
|
favorite: "Favorite this note"
|
||||||
pin: "Pin to profile page"
|
pin: "Pin to profile page"
|
||||||
|
remote: "Show on origin"
|
||||||
|
|
||||||
common/views/components/poll.vue:
|
common/views/components/poll.vue:
|
||||||
vote-to: "Vote for '{}'"
|
vote-to: "Vote for '{}'"
|
||||||
@ -367,9 +369,12 @@ desktop/views/components/settings.profile.vue:
|
|||||||
desktop/views/components/ui.header.account.vue:
|
desktop/views/components/ui.header.account.vue:
|
||||||
profile: "Your profile"
|
profile: "Your profile"
|
||||||
drive: "Drive"
|
drive: "Drive"
|
||||||
|
favorites: "Favorites"
|
||||||
|
lists: "Lists"
|
||||||
customize: "Customize"
|
customize: "Customize"
|
||||||
settings: "Settings"
|
settings: "Settings"
|
||||||
signout: "Sign out"
|
signout: "Sign out"
|
||||||
|
dark: "Fall in dark"
|
||||||
|
|
||||||
desktop/views/components/ui.header.nav.vue:
|
desktop/views/components/ui.header.nav.vue:
|
||||||
home: "Home"
|
home: "Home"
|
||||||
@ -406,6 +411,7 @@ desktop/views/pages/user/user.friends.vue:
|
|||||||
no-users: "No users"
|
no-users: "No users"
|
||||||
|
|
||||||
desktop/views/pages/user/user.header.vue:
|
desktop/views/pages/user/user.header.vue:
|
||||||
|
is-suspended: "This account has been suspended."
|
||||||
is-remote: "This user is a remote user, so the information is not accurate. "
|
is-remote: "This user is a remote user, so the information is not accurate. "
|
||||||
view-remote: "See accurate information"
|
view-remote: "See accurate information"
|
||||||
|
|
||||||
@ -594,6 +600,7 @@ mobile/views/pages/user.vue:
|
|||||||
overview: "Overview"
|
overview: "Overview"
|
||||||
timeline: "Timeline"
|
timeline: "Timeline"
|
||||||
media: "Media"
|
media: "Media"
|
||||||
|
is-suspended: "This account has been suspended."
|
||||||
is-remote: "This user is a remote user, so the information is not accurate. "
|
is-remote: "This user is a remote user, so the information is not accurate. "
|
||||||
view-remote: "See accurate information"
|
view-remote: "See accurate information"
|
||||||
|
|
||||||
|
@ -98,7 +98,9 @@ common/views/components/nav.vue:
|
|||||||
feedback: "フィードバック"
|
feedback: "フィードバック"
|
||||||
|
|
||||||
common/views/components/note-menu.vue:
|
common/views/components/note-menu.vue:
|
||||||
|
favorite: "Favorite this note"
|
||||||
pin: "Épingler sur votre profile"
|
pin: "Épingler sur votre profile"
|
||||||
|
remote: "投稿元で見る"
|
||||||
|
|
||||||
common/views/components/poll.vue:
|
common/views/components/poll.vue:
|
||||||
vote-to: "Voter pour '{}'"
|
vote-to: "Voter pour '{}'"
|
||||||
@ -367,9 +369,12 @@ desktop/views/components/settings.profile.vue:
|
|||||||
desktop/views/components/ui.header.account.vue:
|
desktop/views/components/ui.header.account.vue:
|
||||||
profile: "Votre profil"
|
profile: "Votre profil"
|
||||||
drive: "Drive"
|
drive: "Drive"
|
||||||
|
favorites: "Favorites"
|
||||||
|
lists: "リスト"
|
||||||
customize: "Modifications"
|
customize: "Modifications"
|
||||||
settings: "Réglages"
|
settings: "Réglages"
|
||||||
signout: "Déconnexion"
|
signout: "Déconnexion"
|
||||||
|
dark: "Fall in dark"
|
||||||
|
|
||||||
desktop/views/components/ui.header.nav.vue:
|
desktop/views/components/ui.header.nav.vue:
|
||||||
home: "Accueil"
|
home: "Accueil"
|
||||||
@ -406,6 +411,7 @@ desktop/views/pages/user/user.friends.vue:
|
|||||||
no-users: "Pas d'utilisateurs"
|
no-users: "Pas d'utilisateurs"
|
||||||
|
|
||||||
desktop/views/pages/user/user.header.vue:
|
desktop/views/pages/user/user.header.vue:
|
||||||
|
is-suspended: "This account has been suspended."
|
||||||
is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
|
is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
|
||||||
view-remote: "Voir les informations détaillées"
|
view-remote: "Voir les informations détaillées"
|
||||||
|
|
||||||
@ -594,6 +600,7 @@ mobile/views/pages/user.vue:
|
|||||||
overview: "Aperçu"
|
overview: "Aperçu"
|
||||||
timeline: "Fil d'actualité"
|
timeline: "Fil d'actualité"
|
||||||
media: "Media"
|
media: "Media"
|
||||||
|
is-suspended: "This account has been suspended."
|
||||||
is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
|
is-remote: "Cet utilisateur n'est pas un utilisateur de Misskey. Certaines informations peuvent être erronées "
|
||||||
view-remote: "Voir les informations détaillées"
|
view-remote: "Voir les informations détaillées"
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ const native = loadLang('ja');
|
|||||||
const langs = {
|
const langs = {
|
||||||
'en': loadLang('en'),
|
'en': loadLang('en'),
|
||||||
'fr': loadLang('fr'),
|
'fr': loadLang('fr'),
|
||||||
'ja': native
|
'ja': native,
|
||||||
|
'pl': loadLang('pl')
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.entries(langs).map(([, locale]) => {
|
Object.entries(langs).map(([, locale]) => {
|
||||||
|
@ -98,7 +98,9 @@ common/views/components/nav.vue:
|
|||||||
feedback: "フィードバック"
|
feedback: "フィードバック"
|
||||||
|
|
||||||
common/views/components/note-menu.vue:
|
common/views/components/note-menu.vue:
|
||||||
|
favorite: "お気に入り"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
|
remote: "投稿元で見る"
|
||||||
|
|
||||||
common/views/components/poll.vue:
|
common/views/components/poll.vue:
|
||||||
vote-to: "「{}」に投票する"
|
vote-to: "「{}」に投票する"
|
||||||
@ -367,9 +369,12 @@ desktop/views/components/settings.profile.vue:
|
|||||||
desktop/views/components/ui.header.account.vue:
|
desktop/views/components/ui.header.account.vue:
|
||||||
profile: "プロフィール"
|
profile: "プロフィール"
|
||||||
drive: "ドライブ"
|
drive: "ドライブ"
|
||||||
|
favorites: "お気に入り"
|
||||||
|
lists: "リスト"
|
||||||
customize: "カスタマイズ"
|
customize: "カスタマイズ"
|
||||||
settings: "設定"
|
settings: "設定"
|
||||||
signout: "サインアウト"
|
signout: "サインアウト"
|
||||||
|
dark: "闇に飲まれる"
|
||||||
|
|
||||||
desktop/views/components/ui.header.nav.vue:
|
desktop/views/components/ui.header.nav.vue:
|
||||||
home: "ホーム"
|
home: "ホーム"
|
||||||
@ -406,7 +411,8 @@ desktop/views/pages/user/user.friends.vue:
|
|||||||
no-users: "よく話すユーザーはいません"
|
no-users: "よく話すユーザーはいません"
|
||||||
|
|
||||||
desktop/views/pages/user/user.header.vue:
|
desktop/views/pages/user/user.header.vue:
|
||||||
is-remote: "このユーザーはリモートユーザーのため情報が正確ではありません。"
|
is-suspended: "このユーザーは凍結されています。"
|
||||||
|
is-remote: "このユーザーはリモートユーザーです。"
|
||||||
view-remote: "正確な情報を見る"
|
view-remote: "正確な情報を見る"
|
||||||
|
|
||||||
desktop/views/pages/user/user.home.vue:
|
desktop/views/pages/user/user.home.vue:
|
||||||
@ -594,7 +600,8 @@ mobile/views/pages/user.vue:
|
|||||||
overview: "概要"
|
overview: "概要"
|
||||||
timeline: "タイムライン"
|
timeline: "タイムライン"
|
||||||
media: "メディア"
|
media: "メディア"
|
||||||
is-remote: "このユーザーはリモートユーザーのため情報が正確ではありません。"
|
is-suspended: "このユーザーは凍結されています。"
|
||||||
|
is-remote: "このユーザーはリモートユーザーです。"
|
||||||
view-remote: "正確な情報を見る"
|
view-remote: "正確な情報を見る"
|
||||||
|
|
||||||
mobile/views/pages/user/home.vue:
|
mobile/views/pages/user/home.vue:
|
||||||
|
637
locales/pl.yml
Normal file
637
locales/pl.yml
Normal file
@ -0,0 +1,637 @@
|
|||||||
|
common:
|
||||||
|
misskey: "Dziel się zawartością z innymi korzystając z Misskey."
|
||||||
|
|
||||||
|
time:
|
||||||
|
unknown: "nieznany"
|
||||||
|
future: "w przyszłości"
|
||||||
|
just_now: "teraz"
|
||||||
|
seconds_ago: "{} sek. temu"
|
||||||
|
minutes_ago: "{} min. temu"
|
||||||
|
hours_ago: "{} godz. temu"
|
||||||
|
days_ago: "{} dni temu"
|
||||||
|
weeks_ago: "{} tyg. temu"
|
||||||
|
months_ago: "{} mies. temu"
|
||||||
|
years_ago: "{} lat temu"
|
||||||
|
|
||||||
|
weekday-short:
|
||||||
|
sunday: "N"
|
||||||
|
monday: "Pn"
|
||||||
|
tuesday: "W"
|
||||||
|
wednesday: "Ś"
|
||||||
|
thursday: "C"
|
||||||
|
friday: "P"
|
||||||
|
satruday: "S"
|
||||||
|
|
||||||
|
reactions:
|
||||||
|
like: "Lubię"
|
||||||
|
love: "Kocham"
|
||||||
|
laugh: "Śmieszne"
|
||||||
|
hmm: "Hmm…?"
|
||||||
|
surprise: "Wow"
|
||||||
|
congrats: "Gratuluję!"
|
||||||
|
angry: "Wściekły"
|
||||||
|
confused: "Zmieszany"
|
||||||
|
pudding: "Pudding"
|
||||||
|
|
||||||
|
delete: "Usuń"
|
||||||
|
loading: "Ładowanie"
|
||||||
|
ok: "OK"
|
||||||
|
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."
|
||||||
|
|
||||||
|
common/views/components/connect-failed.vue:
|
||||||
|
title: "Nie udało się połączyć z serwerem"
|
||||||
|
description: "Wystąpił problem z Twoim połączeniem z Internetem, lub z serwerem. {Spróbuj ponownie} wkrótce."
|
||||||
|
thanks: "Dziękujemy za korzystanie z Misskey."
|
||||||
|
troubleshoot: "Rozwiązywanie problemów"
|
||||||
|
|
||||||
|
common/views/components/connect-failed.troubleshooter.vue:
|
||||||
|
title: "Rozwiązywanie problemów"
|
||||||
|
network: "Połączenie z siecią"
|
||||||
|
checking-network: "Sprawdzanie połączenia sieciowego"
|
||||||
|
internet: "Połączenie z Internetem"
|
||||||
|
checking-internet: "Sprawdzanie połączenia z Internetem"
|
||||||
|
server: "Połączenie z serwerem"
|
||||||
|
checking-server: "Sprawdzanie połączenia z serwerem"
|
||||||
|
finding: "Wyszukiwanie problemu"
|
||||||
|
no-network: "Brak połączenia z siecią"
|
||||||
|
no-network-desc: "Upewnij się, że jesteś połączony z siecią."
|
||||||
|
no-internet: "Brak połączenia z Internetem"
|
||||||
|
no-internet-desc: "Upewnij się, że jesteś połączony z Internetem."
|
||||||
|
no-server: "Nie udało się połączyć z serwerem"
|
||||||
|
no-server-desc: "Połączenie sieciowe działa, ale nie udało się połączyć z serwerem Misskey. Możliwe że serwer nie działa lub trwają prace konserwacyjne, spróbuj ponownie później."
|
||||||
|
success: "Pomyślnie połączono z serwerem Misskey"
|
||||||
|
success-desc: "Wygląda na to, że udało się połączyć. Odśwież stronę."
|
||||||
|
flush: "Wyczyść pamięć podręczną"
|
||||||
|
set-version: "Określ wersję"
|
||||||
|
|
||||||
|
common/views/components/messaging.vue:
|
||||||
|
search-user: "Znajdź użytkownika"
|
||||||
|
you: "Ty"
|
||||||
|
no-history: "Brak historii"
|
||||||
|
|
||||||
|
common/views/components/messaging-room.vue:
|
||||||
|
empty: "Brak konwersacji"
|
||||||
|
more: "Więcej"
|
||||||
|
no-history: "Brak dalszej historii"
|
||||||
|
resize-form: "Przeciągnij aby zmienić rozmiar"
|
||||||
|
new-message: "Nowa wiadomość"
|
||||||
|
|
||||||
|
common/views/components/messaging-room.form.vue:
|
||||||
|
input-message-here: "Wprowadź wiadomość tutaj"
|
||||||
|
send: "Wyślij"
|
||||||
|
attach-from-local: "Załącz pliki z komputera"
|
||||||
|
attach-from-drive: "Załącz pliki z dysku"
|
||||||
|
|
||||||
|
common/views/components/messaging-room.message.vue:
|
||||||
|
is-read: "Przeczytano"
|
||||||
|
deleted: "Wiadomość została usunięta"
|
||||||
|
|
||||||
|
common/views/components/nav.vue:
|
||||||
|
about: "O stronie"
|
||||||
|
stats: "Statystyki"
|
||||||
|
status: "Stan"
|
||||||
|
wiki: "Wiki"
|
||||||
|
donors: "Sponsorzy"
|
||||||
|
repository: "Repozytorium"
|
||||||
|
develop: "Autorzy"
|
||||||
|
feedback: "Podziel się opinią"
|
||||||
|
|
||||||
|
common/views/components/note-menu.vue:
|
||||||
|
favorite: "Dodaj do ulubionych"
|
||||||
|
pin: "Przypnij do profilu"
|
||||||
|
|
||||||
|
common/views/components/poll.vue:
|
||||||
|
vote-to: "Zagłosuj na '{}'"
|
||||||
|
vote-count: "{} głosów"
|
||||||
|
total-users: "{} głosujących"
|
||||||
|
vote: "Zagłosuj"
|
||||||
|
show-result: "Pokaż wyniki"
|
||||||
|
voted: "Zagłosowano"
|
||||||
|
|
||||||
|
common/views/components/poll-editor.vue:
|
||||||
|
no-only-one-choice: "Musisz wprowadzić dwie lub więcej opcji."
|
||||||
|
choice-n: "Opcja {}"
|
||||||
|
remove: "Usuń tą opcję"
|
||||||
|
add: "+ Dodaj opcję"
|
||||||
|
destroy: "Usuń ankietę"
|
||||||
|
|
||||||
|
common/views/components/reaction-picker.vue:
|
||||||
|
choose-reaction: "Wybierz reakcję"
|
||||||
|
|
||||||
|
common/views/components/signin.vue:
|
||||||
|
username: "Nazwa użytkownika"
|
||||||
|
password: "Hasło"
|
||||||
|
token: "Token"
|
||||||
|
signing-in: "Logowanie…"
|
||||||
|
signin: "Zaloguj"
|
||||||
|
|
||||||
|
common/views/components/signup.vue:
|
||||||
|
username: "Nazwa użytkownika"
|
||||||
|
checking: "Sprawdzanie…"
|
||||||
|
available: "Dostępna"
|
||||||
|
unavailable: "Niedostępna"
|
||||||
|
error: "Błąd sieci"
|
||||||
|
invalid-format: "Może zawierać litery, cyfry i myślniki."
|
||||||
|
too-short: "Wprowadź przynajmniej jeden znak"
|
||||||
|
too-long: "Nazwa nie może zawierać więcej niż 20 znaków"
|
||||||
|
password: "Hasło"
|
||||||
|
password-placeholder: "Zalecamy korzystanie z hasła zawierającego przynajmniej 8 znaków."
|
||||||
|
weak-password: "Słabe"
|
||||||
|
normal-password: "Średnie"
|
||||||
|
strong-password: "Silne"
|
||||||
|
retype: "Powtórz hasło"
|
||||||
|
retype-placeholder: "Potwierdź hasło"
|
||||||
|
password-matched: "OK"
|
||||||
|
password-not-matched: "Hasła nie zgadzają się"
|
||||||
|
recaptcha: "Weryfikacja"
|
||||||
|
create: "Utwórz konto"
|
||||||
|
some-error: "Nie udało się utworzyć konta. Spróbuj ponownie."
|
||||||
|
|
||||||
|
common/views/components/special-message.vue:
|
||||||
|
new-year: "Szczęśliwego nowego roku!"
|
||||||
|
christmas: "Wesołych świąt!"
|
||||||
|
|
||||||
|
common/views/components/stream-indicator.vue:
|
||||||
|
connecting: "Łączenie"
|
||||||
|
reconnecting: "Ponowne łączenie"
|
||||||
|
connected: "Połączono"
|
||||||
|
|
||||||
|
common/views/components/twitter-setting.vue:
|
||||||
|
description: "Jeżeli połączysz konto Twittera z kontem Misskey, informacje z Twittera będą widoczne na Twoim profilu i będziesz mógł logować się z użyciem Twittera."
|
||||||
|
connected-to: "Jesteś połączony z tym kontem Twittera"
|
||||||
|
detail: "Szczegóły…"
|
||||||
|
reconnect: "Połącz ponownie"
|
||||||
|
connect: "Połącz z kontem Twittera"
|
||||||
|
disconnect: "Rozłącz"
|
||||||
|
|
||||||
|
common/views/components/uploader.vue:
|
||||||
|
waiting: "Oczekiwanie"
|
||||||
|
|
||||||
|
common/views/widgets/broadcast.vue:
|
||||||
|
no-broadcasts: "Brak transmisji"
|
||||||
|
have-a-nice-day: "Miłego dnia!"
|
||||||
|
next: "Dalej"
|
||||||
|
|
||||||
|
common/views/widgets/donation.vue:
|
||||||
|
title: "Dotacje"
|
||||||
|
text: "Aby utrzymywać Misskey, płacimy za domenę, serwery i nie tylko… Nie zarabiamy na tym, więc byłoby nam miło, gdybyśmy uzyskali od Ciebie dotację. Jeżeli jesteś zainteresowany, skontaktuj się z {}. Dziękujemy za wsparcie!"
|
||||||
|
|
||||||
|
common/views/widgets/photo-stream.vue:
|
||||||
|
no-photos: "Brak zdjęć"
|
||||||
|
|
||||||
|
common/views/widgets/server.vue:
|
||||||
|
title: "Informacje o serwerze"
|
||||||
|
toggle: "Przełącz widok"
|
||||||
|
|
||||||
|
desktop/views/components/activity.vue:
|
||||||
|
title: "Aktywność"
|
||||||
|
toggle: "Przełącz widok"
|
||||||
|
|
||||||
|
desktop/views/components/calendar.vue:
|
||||||
|
title: "{1} / {2}"
|
||||||
|
prev: "Poprzedni miesiąc"
|
||||||
|
next: "Następny miesiąc"
|
||||||
|
go: "Naciśnij, aby przejść"
|
||||||
|
|
||||||
|
desktop/views/components/drive-window.vue:
|
||||||
|
used: "wykorzystane"
|
||||||
|
drive: "Dysk"
|
||||||
|
|
||||||
|
desktop/views/components/drive.file.vue:
|
||||||
|
avatar: "Awatar"
|
||||||
|
banner: "Baner"
|
||||||
|
contextmenu:
|
||||||
|
rename: "Zmień nazwę"
|
||||||
|
copy-url: "Skopiuj adres"
|
||||||
|
download: "Pobierz"
|
||||||
|
else-files: "Inne"
|
||||||
|
set-as-avatar: "Ustaw jako awatar"
|
||||||
|
set-as-banner: "Ustaw jako baner"
|
||||||
|
open-in-app: "Otwórz w aplikacji"
|
||||||
|
add-app: "Dodaj aplikację"
|
||||||
|
rename-file: "Zmień nazwę pliku"
|
||||||
|
input-new-file-name: "Wprowadź nową nazwę"
|
||||||
|
copied: "Skopiowano"
|
||||||
|
copied-url-to-clipboard: "Skopiowano adres do schowka"
|
||||||
|
|
||||||
|
desktop/views/components/drive.folder.vue:
|
||||||
|
unable-to-process: "Nie udało się ukończyć działania."
|
||||||
|
circular-reference-detected: "Docelowy katalog znajduje się w katalogu, który chcesz przenieść."
|
||||||
|
unhandled-error: "Nieznany błąd"
|
||||||
|
contextmenu:
|
||||||
|
move-to-this-folder: "Przenieś do tego katalogu"
|
||||||
|
show-in-new-window: "Otwórz w nowym oknie"
|
||||||
|
rename: "Zmień nazwę"
|
||||||
|
rename-folder: "Zmień nazwę katalogu"
|
||||||
|
input-new-folder-name: "Wprowadź nową nazwę"
|
||||||
|
|
||||||
|
desktop/views/components/drive.nav-folder.vue:
|
||||||
|
drive: "Dysk"
|
||||||
|
|
||||||
|
desktop/views/components/drive.vue:
|
||||||
|
search: "Szukaj"
|
||||||
|
load-more: "Załaduj więcej"
|
||||||
|
empty-drive: "Twój dysk jest pusty"
|
||||||
|
empty-drive-description: "Możesz wysłać plik klikając prawym przyciskiem myszy i wybierając \"Wyślij plik\" lub przeciągnąć plik i upuścić w tym oknie."
|
||||||
|
empty-folder: "Ten katalog jest posty"
|
||||||
|
unable-to-process: "Nie udało się dokończyć działania."
|
||||||
|
circular-reference-detected: "Ten katalog znajduje się w katalogu, który chcesz przenieść."
|
||||||
|
unhandled-error: "Nieznany błąd"
|
||||||
|
url-upload: "Wyślij z adresu"
|
||||||
|
url-of-file: "Adres URL pliku, który chcesz wysłać"
|
||||||
|
url-upload-requested: "Zaplanowano wysyłanie"
|
||||||
|
may-take-time: "Może trochę potrwać, zanim wysyłanie zostanie ukończone."
|
||||||
|
create-folder: "Utwórz katalog"
|
||||||
|
folder-name: "Nazwa katalogu"
|
||||||
|
contextmenu:
|
||||||
|
create-folder: "Utwórz katalog"
|
||||||
|
upload: "Wyślij plik"
|
||||||
|
url-upload: "Wyślij z adresu URL"
|
||||||
|
|
||||||
|
desktop/views/components/messaging-window.vue:
|
||||||
|
title: "Wiadomości"
|
||||||
|
|
||||||
|
desktop/views/components/notes.note.vue:
|
||||||
|
reposted-by: "Udostępniono przez {}"
|
||||||
|
reply: "Odpowiedz"
|
||||||
|
renote: "Przeredaguj"
|
||||||
|
add-reaction: "Dodaj reakcję"
|
||||||
|
detail: "Pokaż szczegóły"
|
||||||
|
|
||||||
|
desktop/views/components/notifications.vue:
|
||||||
|
more: "Więcej"
|
||||||
|
empty: "Brak powiadomień"
|
||||||
|
|
||||||
|
desktop/views/components/post-form.vue:
|
||||||
|
note-placeholder: "Co się dzieje?"
|
||||||
|
reply-placeholder: "Odpowiedz na ten wpis…"
|
||||||
|
quote-placeholder: "Zacytuj ten wpis…"
|
||||||
|
note: "Wyślij"
|
||||||
|
reply: "Odpowiedz"
|
||||||
|
renote: "Przeredaguj"
|
||||||
|
posted: "Opublikowano!"
|
||||||
|
replied: "Odpowiedziano!"
|
||||||
|
reposted: "Udostępniono!"
|
||||||
|
note-failed: "Nie udało się wysłać"
|
||||||
|
reply-failed: "Nie udało się odpowiedzieć"
|
||||||
|
renote-failed: "Nie udało się przeredagować"
|
||||||
|
posting: "Wysyłanie"
|
||||||
|
attach-media-from-local: "Załącz zawartość multimedialną z komputera"
|
||||||
|
attach-media-from-drive: "Załącz zawartość multimedialną z dysku"
|
||||||
|
attach-cancel: "Usuń załącznik"
|
||||||
|
insert-a-kao: "v(‘ω’)v"
|
||||||
|
create-poll: "Utwórz ankietę"
|
||||||
|
text-remain: "pozostałe znaki: {}"
|
||||||
|
|
||||||
|
desktop/views/components/post-form-window.vue:
|
||||||
|
note: "Nowy wpis"
|
||||||
|
reply: "Odpowiedz"
|
||||||
|
attaches: "{} załączników multimedialnych"
|
||||||
|
uploading-media: "Wysyłanie {} treści multimedialnych"
|
||||||
|
|
||||||
|
desktop/views/components/renote-form.vue:
|
||||||
|
quote: "Cytuj…"
|
||||||
|
cancel: "Anuluj"
|
||||||
|
renote: "Przeredaguj"
|
||||||
|
reposting: "Udostępnianie…"
|
||||||
|
success: "Udostępniono!"
|
||||||
|
failure: "Nie udało się przeredagować"
|
||||||
|
|
||||||
|
desktop/views/components/renote-form-window.vue:
|
||||||
|
title: "Czy na pewno chcesz przeredagować ten wpis?"
|
||||||
|
|
||||||
|
desktop/views/components/settings.vue:
|
||||||
|
profile: "Profil"
|
||||||
|
notification: "Powiadomienia"
|
||||||
|
apps: "Aplikacje"
|
||||||
|
mute: "Wyciszanie"
|
||||||
|
drive: "Dysk"
|
||||||
|
security: "Bezpieczeństwo"
|
||||||
|
password: "Hasło"
|
||||||
|
2fa: "Uwierzytelnianie dwuetapowe"
|
||||||
|
other: "Inne"
|
||||||
|
license: "Licencja"
|
||||||
|
|
||||||
|
desktop/views/components/settings.2fa.vue:
|
||||||
|
intro: "Jeżeli skonfigurujesz uwierzytelnianie dwuetapowe, aby zablokować się będziesz potrzebować (oprócz hasła) kodu ze skonfigurowanego urządzenia (np. smartfonu), co zwiększy bezpieczeństwo."
|
||||||
|
detail: "Zobacz szczegóły…"
|
||||||
|
url: "https://www.google.com/landing/2step/"
|
||||||
|
caution: "Jeżeli stracisz dostęp do urządzenia, nie będziesz mógł logować się do Misskey!"
|
||||||
|
register: "Zarejestruj urządzenie"
|
||||||
|
already-registered: "Urządzenie jest już zarejestrowane"
|
||||||
|
unregister: "Wyłącz"
|
||||||
|
unregistered: "Wyłączono uwierzytelnianie dwuetapowe."
|
||||||
|
enter-password: "Wprowadź hasło"
|
||||||
|
authenticator: "Na początek musisz zainstalować Google Authenticator na swoim urządzeniu:"
|
||||||
|
howtoinstall: "Jak zainstalować"
|
||||||
|
scan: "Później, zeskanuje ten kod QR:"
|
||||||
|
done: "Wprowadź token wyświetlony na Twoim urządzeniu:"
|
||||||
|
submit: "Wyślij"
|
||||||
|
success: "Pomyślnie ukończono konfigurację!"
|
||||||
|
failed: "Nie udało się skonfigurować uwierzytelniania dwuetapowego, upewnij się że wprowadziłeś prawidłowy token."
|
||||||
|
info: "Od teraz, wprowadzaj token wyświetlany na urządzeniu przy każdym logowaniu do Misskey."
|
||||||
|
|
||||||
|
desktop/views/components/settings.api.vue:
|
||||||
|
caution: "Nie pokazuj tego tokenu osobom trzecim (nie wprowadzaj go nigdzie indziej), aby konto nie trafiło w niepowołane ręce."
|
||||||
|
regeneration-of-token: "W przypadku wycieku tokenu, możesz wygenerować nowy."
|
||||||
|
regenerate-token: "Wygeneruj nowy token"
|
||||||
|
enter-password: "Wprowadź hasło"
|
||||||
|
|
||||||
|
desktop/views/components/settings.app.vue:
|
||||||
|
no-apps: "Brak zautoryzowanych aplikacji"
|
||||||
|
|
||||||
|
desktop/views/components/settings.mute.vue:
|
||||||
|
no-users: "Brak wyciszonych użytkowników"
|
||||||
|
|
||||||
|
desktop/views/components/settings.password.vue:
|
||||||
|
reset: "Zmień hasło"
|
||||||
|
enter-current-password: "Wprowadź obecne hasło"
|
||||||
|
enter-new-password: "Wprowadź nowe hasło"
|
||||||
|
enter-new-password-again: "Wprowadź ponownie nowe hasło"
|
||||||
|
not-match: "Nowe hasła nie pasują do siebie"
|
||||||
|
changed: "Pomyślnie zmieniono hasło"
|
||||||
|
|
||||||
|
desktop/views/components/settings.profile.vue:
|
||||||
|
avatar: "Awatar"
|
||||||
|
choice-avatar: "Wybierz obraz"
|
||||||
|
name: "Nazwa"
|
||||||
|
location: "Lokalizacja"
|
||||||
|
description: "Opis"
|
||||||
|
birthday: "Data urodzenia"
|
||||||
|
save: "Aktualizuj profil"
|
||||||
|
|
||||||
|
desktop/views/components/ui.header.account.vue:
|
||||||
|
profile: "Twój profil"
|
||||||
|
drive: "Dysk"
|
||||||
|
favorites: "Ulubione"
|
||||||
|
lists: "Listy"
|
||||||
|
customize: "Dostosuj"
|
||||||
|
settings: "Ustawienia"
|
||||||
|
signout: "Wyloguj się"
|
||||||
|
dark: "Sprowadź ciemność"
|
||||||
|
|
||||||
|
desktop/views/components/ui.header.nav.vue:
|
||||||
|
home: "Strona główna"
|
||||||
|
messaging: "Wiadomości"
|
||||||
|
game: "Gra"
|
||||||
|
|
||||||
|
desktop/views/components/ui.header.notifications.vue:
|
||||||
|
title: "Powiadomienia"
|
||||||
|
|
||||||
|
desktop/views/components/ui.header.post.vue:
|
||||||
|
post: "Utwórz nowy wpis"
|
||||||
|
|
||||||
|
desktop/views/components/ui.header.search.vue:
|
||||||
|
placeholder: "Szukaj"
|
||||||
|
|
||||||
|
desktop/views/pages/note.vue:
|
||||||
|
prev: "Poprzedni wpis"
|
||||||
|
next: "Następny wpis"
|
||||||
|
|
||||||
|
desktop/views/pages/selectdrive.vue:
|
||||||
|
title: "Wybierz plik(i)"
|
||||||
|
ok: "OK"
|
||||||
|
cancel: "Anuluj"
|
||||||
|
upload: "Wyślij pliki z Twojego komputera"
|
||||||
|
|
||||||
|
desktop/views/pages/user/user.followers-you-know.vue:
|
||||||
|
title: "Śledzący których znasz"
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-users: "Brak użytkowników"
|
||||||
|
|
||||||
|
desktop/views/pages/user/user.friends.vue:
|
||||||
|
title: "Najbardziej aktywni"
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-users: "Brak użytkowników"
|
||||||
|
|
||||||
|
desktop/views/pages/user/user.header.vue:
|
||||||
|
is-suspended: "To konto zostało zawieszone."
|
||||||
|
is-remote: "To jest użytkownik zdalnej instancji, informacje mogą nie być w pełni dokładne."
|
||||||
|
view-remote: "Wyświetl dokładne informacje"
|
||||||
|
|
||||||
|
desktop/views/pages/user/user.home.vue:
|
||||||
|
last-used-at: "Ostatnio aktywny: "
|
||||||
|
|
||||||
|
desktop/views/pages/user/user.photos.vue:
|
||||||
|
title: "Zdjęcia"
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-photos: "Brak zdjęć"
|
||||||
|
|
||||||
|
desktop/views/pages/user/user.profile.vue:
|
||||||
|
follows-you: "Śledzi Cię"
|
||||||
|
stalk: "Stalkuj"
|
||||||
|
stalking: "Stalkujesz"
|
||||||
|
unstalk: "Przestań stalkować"
|
||||||
|
mute: "Wycisz"
|
||||||
|
muted: "Wyciszyłeś"
|
||||||
|
unmute: "Cofnij wyciszenie"
|
||||||
|
|
||||||
|
desktop/views/widgets/notifications.vue:
|
||||||
|
title: "Powiadomienia"
|
||||||
|
settings: "Ustawienia"
|
||||||
|
|
||||||
|
desktop/views/widgets/polls.vue:
|
||||||
|
title: "Ankiety"
|
||||||
|
refresh: "Pokaż inne"
|
||||||
|
nothing: "Pusto"
|
||||||
|
|
||||||
|
desktop/views/widgets/post-form.vue:
|
||||||
|
title: "Wpis"
|
||||||
|
note: "Wpis"
|
||||||
|
placeholder: "Co się dzieje?"
|
||||||
|
|
||||||
|
desktop/views/widgets/trends.vue:
|
||||||
|
title: "Na czasie"
|
||||||
|
refresh: "Pokaż inne"
|
||||||
|
nothing: "Pusto"
|
||||||
|
|
||||||
|
desktop/views/widgets/users.vue:
|
||||||
|
title: "Polecani użytkownicy"
|
||||||
|
refresh: "Pokaż innych"
|
||||||
|
no-one: "Pusto"
|
||||||
|
|
||||||
|
desktop/views/widgets/channel.vue:
|
||||||
|
title: "Kanał"
|
||||||
|
settings: "Ustawienia widżetu"
|
||||||
|
|
||||||
|
mobile/views/components/drive.vue:
|
||||||
|
drive: "Dysk"
|
||||||
|
used: "użyto"
|
||||||
|
folder-count: "Katalog(i)"
|
||||||
|
count-separator: ", "
|
||||||
|
file-count: "Plik(i)"
|
||||||
|
load-more: "Załaduj więcej"
|
||||||
|
nothing-in-drive: "Pusto"
|
||||||
|
folder-is-empty: "Ten katalog jest pusty"
|
||||||
|
|
||||||
|
mobile/views/components/drive-file-chooser.vue:
|
||||||
|
select-file: "Wybierz plik"
|
||||||
|
|
||||||
|
mobile/views/components/drive-folder-chooser.vue:
|
||||||
|
select-folder: "Wybierz katalog"
|
||||||
|
|
||||||
|
mobile/views/components/drive.file-detail.vue:
|
||||||
|
download: "Pobierz"
|
||||||
|
rename: "Zmień nazwę"
|
||||||
|
move: "Przenieś"
|
||||||
|
hash: "Hash (md5)"
|
||||||
|
exif: "EXIF"
|
||||||
|
|
||||||
|
mobile/views/components/follow-button.vue:
|
||||||
|
follow: "Śledź"
|
||||||
|
unfollow: "Przestań śledzić"
|
||||||
|
|
||||||
|
mobile/views/components/note-detail.vue:
|
||||||
|
reply: "Odpowiedz"
|
||||||
|
reaction: "Reakcja"
|
||||||
|
|
||||||
|
mobile/views/components/notifications.vue:
|
||||||
|
more: "Więcej"
|
||||||
|
empty: "Brak powiadomień"
|
||||||
|
|
||||||
|
mobile/views/components/post-form.vue:
|
||||||
|
submit: "Wyślij"
|
||||||
|
reply-placeholder: "Odpowiedź na ten wpis…"
|
||||||
|
note-placeholder: "Co się dzieje?"
|
||||||
|
|
||||||
|
mobile/views/components/sub-note-content.vue:
|
||||||
|
media-count: "{} zawartości multimedialnej"
|
||||||
|
poll: "Ankieta"
|
||||||
|
|
||||||
|
mobile/views/components/timeline.vue:
|
||||||
|
empty: "Brak wpisów"
|
||||||
|
load-more: "Więcej"
|
||||||
|
|
||||||
|
mobile/views/components/ui.nav.vue:
|
||||||
|
home: "Strona główna"
|
||||||
|
notifications: "Powiadomienia"
|
||||||
|
messaging: "Wiadomości"
|
||||||
|
drive: "Dysk"
|
||||||
|
settings: "Ustawienia"
|
||||||
|
about: "O Misskey"
|
||||||
|
search: "Szukaj"
|
||||||
|
|
||||||
|
mobile/views/components/user-timeline.vue:
|
||||||
|
no-notes: "Wygląda na to, że ten użytkownik nie opublikował jeszcze niczego"
|
||||||
|
no-notes-with-media: "Brak wpisów z zawartością multimedialną"
|
||||||
|
load-more: "Więcej"
|
||||||
|
|
||||||
|
mobile/views/components/users-list.vue:
|
||||||
|
all: "Wszyscy"
|
||||||
|
known: "Znasz"
|
||||||
|
load-more: "Więcej"
|
||||||
|
|
||||||
|
mobile/views/pages/drive.vue:
|
||||||
|
drive: "Dysk"
|
||||||
|
|
||||||
|
mobile/views/pages/followers.vue:
|
||||||
|
followers-of: "Śledzący {}"
|
||||||
|
|
||||||
|
mobile/views/pages/following.vue:
|
||||||
|
following-of: "Śledzeni przez {}"
|
||||||
|
|
||||||
|
mobile/views/pages/home.vue:
|
||||||
|
timeline: "Oś czasu"
|
||||||
|
|
||||||
|
mobile/views/pages/messaging.vue:
|
||||||
|
messaging: "Wiadomości"
|
||||||
|
|
||||||
|
mobile/views/pages/messaging-room.vue:
|
||||||
|
messaging: "Wiadomości"
|
||||||
|
|
||||||
|
mobile/views/pages/note.vue:
|
||||||
|
title: "Wyślij"
|
||||||
|
prev: "Poprzedni wpis"
|
||||||
|
next: "Następny wpis"
|
||||||
|
|
||||||
|
mobile/views/pages/notifications.vue:
|
||||||
|
notifications: "Powiadomienia"
|
||||||
|
read-all: "Czy na pewno chcesz oznaczyć wszystkie powiadomienia jako przeczytane?"
|
||||||
|
|
||||||
|
mobile/views/pages/profile-setting.vue:
|
||||||
|
title: "Ustawienia profilu"
|
||||||
|
will-be-published: "Te ustawienia profilu zostaną zaktualizowane."
|
||||||
|
name: "Nazwa"
|
||||||
|
location: "Lokalizacja"
|
||||||
|
description: "Opis"
|
||||||
|
birthday: "Data urodzenia"
|
||||||
|
avatar: "Awatar"
|
||||||
|
banner: "Baner"
|
||||||
|
avatar-saved: "Pomyślnie zaktualizowano awatar"
|
||||||
|
banner-saved: "Pomyślnie zaktualizowano baner"
|
||||||
|
set-avatar: "Wybierz awatar"
|
||||||
|
set-banner: "Wybierz baner"
|
||||||
|
save: "Zapisz"
|
||||||
|
saved: "Pomyślnie zaktualizowano profil"
|
||||||
|
|
||||||
|
mobile/views/pages/search.vue:
|
||||||
|
search: "Szukaj"
|
||||||
|
empty: "Nie znaleziono wpisów zawierających '{}'"
|
||||||
|
|
||||||
|
mobile/views/pages/selectdrive.vue:
|
||||||
|
select-file: "Wybierz plik"
|
||||||
|
|
||||||
|
mobile/views/pages/settings.vue:
|
||||||
|
signed-in-as: "Zalogowany jako {}"
|
||||||
|
profile: "Profil"
|
||||||
|
twitter-integration: "Integracja z Twitterem"
|
||||||
|
signin-history: "Historia logowań"
|
||||||
|
settings: "Ustawienia"
|
||||||
|
signout: "Wyloguj"
|
||||||
|
|
||||||
|
mobile/views/pages/user.vue:
|
||||||
|
follows-you: "Śledzi Cię"
|
||||||
|
following: "Śledzeni"
|
||||||
|
followers: "Śledzący"
|
||||||
|
notes: "Wpisy"
|
||||||
|
overview: "Przegląd"
|
||||||
|
timeline: "Oś czasu"
|
||||||
|
media: "Zawartość multimedialna"
|
||||||
|
is-suspended: "To konto zostało zablokowane"
|
||||||
|
is-remote: "To jest użytkownik zdalnej instancji, informacje mogą nie być w pełni dokładne."
|
||||||
|
view-remote: "Wyświetl dokładne informacje"
|
||||||
|
|
||||||
|
mobile/views/pages/user/home.vue:
|
||||||
|
recent-notes: "Ostatnie wpisy"
|
||||||
|
images: "Zdjęcia"
|
||||||
|
activity: "Aktywność"
|
||||||
|
keywords: "Słowa kluczowe"
|
||||||
|
domains: "Domeny"
|
||||||
|
frequently-replied-users: "Często aktywni użytkownicy"
|
||||||
|
followers-you-know: "Śledzący których znasz"
|
||||||
|
last-used-at: "Ostatnio aktywny:"
|
||||||
|
|
||||||
|
mobile/views/pages/user/home.followers-you-know.vue:
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-users: "Brak użytkowników"
|
||||||
|
|
||||||
|
mobile/views/pages/user/home.friends.vue:
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-users: "Brak użytkowników"
|
||||||
|
|
||||||
|
mobile/views/pages/user/home.notes.vue:
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-notes: "Brak wpisów"
|
||||||
|
|
||||||
|
mobile/views/pages/user/home.photos.vue:
|
||||||
|
loading: "Ładowanie"
|
||||||
|
no-photos: "Brak zdjęć"
|
||||||
|
|
||||||
|
docs:
|
||||||
|
edit-this-page-on-github: "Znalazłeś błąd lub chcesz pomóc w tworzeniu dokumentacji?"
|
||||||
|
edit-this-page-on-github-link: "Edytuj stronę na GitHubie!"
|
||||||
|
|
||||||
|
api:
|
||||||
|
entities:
|
||||||
|
properties: "Właściwości"
|
||||||
|
endpoints:
|
||||||
|
params: "Parametry"
|
||||||
|
res: "Odpowiedź"
|
||||||
|
props:
|
||||||
|
name: "Nazwa"
|
||||||
|
type: "Rodzaj"
|
||||||
|
optional: "Nieobowiązkowy"
|
||||||
|
description: "Opis"
|
||||||
|
yes: "Tak"
|
||||||
|
no: "Nie"
|
57
migration/2.0.0.js
Normal file
57
migration/2.0.0.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// for Node.js interpret
|
||||||
|
|
||||||
|
const chalk = require('chalk');
|
||||||
|
const sequential = require('promise-sequential');
|
||||||
|
|
||||||
|
const { default: User } = require('../built/models/user');
|
||||||
|
const { default: DriveFile } = require('../built/models/drive-file');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const promiseGens = [];
|
||||||
|
|
||||||
|
const count = await DriveFile.count({});
|
||||||
|
|
||||||
|
let prev;
|
||||||
|
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
promiseGens.push(() => {
|
||||||
|
const promise = new Promise(async (res, rej) => {
|
||||||
|
const file = await DriveFile.findOne(prev ? {
|
||||||
|
_id: { $gt: prev._id }
|
||||||
|
} : {}, {
|
||||||
|
sort: {
|
||||||
|
_id: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
prev = file;
|
||||||
|
|
||||||
|
const user = await User.findOne({ _id: file.metadata.userId });
|
||||||
|
|
||||||
|
DriveFile.update({
|
||||||
|
_id: file._id
|
||||||
|
}, {
|
||||||
|
$set: {
|
||||||
|
'metadata._user': {
|
||||||
|
host: user.host
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).then(() => {
|
||||||
|
res([i, file]);
|
||||||
|
}).catch(rej);
|
||||||
|
});
|
||||||
|
|
||||||
|
promise.then(([i, file]) => {
|
||||||
|
console.log(chalk`{gray ${i}} {green done: {bold ${file._id}} ${file.filename}}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
return promise;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return await sequential(promiseGens);
|
||||||
|
}
|
||||||
|
|
||||||
|
main().then(() => {
|
||||||
|
console.log('ALL DONE');
|
||||||
|
}).catch(console.error);
|
71
migration/2.4.0.js
Normal file
71
migration/2.4.0.js
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
// for Node.js interpret
|
||||||
|
|
||||||
|
const chalk = require('chalk');
|
||||||
|
const sequential = require('promise-sequential');
|
||||||
|
|
||||||
|
const { default: User } = require('../built/models/user');
|
||||||
|
const { default: DriveFile } = require('../built/models/drive-file');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const promiseGens = [];
|
||||||
|
|
||||||
|
const count = await User.count({});
|
||||||
|
|
||||||
|
let prev;
|
||||||
|
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
promiseGens.push(() => {
|
||||||
|
const promise = new Promise(async (res, rej) => {
|
||||||
|
const user = await User.findOne(prev ? {
|
||||||
|
_id: { $gt: prev._id }
|
||||||
|
} : {}, {
|
||||||
|
sort: {
|
||||||
|
_id: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
prev = user;
|
||||||
|
|
||||||
|
const set = {};
|
||||||
|
|
||||||
|
if (user.avatarId != null) {
|
||||||
|
const file = await DriveFile.findOne({ _id: user.avatarId });
|
||||||
|
|
||||||
|
if (file && file.metadata.properties.avgColor) {
|
||||||
|
set.avatarColor = file.metadata.properties.avgColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.bannerId != null) {
|
||||||
|
const file = await DriveFile.findOne({ _id: user.bannerId });
|
||||||
|
|
||||||
|
if (file && file.metadata.properties.avgColor) {
|
||||||
|
set.bannerColor = file.metadata.properties.avgColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Object.keys(set).length === 0) return res([i, user]);
|
||||||
|
|
||||||
|
User.update({
|
||||||
|
_id: user._id
|
||||||
|
}, {
|
||||||
|
$set: set
|
||||||
|
}).then(() => {
|
||||||
|
res([i, user]);
|
||||||
|
}).catch(rej);
|
||||||
|
});
|
||||||
|
|
||||||
|
promise.then(([i, user]) => {
|
||||||
|
console.log(chalk`{gray ${i}} {green done: {bold ${user._id}} @${user.username}}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
return promise;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return await sequential(promiseGens);
|
||||||
|
}
|
||||||
|
|
||||||
|
main().then(() => {
|
||||||
|
console.log('ALL DONE');
|
||||||
|
}).catch(console.error);
|
@ -1,49 +0,0 @@
|
|||||||
// for Node.js interpret
|
|
||||||
|
|
||||||
const { default: User } = require('../built/models/user');
|
|
||||||
const { default: Following } = require('../built/models/following');
|
|
||||||
const { default: zip } = require('@prezzemolo/zip')
|
|
||||||
|
|
||||||
const migrate = async (following) => {
|
|
||||||
const follower = await User.findOne({ _id: following.followerId });
|
|
||||||
const followee = await User.findOne({ _id: following.followeeId });
|
|
||||||
const result = await Following.update(following._id, {
|
|
||||||
$set: {
|
|
||||||
stalk: true,
|
|
||||||
_follower: {
|
|
||||||
host: follower.host,
|
|
||||||
inbox: follower.host != null ? follower.inbox : undefined
|
|
||||||
},
|
|
||||||
_followee: {
|
|
||||||
host: followee.host,
|
|
||||||
inbox: followee.host != null ? followee.inbox : undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return result.ok === 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
const count = await Following.count({});
|
|
||||||
|
|
||||||
const dop = Number.parseInt(process.argv[2]) || 5
|
|
||||||
const idop = ((count - (count % dop)) / dop) + 1
|
|
||||||
|
|
||||||
return zip(
|
|
||||||
1,
|
|
||||||
async (time) => {
|
|
||||||
console.log(`${time} / ${idop}`)
|
|
||||||
const doc = await Following.find({}, {
|
|
||||||
limit: dop, skip: time * dop
|
|
||||||
})
|
|
||||||
return Promise.all(doc.map(migrate))
|
|
||||||
},
|
|
||||||
idop
|
|
||||||
).then(a => {
|
|
||||||
const rv = []
|
|
||||||
a.forEach(e => rv.push(...e))
|
|
||||||
return rv
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
main().then(console.dir).catch(console.error)
|
|
62
package.json
62
package.json
@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "0.0.5018",
|
"version": "2.5.0",
|
||||||
|
"clientVersion": "1.0.5241",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"license": "MIT",
|
|
||||||
"description": "A miniblog-based SNS",
|
|
||||||
"bugs": "https://github.com/syuilo/misskey/issues",
|
|
||||||
"repository": "https://github.com/syuilo/misskey.git",
|
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -34,7 +31,7 @@
|
|||||||
"@prezzemolo/rap": "0.1.2",
|
"@prezzemolo/rap": "0.1.2",
|
||||||
"@prezzemolo/zip": "0.0.3",
|
"@prezzemolo/zip": "0.0.3",
|
||||||
"@types/bcryptjs": "2.4.1",
|
"@types/bcryptjs": "2.4.1",
|
||||||
"@types/chai": "4.1.2",
|
"@types/chai": "4.1.3",
|
||||||
"@types/chai-http": "3.0.4",
|
"@types/chai-http": "3.0.4",
|
||||||
"@types/debug": "0.0.30",
|
"@types/debug": "0.0.30",
|
||||||
"@types/deep-equal": "1.0.1",
|
"@types/deep-equal": "1.0.1",
|
||||||
@ -54,22 +51,25 @@
|
|||||||
"@types/js-yaml": "3.11.1",
|
"@types/js-yaml": "3.11.1",
|
||||||
"@types/koa": "2.0.45",
|
"@types/koa": "2.0.45",
|
||||||
"@types/koa-bodyparser": "4.2.0",
|
"@types/koa-bodyparser": "4.2.0",
|
||||||
"@types/koa-compress": "^2.0.8",
|
"@types/koa-compress": "2.0.8",
|
||||||
"@types/koa-favicon": "2.0.19",
|
"@types/koa-favicon": "2.0.19",
|
||||||
|
"@types/koa-logger": "3.1.0",
|
||||||
"@types/koa-mount": "3.0.1",
|
"@types/koa-mount": "3.0.1",
|
||||||
"@types/koa-multer": "1.0.0",
|
"@types/koa-multer": "1.0.0",
|
||||||
"@types/koa-router": "7.0.27",
|
"@types/koa-router": "7.0.28",
|
||||||
"@types/koa-send": "4.1.1",
|
"@types/koa-send": "4.1.1",
|
||||||
|
"@types/koa-views": "^2.0.3",
|
||||||
"@types/koa__cors": "2.2.2",
|
"@types/koa__cors": "2.2.2",
|
||||||
"@types/kue": "0.11.8",
|
"@types/kue": "0.11.8",
|
||||||
"@types/license-checker": "15.0.0",
|
"@types/license-checker": "15.0.0",
|
||||||
"@types/mkdirp": "0.5.2",
|
"@types/mkdirp": "0.5.2",
|
||||||
"@types/mocha": "5.0.0",
|
"@types/mocha": "5.2.0",
|
||||||
"@types/mongodb": "3.0.15",
|
"@types/mongodb": "3.0.15",
|
||||||
"@types/monk": "6.0.0",
|
"@types/monk": "6.0.0",
|
||||||
"@types/ms": "0.7.30",
|
"@types/ms": "0.7.30",
|
||||||
"@types/node": "9.6.5",
|
"@types/node": "9.6.6",
|
||||||
"@types/nopt": "3.0.29",
|
"@types/nopt": "3.0.29",
|
||||||
|
"@types/parse5": "^3.0.0",
|
||||||
"@types/pug": "2.0.4",
|
"@types/pug": "2.0.4",
|
||||||
"@types/qrcode": "0.8.1",
|
"@types/qrcode": "0.8.1",
|
||||||
"@types/ratelimiter": "2.1.28",
|
"@types/ratelimiter": "2.1.28",
|
||||||
@ -78,10 +78,11 @@
|
|||||||
"@types/request-promise-native": "1.0.14",
|
"@types/request-promise-native": "1.0.14",
|
||||||
"@types/rimraf": "2.0.2",
|
"@types/rimraf": "2.0.2",
|
||||||
"@types/seedrandom": "2.4.27",
|
"@types/seedrandom": "2.4.27",
|
||||||
|
"@types/single-line-log": "^1.1.0",
|
||||||
"@types/speakeasy": "2.0.2",
|
"@types/speakeasy": "2.0.2",
|
||||||
"@types/tmp": "0.0.33",
|
"@types/tmp": "0.0.33",
|
||||||
"@types/uuid": "3.4.3",
|
"@types/uuid": "3.4.3",
|
||||||
"@types/webpack": "4.1.3",
|
"@types/webpack": "4.1.4",
|
||||||
"@types/webpack-stream": "3.2.10",
|
"@types/webpack-stream": "3.2.10",
|
||||||
"@types/websocket": "0.0.38",
|
"@types/websocket": "0.0.38",
|
||||||
"@types/ws": "4.0.2",
|
"@types/ws": "4.0.2",
|
||||||
@ -90,10 +91,10 @@
|
|||||||
"autwh": "0.1.0",
|
"autwh": "0.1.0",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"bootstrap-vue": "2.0.0-rc.6",
|
"bootstrap-vue": "2.0.0-rc.6",
|
||||||
"cafy": "3.2.1",
|
"cafy": "8.0.0",
|
||||||
"chai": "4.1.2",
|
"chai": "4.1.2",
|
||||||
"chai-http": "4.0.0",
|
"chai-http": "4.0.0",
|
||||||
"chalk": "2.4.0",
|
"chalk": "2.4.1",
|
||||||
"crc-32": "1.2.0",
|
"crc-32": "1.2.0",
|
||||||
"css-loader": "0.28.11",
|
"css-loader": "0.28.11",
|
||||||
"debug": "3.1.0",
|
"debug": "3.1.0",
|
||||||
@ -102,12 +103,12 @@
|
|||||||
"diskusage": "0.2.4",
|
"diskusage": "0.2.4",
|
||||||
"dompurify": "1.0.3",
|
"dompurify": "1.0.3",
|
||||||
"elasticsearch": "14.2.2",
|
"elasticsearch": "14.2.2",
|
||||||
"element-ui": "2.3.4",
|
"element-ui": "2.3.6",
|
||||||
"emojilib": "2.2.12",
|
"emojilib": "2.2.12",
|
||||||
"escape-regexp": "0.0.1",
|
"escape-regexp": "0.0.1",
|
||||||
"eslint": "4.19.1",
|
"eslint": "4.19.1",
|
||||||
"eslint-plugin-vue": "4.4.0",
|
"eslint-plugin-vue": "4.5.0",
|
||||||
"eventemitter3": "3.0.1",
|
"eventemitter3": "3.1.0",
|
||||||
"exif-js": "2.3.0",
|
"exif-js": "2.3.0",
|
||||||
"file-loader": "1.1.11",
|
"file-loader": "1.1.11",
|
||||||
"file-type": "7.6.0",
|
"file-type": "7.6.0",
|
||||||
@ -135,36 +136,41 @@
|
|||||||
"is-root": "2.0.0",
|
"is-root": "2.0.0",
|
||||||
"is-url": "1.2.4",
|
"is-url": "1.2.4",
|
||||||
"js-yaml": "3.11.0",
|
"js-yaml": "3.11.0",
|
||||||
"jsdom": "11.8.0",
|
"jsdom": "11.9.0",
|
||||||
"koa": "2.5.0",
|
"koa": "2.5.1",
|
||||||
"koa-bodyparser": "4.2.0",
|
"koa-bodyparser": "4.2.0",
|
||||||
"koa-compress": "3.0.0",
|
"koa-compress": "3.0.0",
|
||||||
"koa-favicon": "2.0.1",
|
"koa-favicon": "2.0.1",
|
||||||
"koa-json-body": "^5.3.0",
|
"koa-json-body": "5.3.0",
|
||||||
|
"koa-logger": "3.2.0",
|
||||||
"koa-mount": "3.0.0",
|
"koa-mount": "3.0.0",
|
||||||
"koa-multer": "1.0.2",
|
"koa-multer": "1.0.2",
|
||||||
"koa-router": "7.4.0",
|
"koa-router": "7.4.0",
|
||||||
"koa-send": "4.1.3",
|
"koa-send": "4.1.3",
|
||||||
|
"koa-slow": "2.1.0",
|
||||||
|
"koa-views": "^6.1.4",
|
||||||
"kue": "0.11.6",
|
"kue": "0.11.6",
|
||||||
"license-checker": "18.0.0",
|
"license-checker": "18.0.0",
|
||||||
"loader-utils": "1.1.0",
|
"loader-utils": "1.1.0",
|
||||||
"mecab-async": "0.1.2",
|
"mecab-async": "0.1.2",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
"mocha": "5.1.0",
|
"mocha": "5.1.1",
|
||||||
"moji": "0.5.1",
|
"moji": "0.5.1",
|
||||||
"mongodb": "3.0.7",
|
"mongodb": "3.0.7",
|
||||||
"monk": "6.0.5",
|
"monk": "6.0.5",
|
||||||
"ms": "2.1.1",
|
"ms": "2.1.1",
|
||||||
"nan": "2.10.0",
|
"nan": "2.10.0",
|
||||||
"node-sass": "4.8.3",
|
"node-sass": "4.9.0",
|
||||||
"node-sass-json-importer": "3.2.0",
|
"node-sass-json-importer": "3.2.0",
|
||||||
"nopt": "4.0.1",
|
"nopt": "4.0.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"object-assign-deep": "0.4.0",
|
"object-assign-deep": "0.4.0",
|
||||||
"on-build-webpack": "0.1.0",
|
"on-build-webpack": "0.1.0",
|
||||||
"os-utils": "0.0.14",
|
"os-utils": "0.0.14",
|
||||||
|
"parse5": "^4.0.0",
|
||||||
"progress-bar-webpack-plugin": "1.11.0",
|
"progress-bar-webpack-plugin": "1.11.0",
|
||||||
"prominence": "0.2.0",
|
"prominence": "0.2.0",
|
||||||
|
"promise-sequential": "^1.1.1",
|
||||||
"pug": "2.0.3",
|
"pug": "2.0.3",
|
||||||
"punycode": "2.1.0",
|
"punycode": "2.1.0",
|
||||||
"qrcode": "1.2.0",
|
"qrcode": "1.2.0",
|
||||||
@ -179,6 +185,7 @@
|
|||||||
"s-age": "1.1.2",
|
"s-age": "1.1.2",
|
||||||
"sass-loader": "7.0.1",
|
"sass-loader": "7.0.1",
|
||||||
"seedrandom": "2.4.3",
|
"seedrandom": "2.4.3",
|
||||||
|
"single-line-log": "^1.1.2",
|
||||||
"speakeasy": "2.0.0",
|
"speakeasy": "2.0.0",
|
||||||
"style-loader": "0.21.0",
|
"style-loader": "0.21.0",
|
||||||
"stylus": "0.54.5",
|
"stylus": "0.54.5",
|
||||||
@ -190,9 +197,9 @@
|
|||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"tmp": "0.0.33",
|
"tmp": "0.0.33",
|
||||||
"ts-loader": "4.2.0",
|
"ts-loader": "4.2.0",
|
||||||
"ts-node": "6.0.0",
|
"ts-node": "6.0.1",
|
||||||
"tslint": "5.9.1",
|
"tslint": "5.9.1",
|
||||||
"typescript": "2.8.1",
|
"typescript": "2.8.3",
|
||||||
"typescript-eslint-parser": "15.0.0",
|
"typescript-eslint-parser": "15.0.0",
|
||||||
"uglify-es": "3.3.9",
|
"uglify-es": "3.3.9",
|
||||||
"url-loader": "1.0.1",
|
"url-loader": "1.0.1",
|
||||||
@ -201,17 +208,18 @@
|
|||||||
"vue": "2.5.16",
|
"vue": "2.5.16",
|
||||||
"vue-cropperjs": "2.2.0",
|
"vue-cropperjs": "2.2.0",
|
||||||
"vue-js-modal": "1.3.13",
|
"vue-js-modal": "1.3.13",
|
||||||
"vue-json-tree-view": "2.1.3",
|
"vue-json-tree-view": "2.1.4",
|
||||||
"vue-loader": "14.2.2",
|
"vue-loader": "15.0.3",
|
||||||
"vue-router": "3.0.1",
|
"vue-router": "3.0.1",
|
||||||
"vue-template-compiler": "2.5.16",
|
"vue-template-compiler": "2.5.16",
|
||||||
"vuedraggable": "2.16.0",
|
"vuedraggable": "2.16.0",
|
||||||
|
"vuex": "3.0.1",
|
||||||
"web-push": "3.3.0",
|
"web-push": "3.3.0",
|
||||||
"webfinger.js": "2.6.6",
|
"webfinger.js": "2.6.6",
|
||||||
"webpack": "4.6.0",
|
"webpack": "4.6.0",
|
||||||
"webpack-cli": "2.0.14",
|
"webpack-cli": "2.0.15",
|
||||||
"webpack-replace-loader": "1.3.0",
|
"webpack-replace-loader": "1.3.0",
|
||||||
"websocket": "1.0.25",
|
"websocket": "1.0.26",
|
||||||
"ws": "5.1.1",
|
"ws": "5.1.1",
|
||||||
"xev": "2.0.0"
|
"xev": "2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import locale from '../../locales';
|
|||||||
export default class Replacer {
|
export default class Replacer {
|
||||||
private lang: string;
|
private lang: string;
|
||||||
|
|
||||||
public pattern = /%i18n:([a-z_\-@\.\!]+?)%/g;
|
public pattern = /%i18n:([a-z0-9_\-@\.\!]+?)%/g;
|
||||||
|
|
||||||
constructor(lang: string) {
|
constructor(lang: string) {
|
||||||
this.lang = lang;
|
this.lang = lang;
|
||||||
|
29
src/cafy-id.ts
Normal file
29
src/cafy-id.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import * as mongo from 'mongodb';
|
||||||
|
import { Query } from 'cafy';
|
||||||
|
|
||||||
|
export const isAnId = x => mongo.ObjectID.isValid(x);
|
||||||
|
export const isNotAnId = x => !isAnId(x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
export default class ID extends Query<mongo.ObjectID> {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.transform = v => {
|
||||||
|
if (isAnId(v) && !mongo.ObjectID.prototype.isPrototypeOf(v)) {
|
||||||
|
return new mongo.ObjectID(v);
|
||||||
|
} else {
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.push(v => {
|
||||||
|
if (!mongo.ObjectID.prototype.isPrototypeOf(v) && isNotAnId(v)) {
|
||||||
|
return new Error('must-be-an-id');
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -94,13 +94,13 @@ export default Vue.extend({
|
|||||||
margin 0 auto -38px auto
|
margin 0 auto -38px auto
|
||||||
border solid 5px #fff
|
border solid 5px #fff
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1)
|
box-shadow 0 2px 2px rgba(#000, 0.1)
|
||||||
|
|
||||||
> .app
|
> .app
|
||||||
padding 44px 16px 0 16px
|
padding 44px 16px 0 16px
|
||||||
color #555
|
color #555
|
||||||
background #eee
|
background #eee
|
||||||
box-shadow 0 2px 2px rgba(0, 0, 0, 0.1) inset
|
box-shadow 0 2px 2px rgba(#000, 0.1) inset
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ''
|
content ''
|
||||||
|
@ -94,7 +94,7 @@ export default Vue.extend({
|
|||||||
margin 0 auto
|
margin 0 auto
|
||||||
text-align center
|
text-align center
|
||||||
background #fff
|
background #fff
|
||||||
box-shadow 0px 4px 16px rgba(0, 0, 0, 0.2)
|
box-shadow 0px 4px 16px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .fetching
|
> .fetching
|
||||||
margin 0
|
margin 0
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
block vars
|
||||||
|
|
||||||
doctype html
|
doctype html
|
||||||
|
|
||||||
!= '\n<!-- Thank you for using Misskey! @syuilo -->\n'
|
!= '\n<!-- Thank you for using Misskey! @syuilo -->\n'
|
||||||
@ -9,9 +11,17 @@ html
|
|||||||
meta(name='application-name' content='Misskey')
|
meta(name='application-name' content='Misskey')
|
||||||
meta(name='theme-color' content=themeColor)
|
meta(name='theme-color' content=themeColor)
|
||||||
meta(name='referrer' content='origin')
|
meta(name='referrer' content='origin')
|
||||||
|
meta(property='og:site_name' content='Misskey')
|
||||||
link(rel='manifest' href='/manifest.json')
|
link(rel='manifest' href='/manifest.json')
|
||||||
|
|
||||||
title Misskey
|
title
|
||||||
|
block title
|
||||||
|
| Misskey
|
||||||
|
|
||||||
|
block desc
|
||||||
|
meta(name='description' content='A SNS')
|
||||||
|
|
||||||
|
block meta
|
||||||
|
|
||||||
style
|
style
|
||||||
include ./../../../built/client/assets/init.css
|
include ./../../../built/client/assets/init.css
|
||||||
|
@ -11,14 +11,12 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Chromeで確認したことなのですが、constやletを用いたとしても
|
(function() {
|
||||||
// グローバルなスコープで定数/変数を定義するとwindowのプロパティ
|
// キャッシュ削除要求があれば従う
|
||||||
// としてそれがアクセスできるようになる訳ではありませんが、普通に
|
if (localStorage.getItem('shouldFlush') == 'true') {
|
||||||
// コンソールから定数/変数名を入力するとアクセスできてしまいます。
|
refresh();
|
||||||
// ブロック内に入れてスコープを非グローバル化するとそれが防げます
|
return;
|
||||||
// (Chrome以外のブラウザでは検証していません)
|
}
|
||||||
{
|
|
||||||
if (localStorage.getItem('shouldFlush') == 'true') refresh();
|
|
||||||
|
|
||||||
// Get the current url information
|
// Get the current url information
|
||||||
const url = new URL(location.href);
|
const url = new URL(location.href);
|
||||||
@ -62,6 +60,11 @@
|
|||||||
app = isMobile ? 'mobile' : 'desktop';
|
app = isMobile ? 'mobile' : 'desktop';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dark/Light
|
||||||
|
if (localStorage.getItem('darkmode') == 'true') {
|
||||||
|
document.documentElement.setAttribute('data-darkmode', 'true');
|
||||||
|
}
|
||||||
|
|
||||||
// Script version
|
// Script version
|
||||||
const ver = localStorage.getItem('v') || VERSION;
|
const ver = localStorage.getItem('v') || VERSION;
|
||||||
|
|
||||||
@ -72,11 +75,16 @@
|
|||||||
const raw = (localStorage.getItem('useRawScript') == 'true' && isDebug)
|
const raw = (localStorage.getItem('useRawScript') == 'true' && isDebug)
|
||||||
|| ENV != 'production';
|
|| ENV != 'production';
|
||||||
|
|
||||||
|
// Get salt query
|
||||||
|
const salt = localStorage.getItem('salt')
|
||||||
|
? '?salt=' + localStorage.getItem('salt')
|
||||||
|
: '';
|
||||||
|
|
||||||
// Load an app script
|
// Load an app script
|
||||||
// Note: 'async' make it possible to load the script asyncly.
|
// Note: 'async' make it possible to load the script asyncly.
|
||||||
// 'defer' make it possible to run the script when the dom loaded.
|
// 'defer' make it possible to run the script when the dom loaded.
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.setAttribute('src', `/assets/${app}.${ver}.${lang}.${raw ? 'raw' : 'min'}.js`);
|
script.setAttribute('src', `/assets/${app}.${ver}.${lang}.${raw ? 'raw' : 'min'}.js${salt}`);
|
||||||
script.setAttribute('async', 'true');
|
script.setAttribute('async', 'true');
|
||||||
script.setAttribute('defer', 'true');
|
script.setAttribute('defer', 'true');
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
@ -97,8 +105,8 @@
|
|||||||
const meta = await res.json();
|
const meta = await res.json();
|
||||||
|
|
||||||
// Compare versions
|
// Compare versions
|
||||||
if (meta.version != ver) {
|
if (meta.clientVersion != ver) {
|
||||||
localStorage.setItem('v', meta.version);
|
localStorage.setItem('v', meta.clientVersion);
|
||||||
|
|
||||||
alert(
|
alert(
|
||||||
'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' +
|
'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' +
|
||||||
@ -112,6 +120,9 @@
|
|||||||
function refresh() {
|
function refresh() {
|
||||||
localStorage.setItem('shouldFlush', 'false');
|
localStorage.setItem('shouldFlush', 'false');
|
||||||
|
|
||||||
|
// Random
|
||||||
|
localStorage.setItem('salt', Math.random().toString());
|
||||||
|
|
||||||
// Clear cache (serive worker)
|
// Clear cache (serive worker)
|
||||||
try {
|
try {
|
||||||
navigator.serviceWorker.controller.postMessage('clear');
|
navigator.serviceWorker.controller.postMessage('clear');
|
||||||
@ -126,4 +137,4 @@
|
|||||||
// Force reload
|
// Force reload
|
||||||
location.reload(true);
|
location.reload(true);
|
||||||
}
|
}
|
||||||
}
|
})();
|
||||||
|
@ -18,61 +18,65 @@ export default function<T extends object>(data: {
|
|||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
id(): string {
|
id(): string {
|
||||||
return this.widget.id;
|
return this.widget.id;
|
||||||
|
},
|
||||||
|
|
||||||
|
props(): T {
|
||||||
|
return this.widget.data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
props: data.props ? data.props() : {} as T,
|
bakedOldProps: null
|
||||||
bakedOldProps: null,
|
|
||||||
preventSave: false
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.props) {
|
this.mergeProps();
|
||||||
Object.keys(this.props).forEach(prop => {
|
|
||||||
if (this.widget.data.hasOwnProperty(prop)) {
|
this.$watch('props', () => {
|
||||||
this.props[prop] = this.widget.data[prop];
|
this.mergeProps();
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.bakeProps();
|
this.bakeProps();
|
||||||
|
},
|
||||||
|
|
||||||
this.$watch('props', newProps => {
|
methods: {
|
||||||
if (this.preventSave) {
|
bakeProps() {
|
||||||
this.preventSave = false;
|
this.bakedOldProps = JSON.stringify(this.props);
|
||||||
this.bakeProps();
|
},
|
||||||
return;
|
|
||||||
|
mergeProps() {
|
||||||
|
if (data.props) {
|
||||||
|
const defaultProps = data.props();
|
||||||
|
Object.keys(defaultProps).forEach(prop => {
|
||||||
|
if (!this.props.hasOwnProperty(prop)) {
|
||||||
|
Vue.set(this.props, prop, defaultProps[prop]);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (this.bakedOldProps == JSON.stringify(newProps)) return;
|
},
|
||||||
|
|
||||||
|
save() {
|
||||||
|
if (this.bakedOldProps == JSON.stringify(this.props)) return;
|
||||||
|
|
||||||
this.bakeProps();
|
this.bakeProps();
|
||||||
|
|
||||||
if (this.isMobile) {
|
if (this.isMobile) {
|
||||||
(this as any).api('i/update_mobile_home', {
|
(this as any).api('i/update_mobile_home', {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
data: newProps
|
data: this.props
|
||||||
}).then(() => {
|
|
||||||
(this as any).os.i.clientSettings.mobileHome.find(w => w.id == this.id).data = newProps;
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
(this as any).api('i/update_home', {
|
(this as any).api('i/update_home', {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
data: newProps
|
data: this.props
|
||||||
}).then(() => {
|
|
||||||
(this as any).os.i.clientSettings.home.find(w => w.id == this.id).data = newProps;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
deep: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
bakeProps() {
|
|
||||||
this.bakedOldProps = JSON.stringify(this.props);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import MiOS from '../mios';
|
import MiOS from '../../mios';
|
||||||
import { version as current } from '../../config';
|
import { version as current } from '../../config';
|
||||||
|
|
||||||
export default async function(mios: MiOS, force = false, silent = false) {
|
export default async function(mios: MiOS, force = false, silent = false) {
|
||||||
const meta = await mios.getMeta(force);
|
const meta = await mios.getMeta(force);
|
||||||
const newer = meta.version;
|
const newer = meta.clientVersion;
|
||||||
|
|
||||||
if (newer != current) {
|
if (newer != current) {
|
||||||
localStorage.setItem('should-refresh', 'true');
|
localStorage.setItem('should-refresh', 'true');
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Channel stream connection
|
* Channel stream connection
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drive stream connection
|
* Drive stream connection
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global timeline stream connection
|
* Global timeline stream connection
|
||||||
|
@ -2,7 +2,7 @@ import * as merge from 'object-assign-deep';
|
|||||||
|
|
||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home stream connection
|
* Home stream connection
|
||||||
@ -25,10 +25,31 @@ export class HomeStream extends Stream {
|
|||||||
console.log('I updated:', i);
|
console.log('I updated:', i);
|
||||||
}
|
}
|
||||||
merge(me, i);
|
merge(me, i);
|
||||||
|
|
||||||
|
// キャッシュ更新
|
||||||
|
os.bakeMe();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on('clientSettingUpdated', x => {
|
||||||
|
os.store.commit('settings/set', {
|
||||||
|
key: x.key,
|
||||||
|
value: x.value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.on('home_updated', x => {
|
||||||
|
if (x.home) {
|
||||||
|
os.store.commit('settings/setHome', x.home);
|
||||||
|
} else {
|
||||||
|
os.store.commit('settings/setHomeWidget', {
|
||||||
|
id: x.id,
|
||||||
|
data: x.data
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// トークンが再生成されたとき
|
// トークンが再生成されたとき
|
||||||
// このままではAPIが利用できないので強制的にサインアウトさせる
|
// このままではMisskeyが利用できないので強制的にサインアウトさせる
|
||||||
this.on('my_token_regenerated', () => {
|
this.on('my_token_regenerated', () => {
|
||||||
alert('%i18n:!common.my-token-regenerated%');
|
alert('%i18n:!common.my-token-regenerated%');
|
||||||
os.signout();
|
os.signout();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local timeline stream connection
|
* Local timeline stream connection
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Messaging index stream connection
|
* Messaging index stream connection
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Messaging stream connection
|
* Messaging stream connection
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
export class OthelloGameStream extends Stream {
|
export class OthelloGameStream extends Stream {
|
||||||
constructor(os: MiOS, me, game) {
|
constructor(os: MiOS, me, game) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
export class OthelloStream extends Stream {
|
export class OthelloStream extends Stream {
|
||||||
constructor(os: MiOS, me) {
|
constructor(os: MiOS, me) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Stream from './stream';
|
import Stream from './stream';
|
||||||
import StreamManager from './stream-manager';
|
import StreamManager from './stream-manager';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Server stream connection
|
* Server stream connection
|
||||||
|
@ -2,7 +2,7 @@ import { EventEmitter } from 'eventemitter3';
|
|||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
import * as ReconnectingWebsocket from 'reconnecting-websocket';
|
import * as ReconnectingWebsocket from 'reconnecting-websocket';
|
||||||
import { wsUrl } from '../../../config';
|
import { wsUrl } from '../../../config';
|
||||||
import MiOS from '../../mios';
|
import MiOS from '../../../mios';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Misskey stream connection
|
* Misskey stream connection
|
||||||
|
17
src/client/app/common/scripts/streaming/user-list.ts
Normal file
17
src/client/app/common/scripts/streaming/user-list.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import Stream from './stream';
|
||||||
|
import MiOS from '../../mios';
|
||||||
|
|
||||||
|
export class UserListStream extends Stream {
|
||||||
|
constructor(os: MiOS, me, listId) {
|
||||||
|
super(os, 'user-list', {
|
||||||
|
i: me.token,
|
||||||
|
listId
|
||||||
|
});
|
||||||
|
|
||||||
|
(this as any).on('_connected_', () => {
|
||||||
|
this.send({
|
||||||
|
i: me.token
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -234,7 +234,7 @@ export default Vue.extend({
|
|||||||
margin-top calc(1em + 8px)
|
margin-top calc(1em + 8px)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
transition top 0.1s ease, left 0.1s ease
|
transition top 0.1s ease, left 0.1s ease
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ export default Vue.extend({
|
|||||||
white-space nowrap
|
white-space nowrap
|
||||||
overflow hidden
|
overflow hidden
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
cursor default
|
cursor default
|
||||||
|
|
||||||
&, *
|
&, *
|
||||||
@ -285,10 +285,10 @@ export default Vue.extend({
|
|||||||
|
|
||||||
.name
|
.name
|
||||||
margin 0 8px 0 0
|
margin 0 8px 0 0
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
.username
|
.username
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
|
|
||||||
> .emojis > li
|
> .emojis > li
|
||||||
|
|
||||||
@ -298,10 +298,10 @@ export default Vue.extend({
|
|||||||
width 24px
|
width 24px
|
||||||
|
|
||||||
.name
|
.name
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
.alias
|
.alias
|
||||||
margin 0 0 0 8px
|
margin 0 0 0 8px
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
42
src/client/app/common/views/components/avatar.vue
Normal file
42
src/client/app/common/views/components/avatar.vue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-if="disablePreview"></router-link>
|
||||||
|
<router-link class="mk-avatar" :to="user | userPage" :title="user | acct" :target="target" :style="style" v-else v-user-preview="user.id"></router-link>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
export default Vue.extend({
|
||||||
|
props: {
|
||||||
|
user: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
disablePreview: {
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
style(): any {
|
||||||
|
return {
|
||||||
|
backgroundColor: this.user.avatarColor ? `rgb(${ this.user.avatarColor.join(',') })` : null,
|
||||||
|
backgroundImage: `url(${ this.user.avatarUrl }?thumbnail)`,
|
||||||
|
borderRadius: (this as any).clientSettings.circleIcons ? '100%' : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.mk-avatar
|
||||||
|
display inline-block
|
||||||
|
vertical-align bottom
|
||||||
|
background-size cover
|
||||||
|
background-position center center
|
||||||
|
transition border-radius 1s ease
|
||||||
|
</style>
|
67
src/client/app/common/views/components/google.vue
Normal file
67
src/client/app/common/views/components/google.vue
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mk-google">
|
||||||
|
<input type="search" v-model="query" :placeholder="q">
|
||||||
|
<button @click="search">検索</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
export default Vue.extend({
|
||||||
|
props: ['q'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.query = this.q;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search() {
|
||||||
|
window.open(`https://www.google.com/?#q=${this.query}`, '_blank');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
root(isDark)
|
||||||
|
display flex
|
||||||
|
margin 8px 0
|
||||||
|
|
||||||
|
> input
|
||||||
|
flex-shrink 1
|
||||||
|
padding 10px
|
||||||
|
width 100%
|
||||||
|
height 40px
|
||||||
|
font-family sans-serif
|
||||||
|
font-size 16px
|
||||||
|
color isDark ? #dee4e8 : #55595c
|
||||||
|
background isDark ? #191b22 : #fff
|
||||||
|
border solid 1px isDark ? #495156 : #dadada
|
||||||
|
border-radius 4px 0 0 4px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-color isDark ? #777c86 : #b0b0b0
|
||||||
|
|
||||||
|
> button
|
||||||
|
flex-shrink 0
|
||||||
|
padding 0 16px
|
||||||
|
border solid 1px isDark ? #495156 : #dadada
|
||||||
|
border-left none
|
||||||
|
border-radius 0 4px 4px 0
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color isDark ? #2e3440 : #eee
|
||||||
|
|
||||||
|
&:active
|
||||||
|
box-shadow 0 2px 4px rgba(#000, 0.15) inset
|
||||||
|
|
||||||
|
.mk-google[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-google:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
|
</style>
|
@ -3,6 +3,7 @@ import Vue from 'vue';
|
|||||||
import signin from './signin.vue';
|
import signin from './signin.vue';
|
||||||
import signup from './signup.vue';
|
import signup from './signup.vue';
|
||||||
import forkit from './forkit.vue';
|
import forkit from './forkit.vue';
|
||||||
|
import avatar from './avatar.vue';
|
||||||
import nav from './nav.vue';
|
import nav from './nav.vue';
|
||||||
import noteHtml from './note-html';
|
import noteHtml from './note-html';
|
||||||
import poll from './poll.vue';
|
import poll from './poll.vue';
|
||||||
@ -28,6 +29,7 @@ import welcomeTimeline from './welcome-timeline.vue';
|
|||||||
Vue.component('mk-signin', signin);
|
Vue.component('mk-signin', signin);
|
||||||
Vue.component('mk-signup', signup);
|
Vue.component('mk-signup', signup);
|
||||||
Vue.component('mk-forkit', forkit);
|
Vue.component('mk-forkit', forkit);
|
||||||
|
Vue.component('mk-avatar', avatar);
|
||||||
Vue.component('mk-nav', nav);
|
Vue.component('mk-nav', nav);
|
||||||
Vue.component('mk-note-html', noteHtml);
|
Vue.component('mk-note-html', noteHtml);
|
||||||
Vue.component('mk-poll', poll);
|
Vue.component('mk-poll', poll);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="mk-media-list" :data-count="mediaList.length">
|
<div class="mk-media-list" :data-count="mediaList.length">
|
||||||
<template v-for="media in mediaList">
|
<template v-for="media in mediaList">
|
||||||
<mk-media-video :video="media" :key="media.id" v-if="media.type.startsWith('video')" :inline-playable="mediaList.length === 1"/>
|
<mk-media-video :video="media" :key="media.id" v-if="media.type.startsWith('video')" :inline-playable="mediaList.length === 1"/>
|
||||||
<mk-media-image :image="media" :key="media.id" v-else />
|
<mk-media-image :image="media" :key="media.id" v-else :raw="raw"/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -11,7 +11,14 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['mediaList'],
|
props: {
|
||||||
|
mediaList: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
raw: {
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -23,7 +30,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
@media (max-width 500px)
|
@media (max-width 500px)
|
||||||
height 192px
|
height 192px
|
||||||
|
|
||||||
&[data-count="1"]
|
&[data-count="1"]
|
||||||
grid-template-rows 1fr
|
grid-template-rows 1fr
|
||||||
&[data-count="2"]
|
&[data-count="2"]
|
||||||
@ -40,7 +47,7 @@ export default Vue.extend({
|
|||||||
&[data-count="4"]
|
&[data-count="4"]
|
||||||
grid-template-columns 1fr 1fr
|
grid-template-columns 1fr 1fr
|
||||||
grid-template-rows 1fr 1fr
|
grid-template-rows 1fr 1fr
|
||||||
|
|
||||||
:nth-child(1)
|
:nth-child(1)
|
||||||
grid-column 1 / 2
|
grid-column 1 / 2
|
||||||
grid-row 1 / 2
|
grid-row 1 / 2
|
||||||
@ -53,5 +60,5 @@ export default Vue.extend({
|
|||||||
:nth-child(4)
|
:nth-child(4)
|
||||||
grid-column 2 / 3
|
grid-column 2 / 3
|
||||||
grid-row 2 / 3
|
grid-row 2 / 3
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="message" :data-is-me="isMe">
|
<div class="message" :data-is-me="isMe">
|
||||||
<router-link class="avatar-anchor" :to="message.user | userPage" :title="message.user | acct" target="_blank">
|
<mk-avatar class="avatar" :user="message.user" target="_blank"/>
|
||||||
<img class="avatar" :src="`${message.user.avatarUrl}?thumbnail&size=80`" alt=""/>
|
|
||||||
</router-link>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="balloon" :data-no-text="message.text == null">
|
<div class="balloon" :data-no-text="message.text == null">
|
||||||
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
|
<p class="read" v-if="isMe && message.isRead">%i18n:@is-read%</p>
|
||||||
@ -67,20 +65,14 @@ export default Vue.extend({
|
|||||||
padding 10px 12px 10px 12px
|
padding 10px 12px 10px 12px
|
||||||
background-color transparent
|
background-color transparent
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
top 10px
|
top 10px
|
||||||
|
width 54px
|
||||||
> .avatar
|
height 54px
|
||||||
display block
|
border-radius 8px
|
||||||
min-width 54px
|
transition all 0.1s ease
|
||||||
min-height 54px
|
|
||||||
max-width 54px
|
|
||||||
max-height 54px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
transition all 0.1s ease
|
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
|
|
||||||
@ -134,7 +126,7 @@ export default Vue.extend({
|
|||||||
bottom -4px
|
bottom -4px
|
||||||
left -12px
|
left -12px
|
||||||
margin 0
|
margin 0
|
||||||
color rgba(0, 0, 0, 0.5)
|
color rgba(#000, 0.5)
|
||||||
font-size 11px
|
font-size 11px
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
@ -146,7 +138,7 @@ export default Vue.extend({
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.5)
|
color rgba(#000, 0.5)
|
||||||
|
|
||||||
> .text
|
> .text
|
||||||
display block
|
display block
|
||||||
@ -155,7 +147,7 @@ export default Vue.extend({
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
& + .file
|
& + .file
|
||||||
> a
|
> a
|
||||||
@ -195,13 +187,13 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
margin 2px 0 0 0
|
margin 2px 0 0 0
|
||||||
font-size 10px
|
font-size 10px
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-left 4px
|
margin-left 4px
|
||||||
|
|
||||||
&:not([data-is-me])
|
&:not([data-is-me])
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
left 12px
|
left 12px
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
@ -225,7 +217,7 @@ export default Vue.extend({
|
|||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
&[data-is-me]
|
&[data-is-me]
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
right 12px
|
right 12px
|
||||||
|
|
||||||
> .content
|
> .content
|
||||||
|
@ -256,7 +256,7 @@ export default Vue.extend({
|
|||||||
padding 16px 8px 8px 8px
|
padding 16px 8px 8px 8px
|
||||||
text-align center
|
text-align center
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -267,7 +267,7 @@ export default Vue.extend({
|
|||||||
padding 16px 8px 8px 8px
|
padding 16px 8px 8px 8px
|
||||||
text-align center
|
text-align center
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -278,7 +278,7 @@ export default Vue.extend({
|
|||||||
padding 16px
|
padding 16px
|
||||||
text-align center
|
text-align center
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color rgba(0, 0, 0, 0.4)
|
color rgba(#000, 0.4)
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -289,14 +289,14 @@ export default Vue.extend({
|
|||||||
padding 0 12px
|
padding 0 12px
|
||||||
line-height 24px
|
line-height 24px
|
||||||
color #fff
|
color #fff
|
||||||
background rgba(0, 0, 0, 0.3)
|
background rgba(#000, 0.3)
|
||||||
border-radius 12px
|
border-radius 12px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.4)
|
background rgba(#000, 0.4)
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.5)
|
background rgba(#000, 0.5)
|
||||||
|
|
||||||
&.fetching
|
&.fetching
|
||||||
cursor wait
|
cursor wait
|
||||||
@ -322,7 +322,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
right 0
|
right 0
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
|
|
||||||
> span
|
> span
|
||||||
display inline-block
|
display inline-block
|
||||||
@ -330,7 +330,7 @@ export default Vue.extend({
|
|||||||
padding 0 16px
|
padding 0 16px
|
||||||
//font-weight bold
|
//font-weight bold
|
||||||
line-height 32px
|
line-height 32px
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
background #fff
|
background #fff
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@click="navigate(user)"
|
@click="navigate(user)"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=32`" alt=""/>
|
<mk-avatar class="avatar" :user="user"/>
|
||||||
<span class="name">{{ user | userName }}</span>
|
<span class="name">{{ user | userName }}</span>
|
||||||
<span class="username">@{{ user | acct }}</span>
|
<span class="username">@{{ user | acct }}</span>
|
||||||
</li>
|
</li>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
:key="message.id"
|
:key="message.id"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img class="avatar" :src="`${isMe(message) ? message.recipient.avatarUrl : message.user.avatarUrl}?thumbnail&size=64`" alt=""/>
|
<mk-avatar class="avatar" :user="isMe(message) ? message.recipient : message.user"/>
|
||||||
<header>
|
<header>
|
||||||
<span class="name">{{ isMe(message) ? message.recipient : message.user | userName }}</span>
|
<span class="name">{{ isMe(message) ? message.recipient : message.user | userName }}</span>
|
||||||
<span class="username">@{{ isMe(message) ? message.recipient : message.user | acct }}</span>
|
<span class="username">@{{ isMe(message) ? message.recipient : message.user | acct }}</span>
|
||||||
@ -169,7 +169,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-messaging
|
root(isDark)
|
||||||
|
|
||||||
&[data-compact]
|
&[data-compact]
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
@ -205,11 +205,11 @@ export default Vue.extend({
|
|||||||
z-index 1
|
z-index 1
|
||||||
width 100%
|
width 100%
|
||||||
background #fff
|
background #fff
|
||||||
box-shadow 0 0px 2px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0px 2px rgba(#000, 0.2)
|
||||||
|
|
||||||
> .form
|
> .form
|
||||||
padding 8px
|
padding 8px
|
||||||
background #f7f7f7
|
background isDark ? #282c37 : #f7f7f7
|
||||||
|
|
||||||
> label
|
> label
|
||||||
display block
|
display block
|
||||||
@ -241,13 +241,14 @@ export default Vue.extend({
|
|||||||
line-height 38px
|
line-height 38px
|
||||||
color #000
|
color #000
|
||||||
outline none
|
outline none
|
||||||
border solid 1px #eee
|
background isDark ? #191b22 : #fff
|
||||||
|
border solid 1px isDark ? #495156 : #eee
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
box-shadow none
|
box-shadow none
|
||||||
transition color 0.5s ease, border 0.5s ease
|
transition color 0.5s ease, border 0.5s ease
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
border solid 1px #ddd
|
border solid 1px isDark ? #b0b0b0 : #ddd
|
||||||
transition border 0.2s ease
|
transition border 0.2s ease
|
||||||
|
|
||||||
&:focus
|
&:focus
|
||||||
@ -278,7 +279,7 @@ export default Vue.extend({
|
|||||||
vertical-align top
|
vertical-align top
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
overflow hidden
|
overflow hidden
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
text-decoration none
|
text-decoration none
|
||||||
transition none
|
transition none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
@ -317,32 +318,32 @@ export default Vue.extend({
|
|||||||
margin 0 8px 0 0
|
margin 0 8px 0 0
|
||||||
/*font-weight bold*/
|
/*font-weight bold*/
|
||||||
font-weight normal
|
font-weight normal
|
||||||
color rgba(0, 0, 0, 0.8)
|
color rgba(#000, 0.8)
|
||||||
|
|
||||||
.username
|
.username
|
||||||
font-weight normal
|
font-weight normal
|
||||||
color rgba(0, 0, 0, 0.3)
|
color rgba(#000, 0.3)
|
||||||
|
|
||||||
> .history
|
> .history
|
||||||
|
|
||||||
> a
|
> a
|
||||||
display block
|
display block
|
||||||
text-decoration none
|
text-decoration none
|
||||||
background #fff
|
background isDark ? #282c37 : #fff
|
||||||
border-bottom solid 1px #eee
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
||||||
|
|
||||||
*
|
*
|
||||||
pointer-events none
|
pointer-events none
|
||||||
user-select none
|
user-select none
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background #fafafa
|
background isDark ? #1e2129 : #fafafa
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
filter saturate(200%)
|
filter saturate(200%)
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background #eee
|
background isDark ? #14161b : #eee
|
||||||
|
|
||||||
&[data-is-read]
|
&[data-is-read]
|
||||||
&[data-is-me]
|
&[data-is-me]
|
||||||
@ -382,17 +383,17 @@ export default Vue.extend({
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
text-overflow ellipsis
|
text-overflow ellipsis
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.9)
|
color isDark ? #fff : rgba(#000, 0.9)
|
||||||
font-weight bold
|
font-weight bold
|
||||||
transition all 0.1s ease
|
transition all 0.1s ease
|
||||||
|
|
||||||
> .username
|
> .username
|
||||||
margin 0 8px
|
margin 0 8px
|
||||||
color rgba(0, 0, 0, 0.5)
|
color isDark ? #606984 : rgba(#000, 0.5)
|
||||||
|
|
||||||
> .mk-time
|
> .mk-time
|
||||||
margin 0 0 0 auto
|
margin 0 0 0 auto
|
||||||
color rgba(0, 0, 0, 0.5)
|
color isDark ? #606984 : rgba(#000, 0.5)
|
||||||
font-size 80%
|
font-size 80%
|
||||||
|
|
||||||
> .avatar
|
> .avatar
|
||||||
@ -412,10 +413,10 @@ export default Vue.extend({
|
|||||||
overflow hidden
|
overflow hidden
|
||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size 1.1em
|
font-size 1.1em
|
||||||
color rgba(0, 0, 0, 0.8)
|
color isDark ? #fff : rgba(#000, 0.8)
|
||||||
|
|
||||||
.me
|
.me
|
||||||
color rgba(0, 0, 0, 0.4)
|
color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.4)
|
||||||
|
|
||||||
> .image
|
> .image
|
||||||
display block
|
display block
|
||||||
@ -460,4 +461,10 @@ export default Vue.extend({
|
|||||||
> .avatar
|
> .avatar
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
|
||||||
|
.mk-messaging[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-messaging:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -4,6 +4,7 @@ import parse from '../../../../../text/parse';
|
|||||||
import getAcct from '../../../../../acct/render';
|
import getAcct from '../../../../../acct/render';
|
||||||
import { url } from '../../../config';
|
import { url } from '../../../config';
|
||||||
import MkUrl from './url.vue';
|
import MkUrl from './url.vue';
|
||||||
|
import MkGoogle from './google.vue';
|
||||||
|
|
||||||
const flatten = list => list.reduce(
|
const flatten = list => list.reduce(
|
||||||
(a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []
|
(a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []
|
||||||
@ -97,7 +98,9 @@ export default Vue.component('mk-note-html', {
|
|||||||
}, token.content);
|
}, token.content);
|
||||||
|
|
||||||
case 'code':
|
case 'code':
|
||||||
return createElement('pre', [
|
return createElement('pre', {
|
||||||
|
class: 'code'
|
||||||
|
}, [
|
||||||
createElement('code', {
|
createElement('code', {
|
||||||
domProps: {
|
domProps: {
|
||||||
innerHTML: token.html
|
innerHTML: token.html
|
||||||
@ -132,10 +135,24 @@ export default Vue.component('mk-note-html', {
|
|||||||
}, text2.replace(/\n/g, ' '));
|
}, text2.replace(/\n/g, ' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 'title':
|
||||||
|
return createElement('div', {
|
||||||
|
attrs: {
|
||||||
|
class: 'title'
|
||||||
|
}
|
||||||
|
}, token.title);
|
||||||
|
|
||||||
case 'emoji':
|
case 'emoji':
|
||||||
const emoji = emojilib.lib[token.emoji];
|
const emoji = emojilib.lib[token.emoji];
|
||||||
return createElement('span', emoji ? emoji.char : token.content);
|
return createElement('span', emoji ? emoji.char : token.content);
|
||||||
|
|
||||||
|
case 'search':
|
||||||
|
return createElement(MkGoogle, {
|
||||||
|
props: {
|
||||||
|
q: token.query
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.log('unknown ast type:', token.type);
|
console.log('unknown ast type:', token.type);
|
||||||
}
|
}
|
||||||
@ -144,7 +161,7 @@ export default Vue.component('mk-note-html', {
|
|||||||
const _els = [];
|
const _els = [];
|
||||||
els.forEach((el, i) => {
|
els.forEach((el, i) => {
|
||||||
if (el.tag == 'br') {
|
if (el.tag == 'br') {
|
||||||
if (els[i - 1].tag != 'div') {
|
if (!['div', 'pre'].includes(els[i - 1].tag)) {
|
||||||
_els.push(el);
|
_els.push(el);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div class="mk-note-menu">
|
<div class="mk-note-menu">
|
||||||
<div class="backdrop" ref="backdrop" @click="close"></div>
|
<div class="backdrop" ref="backdrop" @click="close"></div>
|
||||||
<div class="popover" :class="{ compact }" ref="popover">
|
<div class="popover" :class="{ compact }" ref="popover">
|
||||||
|
<button @click="favorite">%i18n:@favorite%</button>
|
||||||
<button v-if="note.userId == os.i.id" @click="pin">%i18n:@pin%</button>
|
<button v-if="note.userId == os.i.id" @click="pin">%i18n:@pin%</button>
|
||||||
<a v-if="note.uri" :href="note.uri" target="_blank">%i18n:@remote%</a>
|
<a v-if="note.uri" :href="note.uri" target="_blank">%i18n:@remote%</a>
|
||||||
</div>
|
</div>
|
||||||
@ -58,6 +59,14 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
favorite() {
|
||||||
|
(this as any).api('notes/favorites/create', {
|
||||||
|
noteId: this.note.id
|
||||||
|
}).then(() => {
|
||||||
|
this.$destroy();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
(this.$refs.backdrop as any).style.pointerEvents = 'none';
|
(this.$refs.backdrop as any).style.pointerEvents = 'none';
|
||||||
anime({
|
anime({
|
||||||
@ -96,7 +105,7 @@ $border-color = rgba(27, 31, 35, 0.15)
|
|||||||
z-index 10000
|
z-index 10000
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
opacity 0
|
opacity 0
|
||||||
|
|
||||||
> .popover
|
> .popover
|
||||||
@ -142,6 +151,7 @@ $border-color = rgba(27, 31, 35, 0.15)
|
|||||||
> a
|
> a
|
||||||
display block
|
display block
|
||||||
padding 8px 16px
|
padding 8px 16px
|
||||||
|
width 100%
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color $theme-color-foreground
|
color $theme-color-foreground
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<section v-if="invitations.length > 0">
|
<section v-if="invitations.length > 0">
|
||||||
<h2>対局の招待があります!:</h2>
|
<h2>対局の招待があります!:</h2>
|
||||||
<div class="invitation" v-for="i in invitations" tabindex="-1" @click="accept(i)">
|
<div class="invitation" v-for="i in invitations" tabindex="-1" @click="accept(i)">
|
||||||
<img :src="`${i.parent.avatarUrl}?thumbnail&size=32`" alt="">
|
<mk-avatar class="avatar" :user="i.parent"/>
|
||||||
<span class="name"><b>{{ i.parent.name }}</b></span>
|
<span class="name"><b>{{ i.parent.name }}</b></span>
|
||||||
<span class="username">@{{ i.parent.username }}</span>
|
<span class="username">@{{ i.parent.username }}</span>
|
||||||
<mk-time :time="i.createdAt"/>
|
<mk-time :time="i.createdAt"/>
|
||||||
@ -40,8 +40,8 @@
|
|||||||
<section v-if="myGames.length > 0">
|
<section v-if="myGames.length > 0">
|
||||||
<h2>自分の対局</h2>
|
<h2>自分の対局</h2>
|
||||||
<a class="game" v-for="g in myGames" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
<a class="game" v-for="g in myGames" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
||||||
<img :src="`${g.user1.avatarUrl}?thumbnail&size=32`" alt="">
|
<mk-avatar class="avatar" :user="g.user1"/>
|
||||||
<img :src="`${g.user2.avatarUrl}?thumbnail&size=32`" alt="">
|
<mk-avatar class="avatar" :user="g.user2"/>
|
||||||
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
||||||
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -49,8 +49,8 @@
|
|||||||
<section v-if="games.length > 0">
|
<section v-if="games.length > 0">
|
||||||
<h2>みんなの対局</h2>
|
<h2>みんなの対局</h2>
|
||||||
<a class="game" v-for="g in games" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
<a class="game" v-for="g in games" tabindex="-1" @click.prevent="go(g)" :href="`/othello/${g.id}`">
|
||||||
<img :src="`${g.user1.avatarUrl}?thumbnail&size=32`" alt="">
|
<mk-avatar class="avatar" :user="g.user1"/>
|
||||||
<img :src="`${g.user2.avatarUrl}?thumbnail&size=32`" alt="">
|
<mk-avatar class="avatar" :user="g.user2"/>
|
||||||
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
||||||
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
<span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -271,8 +271,9 @@ export default Vue.extend({
|
|||||||
&:active
|
&:active
|
||||||
background #eee
|
background #eee
|
||||||
|
|
||||||
> img
|
> .avatar
|
||||||
vertical-align bottom
|
width 32px
|
||||||
|
height 32px
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
> span
|
> span
|
||||||
@ -301,8 +302,9 @@ export default Vue.extend({
|
|||||||
&:active
|
&:active
|
||||||
background #eee
|
background #eee
|
||||||
|
|
||||||
> img
|
> .avatar
|
||||||
vertical-align bottom
|
width 32px
|
||||||
|
height 32px
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
> span
|
> span
|
||||||
|
@ -69,7 +69,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-poll-editor
|
root(isDark)
|
||||||
padding 8px
|
padding 8px
|
||||||
|
|
||||||
> .caution
|
> .caution
|
||||||
@ -102,6 +102,8 @@ export default Vue.extend({
|
|||||||
padding 6px 8px
|
padding 6px 8px
|
||||||
width 300px
|
width 300px
|
||||||
font-size 14px
|
font-size 14px
|
||||||
|
color isDark ? #fff : #000
|
||||||
|
background isDark ? #191b22 : #fff
|
||||||
border solid 1px rgba($theme-color, 0.1)
|
border solid 1px rgba($theme-color, 0.1)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
|
||||||
@ -139,4 +141,10 @@ export default Vue.extend({
|
|||||||
&:active
|
&:active
|
||||||
color darken($theme-color, 30%)
|
color darken($theme-color, 30%)
|
||||||
|
|
||||||
|
.mk-poll-editor[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-poll-editor:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -68,7 +68,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-poll
|
root(isDark)
|
||||||
|
|
||||||
> ul
|
> ul
|
||||||
display block
|
display block
|
||||||
@ -81,16 +81,17 @@ export default Vue.extend({
|
|||||||
margin 4px 0
|
margin 4px 0
|
||||||
padding 4px 8px
|
padding 4px 8px
|
||||||
width 100%
|
width 100%
|
||||||
border solid 1px #eee
|
color isDark ? #fff : #000
|
||||||
|
border solid 1px isDark ? #5e636f : #eee
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
|
|
||||||
> .backdrop
|
> .backdrop
|
||||||
position absolute
|
position absolute
|
||||||
@ -108,6 +109,8 @@ export default Vue.extend({
|
|||||||
margin-left 4px
|
margin-left 4px
|
||||||
|
|
||||||
> p
|
> p
|
||||||
|
color isDark ? #a3aebf : #000
|
||||||
|
|
||||||
a
|
a
|
||||||
color inherit
|
color inherit
|
||||||
|
|
||||||
@ -121,4 +124,10 @@ export default Vue.extend({
|
|||||||
&:active
|
&:active
|
||||||
background transparent
|
background transparent
|
||||||
|
|
||||||
|
.mk-poll[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-poll:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -110,7 +110,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
$border-color = rgba(27, 31, 35, 0.15)
|
$border-color = rgba(27, 31, 35, 0.15)
|
||||||
|
|
||||||
.mk-reaction-picker
|
root(isDark)
|
||||||
position initial
|
position initial
|
||||||
|
|
||||||
> .backdrop
|
> .backdrop
|
||||||
@ -120,13 +120,14 @@ $border-color = rgba(27, 31, 35, 0.15)
|
|||||||
z-index 10000
|
z-index 10000
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.1)
|
background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1)
|
||||||
opacity 0
|
opacity 0
|
||||||
|
|
||||||
> .popover
|
> .popover
|
||||||
|
$bgcolor = isDark ? #2c303c : #fff
|
||||||
position absolute
|
position absolute
|
||||||
z-index 10001
|
z-index 10001
|
||||||
background #fff
|
background $bgcolor
|
||||||
border 1px solid $border-color
|
border 1px solid $border-color
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
box-shadow 0 3px 12px rgba(27, 31, 35, 0.15)
|
box-shadow 0 3px 12px rgba(27, 31, 35, 0.15)
|
||||||
@ -159,15 +160,15 @@ $border-color = rgba(27, 31, 35, 0.15)
|
|||||||
border-top solid $balloon-size transparent
|
border-top solid $balloon-size transparent
|
||||||
border-left solid $balloon-size transparent
|
border-left solid $balloon-size transparent
|
||||||
border-right solid $balloon-size transparent
|
border-right solid $balloon-size transparent
|
||||||
border-bottom solid $balloon-size #fff
|
border-bottom solid $balloon-size $bgcolor
|
||||||
|
|
||||||
> p
|
> p
|
||||||
display block
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 8px 10px
|
padding 8px 10px
|
||||||
font-size 14px
|
font-size 14px
|
||||||
color #586069
|
color isDark ? #d6dce2 : #586069
|
||||||
border-bottom solid 1px #e1e4e8
|
border-bottom solid 1px isDark ? #1c2023 : #e1e4e8
|
||||||
|
|
||||||
> div
|
> div
|
||||||
padding 4px
|
padding 4px
|
||||||
@ -182,10 +183,16 @@ $border-color = rgba(27, 31, 35, 0.15)
|
|||||||
border-radius 2px
|
border-radius 2px
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background #eee
|
background isDark ? #252731 : #eee
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background $theme-color
|
background $theme-color
|
||||||
box-shadow inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15)
|
box-shadow inset 0 0.15em 0.3em rgba(27, 31, 35, 0.15)
|
||||||
|
|
||||||
|
.mk-reaction-picker[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-reaction-picker:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-reactions-viewer">
|
<div class="mk-reactions-viewer">
|
||||||
<template v-if="reactions">
|
<template v-if="reactions">
|
||||||
<span v-if="reactions.like"><mk-reaction-icon reaction='like'/><span>{{ reactions.like }}</span></span>
|
<span v-if="reactions.like"><mk-reaction-icon reaction="like"/><span>{{ reactions.like }}</span></span>
|
||||||
<span v-if="reactions.love"><mk-reaction-icon reaction='love'/><span>{{ reactions.love }}</span></span>
|
<span v-if="reactions.love"><mk-reaction-icon reaction="love"/><span>{{ reactions.love }}</span></span>
|
||||||
<span v-if="reactions.laugh"><mk-reaction-icon reaction='laugh'/><span>{{ reactions.laugh }}</span></span>
|
<span v-if="reactions.laugh"><mk-reaction-icon reaction="laugh"/><span>{{ reactions.laugh }}</span></span>
|
||||||
<span v-if="reactions.hmm"><mk-reaction-icon reaction='hmm'/><span>{{ reactions.hmm }}</span></span>
|
<span v-if="reactions.hmm"><mk-reaction-icon reaction="hmm"/><span>{{ reactions.hmm }}</span></span>
|
||||||
<span v-if="reactions.surprise"><mk-reaction-icon reaction='surprise'/><span>{{ reactions.surprise }}</span></span>
|
<span v-if="reactions.surprise"><mk-reaction-icon reaction="surprise"/><span>{{ reactions.surprise }}</span></span>
|
||||||
<span v-if="reactions.congrats"><mk-reaction-icon reaction='congrats'/><span>{{ reactions.congrats }}</span></span>
|
<span v-if="reactions.congrats"><mk-reaction-icon reaction="congrats"/><span>{{ reactions.congrats }}</span></span>
|
||||||
<span v-if="reactions.angry"><mk-reaction-icon reaction='angry'/><span>{{ reactions.angry }}</span></span>
|
<span v-if="reactions.angry"><mk-reaction-icon reaction="angry"/><span>{{ reactions.angry }}</span></span>
|
||||||
<span v-if="reactions.confused"><mk-reaction-icon reaction='confused'/><span>{{ reactions.confused }}</span></span>
|
<span v-if="reactions.confused"><mk-reaction-icon reaction="confused"/><span>{{ reactions.confused }}</span></span>
|
||||||
<span v-if="reactions.pudding"><mk-reaction-icon reaction='pudding'/><span>{{ reactions.pudding }}</span></span>
|
<span v-if="reactions.pudding"><mk-reaction-icon reaction="pudding"/><span>{{ reactions.pudding }}</span></span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -27,9 +27,10 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-reactions-viewer
|
root(isDark)
|
||||||
border-top dashed 1px #eee
|
$borderColor = isDark ? #5e6673 : #eee
|
||||||
border-bottom dashed 1px #eee
|
border-top dashed 1px $borderColor
|
||||||
|
border-bottom dashed 1px $borderColor
|
||||||
margin 4px 0
|
margin 4px 0
|
||||||
|
|
||||||
&:empty
|
&:empty
|
||||||
@ -44,6 +45,12 @@ export default Vue.extend({
|
|||||||
> span
|
> span
|
||||||
margin-left 4px
|
margin-left 4px
|
||||||
font-size 1.2em
|
font-size 1.2em
|
||||||
color #444
|
color isDark ? #d1d5dc : #444
|
||||||
|
|
||||||
|
.mk-reactions-viewer[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-reactions-viewer:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -91,7 +91,7 @@ export default Vue.extend({
|
|||||||
width 100%
|
width 100%
|
||||||
line-height 44px
|
line-height 44px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color rgba(0, 0, 0, 0.7)
|
color rgba(#000, 0.7)
|
||||||
background #fff
|
background #fff
|
||||||
outline none
|
outline none
|
||||||
border solid 1px #eee
|
border solid 1px #eee
|
||||||
@ -117,7 +117,7 @@ export default Vue.extend({
|
|||||||
margin -6px 0 0 0
|
margin -6px 0 0 0
|
||||||
width 100%
|
width 100%
|
||||||
font-size 1.2em
|
font-size 1.2em
|
||||||
color rgba(0, 0, 0, 0.5)
|
color rgba(#000, 0.5)
|
||||||
outline none
|
outline none
|
||||||
border none
|
border none
|
||||||
border-radius 0
|
border-radius 0
|
||||||
|
@ -234,13 +234,13 @@ export default Vue.extend({
|
|||||||
color #333 !important
|
color #333 !important
|
||||||
background #fff !important
|
background #fff !important
|
||||||
outline none
|
outline none
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
box-shadow 0 0 0 114514px #fff inset
|
box-shadow 0 0 0 114514px #fff inset
|
||||||
transition all .3s ease
|
transition all .3s ease
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
border-color rgba(0, 0, 0, 0.2)
|
border-color rgba(#000, 0.2)
|
||||||
transition all .1s ease
|
transition all .1s ease
|
||||||
|
|
||||||
&:focus
|
&:focus
|
||||||
|
@ -73,7 +73,7 @@ export default Vue.extend({
|
|||||||
padding 6px 12px
|
padding 6px 12px
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color #fff
|
color #fff
|
||||||
background rgba(0, 0, 0, 0.8)
|
background rgba(#000, 0.8)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
|
||||||
> p
|
> p
|
||||||
|
@ -87,7 +87,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-switch
|
root(isDark)
|
||||||
display flex
|
display flex
|
||||||
margin 12px 0
|
margin 12px 0
|
||||||
cursor pointer
|
cursor pointer
|
||||||
@ -121,11 +121,12 @@ export default Vue.extend({
|
|||||||
&:hover
|
&:hover
|
||||||
> .label
|
> .label
|
||||||
> span
|
> span
|
||||||
color #2e3338
|
color isDark ? #fff : #2e3338
|
||||||
|
|
||||||
> .button
|
> .button
|
||||||
background #ced2da
|
$color = isDark ? #15181d : #ced2da
|
||||||
border-color #ced2da
|
background $color
|
||||||
|
border-color $color
|
||||||
|
|
||||||
> input
|
> input
|
||||||
position absolute
|
position absolute
|
||||||
@ -147,14 +148,16 @@ export default Vue.extend({
|
|||||||
border-radius 14px
|
border-radius 14px
|
||||||
|
|
||||||
> .button
|
> .button
|
||||||
|
$color = isDark ? #1c1f25 : #dcdfe6
|
||||||
|
|
||||||
display inline-block
|
display inline-block
|
||||||
margin 0
|
margin 0
|
||||||
width 40px
|
width 40px
|
||||||
min-width 40px
|
min-width 40px
|
||||||
height 20px
|
height 20px
|
||||||
min-height 20px
|
min-height 20px
|
||||||
background #dcdfe6
|
background $color
|
||||||
border 1px solid #dcdfe6
|
border 1px solid $color
|
||||||
outline none
|
outline none
|
||||||
border-radius 10px
|
border-radius 10px
|
||||||
transition inherit
|
transition inherit
|
||||||
@ -179,12 +182,18 @@ export default Vue.extend({
|
|||||||
> span
|
> span
|
||||||
display block
|
display block
|
||||||
line-height 20px
|
line-height 20px
|
||||||
color #4a535a
|
color isDark ? #c4ccd2 : #4a535a
|
||||||
transition inherit
|
transition inherit
|
||||||
|
|
||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
//font-size 90%
|
//font-size 90%
|
||||||
color #9daab3
|
color isDark ? #78858e : #9daab3
|
||||||
|
|
||||||
|
.mk-switch[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-switch:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -50,8 +50,6 @@ export default Vue.extend({
|
|||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-twitter-setting
|
.mk-twitter-setting
|
||||||
color #4a535a
|
|
||||||
|
|
||||||
.account
|
.account
|
||||||
border solid 1px #e1e8ed
|
border solid 1px #e1e8ed
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<iframe v-if="youtubeId" type="text/html" height="250"
|
<iframe v-if="youtubeId" type="text/html" height="250"
|
||||||
:src="`https://www.youtube.com/embed/${youtubeId}?origin=${misskeyUrl}`"
|
:src="`https://www.youtube.com/embed/${youtubeId}?origin=${misskeyUrl}`"
|
||||||
frameborder="0"/>
|
frameborder="0"/>
|
||||||
<div v-else>
|
<div v-else class="mk-url-preview">
|
||||||
<a class="mk-url-preview" :href="url" target="_blank" :title="url" v-if="!fetching">
|
<a :href="url" target="_blank" :title="url" v-if="!fetching">
|
||||||
<div class="thumbnail" v-if="thumbnail" :style="`background-image: url(${thumbnail})`"></div>
|
<div class="thumbnail" v-if="thumbnail" :style="`background-image: url(${thumbnail})`"></div>
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
@ -65,78 +65,85 @@ export default Vue.extend({
|
|||||||
iframe
|
iframe
|
||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
.mk-url-preview
|
root(isDark)
|
||||||
display block
|
> a
|
||||||
font-size 16px
|
display block
|
||||||
border solid 1px #eee
|
font-size 16px
|
||||||
border-radius 4px
|
border solid 1px isDark ? #191b1f : #eee
|
||||||
overflow hidden
|
border-radius 4px
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
text-decoration none
|
text-decoration none
|
||||||
border-color #ddd
|
border-color isDark ? #4f5561 : #ddd
|
||||||
|
|
||||||
> article > header > h1
|
> article > header > h1
|
||||||
text-decoration underline
|
text-decoration underline
|
||||||
|
|
||||||
> .thumbnail
|
|
||||||
position absolute
|
|
||||||
width 100px
|
|
||||||
height 100%
|
|
||||||
background-position center
|
|
||||||
background-size cover
|
|
||||||
|
|
||||||
& + article
|
|
||||||
left 100px
|
|
||||||
width calc(100% - 100px)
|
|
||||||
|
|
||||||
> article
|
|
||||||
padding 16px
|
|
||||||
|
|
||||||
> header
|
|
||||||
margin-bottom 8px
|
|
||||||
|
|
||||||
> h1
|
|
||||||
margin 0
|
|
||||||
font-size 1em
|
|
||||||
color #555
|
|
||||||
|
|
||||||
> p
|
|
||||||
margin 0
|
|
||||||
color #777
|
|
||||||
font-size 0.8em
|
|
||||||
|
|
||||||
> footer
|
|
||||||
margin-top 8px
|
|
||||||
height 16px
|
|
||||||
|
|
||||||
> img
|
|
||||||
display inline-block
|
|
||||||
width 16px
|
|
||||||
height 16px
|
|
||||||
margin-right 4px
|
|
||||||
vertical-align top
|
|
||||||
|
|
||||||
> p
|
|
||||||
display inline-block
|
|
||||||
margin 0
|
|
||||||
color #666
|
|
||||||
font-size 0.8em
|
|
||||||
line-height 16px
|
|
||||||
vertical-align top
|
|
||||||
|
|
||||||
@media (max-width 500px)
|
|
||||||
font-size 8px
|
|
||||||
border none
|
|
||||||
|
|
||||||
> .thumbnail
|
> .thumbnail
|
||||||
width 70px
|
position absolute
|
||||||
|
width 100px
|
||||||
|
height 100%
|
||||||
|
background-position center
|
||||||
|
background-size cover
|
||||||
|
|
||||||
& + article
|
& + article
|
||||||
left 70px
|
left 100px
|
||||||
width calc(100% - 70px)
|
width calc(100% - 100px)
|
||||||
|
|
||||||
> article
|
> article
|
||||||
padding 8px
|
padding 16px
|
||||||
|
|
||||||
|
> header
|
||||||
|
margin-bottom 8px
|
||||||
|
|
||||||
|
> h1
|
||||||
|
margin 0
|
||||||
|
font-size 1em
|
||||||
|
color isDark ? #d6dae0 : #555
|
||||||
|
|
||||||
|
> p
|
||||||
|
margin 0
|
||||||
|
color isDark ? #a4aab3 : #777
|
||||||
|
font-size 0.8em
|
||||||
|
|
||||||
|
> footer
|
||||||
|
margin-top 8px
|
||||||
|
height 16px
|
||||||
|
|
||||||
|
> img
|
||||||
|
display inline-block
|
||||||
|
width 16px
|
||||||
|
height 16px
|
||||||
|
margin-right 4px
|
||||||
|
vertical-align top
|
||||||
|
|
||||||
|
> p
|
||||||
|
display inline-block
|
||||||
|
margin 0
|
||||||
|
color isDark ? #b0b4bf : #666
|
||||||
|
font-size 0.8em
|
||||||
|
line-height 16px
|
||||||
|
vertical-align top
|
||||||
|
|
||||||
|
@media (max-width 500px)
|
||||||
|
font-size 8px
|
||||||
|
border none
|
||||||
|
|
||||||
|
> .thumbnail
|
||||||
|
width 70px
|
||||||
|
|
||||||
|
& + article
|
||||||
|
left 70px
|
||||||
|
width calc(100% - 70px)
|
||||||
|
|
||||||
|
> article
|
||||||
|
padding 8px
|
||||||
|
|
||||||
|
.mk-url-preview[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-url-preview:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
223
src/client/app/common/views/components/visibility-chooser.vue
Normal file
223
src/client/app/common/views/components/visibility-chooser.vue
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mk-visibility-chooser">
|
||||||
|
<div class="backdrop" ref="backdrop" @click="close"></div>
|
||||||
|
<div class="popover" :class="{ compact }" ref="popover">
|
||||||
|
<div @click="choose('public')" :class="{ active: v == 'public' }">
|
||||||
|
<div>%fa:globe%</div>
|
||||||
|
<div>
|
||||||
|
<span>公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('home')" :class="{ active: v == 'home' }">
|
||||||
|
<div>%fa:home%</div>
|
||||||
|
<div>
|
||||||
|
<span>ホーム</span>
|
||||||
|
<span>ホームタイムラインにのみ公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('followers')" :class="{ active: v == 'followers' }">
|
||||||
|
<div>%fa:unlock%</div>
|
||||||
|
<div>
|
||||||
|
<span>フォロワー</span>
|
||||||
|
<span>自分のフォロワーにのみ公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('specified')" :class="{ active: v == 'specified' }">
|
||||||
|
<div>%fa:envelope%</div>
|
||||||
|
<div>
|
||||||
|
<span>ダイレクト</span>
|
||||||
|
<span>指定したユーザーにのみ公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div @click="choose('private')" :class="{ active: v == 'private' }">
|
||||||
|
<div>%fa:lock%</div>
|
||||||
|
<div>
|
||||||
|
<span>非公開</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
import * as anime from 'animejs';
|
||||||
|
|
||||||
|
export default Vue.extend({
|
||||||
|
props: ['source', 'compact', 'v'],
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const popover = this.$refs.popover as any;
|
||||||
|
|
||||||
|
const rect = this.source.getBoundingClientRect();
|
||||||
|
const width = popover.offsetWidth;
|
||||||
|
const height = popover.offsetHeight;
|
||||||
|
|
||||||
|
let left;
|
||||||
|
let top;
|
||||||
|
|
||||||
|
if (this.compact) {
|
||||||
|
const x = rect.left + window.pageXOffset + (this.source.offsetWidth / 2);
|
||||||
|
const y = rect.top + window.pageYOffset + (this.source.offsetHeight / 2);
|
||||||
|
left = (x - (width / 2));
|
||||||
|
top = (y - (height / 2));
|
||||||
|
} else {
|
||||||
|
const x = rect.left + window.pageXOffset + (this.source.offsetWidth / 2);
|
||||||
|
const y = rect.top + window.pageYOffset + this.source.offsetHeight;
|
||||||
|
left = (x - (width / 2));
|
||||||
|
top = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (left + width > window.innerWidth) {
|
||||||
|
left = window.innerWidth - width;
|
||||||
|
}
|
||||||
|
|
||||||
|
popover.style.left = left + 'px';
|
||||||
|
popover.style.top = top + 'px';
|
||||||
|
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.backdrop,
|
||||||
|
opacity: 1,
|
||||||
|
duration: 100,
|
||||||
|
easing: 'linear'
|
||||||
|
});
|
||||||
|
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.popover,
|
||||||
|
opacity: 1,
|
||||||
|
scale: [0.5, 1],
|
||||||
|
duration: 500
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
choose(visibility) {
|
||||||
|
this.$emit('chosen', visibility);
|
||||||
|
this.$destroy();
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
(this.$refs.backdrop as any).style.pointerEvents = 'none';
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.backdrop,
|
||||||
|
opacity: 0,
|
||||||
|
duration: 200,
|
||||||
|
easing: 'linear'
|
||||||
|
});
|
||||||
|
|
||||||
|
(this.$refs.popover as any).style.pointerEvents = 'none';
|
||||||
|
anime({
|
||||||
|
targets: this.$refs.popover,
|
||||||
|
opacity: 0,
|
||||||
|
scale: 0.5,
|
||||||
|
duration: 200,
|
||||||
|
easing: 'easeInBack',
|
||||||
|
complete: () => this.$destroy()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '~const.styl'
|
||||||
|
|
||||||
|
$border-color = rgba(27, 31, 35, 0.15)
|
||||||
|
|
||||||
|
root(isDark)
|
||||||
|
position initial
|
||||||
|
|
||||||
|
> .backdrop
|
||||||
|
position fixed
|
||||||
|
top 0
|
||||||
|
left 0
|
||||||
|
z-index 10000
|
||||||
|
width 100%
|
||||||
|
height 100%
|
||||||
|
background isDark ? rgba(#000, 0.4) : rgba(#000, 0.1)
|
||||||
|
opacity 0
|
||||||
|
|
||||||
|
> .popover
|
||||||
|
$bgcolor = isDark ? #2c303c : #fff
|
||||||
|
position absolute
|
||||||
|
z-index 10001
|
||||||
|
width 240px
|
||||||
|
padding 8px 0
|
||||||
|
background $bgcolor
|
||||||
|
border 1px solid $border-color
|
||||||
|
border-radius 4px
|
||||||
|
box-shadow 0 3px 12px rgba(27, 31, 35, 0.15)
|
||||||
|
transform scale(0.5)
|
||||||
|
opacity 0
|
||||||
|
|
||||||
|
$balloon-size = 10px
|
||||||
|
|
||||||
|
&:not(.compact)
|
||||||
|
margin-top $balloon-size
|
||||||
|
transform-origin center -($balloon-size)
|
||||||
|
|
||||||
|
&:before
|
||||||
|
content ""
|
||||||
|
display block
|
||||||
|
position absolute
|
||||||
|
top -($balloon-size * 2)
|
||||||
|
left s('calc(50% - %s)', $balloon-size)
|
||||||
|
border-top solid $balloon-size transparent
|
||||||
|
border-left solid $balloon-size transparent
|
||||||
|
border-right solid $balloon-size transparent
|
||||||
|
border-bottom solid $balloon-size $border-color
|
||||||
|
|
||||||
|
&:after
|
||||||
|
content ""
|
||||||
|
display block
|
||||||
|
position absolute
|
||||||
|
top -($balloon-size * 2) + 1.5px
|
||||||
|
left s('calc(50% - %s)', $balloon-size)
|
||||||
|
border-top solid $balloon-size transparent
|
||||||
|
border-left solid $balloon-size transparent
|
||||||
|
border-right solid $balloon-size transparent
|
||||||
|
border-bottom solid $balloon-size $bgcolor
|
||||||
|
|
||||||
|
> div
|
||||||
|
display flex
|
||||||
|
padding 8px 14px
|
||||||
|
font-size 12px
|
||||||
|
color isDark ? #fff : #666
|
||||||
|
cursor pointer
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background isDark ? #252731 : #eee
|
||||||
|
|
||||||
|
&:active
|
||||||
|
background isDark ? #21242b : #ddd
|
||||||
|
|
||||||
|
&.active
|
||||||
|
color $theme-color-foreground
|
||||||
|
background $theme-color
|
||||||
|
|
||||||
|
> *
|
||||||
|
user-select none
|
||||||
|
pointer-events none
|
||||||
|
|
||||||
|
> *:first-child
|
||||||
|
display flex
|
||||||
|
justify-content center
|
||||||
|
align-items center
|
||||||
|
margin-right 10px
|
||||||
|
|
||||||
|
> *:last-child
|
||||||
|
flex 1 1 auto
|
||||||
|
|
||||||
|
> span:first-child
|
||||||
|
display block
|
||||||
|
font-weight bold
|
||||||
|
|
||||||
|
> span:last-child:not(:first-child)
|
||||||
|
opacity 0.6
|
||||||
|
|
||||||
|
.mk-visibility-chooser[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-visibility-chooser:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
|
</style>
|
@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-welcome-timeline">
|
<div class="mk-welcome-timeline">
|
||||||
<div v-for="note in notes">
|
<div v-for="note in notes">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.user.id">
|
<mk-avatar class="avatar" :user="note.user" target="_blank"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
|
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
|
||||||
@ -62,25 +60,22 @@ export default Vue.extend({
|
|||||||
overflow-wrap break-word
|
overflow-wrap break-word
|
||||||
font-size .9em
|
font-size .9em
|
||||||
color #4C4C4C
|
color #4C4C4C
|
||||||
border-bottom 1px solid rgba(0, 0, 0, 0.05)
|
border-bottom 1px solid rgba(#000, 0.05)
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
position -webkit-sticky
|
position -webkit-sticky
|
||||||
position sticky
|
position sticky
|
||||||
top 16px
|
top 16px
|
||||||
|
width 42px
|
||||||
> img
|
height 42px
|
||||||
display block
|
border-radius 6px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float right
|
float right
|
||||||
|
@ -61,6 +61,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -78,7 +79,7 @@ export default define({
|
|||||||
color #555
|
color #555
|
||||||
|
|
||||||
&:nth-child(odd)
|
&:nth-child(odd)
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
> b
|
> b
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
@ -68,6 +68,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -73,6 +73,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
tick() {
|
tick() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
@ -109,11 +110,11 @@ export default define({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mkw-calendar
|
root(isDark)
|
||||||
padding 16px 0
|
padding 16px 0
|
||||||
color #777
|
color isDark ? #c5ced6 :#777
|
||||||
background #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-special='on-new-years-day']
|
&[data-special='on-new-years-day']
|
||||||
@ -126,7 +127,7 @@ export default define({
|
|||||||
&[data-mobile]
|
&[data-mobile]
|
||||||
border none
|
border none
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
@ -171,7 +172,7 @@ export default define({
|
|||||||
margin 0 0 2px 0
|
margin 0 0 2px 0
|
||||||
font-size 12px
|
font-size 12px
|
||||||
line-height 18px
|
line-height 18px
|
||||||
color #888
|
color isDark ? #7a8692 : #888
|
||||||
|
|
||||||
> b
|
> b
|
||||||
margin-left 2px
|
margin-left 2px
|
||||||
@ -179,7 +180,7 @@ export default define({
|
|||||||
> .meter
|
> .meter
|
||||||
width 100%
|
width 100%
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #eee
|
background isDark ? #1c1f25 : #eee
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
|
||||||
> .val
|
> .val
|
||||||
@ -198,4 +199,10 @@ export default define({
|
|||||||
> .meter > .val
|
> .meter > .val
|
||||||
background #41ddde
|
background #41ddde
|
||||||
|
|
||||||
|
.mkw-calendar[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-calendar:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -19,9 +19,9 @@ export default define({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mkw-donation
|
root(isDark)
|
||||||
background #fff
|
background isDark ? #282c37 : #fff
|
||||||
border solid 1px #ead8bb
|
border solid 1px isDark ? #c3831c : #ead8bb
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> article
|
> article
|
||||||
@ -30,7 +30,7 @@ export default define({
|
|||||||
> h1
|
> h1
|
||||||
margin 0 0 5px 0
|
margin 0 0 5px 0
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #888
|
color isDark ? #b2bac1 : #888
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 0.25em
|
margin-right 0.25em
|
||||||
@ -40,13 +40,13 @@ export default define({
|
|||||||
z-index 1
|
z-index 1
|
||||||
margin 0
|
margin 0
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
color #999
|
color isDark ? #a1a6ab : #999
|
||||||
|
|
||||||
&[data-mobile]
|
&[data-mobile]
|
||||||
border none
|
border none
|
||||||
background #ead8bb
|
background #ead8bb
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
> article
|
> article
|
||||||
> h1
|
> h1
|
||||||
@ -55,4 +55,10 @@ export default define({
|
|||||||
> p
|
> p
|
||||||
color #777d71
|
color #777d71
|
||||||
|
|
||||||
|
.mkw-donation[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-donation:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mkw-nav">
|
<div class="mkw-nav">
|
||||||
<mk-widget-container>
|
<mk-widget-container>
|
||||||
<div :class="$style.body">
|
<div class="mkw-nav--body">
|
||||||
<mk-nav/>
|
<mk-nav/>
|
||||||
</div>
|
</div>
|
||||||
</mk-widget-container>
|
</mk-widget-container>
|
||||||
@ -15,17 +15,24 @@ export default define({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
<style lang="stylus" scoped>
|
||||||
.body
|
root(isDark)
|
||||||
padding 16px
|
.mkw-nav--body
|
||||||
font-size 12px
|
padding 16px
|
||||||
color #aaa
|
font-size 12px
|
||||||
background #fff
|
color isDark ? #9aa4b3 : #aaa
|
||||||
|
background isDark ? #282c37 : #fff
|
||||||
|
|
||||||
a
|
a
|
||||||
color #999
|
color isDark ? #9aa4b3 : #999
|
||||||
|
|
||||||
i
|
i
|
||||||
color #ccc
|
color isDark ? #9aa4b3 : #ccc
|
||||||
|
|
||||||
|
.mkw-nav[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-nav:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -59,6 +59,8 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
<template slot="header">%fa:rss-square%RSS</template>
|
<template slot="header">%fa:rss-square%RSS</template>
|
||||||
<button slot="func" title="設定" @click="setting">%fa:cog%</button>
|
<button slot="func" title="設定" @click="setting">%fa:cog%</button>
|
||||||
|
|
||||||
<p :class="$style.fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
<div class="mkw-rss--body">
|
||||||
<div :class="$style.feed" v-else>
|
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||||
<a v-for="item in items" :href="item.link" target="_blank">{{ item.title }}</a>
|
<div class="feed" v-else>
|
||||||
|
<a v-for="item in items" :href="item.link" target="_blank">{{ item.title }}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mk-widget-container>
|
</mk-widget-container>
|
||||||
</div>
|
</div>
|
||||||
@ -38,6 +40,7 @@ export default define({
|
|||||||
methods: {
|
methods: {
|
||||||
func() {
|
func() {
|
||||||
this.props.compact = !this.props.compact;
|
this.props.compact = !this.props.compact;
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
fetch() {
|
fetch() {
|
||||||
fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`, {
|
fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`, {
|
||||||
@ -56,38 +59,46 @@ export default define({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
<style lang="stylus" scoped>
|
||||||
.feed
|
root(isDark)
|
||||||
padding 12px 16px
|
.mkw-rss--body
|
||||||
font-size 0.9em
|
.feed
|
||||||
|
padding 12px 16px
|
||||||
|
font-size 0.9em
|
||||||
|
|
||||||
> a
|
> a
|
||||||
display block
|
display block
|
||||||
padding 4px 0
|
padding 4px 0
|
||||||
color #666
|
color isDark ? #9aa4b3 : #666
|
||||||
border-bottom dashed 1px #eee
|
border-bottom dashed 1px isDark ? #1c2023 : #eee
|
||||||
|
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom none
|
border-bottom none
|
||||||
|
|
||||||
.fetching
|
.fetching
|
||||||
margin 0
|
margin 0
|
||||||
padding 16px
|
padding 16px
|
||||||
text-align center
|
text-align center
|
||||||
color #aaa
|
color #aaa
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
|
|
||||||
&[data-mobile]
|
&[data-mobile]
|
||||||
.feed
|
.feed
|
||||||
padding 0
|
padding 0
|
||||||
font-size 1em
|
font-size 1em
|
||||||
|
|
||||||
> a
|
> a
|
||||||
padding 8px 16px
|
padding 8px 16px
|
||||||
|
|
||||||
&:nth-child(even)
|
&:nth-child(even)
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
|
.mkw-rss[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mkw-rss:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -100,7 +100,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.cpu-memory
|
root(isDark)
|
||||||
> svg
|
> svg
|
||||||
display block
|
display block
|
||||||
padding 10px
|
padding 10px
|
||||||
@ -115,7 +115,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
> text
|
> text
|
||||||
font-size 5px
|
font-size 5px
|
||||||
fill rgba(0, 0, 0, 0.55)
|
fill isDark ? rgba(#fff, 0.55) : rgba(#000, 0.55)
|
||||||
|
|
||||||
> tspan
|
> tspan
|
||||||
opacity 0.5
|
opacity 0.5
|
||||||
@ -124,4 +124,11 @@ export default Vue.extend({
|
|||||||
content ""
|
content ""
|
||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
|
.cpu-memory[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.cpu-memory:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -38,7 +38,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.cpu
|
root(isDark)
|
||||||
> .pie
|
> .pie
|
||||||
padding 10px
|
padding 10px
|
||||||
height 100px
|
height 100px
|
||||||
@ -52,7 +52,7 @@ export default Vue.extend({
|
|||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
font-size 12px
|
font-size 12px
|
||||||
color #505050
|
color isDark ? #a8b4bd : #505050
|
||||||
|
|
||||||
&:first-child
|
&:first-child
|
||||||
font-weight bold
|
font-weight bold
|
||||||
@ -65,4 +65,10 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
|
.cpu[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.cpu:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -46,7 +46,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.disk
|
root(isDark)
|
||||||
> .pie
|
> .pie
|
||||||
padding 10px
|
padding 10px
|
||||||
height 100px
|
height 100px
|
||||||
@ -60,7 +60,7 @@ export default Vue.extend({
|
|||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
font-size 12px
|
font-size 12px
|
||||||
color #505050
|
color isDark ? #a8b4bd : #505050
|
||||||
|
|
||||||
&:first-child
|
&:first-child
|
||||||
font-weight bold
|
font-weight bold
|
||||||
@ -73,4 +73,10 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
|
.disk[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.disk:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -46,7 +46,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.memory
|
root(isDark)
|
||||||
> .pie
|
> .pie
|
||||||
padding 10px
|
padding 10px
|
||||||
height 100px
|
height 100px
|
||||||
@ -60,7 +60,7 @@ export default Vue.extend({
|
|||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
font-size 12px
|
font-size 12px
|
||||||
color #505050
|
color isDark ? #a8b4bd : #505050
|
||||||
|
|
||||||
&:first-child
|
&:first-child
|
||||||
font-weight bold
|
font-weight bold
|
||||||
@ -73,4 +73,10 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
|
.memory[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.memory:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -45,7 +45,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
svg
|
root(isDark)
|
||||||
display block
|
display block
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
@ -56,6 +56,12 @@ svg
|
|||||||
|
|
||||||
> text
|
> text
|
||||||
font-size 0.15px
|
font-size 0.15px
|
||||||
fill rgba(0, 0, 0, 0.6)
|
fill isDark ? rgba(#fff, 0.6) : rgba(#000, 0.6)
|
||||||
|
|
||||||
|
svg[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
svg:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -68,6 +68,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.view++;
|
this.props.view++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
},
|
},
|
||||||
func() {
|
func() {
|
||||||
if (this.props.design == 2) {
|
if (this.props.design == 2) {
|
||||||
@ -75,6 +76,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.design++;
|
this.props.design++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -64,6 +64,7 @@ export default define({
|
|||||||
} else {
|
} else {
|
||||||
this.props.size++;
|
this.props.size++;
|
||||||
}
|
}
|
||||||
|
this.save();
|
||||||
|
|
||||||
this.applySize();
|
this.applySize();
|
||||||
},
|
},
|
||||||
@ -111,6 +112,7 @@ export default define({
|
|||||||
choose() {
|
choose() {
|
||||||
(this as any).apis.chooseDriveFolder().then(folder => {
|
(this as any).apis.chooseDriveFolder().then(folder => {
|
||||||
this.props.folder = folder ? folder.id : null;
|
this.props.folder = folder ? folder.id : null;
|
||||||
|
this.save();
|
||||||
this.fetch();
|
this.fetch();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -122,13 +124,13 @@ export default define({
|
|||||||
.mkw-slideshow
|
.mkw-slideshow
|
||||||
overflow hidden
|
overflow hidden
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-mobile]
|
&[data-mobile]
|
||||||
border none
|
border none
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
box-shadow 0 0 0 1px rgba(0, 0, 0, 0.2)
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
||||||
|
|
||||||
> div
|
> div
|
||||||
width 100%
|
width 100%
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import OS from '../../common/mios';
|
import OS from '../../mios';
|
||||||
import { apiUrl } from '../../config';
|
import { apiUrl } from '../../config';
|
||||||
import CropWindow from '../views/components/crop-window.vue';
|
import CropWindow from '../views/components/crop-window.vue';
|
||||||
import ProgressDialog from '../views/components/progress-dialog.vue';
|
import ProgressDialog from '../views/components/progress-dialog.vue';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import OS from '../../common/mios';
|
import OS from '../../mios';
|
||||||
import { apiUrl } from '../../config';
|
import { apiUrl } from '../../config';
|
||||||
import CropWindow from '../views/components/crop-window.vue';
|
import CropWindow from '../views/components/crop-window.vue';
|
||||||
import ProgressDialog from '../views/components/progress-dialog.vue';
|
import ProgressDialog from '../views/components/progress-dialog.vue';
|
||||||
@ -95,7 +95,7 @@ export default (os: OS) => {
|
|||||||
multiple: false,
|
multiple: false,
|
||||||
title: '%fa:image%バナーにする画像を選択'
|
title: '%fa:image%バナーにする画像を選択'
|
||||||
});
|
});
|
||||||
|
|
||||||
return selectedFile
|
return selectedFile
|
||||||
.then(cropImage)
|
.then(cropImage)
|
||||||
.then(setBanner)
|
.then(setBanner)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
* Desktop Client
|
* Desktop Client
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import Vue from 'vue';
|
||||||
import VueRouter from 'vue-router';
|
import VueRouter from 'vue-router';
|
||||||
|
|
||||||
// Style
|
// Style
|
||||||
@ -24,8 +25,10 @@ import updateBanner from './api/update-banner';
|
|||||||
|
|
||||||
import MkIndex from './views/pages/index.vue';
|
import MkIndex from './views/pages/index.vue';
|
||||||
import MkUser from './views/pages/user/user.vue';
|
import MkUser from './views/pages/user/user.vue';
|
||||||
|
import MkFavorites from './views/pages/favorites.vue';
|
||||||
import MkSelectDrive from './views/pages/selectdrive.vue';
|
import MkSelectDrive from './views/pages/selectdrive.vue';
|
||||||
import MkDrive from './views/pages/drive.vue';
|
import MkDrive from './views/pages/drive.vue';
|
||||||
|
import MkUserList from './views/pages/user-list.vue';
|
||||||
import MkHomeCustomize from './views/pages/home-customize.vue';
|
import MkHomeCustomize from './views/pages/home-customize.vue';
|
||||||
import MkMessagingRoom from './views/pages/messaging-room.vue';
|
import MkMessagingRoom from './views/pages/messaging-room.vue';
|
||||||
import MkNote from './views/pages/note.vue';
|
import MkNote from './views/pages/note.vue';
|
||||||
@ -49,9 +52,11 @@ init(async (launch) => {
|
|||||||
routes: [
|
routes: [
|
||||||
{ path: '/', name: 'index', component: MkIndex },
|
{ path: '/', name: 'index', component: MkIndex },
|
||||||
{ path: '/i/customize-home', component: MkHomeCustomize },
|
{ path: '/i/customize-home', component: MkHomeCustomize },
|
||||||
|
{ path: '/i/favorites', component: MkFavorites },
|
||||||
{ path: '/i/messaging/:user', component: MkMessagingRoom },
|
{ path: '/i/messaging/:user', component: MkMessagingRoom },
|
||||||
{ path: '/i/drive', component: MkDrive },
|
{ path: '/i/drive', component: MkDrive },
|
||||||
{ path: '/i/drive/folder/:folder', component: MkDrive },
|
{ path: '/i/drive/folder/:folder', component: MkDrive },
|
||||||
|
{ path: '/i/lists/:list', component: MkUserList },
|
||||||
{ path: '/selectdrive', component: MkSelectDrive },
|
{ path: '/selectdrive', component: MkSelectDrive },
|
||||||
{ path: '/search', component: MkSearch },
|
{ path: '/search', component: MkSearch },
|
||||||
{ path: '/othello', component: MkOthello },
|
{ path: '/othello', component: MkOthello },
|
||||||
|
@ -44,6 +44,26 @@ html
|
|||||||
height 100%
|
height 100%
|
||||||
background #f7f7f7
|
background #f7f7f7
|
||||||
|
|
||||||
|
&[data-darkmode]
|
||||||
|
background #191B22
|
||||||
|
|
||||||
|
&, *
|
||||||
|
&::-webkit-scrollbar-track
|
||||||
|
background-color #282C37
|
||||||
|
|
||||||
|
&::-webkit-scrollbar
|
||||||
|
width 6px
|
||||||
|
height 6px
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
background-color #454954
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color #535660
|
||||||
|
|
||||||
|
&:active
|
||||||
|
background-color $theme-color
|
||||||
|
|
||||||
body
|
body
|
||||||
display flex
|
display flex
|
||||||
flex-direction column
|
flex-direction column
|
||||||
|
@ -123,3 +123,59 @@ textarea.ui
|
|||||||
font-size 90%
|
font-size 90%
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color rgba(#373a3c, 0.9)
|
color rgba(#373a3c, 0.9)
|
||||||
|
|
||||||
|
html[data-darkmode]
|
||||||
|
button.ui
|
||||||
|
.button.ui
|
||||||
|
color #fff
|
||||||
|
background linear-gradient(to bottom, #313543 0%, #282c37 100%)
|
||||||
|
border-color #1c2023
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background linear-gradient(to bottom, #2c2f3c 0%, #22262f 100%)
|
||||||
|
border-color #151a1d
|
||||||
|
|
||||||
|
&:active
|
||||||
|
background #22262f
|
||||||
|
border-color #151a1d
|
||||||
|
|
||||||
|
&.primary
|
||||||
|
color $theme-color-foreground
|
||||||
|
background linear-gradient(to bottom, lighten($theme-color, 25%) 0%, lighten($theme-color, 10%) 100%)
|
||||||
|
border solid 1px lighten($theme-color, 15%)
|
||||||
|
|
||||||
|
&:hover:not(:disabled)
|
||||||
|
background linear-gradient(to bottom, lighten($theme-color, 8%) 0%, darken($theme-color, 8%) 100%)
|
||||||
|
border-color $theme-color
|
||||||
|
|
||||||
|
&:active:not(:disabled)
|
||||||
|
background $theme-color
|
||||||
|
border-color $theme-color
|
||||||
|
|
||||||
|
input:not([type]).ui
|
||||||
|
input[type='text'].ui
|
||||||
|
input[type='password'].ui
|
||||||
|
input[type='email'].ui
|
||||||
|
input[type='date'].ui
|
||||||
|
input[type='number'].ui
|
||||||
|
textarea.ui
|
||||||
|
display block
|
||||||
|
padding 10px
|
||||||
|
width 100%
|
||||||
|
height 40px
|
||||||
|
font-family sans-serif
|
||||||
|
font-size 16px
|
||||||
|
color #dee4e8
|
||||||
|
background #191b22
|
||||||
|
border solid 1px #495156
|
||||||
|
border-radius 4px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
border-color #b0b0b0
|
||||||
|
|
||||||
|
&:focus
|
||||||
|
border-color $theme-color
|
||||||
|
|
||||||
|
.ui.from.group
|
||||||
|
> p:first-child
|
||||||
|
color #c0c7cc
|
||||||
|
@ -61,6 +61,6 @@ svg
|
|||||||
|
|
||||||
&.day
|
&.day
|
||||||
&:hover
|
&:hover
|
||||||
fill rgba(0, 0, 0, 0.05)
|
fill rgba(#000, 0.05)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-activity" :data-melt="design == 2">
|
<div class="mk-activity">
|
||||||
<template v-if="design == 0">
|
<mk-widget-container :show-header="design == 0" :naked="design == 2">
|
||||||
<p class="title">%fa:chart-bar%%i18n:@title%</p>
|
<template slot="header">%fa:chart-bar%%i18n:@title%</template>
|
||||||
<button @click="toggle" title="%i18n:@toggle%">%fa:sort%</button>
|
<button slot="func" title="%i18n:@toggle%" @click="toggle">%fa:sort%</button>
|
||||||
</template>
|
|
||||||
<p class="fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
<p :class="$style.fetching" v-if="fetching">%fa:spinner .pulse .fw%%i18n:common.loading%<mk-ellipsis/></p>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<x-calendar v-show="view == 0" :data="[].concat(activity)"/>
|
<x-calendar v-show="view == 0" :data="[].concat(activity)"/>
|
||||||
<x-chart v-show="view == 1" :data="[].concat(activity)"/>
|
<x-chart v-show="view == 1" :data="[].concat(activity)"/>
|
||||||
</template>
|
</template>
|
||||||
|
</mk-widget-container>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -64,53 +65,14 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" module>
|
||||||
.mk-activity
|
.fetching
|
||||||
background #fff
|
margin 0
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
padding 16px
|
||||||
border-radius 6px
|
text-align center
|
||||||
|
color #aaa
|
||||||
|
|
||||||
&[data-melt]
|
> [data-fa]
|
||||||
background transparent !important
|
margin-right 4px
|
||||||
border none !important
|
|
||||||
|
|
||||||
> .title
|
|
||||||
z-index 1
|
|
||||||
margin 0
|
|
||||||
padding 0 16px
|
|
||||||
line-height 42px
|
|
||||||
font-size 0.9em
|
|
||||||
font-weight bold
|
|
||||||
color #888
|
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
|
||||||
|
|
||||||
> [data-fa]
|
|
||||||
margin-right 4px
|
|
||||||
|
|
||||||
> button
|
|
||||||
position absolute
|
|
||||||
z-index 2
|
|
||||||
top 0
|
|
||||||
right 0
|
|
||||||
padding 0
|
|
||||||
width 42px
|
|
||||||
font-size 0.9em
|
|
||||||
line-height 42px
|
|
||||||
color #ccc
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
color #aaa
|
|
||||||
|
|
||||||
&:active
|
|
||||||
color #999
|
|
||||||
|
|
||||||
> .fetching
|
|
||||||
margin 0
|
|
||||||
padding 16px
|
|
||||||
text-align center
|
|
||||||
color #aaa
|
|
||||||
|
|
||||||
> [data-fa]
|
|
||||||
margin-right 4px
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -133,10 +133,10 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-calendar
|
root(isDark)
|
||||||
color #777
|
color isDark ? #c5ced6 : #777
|
||||||
background #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&[data-melt]
|
&[data-melt]
|
||||||
@ -152,7 +152,7 @@ export default Vue.extend({
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-weight bold
|
font-weight bold
|
||||||
color #888
|
color #888
|
||||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
box-shadow 0 1px rgba(#000, 0.07)
|
||||||
|
|
||||||
> [data-fa]
|
> [data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -214,10 +214,10 @@ export default Vue.extend({
|
|||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
&:hover > div
|
&:hover > div
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
&:active > div
|
&:active > div
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&[data-is-donichi]
|
&[data-is-donichi]
|
||||||
color #ef95a0
|
color #ef95a0
|
||||||
@ -233,10 +233,10 @@ export default Vue.extend({
|
|||||||
font-weight bold
|
font-weight bold
|
||||||
|
|
||||||
> div
|
> div
|
||||||
background rgba(0, 0, 0, 0.025)
|
background rgba(#000, 0.025)
|
||||||
|
|
||||||
&:active > div
|
&:active > div
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
&[data-today]
|
&[data-today]
|
||||||
> div
|
> div
|
||||||
@ -249,4 +249,10 @@ export default Vue.extend({
|
|||||||
&:active > div
|
&:active > div
|
||||||
background darken($theme-color, 10%)
|
background darken($theme-color, 10%)
|
||||||
|
|
||||||
|
.mk-calendar[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-calendar:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -31,7 +31,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.menu
|
root(isDark)
|
||||||
$width = 240px
|
$width = 240px
|
||||||
$item-height = 38px
|
$item-height = 38px
|
||||||
$padding = 10px
|
$padding = 10px
|
||||||
@ -46,7 +46,7 @@ export default Vue.extend({
|
|||||||
&.divider
|
&.divider
|
||||||
margin-top $padding
|
margin-top $padding
|
||||||
padding-top $padding
|
padding-top $padding
|
||||||
border-top solid 1px #eee
|
border-top solid 1px isDark ? #1c2023 : #eee
|
||||||
|
|
||||||
&.nest
|
&.nest
|
||||||
> p
|
> p
|
||||||
@ -75,7 +75,7 @@ export default Vue.extend({
|
|||||||
margin 0
|
margin 0
|
||||||
padding 0 32px 0 38px
|
padding 0 32px 0 38px
|
||||||
line-height $item-height
|
line-height $item-height
|
||||||
color #868C8C
|
color isDark ? #c8cece : #868C8C
|
||||||
text-decoration none
|
text-decoration none
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
@ -104,11 +104,17 @@ export default Vue.extend({
|
|||||||
left $width
|
left $width
|
||||||
margin-top -($padding)
|
margin-top -($padding)
|
||||||
width $width
|
width $width
|
||||||
background #fff
|
background isDark ? #282c37 :#fff
|
||||||
border-radius 0 4px 4px 4px
|
border-radius 0 4px 4px 4px
|
||||||
box-shadow 2px 2px 8px rgba(0, 0, 0, 0.2)
|
box-shadow 2px 2px 8px rgba(#000, 0.2)
|
||||||
transition visibility 0s linear 0.2s
|
transition visibility 0s linear 0.2s
|
||||||
|
|
||||||
|
.menu[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.menu:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
<style lang="stylus" module>
|
||||||
|
@ -54,7 +54,7 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.context-menu
|
root(isDark)
|
||||||
$width = 240px
|
$width = 240px
|
||||||
$item-height = 38px
|
$item-height = 38px
|
||||||
$padding = 10px
|
$padding = 10px
|
||||||
@ -66,9 +66,15 @@ export default Vue.extend({
|
|||||||
z-index 4096
|
z-index 4096
|
||||||
width $width
|
width $width
|
||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
background #fff
|
background isDark ? #282c37 : #fff
|
||||||
border-radius 0 4px 4px 4px
|
border-radius 0 4px 4px 4px
|
||||||
box-shadow 2px 2px 8px rgba(0, 0, 0, 0.2)
|
box-shadow 2px 2px 8px rgba(#000, 0.2)
|
||||||
opacity 0
|
opacity 0
|
||||||
|
|
||||||
|
.context-menu[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.context-menu:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -102,7 +102,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
opacity 0
|
opacity 0
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.root.file
|
root(isDark)
|
||||||
padding 8px 0 0 0
|
padding 8px 0 0 0
|
||||||
height 180px
|
height 180px
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
@ -195,7 +195,7 @@ export default Vue.extend({
|
|||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background rgba(0, 0, 0, 0.05)
|
background rgba(#000, 0.05)
|
||||||
|
|
||||||
> .label
|
> .label
|
||||||
&:before
|
&:before
|
||||||
@ -203,7 +203,7 @@ export default Vue.extend({
|
|||||||
background #0b65a5
|
background #0b65a5
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background rgba(0, 0, 0, 0.1)
|
background rgba(#000, 0.1)
|
||||||
|
|
||||||
> .label
|
> .label
|
||||||
&:before
|
&:before
|
||||||
@ -308,10 +308,16 @@ export default Vue.extend({
|
|||||||
font-size 0.8em
|
font-size 0.8em
|
||||||
text-align center
|
text-align center
|
||||||
word-break break-all
|
word-break break-all
|
||||||
color #444
|
color isDark ? #fff : #444
|
||||||
overflow hidden
|
overflow hidden
|
||||||
|
|
||||||
> .ext
|
> .ext
|
||||||
opacity 0.5
|
opacity 0.5
|
||||||
|
|
||||||
|
.root.file[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.root.file:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -577,7 +577,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-drive
|
root(isDark)
|
||||||
|
|
||||||
> nav
|
> nav
|
||||||
display block
|
display block
|
||||||
@ -585,10 +585,9 @@ export default Vue.extend({
|
|||||||
width 100%
|
width 100%
|
||||||
overflow auto
|
overflow auto
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color #555
|
color isDark ? #d2d9dc : #555
|
||||||
background #fff
|
background isDark ? #282c37 : #fff
|
||||||
//border-bottom 1px solid #dfdfdf
|
box-shadow 0 1px 0 rgba(#000, 0.05)
|
||||||
box-shadow 0 1px 0 rgba(0, 0, 0, 0.05)
|
|
||||||
|
|
||||||
&, *
|
&, *
|
||||||
user-select none
|
user-select none
|
||||||
@ -665,6 +664,7 @@ export default Vue.extend({
|
|||||||
padding 8px
|
padding 8px
|
||||||
height calc(100% - 38px)
|
height calc(100% - 38px)
|
||||||
overflow auto
|
overflow auto
|
||||||
|
background isDark ? #191b22 : #fff
|
||||||
|
|
||||||
&, *
|
&, *
|
||||||
user-select none
|
user-select none
|
||||||
@ -733,7 +733,7 @@ export default Vue.extend({
|
|||||||
display inline-block
|
display inline-block
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
background-color rgba(0, 0, 0, 0.3)
|
background-color rgba(#000, 0.3)
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
|
|
||||||
animation sk-bounce 2.0s infinite ease-in-out
|
animation sk-bounce 2.0s infinite ease-in-out
|
||||||
@ -770,4 +770,10 @@ export default Vue.extend({
|
|||||||
> input
|
> input
|
||||||
display none
|
display none
|
||||||
|
|
||||||
|
.mk-drive[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-drive:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
display inline-block
|
display inline-block
|
||||||
width 18px
|
width 18px
|
||||||
height 18px
|
height 18px
|
||||||
background-color rgba(0, 0, 0, 0.3)
|
background-color rgba(#000, 0.3)
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
animation bounce 1.4s infinite ease-in-out both
|
animation bounce 1.4s infinite ease-in-out both
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
user: {
|
user: {
|
||||||
@ -30,6 +31,7 @@ export default Vue.extend({
|
|||||||
default: 'compact'
|
default: 'compact'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wait: false,
|
wait: false,
|
||||||
@ -37,6 +39,7 @@ export default Vue.extend({
|
|||||||
connectionId: null
|
connectionId: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.connection = (this as any).os.stream.getConnection();
|
this.connection = (this as any).os.stream.getConnection();
|
||||||
this.connectionId = (this as any).os.stream.use();
|
this.connectionId = (this as any).os.stream.use();
|
||||||
@ -44,13 +47,14 @@ export default Vue.extend({
|
|||||||
this.connection.on('follow', this.onFollow);
|
this.connection.on('follow', this.onFollow);
|
||||||
this.connection.on('unfollow', this.onUnfollow);
|
this.connection.on('unfollow', this.onUnfollow);
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.connection.off('follow', this.onFollow);
|
this.connection.off('follow', this.onFollow);
|
||||||
this.connection.off('unfollow', this.onUnfollow);
|
this.connection.off('unfollow', this.onUnfollow);
|
||||||
(this as any).os.stream.dispose(this.connectionId);
|
(this as any).os.stream.dispose(this.connectionId);
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
onFollow(user) {
|
onFollow(user) {
|
||||||
if (user.id == this.user.id) {
|
if (user.id == this.user.id) {
|
||||||
this.user.isFollowing = user.isFollowing;
|
this.user.isFollowing = user.isFollowing;
|
||||||
@ -94,7 +98,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-follow-button
|
root(isDark)
|
||||||
display block
|
display block
|
||||||
cursor pointer
|
cursor pointer
|
||||||
padding 0
|
padding 0
|
||||||
@ -121,17 +125,17 @@ export default Vue.extend({
|
|||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
|
||||||
&.follow
|
&.follow
|
||||||
color #888
|
color isDark ? #fff : #888
|
||||||
background linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%)
|
background isDark ? linear-gradient(to bottom, #313543 0%, #282c37 100%) : linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%)
|
||||||
border solid 1px #e2e2e2
|
border solid 1px isDark ? #1c2023 : #e2e2e2
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background linear-gradient(to bottom, #f9f9f9 0%, #ececec 100%)
|
background isDark ? linear-gradient(to bottom, #2c2f3c 0%, #22262f 100%) : linear-gradient(to bottom, #f9f9f9 0%, #ececec 100%)
|
||||||
border-color #dcdcdc
|
border-color isDark ? #151a1d : #dcdcdc
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background #ececec
|
background isDark ? #22262f : #ececec
|
||||||
border-color #dcdcdc
|
border-color isDark ? #151a1d : #dcdcdc
|
||||||
|
|
||||||
&.unfollow
|
&.unfollow
|
||||||
color $theme-color-foreground
|
color $theme-color-foreground
|
||||||
@ -161,4 +165,10 @@ export default Vue.extend({
|
|||||||
i
|
i
|
||||||
margin-right 8px
|
margin-right 8px
|
||||||
|
|
||||||
|
.mk-follow-button[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-follow-button:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
<p class="title">気になるユーザーをフォロー:</p>
|
<p class="title">気になるユーザーをフォロー:</p>
|
||||||
<div class="users" v-if="!fetching && users.length > 0">
|
<div class="users" v-if="!fetching && users.length > 0">
|
||||||
<div class="user" v-for="user in users" :key="user.id">
|
<div class="user" v-for="user in users" :key="user.id">
|
||||||
<router-link class="avatar-anchor" :to="user | userPage">
|
<mk-avatar class="avatar" :user="user" target="_blank"/>
|
||||||
<img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
|
<router-link class="name" :to="user | userPage" v-user-preview="user.id">{{ user | userName }}</router-link>
|
||||||
<p class="username">@{{ user | acct }}</p>
|
<p class="username">@{{ user | acct }}</p>
|
||||||
@ -86,18 +84,13 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
clear both
|
clear both
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 12px 0 0
|
margin 0 12px 0 0
|
||||||
|
width 42px
|
||||||
> .avatar
|
height 42px
|
||||||
display block
|
border-radius 8px
|
||||||
width 42px
|
|
||||||
height 42px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
float left
|
float left
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<a @click="hint">カスタマイズのヒント</a>
|
<a @click="hint">カスタマイズのヒント</a>
|
||||||
<div>
|
<div>
|
||||||
<mk-post-form v-if="os.i.clientSettings.showPostFormOnTopOfTl"/>
|
<mk-post-form v-if="clientSettings.showPostFormOnTopOfTl"/>
|
||||||
<mk-timeline ref="tl" @loaded="onTlLoaded"/>
|
<mk-timeline ref="tl" @loaded="onTlLoaded"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<component v-for="widget in widgets[place]" :is="`mkw-${widget.name}`" :key="widget.id" :ref="widget.id" :widget="widget" @chosen="warp"/>
|
<component v-for="widget in widgets[place]" :is="`mkw-${widget.name}`" :key="widget.id" :ref="widget.id" :widget="widget" @chosen="warp"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<mk-post-form v-if="os.i.clientSettings.showPostFormOnTopOfTl"/>
|
<mk-post-form v-if="clientSettings.showPostFormOnTopOfTl"/>
|
||||||
<mk-timeline ref="tl" @loaded="onTlLoaded" v-if="mode == 'timeline'"/>
|
<mk-timeline ref="tl" @loaded="onTlLoaded" v-if="mode == 'timeline'"/>
|
||||||
<mk-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/>
|
<mk-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/>
|
||||||
</div>
|
</div>
|
||||||
@ -81,6 +81,7 @@ export default Vue.extend({
|
|||||||
components: {
|
components: {
|
||||||
XDraggable
|
XDraggable
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
customize: {
|
customize: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -91,61 +92,43 @@ export default Vue.extend({
|
|||||||
default: 'timeline'
|
default: 'timeline'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
connection: null,
|
connection: null,
|
||||||
connectionId: null,
|
connectionId: null,
|
||||||
widgetAdderSelected: null,
|
widgetAdderSelected: null,
|
||||||
trash: [],
|
trash: []
|
||||||
widgets: {
|
|
||||||
left: [],
|
|
||||||
right: []
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
home: {
|
home(): any[] {
|
||||||
get(): any[] {
|
return this.$store.state.settings.data.home;
|
||||||
//#region 互換性のため
|
|
||||||
(this as any).os.i.clientSettings.home.forEach(w => {
|
|
||||||
if (w.name == 'rss-reader') w.name = 'rss';
|
|
||||||
if (w.name == 'user-recommendation') w.name = 'users';
|
|
||||||
if (w.name == 'recommended-polls') w.name = 'polls';
|
|
||||||
});
|
|
||||||
//#endregion
|
|
||||||
return (this as any).os.i.clientSettings.home;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
(this as any).os.i.clientSettings.home = value;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
left(): any[] {
|
left(): any[] {
|
||||||
return this.home.filter(w => w.place == 'left');
|
return this.home.filter(w => w.place == 'left');
|
||||||
},
|
},
|
||||||
right(): any[] {
|
right(): any[] {
|
||||||
return this.home.filter(w => w.place == 'right');
|
return this.home.filter(w => w.place == 'right');
|
||||||
|
},
|
||||||
|
widgets(): any {
|
||||||
|
return {
|
||||||
|
left: this.left,
|
||||||
|
right: this.right
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.widgets.left = this.left;
|
|
||||||
this.widgets.right = this.right;
|
|
||||||
this.$watch('os.i.clientSettings', i => {
|
|
||||||
this.widgets.left = this.left;
|
|
||||||
this.widgets.right = this.right;
|
|
||||||
}, {
|
|
||||||
deep: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.connection = (this as any).os.stream.getConnection();
|
this.connection = (this as any).os.stream.getConnection();
|
||||||
this.connectionId = (this as any).os.stream.use();
|
this.connectionId = (this as any).os.stream.use();
|
||||||
|
|
||||||
this.connection.on('home_updated', this.onHomeUpdated);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.connection.off('home_updated', this.onHomeUpdated);
|
|
||||||
(this as any).os.stream.dispose(this.connectionId);
|
(this as any).os.stream.dispose(this.connectionId);
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
hint() {
|
hint() {
|
||||||
(this as any).apis.dialog({
|
(this as any).apis.dialog({
|
||||||
@ -159,56 +142,44 @@ export default Vue.extend({
|
|||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onTlLoaded() {
|
onTlLoaded() {
|
||||||
this.$emit('loaded');
|
this.$emit('loaded');
|
||||||
},
|
},
|
||||||
onHomeUpdated(data) {
|
|
||||||
if (data.home) {
|
|
||||||
(this as any).os.i.clientSettings.home = data.home;
|
|
||||||
this.widgets.left = data.home.filter(w => w.place == 'left');
|
|
||||||
this.widgets.right = data.home.filter(w => w.place == 'right');
|
|
||||||
} else {
|
|
||||||
const w = (this as any).os.i.clientSettings.home.find(w => w.id == data.id);
|
|
||||||
if (w != null) {
|
|
||||||
w.data = data.data;
|
|
||||||
this.$refs[w.id][0].preventSave = true;
|
|
||||||
this.$refs[w.id][0].props = w.data;
|
|
||||||
this.widgets.left = (this as any).os.i.clientSettings.home.filter(w => w.place == 'left');
|
|
||||||
this.widgets.right = (this as any).os.i.clientSettings.home.filter(w => w.place == 'right');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onWidgetContextmenu(widgetId) {
|
onWidgetContextmenu(widgetId) {
|
||||||
const w = (this.$refs[widgetId] as any)[0];
|
const w = (this.$refs[widgetId] as any)[0];
|
||||||
if (w.func) w.func();
|
if (w.func) w.func();
|
||||||
},
|
},
|
||||||
|
|
||||||
onWidgetSort() {
|
onWidgetSort() {
|
||||||
this.saveHome();
|
this.saveHome();
|
||||||
},
|
},
|
||||||
|
|
||||||
onTrash(evt) {
|
onTrash(evt) {
|
||||||
this.saveHome();
|
this.saveHome();
|
||||||
},
|
},
|
||||||
|
|
||||||
addWidget() {
|
addWidget() {
|
||||||
const widget = {
|
this.$store.dispatch('settings/addHomeWidget', {
|
||||||
name: this.widgetAdderSelected,
|
name: this.widgetAdderSelected,
|
||||||
id: uuid(),
|
id: uuid(),
|
||||||
place: 'left',
|
place: 'left',
|
||||||
data: {}
|
data: {}
|
||||||
};
|
});
|
||||||
|
|
||||||
this.widgets.left.unshift(widget);
|
|
||||||
this.saveHome();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
saveHome() {
|
saveHome() {
|
||||||
const left = this.widgets.left;
|
const left = this.widgets.left;
|
||||||
const right = this.widgets.right;
|
const right = this.widgets.right;
|
||||||
this.home = left.concat(right);
|
this.$store.commit('settings/setHome', left.concat(right));
|
||||||
left.forEach(w => w.place = 'left');
|
left.forEach(w => w.place = 'left');
|
||||||
right.forEach(w => w.place = 'right');
|
right.forEach(w => w.place = 'right');
|
||||||
(this as any).api('i/update_home', {
|
(this as any).api('i/update_home', {
|
||||||
home: this.home
|
home: this.home
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
warp(date) {
|
warp(date) {
|
||||||
(this.$refs.tl as any).warp(date);
|
(this.$refs.tl as any).warp(date);
|
||||||
}
|
}
|
||||||
@ -219,7 +190,7 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-home
|
root(isDark)
|
||||||
display block
|
display block
|
||||||
|
|
||||||
&[data-customize]
|
&[data-customize]
|
||||||
@ -249,8 +220,9 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 48px
|
height 48px
|
||||||
background #f7f7f7
|
color isDark ? #fff : #000
|
||||||
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
|
background isDark ? #313543 : #f7f7f7
|
||||||
|
box-shadow 0 1px 1px rgba(#000, 0.075)
|
||||||
|
|
||||||
> a
|
> a
|
||||||
display block
|
display block
|
||||||
@ -278,7 +250,7 @@ export default Vue.extend({
|
|||||||
> div
|
> div
|
||||||
display flex
|
display flex
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
max-width 1200px - 32px
|
max-width 1220px - 32px
|
||||||
|
|
||||||
> div
|
> div
|
||||||
width 50%
|
width 50%
|
||||||
@ -289,7 +261,7 @@ export default Vue.extend({
|
|||||||
line-height 48px
|
line-height 48px
|
||||||
|
|
||||||
&.trash
|
&.trash
|
||||||
border-left solid 1px #ddd
|
border-left solid 1px isDark ? #1c2023 : #ddd
|
||||||
|
|
||||||
> div
|
> div
|
||||||
width 100%
|
width 100%
|
||||||
@ -309,7 +281,7 @@ export default Vue.extend({
|
|||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
max-width 1200px
|
max-width 1220px
|
||||||
|
|
||||||
> *
|
> *
|
||||||
.customize-container
|
.customize-container
|
||||||
@ -329,7 +301,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
.mk-post-form
|
.mk-post-form
|
||||||
margin-bottom 16px
|
margin-bottom 16px
|
||||||
border solid 1px #e5e5e5
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
|
||||||
> *:not(.main)
|
> *:not(.main)
|
||||||
@ -357,4 +329,10 @@ export default Vue.extend({
|
|||||||
max-width 700px
|
max-width 700px
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
|
||||||
|
.mk-home[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-home:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -28,6 +28,7 @@ import friendsMaker from './friends-maker.vue';
|
|||||||
import followers from './followers.vue';
|
import followers from './followers.vue';
|
||||||
import following from './following.vue';
|
import following from './following.vue';
|
||||||
import usersList from './users-list.vue';
|
import usersList from './users-list.vue';
|
||||||
|
import userListTimeline from './user-list-timeline.vue';
|
||||||
import widgetContainer from './widget-container.vue';
|
import widgetContainer from './widget-container.vue';
|
||||||
|
|
||||||
Vue.component('mk-ui', ui);
|
Vue.component('mk-ui', ui);
|
||||||
@ -58,4 +59,5 @@ Vue.component('mk-friends-maker', friendsMaker);
|
|||||||
Vue.component('mk-followers', followers);
|
Vue.component('mk-followers', followers);
|
||||||
Vue.component('mk-following', following);
|
Vue.component('mk-following', following);
|
||||||
Vue.component('mk-users-list', usersList);
|
Vue.component('mk-users-list', usersList);
|
||||||
|
Vue.component('mk-user-list-timeline', userListTimeline);
|
||||||
Vue.component('mk-widget-container', widgetContainer);
|
Vue.component('mk-widget-container', widgetContainer);
|
||||||
|
@ -52,7 +52,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
|
|
||||||
> img
|
> img
|
||||||
position fixed
|
position fixed
|
||||||
|
@ -14,12 +14,20 @@ import Vue from 'vue';
|
|||||||
import MkMediaImageDialog from './media-image-dialog.vue';
|
import MkMediaImageDialog from './media-image-dialog.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['image'],
|
props: {
|
||||||
|
image: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
raw: {
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
style(): any {
|
style(): any {
|
||||||
return {
|
return {
|
||||||
'background-color': this.image.properties.avgColor ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
|
'background-color': this.image.properties.avgColor ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
|
||||||
'background-image': `url(${this.image.url}?thumbnail&size=512)`
|
'background-image': this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -31,7 +39,7 @@ export default Vue.extend({
|
|||||||
const xp = mouseX / this.$el.offsetWidth * 100;
|
const xp = mouseX / this.$el.offsetWidth * 100;
|
||||||
const yp = mouseY / this.$el.offsetHeight * 100;
|
const yp = mouseY / this.$el.offsetHeight * 100;
|
||||||
this.$el.style.backgroundPosition = xp + '% ' + yp + '%';
|
this.$el.style.backgroundPosition = xp + '% ' + yp + '%';
|
||||||
this.$el.style.backgroundImage = 'url("' + this.image.url + '?thumbnail")';
|
this.$el.style.backgroundImage = `url("${this.image.url}")`;
|
||||||
},
|
},
|
||||||
|
|
||||||
onMouseleave() {
|
onMouseleave() {
|
||||||
|
@ -54,7 +54,7 @@ export default Vue.extend({
|
|||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
background rgba(0, 0, 0, 0.7)
|
background rgba(#000, 0.7)
|
||||||
|
|
||||||
> video
|
> video
|
||||||
position fixed
|
position fixed
|
||||||
|
@ -52,6 +52,7 @@ export default Vue.extend({
|
|||||||
width 100%
|
width 100%
|
||||||
height 100%
|
height 100%
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
|
|
||||||
.mk-media-video-thumbnail
|
.mk-media-video-thumbnail
|
||||||
display flex
|
display flex
|
||||||
justify-content center
|
justify-content center
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-mentions">
|
<div class="mk-mentions">
|
||||||
<header>
|
<header>
|
||||||
<span :data-is-active="mode == 'all'" @click="mode = 'all'">すべて</span>
|
<span :data-active="mode == 'all'" @click="mode = 'all'">すべて</span>
|
||||||
<span :data-is-active="mode == 'following'" @click="mode = 'following'">フォロー中</span>
|
<span :data-active="mode == 'following'" @click="mode = 'following'">フォロー中</span>
|
||||||
</header>
|
</header>
|
||||||
<div class="fetching" v-if="fetching">
|
<div class="fetching" v-if="fetching">
|
||||||
<mk-ellipsis-icon/>
|
<mk-ellipsis-icon/>
|
||||||
@ -85,7 +85,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
.mk-mentions
|
.mk-mentions
|
||||||
background #fff
|
background #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.075)
|
border solid 1px rgba(#000, 0.075)
|
||||||
border-radius 6px
|
border-radius 6px
|
||||||
|
|
||||||
> header
|
> header
|
||||||
@ -98,7 +98,7 @@ export default Vue.extend({
|
|||||||
font-size 18px
|
font-size 18px
|
||||||
color #555
|
color #555
|
||||||
|
|
||||||
&:not([data-is-active])
|
&:not([data-active])
|
||||||
color $theme-color
|
color $theme-color
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sub" :title="title">
|
<div class="sub" :title="title">
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="note.userId"/>
|
|
||||||
</router-link>
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<header>
|
<header>
|
||||||
<div class="left">
|
<div class="left">
|
||||||
@ -16,7 +14,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<mk-note-html v-if="note.text" :text="note.text" :i="os.i" :class="$style.text"/>
|
<div class="text">
|
||||||
|
<span v-if="note.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
|
<mk-note-html v-if="note.text" :text="note.text" :i="os.i"/>
|
||||||
|
</div>
|
||||||
<div class="media" v-if="note.mediaIds.length > 0">
|
<div class="media" v-if="note.mediaIds.length > 0">
|
||||||
<mk-media-list :media-list="note.media"/>
|
<mk-media-list :media-list="note.media"/>
|
||||||
</div>
|
</div>
|
||||||
@ -40,10 +41,10 @@ export default Vue.extend({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.sub
|
root(isDark)
|
||||||
margin 0
|
margin 0
|
||||||
padding 20px 32px
|
padding 20px 32px
|
||||||
background #fdfdfd
|
background isDark ? #21242d : #fdfdfd
|
||||||
|
|
||||||
&:after
|
&:after
|
||||||
content ""
|
content ""
|
||||||
@ -54,18 +55,13 @@ export default Vue.extend({
|
|||||||
> .main > footer > button
|
> .main > footer > button
|
||||||
color #888
|
color #888
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
display block
|
||||||
float left
|
float left
|
||||||
margin 0 16px 0 0
|
margin 0 16px 0 0
|
||||||
|
width 44px
|
||||||
> .avatar
|
height 44px
|
||||||
display block
|
border-radius 4px
|
||||||
width 44px
|
|
||||||
height 44px
|
|
||||||
margin 0
|
|
||||||
border-radius 4px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
float left
|
float left
|
||||||
@ -87,7 +83,7 @@ export default Vue.extend({
|
|||||||
display inline
|
display inline
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
color #777
|
color isDark ? #fff : #777
|
||||||
font-size 1em
|
font-size 1em
|
||||||
font-weight 700
|
font-weight 700
|
||||||
text-align left
|
text-align left
|
||||||
@ -99,24 +95,29 @@ export default Vue.extend({
|
|||||||
> .username
|
> .username
|
||||||
text-align left
|
text-align left
|
||||||
margin 0 0 0 8px
|
margin 0 0 0 8px
|
||||||
color #ccc
|
color isDark ? #606984 : #ccc
|
||||||
|
|
||||||
> .right
|
> .right
|
||||||
float right
|
float right
|
||||||
|
|
||||||
> .time
|
> .time
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
color #c0c0c0
|
color isDark ? #606984 : #c0c0c0
|
||||||
|
|
||||||
|
> .body
|
||||||
|
> .text
|
||||||
|
cursor default
|
||||||
|
display block
|
||||||
|
margin 0
|
||||||
|
padding 0
|
||||||
|
overflow-wrap break-word
|
||||||
|
font-size 1em
|
||||||
|
color isDark ? #959ba7 : #717171
|
||||||
|
|
||||||
|
.sub[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.sub:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
|
||||||
.text
|
|
||||||
cursor default
|
|
||||||
display block
|
|
||||||
margin 0
|
|
||||||
padding 0
|
|
||||||
overflow-wrap break-word
|
|
||||||
font-size 1em
|
|
||||||
color #717171
|
|
||||||
</style>
|
|
||||||
|
@ -18,18 +18,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="renote" v-if="isRenote">
|
<div class="renote" v-if="isRenote">
|
||||||
<p>
|
<p>
|
||||||
<router-link class="avatar-anchor" :to="note.user | userPage" v-user-preview="note.userId">
|
<mk-avatar class="avatar" :user="note.user"/>
|
||||||
<img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
|
|
||||||
</router-link>
|
|
||||||
%fa:retweet%
|
%fa:retweet%
|
||||||
<router-link class="name" :href="note.user | userPage">{{ note.user | userName }}</router-link>
|
<router-link class="name" :href="note.user | userPage">{{ note.user | userName }}</router-link>
|
||||||
がRenote
|
がRenote
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<article>
|
<article>
|
||||||
<router-link class="avatar-anchor" :to="p.user | userPage">
|
<mk-avatar class="avatar" :user="p.user"/>
|
||||||
<img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/>
|
|
||||||
</router-link>
|
|
||||||
<header>
|
<header>
|
||||||
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
<router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link>
|
||||||
<span class="username">@{{ p.user | acct }}</span>
|
<span class="username">@{{ p.user | acct }}</span>
|
||||||
@ -38,9 +34,12 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</header>
|
</header>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<mk-note-html :class="$style.text" v-if="p.text" :text="p.text" :i="os.i"/>
|
<div class="text">
|
||||||
|
<span v-if="p.isHidden" style="opacity: 0.5">(この投稿は非公開です)</span>
|
||||||
|
<mk-note-html v-if="p.text" :text="p.text" :i="os.i"/>
|
||||||
|
</div>
|
||||||
<div class="media" v-if="p.media.length > 0">
|
<div class="media" v-if="p.media.length > 0">
|
||||||
<mk-media-list :media-list="p.media"/>
|
<mk-media-list :media-list="p.media" :raw="true"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-poll v-if="p.poll" :note="p"/>
|
<mk-poll v-if="p.poll" :note="p"/>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
||||||
@ -156,7 +155,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// Draw map
|
// Draw map
|
||||||
if (this.p.geo) {
|
if (this.p.geo) {
|
||||||
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.clientSettings.showMaps : true;
|
const shouldShowMap = (this as any).os.isSignedIn ? (this as any).clientSettings.showMaps : true;
|
||||||
if (shouldShowMap) {
|
if (shouldShowMap) {
|
||||||
(this as any).os.getGoogleMaps().then(maps => {
|
(this as any).os.getGoogleMaps().then(maps => {
|
||||||
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
const uluru = new maps.LatLng(this.p.geo.coordinates[1], this.p.geo.coordinates[0]);
|
||||||
@ -214,13 +213,13 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-note-detail
|
root(isDark)
|
||||||
margin 0
|
margin 0 auto
|
||||||
padding 0
|
padding 0
|
||||||
overflow hidden
|
overflow hidden
|
||||||
text-align left
|
text-align left
|
||||||
background #fff
|
background isDark ? #282C37 : #fff
|
||||||
border solid 1px rgba(0, 0, 0, 0.1)
|
border solid 1px rgba(#000, 0.1)
|
||||||
border-radius 8px
|
border-radius 8px
|
||||||
|
|
||||||
> .read-more
|
> .read-more
|
||||||
@ -232,44 +231,39 @@ export default Vue.extend({
|
|||||||
text-align center
|
text-align center
|
||||||
color #999
|
color #999
|
||||||
cursor pointer
|
cursor pointer
|
||||||
background #fafafa
|
background isDark ? #21242d : #fafafa
|
||||||
outline none
|
outline none
|
||||||
border none
|
border none
|
||||||
border-bottom solid 1px #eef0f2
|
border-bottom solid 1px isDark ? #1c2023 : #eef0f2
|
||||||
border-radius 6px 6px 0 0
|
border-radius 6px 6px 0 0
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background #f6f6f6
|
background isDark ? #2e3440 : #f6f6f6
|
||||||
|
|
||||||
&:active
|
&:active
|
||||||
background #f0f0f0
|
background isDark ? #21242b : #f0f0f0
|
||||||
|
|
||||||
&:disabled
|
&:disabled
|
||||||
color #ccc
|
color isDark ? #21242b : #ccc
|
||||||
|
|
||||||
> .context
|
> .context
|
||||||
> *
|
> *
|
||||||
border-bottom 1px solid #eef0f2
|
border-bottom 1px solid isDark ? #1c2023 : #eef0f2
|
||||||
|
|
||||||
> .renote
|
> .renote
|
||||||
color #9dbb00
|
color #9dbb00
|
||||||
background linear-gradient(to bottom, #edfde2 0%, #fff 100%)
|
background isDark ? linear-gradient(to bottom, #314027 0%, #282c37 100%) : linear-gradient(to bottom, #edfde2 0%, #fff 100%)
|
||||||
|
|
||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
padding 16px 32px
|
padding 16px 32px
|
||||||
|
|
||||||
.avatar-anchor
|
.avatar
|
||||||
display inline-block
|
display inline-block
|
||||||
|
width 28px
|
||||||
.avatar
|
height 28px
|
||||||
vertical-align bottom
|
margin 0 8px 0 0
|
||||||
min-width 28px
|
border-radius 6px
|
||||||
min-height 28px
|
|
||||||
max-width 28px
|
|
||||||
max-height 28px
|
|
||||||
margin 0 8px 0 0
|
|
||||||
border-radius 6px
|
|
||||||
|
|
||||||
[data-fa]
|
[data-fa]
|
||||||
margin-right 4px
|
margin-right 4px
|
||||||
@ -281,7 +275,7 @@ export default Vue.extend({
|
|||||||
padding-top 8px
|
padding-top 8px
|
||||||
|
|
||||||
> .reply-to
|
> .reply-to
|
||||||
border-bottom 1px solid #eef0f2
|
border-bottom 1px solid isDark ? #1c2023 : #eef0f2
|
||||||
|
|
||||||
> article
|
> article
|
||||||
padding 28px 32px 18px 32px
|
padding 28px 32px 18px 32px
|
||||||
@ -292,21 +286,13 @@ export default Vue.extend({
|
|||||||
clear both
|
clear both
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
> .main > footer > button
|
> footer > button
|
||||||
color #888
|
color isDark ? #707b97 : #888
|
||||||
|
|
||||||
> .avatar-anchor
|
> .avatar
|
||||||
display block
|
|
||||||
width 60px
|
width 60px
|
||||||
height 60px
|
height 60px
|
||||||
|
border-radius 8px
|
||||||
> .avatar
|
|
||||||
display block
|
|
||||||
width 60px
|
|
||||||
height 60px
|
|
||||||
margin 0
|
|
||||||
border-radius 8px
|
|
||||||
vertical-align bottom
|
|
||||||
|
|
||||||
> header
|
> header
|
||||||
position absolute
|
position absolute
|
||||||
@ -318,7 +304,7 @@ export default Vue.extend({
|
|||||||
display inline-block
|
display inline-block
|
||||||
margin 0
|
margin 0
|
||||||
line-height 24px
|
line-height 24px
|
||||||
color #777
|
color isDark ? #fff : #627079
|
||||||
font-size 18px
|
font-size 18px
|
||||||
font-weight 700
|
font-weight 700
|
||||||
text-align left
|
text-align left
|
||||||
@ -331,18 +317,27 @@ export default Vue.extend({
|
|||||||
display block
|
display block
|
||||||
text-align left
|
text-align left
|
||||||
margin 0
|
margin 0
|
||||||
color #ccc
|
color isDark ? #606984 : #ccc
|
||||||
|
|
||||||
> .time
|
> .time
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
right 32px
|
right 32px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #c0c0c0
|
color isDark ? #606984 : #c0c0c0
|
||||||
|
|
||||||
> .body
|
> .body
|
||||||
padding 8px 0
|
padding 8px 0
|
||||||
|
|
||||||
|
> .text
|
||||||
|
cursor default
|
||||||
|
display block
|
||||||
|
margin 0
|
||||||
|
padding 0
|
||||||
|
overflow-wrap break-word
|
||||||
|
font-size 1.5em
|
||||||
|
color isDark ? #fff : #717171
|
||||||
|
|
||||||
> .renote
|
> .renote
|
||||||
margin 8px 0
|
margin 8px 0
|
||||||
|
|
||||||
@ -404,11 +399,11 @@ export default Vue.extend({
|
|||||||
background transparent
|
background transparent
|
||||||
border none
|
border none
|
||||||
font-size 1em
|
font-size 1em
|
||||||
color #ddd
|
color isDark ? #606984 : #ccc
|
||||||
cursor pointer
|
cursor pointer
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color #666
|
color isDark ? #9198af : #666
|
||||||
|
|
||||||
> .count
|
> .count
|
||||||
display inline
|
display inline
|
||||||
@ -420,17 +415,12 @@ export default Vue.extend({
|
|||||||
|
|
||||||
> .replies
|
> .replies
|
||||||
> *
|
> *
|
||||||
border-top 1px solid #eef0f2
|
border-top 1px solid isDark ? #1c2023 : #eef0f2
|
||||||
|
|
||||||
|
.mk-note-detail[data-darkmode]
|
||||||
|
root(true)
|
||||||
|
|
||||||
|
.mk-note-detail:not([data-darkmode])
|
||||||
|
root(false)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="stylus" module>
|
|
||||||
.text
|
|
||||||
cursor default
|
|
||||||
display block
|
|
||||||
margin 0
|
|
||||||
padding 0
|
|
||||||
overflow-wrap break-word
|
|
||||||
font-size 1.5em
|
|
||||||
color #717171
|
|
||||||
</style>
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user