Compare commits

...

83 Commits

Author SHA1 Message Date
Cutls
b4aa5aead5 Merge pull request #67 from cutls/WIP-(before-CI)
TheDesk Usamin (18.3.3)
2019-05-07 00:45:08 +09:00
Cutls
873a8fd229 fix typo 2019-05-07 00:44:04 +09:00
Cutls
d0ddc58160 TheDesk Usamin (18.3.3) 2019-05-07 00:43:21 +09:00
Cutls
6eebfed609 get blurhash 2019-05-07 00:42:06 +09:00
Cutls
09b7b8633e Merge pull request #66 from cutls/WIP-(before-CI)
TheDesk Usaimin (18.3.2)
2019-05-06 19:36:08 +09:00
Cutls
c93326d218 Add notestock notice 2019-05-06 19:34:49 +09:00
Cutls
a03c5c0ecf TheDesk Usain (18.3.2) 2019-05-06 19:31:28 +09:00
Cutls
0380251294 Check vulnerability 2019-05-06 19:30:05 +09:00
Cutls
d8f857e05d TheDesk Usamin (18.3.2) 2019-05-06 19:15:54 +09:00
Cutls
7a06a2b192 Add: min_id TL 2019-05-06 19:10:03 +09:00
Cutls
771db8c3ad Notestock 2019-05-06 01:28:00 +09:00
Cutls
9a800639e6 Custom emojis' marign 2019-05-06 01:27:54 +09:00
Cutls
550c7b1805 change to cutls.com from kirishima.cloud 2019-05-03 01:08:46 +09:00
Cutls
ad7c7ffa66 Fix: flag emojis #64 2019-05-03 00:51:10 +09:00
Cutls
57978bd152 TheDesk Minami💛(announce) 2019-04-25 01:10:49 +09:00
Cutls
5cd72a538c add note 2019-04-22 23:19:34 +09:00
Cutls
d439169c63 Merge pull request #61 from kPherox/fix-integrated-tl-reconnect-streaming
Fix integrated tl reconnect streaming
2019-04-22 23:18:12 +09:00
Cutls
da39e0ded6 package 2019-04-22 23:17:46 +09:00
Cutls
823fae5eac TheDesk Usamin (18.3.1) 2019-04-22 23:16:57 +09:00
kPherox
4f3a7c47e3 Change console log level 2019-04-22 03:33:56 +09:00
kPherox
bd8d480e07 Check error count on integrated tl 2019-04-22 03:31:14 +09:00
kPherox
a09c031dbe Add type integrated to reconnector 2019-04-22 03:26:57 +09:00
kPherox
1fee94846d Fix typo 2019-04-22 02:02:23 +09:00
Cutls
4fb37525d5 Merge branch 'WIP-(before-CI)' of https://github.com/cutls/TheDesk into WIP-(before-CI) 2019-04-22 01:51:42 +09:00
Cutls
8f25557f20 wip 2019-04-22 01:51:32 +09:00
Cutls
cb47eabed9 Merge pull request #60 from kPherox/fix-poll-vote-button
Fix poll vote button
2019-04-22 01:50:29 +09:00
kPherox
f8823a4c5a Fix bug that deleting the vote button 2019-04-22 01:34:50 +09:00
kPherox
7fdd5964cc Fix lang_parse_vote for en 2019-04-22 01:00:20 +09:00
Cutls
3aadcaef0f add some notifications sound 2019-04-20 23:40:12 +09:00
Cutls
f58d4f349b TheDesk Usamin (18.3.0) 2019-04-20 00:59:31 +09:00
Cutls
9bb8ec0b66 some security update 2019-04-19 23:02:30 +09:00
Cutls
ec9a14d63b custom emojis when poll 2019-04-16 01:38:29 +09:00
Cutls
82a00f4d1e security 2019-04-16 01:29:44 +09:00
Cutls
af97f88d0a sound 2019-04-15 00:45:04 +09:00
Cutls
e27351481b Merge pull request #58 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-14 18:58:33 +09:00
Cutls
4c375e2d0a travis 2019-04-14 18:58:12 +09:00
Cutls
53cd49d4e8 travis 2019-04-14 18:55:30 +09:00
Cutls
e36942180e restart 2019-04-14 03:48:44 +09:00
Cutls
6b58c88118 travis 2019-04-14 03:46:15 +09:00
Cutls
d20777ed18 travis 2019-04-14 03:45:30 +09:00
Cutls
202e389c20 travis 2019-04-14 03:38:07 +09:00
Cutls
707a5b2033 change travis 2019-04-14 03:31:19 +09:00
Cutls
0967c93dde Merge pull request #57 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-14 03:26:44 +09:00
Cutls
b13849a427 readme 2019-04-14 03:26:19 +09:00
Cutls
d0322c7bda TheDesk Usamin (18.2.3) 2019-04-14 03:22:16 +09:00
Cutls
494a4e90d6 fix some undif 2019-04-14 03:06:59 +09:00
Cutls
d1968a2e69 Merge pull request #56 from cutls/mac
miss
2019-04-14 01:43:57 +09:00
Cutls
51e6909f77 #64 fix 2019-04-14 01:42:49 +09:00
Cutls
cec46faf19 keybase 2019-04-14 01:42:18 +09:00
Cutls
53f880ab97 Merge pull request #55 from kPherox/fix-nowplaying-for-asar-packed
Fix nowplaying for asar packed
2019-04-14 01:41:30 +09:00
kPherox
cc20b0a7c0 Replace promise to async/await 2019-04-14 01:33:00 +09:00
kPherox
efac88db4c Change to pass error on itunes-np 2019-04-14 01:32:16 +09:00
Cutls
2e1c076b5f Merge pull request #53 from kPherox/update-package
Update package
2019-04-14 00:36:19 +09:00
kPherox
5a03df6ee9 Change itunes-nowplaying-mac pull request number 2019-04-14 00:13:57 +09:00
kPherox
ade5893183 Unpack asar for itunes-nowplaying-mac 2019-04-14 00:12:35 +09:00
kPherox
8a17e737f9 Add npm scripts for build
Update README.md#buildビルド

初回のcloneするときの流れを修正してからnpm scriptsを利用するように書き換え
2019-04-14 00:09:35 +09:00
kPherox
94c1ff3731 Replace dev dependency electron-packager to electron-builder
Some package update
2019-04-13 23:34:10 +09:00
Cutls
4e5fe2fc91 proof lang 2019-04-13 12:51:54 +09:00
Cutls
f88ed31e38 Add keybase 2019-04-13 12:41:58 +09:00
Cutls
7df51c161b mac 18.2.2 2019-04-13 03:55:05 +09:00
Cutls
b5d1686c12 update package 2019-04-13 02:32:42 +09:00
Cutls
a1048b3243 to linux 2019-04-13 02:31:07 +09:00
Cutls
f9090e261d travis 2019-04-13 02:21:21 +09:00
Cutls
4029f168df readme 2019-04-13 01:55:01 +09:00
Cutls
7965e7c742 pavkage 2019-04-13 01:54:33 +09:00
Cutls
932e6731c9 readme package 2019-04-13 01:49:22 +09:00
Cutls
3c3eb5209b readme 2019-04-13 01:48:26 +09:00
Cutls
a07d6b3172 Merge pull request #52 from cutls/WIP-(before-CI)
travis
2019-04-12 23:39:54 +09:00
Cutls
253f742332 travis 2019-04-12 23:39:28 +09:00
Cutls
35e262293d Merge pull request #51 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-12 23:37:14 +09:00
Cutls
972ea9f5ed travjs 2019-04-12 23:36:16 +09:00
Cutls
0c1191e362 travis 2019-04-12 23:35:48 +09:00
Cutls
426e48325c osx 2019-04-12 23:35:22 +09:00
Cutls
6c86825732 update travis 2019-04-12 23:33:36 +09:00
Cutls
e0cae78827 Merge pull request #50 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-12 23:32:37 +09:00
Cutls
09d3643b19 travis 2019-04-12 23:32:14 +09:00
Cutls
ed93d5b4f2 ul 2019-04-12 23:30:59 +09:00
Cutls
f0d7d84f8e travis update 2019-04-12 23:29:30 +09:00
Cutls
05fab4c45c Change 2019-04-12 23:26:38 +09:00
Cutls
3059ec9941 Merge pull request #49 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-12 23:20:26 +09:00
Cutls
892872869b TheDesk Usamin (18.2.1) 2019-04-12 23:19:27 +09:00
Cutls
0db7ed4a33 TheDesk Usamin (18.2.1) 2019-04-12 23:14:38 +09:00
Cutls
54e12db08b Fix XSS 2019-04-12 23:12:57 +09:00
69 changed files with 6183 additions and 4403 deletions

2
.gitignore vendored
View File

@@ -5,8 +5,6 @@
TheDesk-*
app/build
build
make.js
make_js.js
app/.DS_Store
.DS_Store
.vs/*

View File

@@ -1,31 +1,34 @@
os: windows
language: node_js
node_js:
- '10.15.2'
language: objective-c
cache:
directories:
- node_modules
env:
- NODE_VERSION="10.15.2"
before_install:
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
- source /tmp/.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
- node --version
script: node -v
before_deploy:
- cd app
- npm install electron-builder -g
- cd app
- npm install
- electron-builder --win --ia32
- mv ../build/TheDesk-setup.exe ../TheDesk-setup-ia32.exe
- mv ../build/TheDesk*.exe ../TheDesk-ia32.exe
- electron-builder --win --x64
- mv ../build/TheDesk-setup.exe ../TheDesk-setup.exe
- mv ../build/TheDesk*.exe ../TheDesk.exe
- electron-builder --mac --x64 -p never
- mv ../build/TheDesk*.dmg ../TheDesk.dmg
- mv ../build/TheDesk*.zip ../TheDesk-darwin-x64.zip
- cd ../
- ls
after_deploy: ls
deploy:
skip_cleanup: true
provider: releases
# GitHub にリリースするための API KEY を暗号化した値
api_key:
secure: jndR02p5KRTtcJk18b3YsXL2cC+yzEf1AOqXdpWciF8f3lO5oY01jlxd17xdHIcK7VywSsLVZpLToSdqAoIEhJ5OxEQ/FmA3FlmbwwD6ou13gLa4VGIvsBHveCmKGjVu0Z++atIy76tZYU1SOWFWv4B0ZhnVz2ca2VZynvLgw3YNsPJH7rHO966GXgRkGYJAJ4UvLg3sj/iztVh2FSfbUj5IGO1e/JHJO63wAo1MSQtRjkutVgl/djnBLC6vbL4YHkM3Ynpkx/YQEcxwrmeY0Ra8D5yYDq4MNIDMmZahWC+k4u2eA2Cj2ifBFNxbZvTN75vLwRBp6DsTNHsiqkXrSPDBdNeet31RbwTQ6LtsK8jqmL4S/59dmLcj7uCU2WxyBLPbJdbdZWlqW2ZQvfQY8QVAYy7S3MiHQWQN0oP5wqXk89jcgR42ig/zsqFNPpXHM4mExR7l/gDLPg0j9c3XEF6sWtk3FmJN1i4+B+9kn09b6UKlV7EFPKp8XcFNrz4ZcE9/I8lKwsqLVG2jAXIk7Z9LwDRcAmK5eG348X5zwFtOY6raKIvRw2cn92bPnEI+55v8A4WANS2647GFTgxHj30D0d/sOZmJ5BS34zpdWTgE0AlKg7sOqkncjqoW5J5zCh5Ow7b3KXvEvlAts44mAag8tZTectxMP4iguXvTnv4=
file:
- TheDesk.exe
- TheDesk-setup.exe
- TheDesk-ia32.exe
- TheDesk-setup-ia32.exe
# Releases ページにアップロードするファイル
file:
- TheDesk.dmg
- TheDesk-darwin-x64.zip
skip_cleanup: true
on:
repo: cutls/TheDesk
branches:

View File

@@ -1,5 +1,7 @@
# TheDesk
TheDesk Minami (19)はVueで書き直します(rewrite-vueブランチ参照)。18までのバージョンはTheDesk Kawaii (20)以降で継続します。
[![Build Status](https://travis-ci.org/cutls/TheDesk.svg?branch=master)](https://travis-ci.org/cutls/TheDesk)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/thedesk/localized.svg)](https://translate.thedesk.top/project/thedesk)
Mastodon/Misskey client for PC(Windows/Linux/macOS)
@@ -27,6 +29,8 @@ The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.o
* [ico](https://dl.thedesk.top/press/TheDesk.ico)
* [icns](https://dl.thedesk.top/press/TheDesk.icns)
The default sound of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/)
## Terms of Use/利用規約
* [利用規約(Terms of Use(ja))](https://thedesk.top/tos.html)
@@ -73,11 +77,38 @@ iTunes NowPlayingにアルバムアートワークを付けてくれた人
## Build/ビルド
Misskey(misskey.xyz) application token is not in cutls/TheDesk
Misskey(misskey.xyz)のトークンは含まれておりません。
`git clone https://github.com/cutls/TheDesk`
`npm install electron -g`
`cd TheDesk/app`
`npm install`
Misskey(misskey.xyz)のトークンは含まれておりません。
```sh
git clone https://github.com/cutls/TheDesk
cd TheDesk/app
npm install
npm install --only=dev
```
### electron-builder(推奨)
Use npm scripts.
npm scriptsを利用します
```sh
# Build for current platform
# 実行している環境向けにビルド
npm run build
# Select build target
# ターゲットを指定してビルド
## Windows
npm run build:win
## Windows and Linux (The macOS target should run on macOS. So, this option hasn't include the build for macOS)
## macOS向けのビルドにはmacOSで実行する必要があるためこのコマンドではビルドされません
npm run build:all
```
Config is all on package.json
ビルド設定はすべてpackage.jsonに記載しています。
### electron-packager(非推奨)
`npm install --save-dev electron-rebuild`
Linux/macOS
@@ -91,8 +122,6 @@ WindowsでPython 2.xやVisualC++を一発でインストールできるツール
日本語話者向けですが、macOSビルドにはXCodeが要るとの情報があります。([とねぢ](https://minohdon.jp/@toneji)氏談)
### electron-packager
Windows
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --win32metadata.CompanyName="TheDesk&Cutls.com" --win32metadata.FileDescription="TheDesk" --win32metadata.OriginalFilename="TheDesk" --win32metadata.InternalName="TheDesk" --win32metadata.ProductName="TheDesk" --platform=win32 --arch=all --electron-version=4.0.5 --icon=.\app\thedesk.ico --overwrite`
Linux
@@ -100,11 +129,6 @@ Linux
macOS
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite`
### electron-builder
Config is all on package.json
ビルド設定はすべてpackage.jsonに記載しています。
## Pleroma support
Did you find a bug with Pleroma accounts?

View File

@@ -76,7 +76,7 @@ a,button{
<img src="./img/desk.png" style="max-width:70%;">
<h5>TheDesk</h5>
<div class='container'>
<div class='area-name1'>External version</div>
<div class='area-name1'>Display version</div>
<div class='area-data1' id="now"></div>
<div class='area-name2'>Internal version</div>
<div class='area-data2' id="ver"></div>
@@ -87,13 +87,17 @@ a,button{
<div class='area-name5'>Node.js</div>
<div class='area-data5' id="node"></div>
</div>
<div class="cp">Copyright &copy; TheDesk 2018 All rights reserved.<br><a href="https://thedesk.top" target="_blank">Web site</a></div>
<div class="cp">Copyright &copy; <a href="https://cutls.com/@Cutls" target="_blank">Cutls P</a> 2018 All rights reserved.<br>
Thanks:<a href="https://minohdon.jp/@toneji" target="_blank">toneji</a>/<a href="https://popon.pptdn.jp/@popn_ja" target="_blank">popn_ja</a>/<a href="https://pawoo.net/@kPherox" target="_blank">kPherox</a> and all users
<img draggable="false" style="width:0.8rem;top: 1px;margin-left: 1px;position: relative;" alt="❤️" title=":heart:" src="https://twemoji.maxcdn.com/2/72x72/2764.png">
<br><a href="https://thedesk.top" target="_blank">Web site</a></div>
<button onclick="window.close()" class="btn waves-effect indigo" style="width:calc(100% - 10px);"><i class="material-icons left">close</i>Close</button>
<script type="text/javascript" src="./js/ui/theme.js"></script>
<script>
$("#now").text(localStorage.getItem("ver"));
var electron = require("electron");
var remote=electron.remote;
const shell=electron.shell;
//JSON.parse(fs.readFileSync(info_path, 'utf8'));
console.log(process.versions);
$("#node").text(process.version);
@@ -104,6 +108,9 @@ a,button{
var ver=m[1];
$("#ver").text(ver);
}
</script>
<script type="text/javascript" src="./js/platform/end.js"></script>
$(document).on('click', 'a', e => {
var url = $(e.target).attr('href');
shell.openExternal(url);
return false;
});
</script>

View File

@@ -30,6 +30,8 @@ option {
}
#mainView {
padding: 10px;
overflow:scroll;
height: auto;
}
#message {
display: none;

View File

@@ -138,7 +138,7 @@ iframe {
.area-toot .emoji,.area-toot .emoji-img{
width: 20px;
vertical-align: middle;
margin: -3px 0 0;
margin:-1px 0;
}
.faicon_FTL{
display:none;
@@ -249,6 +249,29 @@ grid-area: toot;
margin:2px;
grid-area: side;
}
.quote-renote{
display: grid;
grid-template-columns: 43px 2fr 1fr;
grid-template-areas: 'ricon ruser' 'ricon rtext';
border: 1px solid;
margin-top: 3px;
padding: 1px;
border-radius: 3px;
}
.renote-icon{
grid-area: ricon;
}
.renote-icon img{
width:43px;
}
.renote-user{
grid-area: ruser;
}
.renote-text{
grid-area: rtext;
}
.btn-flat{
color:var(--color);
}
@@ -321,6 +344,7 @@ grid-area: toot;
p {
margin: 0;
margin-bottom: 0px;
line-height:20px;
}
p:not(:last-child){
margin-bottom: 10px;

119
app/js/common/blurhash.js Normal file
View File

@@ -0,0 +1,119 @@
var digitCharacters = [
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d",
"e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u", "v", "w", "x",
"y", "z", "#", "$", "%", "*", "+", ",", "-", ".",
":", ";", "=", "?", "@", "[", "]", "^", "_", "{",
"|", "}", "~",
];
function decode83(str) {
var value = 0;
for (var i = 0; i < str.length; i++) {
var c = str[i];
var digit = digitCharacters.indexOf(c);
value = value * 83 + digit;
}
return value;
}
function linearTosRGB(value) {
var v = Math.max(0, Math.min(1, value));
if (v <= 0.0031308) {
return Math.round(v * 12.92 * 255 + 0.5);
}
else {
return Math.round((1.055 * Math.pow(v, 1 / 2.4) - 0.055) * 255 + 0.5);
}
}
function sRGBToLinear(value) {
var v = value / 255;
if (v <= 0.04045) {
return v / 12.92;
}
else {
return Math.pow((v + 0.055) / 1.055, 2.4);
}
}
function decodeDC(value) {
var intR = value >> 16;
var intG = (value >> 8) & 255;
var intB = value & 255;
return [sRGBToLinear(intR), sRGBToLinear(intG), sRGBToLinear(intB)];
};
function sign(n) { return (n < 0 ? -1 : 1); }
function signPow(val, exp) { return sign(val) * Math.pow(Math.abs(val), exp); }
function decodeDC2(value, maximumValue) {
var quantR = Math.floor(value / (19 * 19));
var quantG = Math.floor(value / 19) % 19;
var quantB = value % 19;
var rgb = [
signPow((quantR - 9) / 9, 2.0) * maximumValue,
signPow((quantG - 9) / 9, 2.0) * maximumValue,
signPow((quantB - 9) / 9, 2.0) * maximumValue,
];
return rgb;
};
function decodeblur(blurhash, width, height, punch) {
punch = punch | 1;
if (blurhash.length < 6) {
console.error('too short blurhash');
return null;
}
var sizeFlag = decode83(blurhash[0]);
var numY = Math.floor(sizeFlag / 9) + 1;
var numX = (sizeFlag % 9) + 1;
var quantisedMaximumValue = decode83(blurhash[1]);
var maximumValue = (quantisedMaximumValue + 1) / 166;
if (blurhash.length !== 4 + 2 * numX * numY) {
console.error('blurhash length mismatch', blurhash.length, 4 + 2 * numX * numY);
return null;
}
var colors = new Array(numX * numY);
for (var i = 0; i < colors.length; i++) {
if (i === 0) {
var value = decode83(blurhash.substring(2, 6));
colors[i] = decodeDC(value);
}
else {
var value = decode83(blurhash.substring(4 + i * 2, 6 + i * 2));
colors[i] = decodeDC2(value, maximumValue * punch);
}
}
var bytesPerRow = width * 4;
var pixels = new Uint8ClampedArray(bytesPerRow * height);
for (var y = 0; y < height; y++) {
for (var x = 0; x < width; x++) {
var r = 0;
var g = 0;
var b = 0;
for (var j = 0; j < numY; j++) {
for (var i = 0; i < numX; i++) {
var basis = Math.cos(Math.PI * x * i / width) * Math.cos(Math.PI * y * j / height);
var color = colors[i + j * numX];
r += color[0] * basis;
g += color[1] * basis;
b += color[2] * basis;
}
}
var intR = linearTosRGB(r);
var intG = linearTosRGB(g);
var intB = linearTosRGB(b);
pixels[4 * x + 0 + y * bytesPerRow] = intR;
pixels[4 * x + 1 + y * bytesPerRow] = intG;
pixels[4 * x + 2 + y * bytesPerRow] = intB;
pixels[4 * x + 3 + y * bytesPerRow] = 255; // alpha
}
}
return pixels;
}
function parseBlur(blur) {
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var pixels = decodeblur(blur, 32, 32)
const imageData = new ImageData(pixels, 32, 32);
ctx.putImageData(imageData, 0, 0);
return canvas.toDataURL()
}

View File

@@ -190,7 +190,7 @@ function verck(ver) {
}
}
if(show){
Materialize.toast(obj.Text+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
Materialize.toast(escapeHTML(obj.Text)+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
}
@@ -211,9 +211,6 @@ function infowebsocket(){
console.log(JSON.parse(mess.data));
var obj=JSON.parse(mess.data);
if(obj.type!="counter"){
if(obj.id*1<=localStorage.getItem("last-notice-id")){
}else{
localStorage.setItem("last-notice-id",obj.id)
var show=true;
if(obj.toot!=""){
@@ -242,9 +239,8 @@ function infowebsocket(){
}
}
if(show){
Materialize.toast(obj.text+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
Materialize.toast(escapeHTML(obj.Text)+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
}
}else{
$("#persons").text(obj.text);
}

View File

@@ -54,7 +54,13 @@ function defEmoji(target){
var emojiraw = newpack.filter(function(item, index){
if (item.short_name == target) return true;
});
emoji=twemoji.convert.fromCodePoint(emojiraw[0].unified);
var hex=emojiraw[0].unified.split("-");
if(hex.length===2){
emoji=twemoji.convert.fromCodePoint(hex[0])+twemoji.convert.fromCodePoint(hex[1]);
}else{
emoji=twemoji.convert.fromCodePoint(hex[0]);
}
console.log(emoji)
var now = $("#textarea").val();
var selin = localStorage.getItem("cursor");
var now = $("#textarea").val();

View File

@@ -141,6 +141,7 @@ var lang={
"lang_hisdata_frcwarn":"Unfollow accounts will be shown.",
"lang_hisdata_taketime":"It will take 30s ~ several minutes",
"lang_hisdata_notonmisskey":"Misskey is unable to request.",
"lang_hisdata_key":"This user is proofed by {{set}}",
//userdata/showOnTL.js
"lang_showontl_movetxt":"This account was moved",
"lang_showontl_movebtn":"Continue on the new account",
@@ -188,7 +189,7 @@ var lang={
"lang_parse_clientmute":"muted",
"lang_parse_mute":" will be muted. You can remove on preferences.",
"lang_parse_voted":"Voted",
"lang_parse_vote":"Voted",
"lang_parse_vote":"Vote",
"lang_parse_unvoted":"Show the result without voting",
"lang_parse_endedvote":"Expired",
"lang_parse_thread":"Show thread",

View File

@@ -143,6 +143,7 @@ var lang={
"lang_hisdata_frcwarn":"非フォローだけど絡みがある時に表示されます。",
"lang_hisdata_taketime":"30秒から数分かかります",
"lang_hisdata_notonmisskey":"このシステムはMisskeyにはありません。",
"lang_hisdata_key":"このユーザーの信頼性は{{set}}によって示されています",
//userdata/showOnTL.js
"lang_showontl_movetxt":"このアカウントは移行しています",
"lang_showontl_movebtn":"移行先を見る",

View File

@@ -364,6 +364,28 @@ function misskeyLogin(url) {
"reaction-write",
"vote-read",
"vote-write"
/*
"read:account",
"write:account",
"read:drive",
"write:drive",
"read:blocks",
"write:blocks",
"read:favorites",
"write:favorites",
"read:following",
"write:following",
"read:messaging",
"write:messaging",
"read:mutes",
"write:mutes",
"write:notes",
"read:notifications",
"write:notifications",
"read:reactions",
"write:reactions",
"write:votes"
*/
]
}));
httpreq.onreadystatechange = function() {
@@ -520,7 +542,7 @@ function getdata(domain, at) {
console.log(json);
if (json.error) {
console.error("Error:" + json.error);
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + escapeHTML(json.error),
5000);
return;
}
@@ -795,7 +817,7 @@ input.addEventListener("focus", function() {
Object.keys(json.instances).forEach(function(key) {
var url = json.instances[key];
urls = urls + ' <a onclick="login(\'' + url.name +
'\')" class="pointer">' + url.name + '</a> ';
'\')" class="pointer">' +escapeHTML(url.name) + '</a> ';
});
$("#ins-suggest").html(urls);
}

View File

@@ -35,8 +35,11 @@
}else if(tags){
if(tags[2]){
tagShow(tags[2]);
Materialize.toast('<a class="btn-flat toast-action" href="detEx(\''+url+'\')">Open in browser</a>', 86400);
var acct_id=$a.parent().attr("data-acct");
if(!acct_id){
acct_id=0;
}
tl('tag',decodeURI(tags[2]),acct_id,'add')
}
}else if(ats){
console.log(ats);
@@ -178,4 +181,21 @@ const {
} = require('electron');
webviewDom.addEventListener('new-window', function(e) {
shell.openExternal(e.url);
});
});
function playSound() {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
context = new AudioContext();
context.createBufferSource().start(0);
context.decodeAudioData(request.response, function (buf) {
console.log(source)
source.buffer = buf;
source.loop = false;
});
source = context.createBufferSource();
volumeControl = context.createGain();
source.connect(volumeControl);
volumeControl.connect(context.destination);
volumeControl.gain.value=0.8
console.log(volumeControl)
source.start(0);
}

View File

@@ -32,6 +32,13 @@ function nl2br(str) {
str = str.replace(/(\n|\r)/g, "<br />");
return str;
}
function br2nl(str) {
if(!str){
return "";
}
str = str.replace(/<br \/>/g, "\r\n");
return str;
}
function formattime(date){
var str=date.getFullYear()+"-";
if(date.getMonth()+1<10){
@@ -55,7 +62,7 @@ function formattime(date){
}else{
str=str+date.getMinutes()
}
return str;
return escapeHTML(str);
}
function formattimeutc(date){
var str=date.getUTCFullYear()+"-";
@@ -80,7 +87,7 @@ function formattimeutc(date){
}else{
str=str+date.getUTCMinutes()
}
return str;
return escapeHTML(str);
}
var electron = require("electron");
var ipc = electron.ipcRenderer;

View File

@@ -35,7 +35,7 @@ function emojiToggle(reaction) {
//絵文字リスト挿入
function emojiGet(parse, started) {
$('#emoji-list').html('Loading...');
$('#emoji-list').text('Loading...');
var acct_id = $("#post-acct-sel").val();
var domain = localStorage.getItem("domain_" + acct_id);
if (localStorage.getItem("mode_" + domain) != "misskey") {
@@ -52,7 +52,7 @@ function emojiGet(parse, started) {
console.error(error);
}).then(function (json) {
if (parse == "true") {
$('#emoji-list').html('Parsing...');
$('#emoji-list').text('Parsing...');
//絵文字をマストドン公式と同順にソート
json.sort(function (a, b) {
if (a.shortcode < b.shortcode) return -1;
@@ -96,7 +96,7 @@ function emojiGet(parse, started) {
})
});
if (parse == "true") {
$('#emoji-list').html('Parsing...');
$('#emoji-list').text('Parsing...');
//絵文字をマストドン公式と同順にソート
md.sort(function (a, b) {
if (a.shortcode < b.shortcode) return -1;

View File

@@ -234,7 +234,7 @@ function voterefresh(acct_id,id){
}else{
var myvote="";
}
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+json.id+'\','+choice.id+')">'+choice.text+'('+choice.votes+''+myvote+')</div>';
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+json.id+'\','+choice.id+')">'+escapeHTML(choice.text)+'('+choice.votes+''+myvote+')</div>';
});
$(".vote_"+json.id).html(poll)
}

View File

@@ -298,7 +298,7 @@ function clear() {
$("#post-acct-sel").prop("disabled", false);
$("#days_poll").val(0);
$("#hours_poll").val(0);
$("#mins_poll").val(0);
$("#mins_poll").val(6);
$(".mastodon-choice").map(function() {
$(this).val("");
});

View File

@@ -169,7 +169,7 @@ function cgNPs(q){
var tags = "";
Object.keys(json).forEach(function(key4) {
var tag = json[key4];
tags = tags + '<a onclick="cgNP(\''+json[key4]+'\')" class="pointer">' + json[key4] + '</a> ';
tags = tags + '<a onclick="cgNP(\''+json[key4]+'\')" class="pointer">' + escapeHTML(json[key4]) + '</a> ';
});
$("#suggest").html("Cinderella NowPlaying:" + tags);
}else{

View File

@@ -4,9 +4,9 @@ function additional(acct_id, tlid) {
//メンション系
//$(".mention").attr("href", "");
$(".mention").addClass("parsed");
$("#timeline-container .mention").addClass("parsed");
$(".hashtag").each(function(i, elem) {
$("#timeline-container .hashtag").each(function(i, elem) {
var tags = $(this).attr("href").match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
@@ -17,8 +17,6 @@ function additional(acct_id, tlid) {
}
}
});
//トゥートサムネ
@@ -34,6 +32,7 @@ function additional(acct_id, tlid) {
);
}
}else{
text=""
var urls =[]
}
@@ -64,8 +63,8 @@ function additional(acct_id, tlid) {
}).then(function(json) {
if (json.title) {
$("[toot-id=" + id + "] .additional").html(
"<span class=\"gray\">URL"+lang.lang_cards_check+":<br>Title:" + json.title + "<br>" +
json.description + "</span>");
"<span class=\"gray\">URL"+lang.lang_cards_check+":<br>Title:" + escapeHTML(json.title) + "<br>" +
escapeHTML(json.description) + "</span>");
$("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed");
$("[toot-id=" + id + "]").addClass("parsed");
}
@@ -149,8 +148,8 @@ function additionalIndv(tlid, acct_id, id) {
}).then(function(json) {
if (json.title) {
$("[toot-id=" + id + "] .additional").html(
"<span class=\"gray\">URL"+lang.lang_cards_check+":<br>Title:" + json.title + "<br>" +
json.description + "</span>");
"<span class=\"gray\">URL"+lang.lang_cards_check+":<br>Title:" + escapeHTML(json.title) + "<br>" +
escapeHTML(json.description) + "</span>");
$("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed");
$("[toot-id=" + id + "]").addClass("parsed");
}

View File

@@ -91,6 +91,9 @@ function details(id, acct_id, tlid, mode) {
}
beforeToot(id, acct_id, dom);
userToot(id, acct_id, uid);
afterToot(id, acct_id, dom);
afterUserToot(id, acct_id, uid);
afterFTLToot(id, acct_id, dom);
faved(id, acct_id);
rted(id, acct_id);
if($("#toot-this div").hasClass("cvo")){
@@ -99,7 +102,7 @@ function details(id, acct_id, tlid, mode) {
$("#toot-this").addClass("cvo");
}
if(!$("#activator").hasClass("active")){
$('#det-col').collapsible('open', 1);
$('#det-col').collapsible('open', 4);
}
});
@@ -332,6 +335,81 @@ function userToot(id, acct_id, user) {
}
}
//後のLTL
function afterToot(id, acct_id, domain) {
//var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain +
"/api/v1/timelines/public?local=true&min_id=" + id;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
},
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
var templete = parse(json, 'noauth', acct_id);
if(templete!=""){
$("#ltl-after .no-data").hide();
}
$("#ltl-after").html(templete);
jQuery("time.timeago").timeago();
});
}
//後のUTL
function afterUserToot(id, acct_id, user) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/accounts/" + user + "/statuses?min_id=" + id;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + at
},
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
var templete = parse(json, '', acct_id);
if(templete!=""){
$("#user-after .no-data").hide();
}
$("#user-after").html(templete);
jQuery("time.timeago").timeago();
});
}
//後のFTL
function afterFTLToot(id, acct_id, domain) {
//var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain +
"/api/v1/timelines/public?min_id=" + id;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
},
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
var templete = parse(json, 'noauth', acct_id);
if(templete!=""){
$("#ftl-after .no-data").hide();
}
$("#ftl-after").html(templete);
jQuery("time.timeago").timeago();
});
}
//ふぁぼ一覧
function faved(id, acct_id) {

View File

@@ -243,7 +243,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var id = toot.id;
var home = "";
if (toot.account.locked) {
var locked = ' <i class="fa fa-lock red-text"></i>';
var locked = ' <i class="fas fa-lock red-text"></i>';
} else {
var locked = "";
}
@@ -251,7 +251,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var via = '';
viashow="hide";
} else {
var via = toot.application.name;
var via = escapeHTML(toot.application.name);
//強調チェック
Object.keys(emp).forEach(function(key6) {
var cli = emp[key6];
@@ -432,7 +432,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if(word){
var word=word.tag;
var regExp = new RegExp( word, "g" ) ;
content=content.replace(regExp,'<span class="emp">'+word+"</span>");
content=content.replace(regExp,'<span class="emp">'+escapeHTML(word)+"</span>");
}
});
}
@@ -483,7 +483,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
for( var i=0; i<tickerdata.length; i++) {
var value=tickerdata[i];
if(value.domain==thisdomain){
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+value.name+'</span></div>';
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+escapeHTML(value.name)+'</span></div>';
break;
}
}
@@ -506,7 +506,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
toot.account.acct + locked + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'' +
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
'('+lang.lang_parse_clickcopyurl+')"><i class="fa fa-clock-o"></i>' +
'('+lang.lang_parse_clickcopyurl+')"><i class="far fa-clock-o"></i>' +
date(toot.created_at, datetype) + '</span>' +
'</div></div>' +
'<div class="area-toot">'+tickerdom+'<span class="' +

View File

@@ -30,7 +30,7 @@ function list(){
var lists = "";
Object.keys(json).forEach(function(key) {
var list = json[key];
lists = lists + list.title+':<a onclick="listShow(\'' + list.id + '\',\'' + list.title + '\',\'' + acct_id +
lists = lists + escapeHTML(list.title)+':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id +
'\')" class="pointer">'+lang.lang_list_show+'</a><br>';
});
$("#lists").html(lists);
@@ -57,7 +57,7 @@ function list(){
var lists = "";
Object.keys(json).forEach(function(key) {
var list = json[key];
lists = lists + list.title+':<a onclick="listShow(\'' + list.id + '\',\'' + list.title + '\',\'' + acct_id +
lists = lists + escapeHTML(list.title)+':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id +
'\')" class="pointer">'+lang.lang_list_show+'</a>/<a onclick="listUser(\'' + list.id + '\',' + acct_id +
')" class="pointer">'+lang.lang_list_users+'</a><br>';
});
@@ -193,7 +193,7 @@ function hisList(user,acct_id){
Object.keys(json).forEach(function(key) {
var list = json[key];
lists = lists + '<a onclick="listRemove(\'' + list.id + '\',\'' + user + '\',\'' + acct_id +
'\')" class="pointer">'+list.title+'</a><br> ';
'\')" class="pointer">'+escapeHTML(list.title)+'</a><br> ';
});
$("#his-lists-b").html(lists);
}else{
@@ -217,7 +217,7 @@ function hisList(user,acct_id){
var lists = "";
Object.keys(json).forEach(function(key) {
var list = json[key];
lists = lists + list.title+':<a onclick="listShow(\'' + list.id + '\',\'' + list.title + '\',\'' + acct_id +
lists = lists + list.title+':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id +
'\')" class="pointer">'+lang.lang_list_show+'</a>/<a onclick="listAdd(\'' + list.id + '\',\'' + user + '\',\'' + acct_id +
'\')" class="pointer">'+lang.lang_list_add+lang.lang_list_add_misskey+'</a><br>';
});

View File

@@ -161,14 +161,16 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
disname="";
}
//絵文字があれば
Object.keys(toot.user.emojis).forEach(function(key5) {
var emoji = toot.user.emojis[key5];
var shortcode = emoji.name;
var emoji_url = '<img draggable="false" src="' + emoji.url +
'" class="emoji-img" data-emoji="'+shortcode+'" alt=" :'+shortcode+': ">';
var regExp = new RegExp(":" + shortcode + ":", "g");
dis_name = dis_name.replace(regExp, emoji_url);
});
if(toot.user.emojis){
Object.keys(toot.user.emojis).forEach(function(key5) {
var emoji = toot.user.emojis[key5];
var shortcode = emoji.name;
var emoji_url = '<img draggable="false" src="' + emoji.url +
'" class="emoji-img" data-emoji="'+shortcode+'" alt=" :'+shortcode+': ">';
var regExp = new RegExp(":" + shortcode + ":", "g");
dis_name = dis_name.replace(regExp, emoji_url);
});
}
if (mix == "notf") {
if (gif == "yes") {
noticeavatar = toot.user.avatarUrl;
@@ -182,14 +184,14 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
'"></a>';
if (toot.type == "reply") {
var what = lang.lang_parse_mentioned;
var icon = '<i class="big-text fa fa-share teal-text"></i>';
var icon = '<i class="big-text fas fa-share teal-text"></i>';
noticeavatar="";
} else if (toot.type == "renote") {
var what = lang.lang_misskeyparse_renoted;
var icon = '<i class="big-text fa fa-retweet light-blue-text"></i>';
var icon = '<i class="big-text fas fa-retweet light-blue-text"></i>';
} else if (toot.type == "quote") {
var what = lang.lang_misskeyparse_quoted;
var icon = '<i class="big-text fa fa-quote-right orange-text"></i>';
var icon = '<i class="big-text fas fa-quote-right orange-text"></i>';
} else if (toot.type == "reaction") {
var what = lang.lang_misskeyparse_reacted;
var reactions={
@@ -224,7 +226,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var icon = '<i class="big-text material-icons indigo-text" style="font-size:17px">info</i>';
}
var noticetext = '<span class="cbadge cbadge-hover"title="' + date(toot.createdAt,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="fa fa-clock-o"></i>' + date(toot.createdAt,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="far fa-clock"></i>' + date(toot.createdAt,
datetype) +
'</span>'+icon+'<a onclick="udg(\'' + toot.user.username +
'\',\'' + acct_id + '\')" class="pointer grey-text">' + dis_name +
@@ -284,18 +286,20 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
}
var if_notf='data-notfIndv="'+acct_id+"_"+toot.id+'"';
var toot = toot.note;
var dis_name=escapeHTMLtemp(toot.user.name);
var dis_name=escapeHTML(toot.user.name);
}else{
var if_notf="";
if (toot.renote) {
var rebtxt = lang.lang_parse_btedsimple;
var rticon = "fa-retweet light-blue-text";
var notice = '<i class="big-text fa '+rticon+'"></i>'+ dis_name + "(@" + toot.user.username +
var notice = '<i class="big-text fas '+rticon+'"></i>'+ dis_name + "(@" + toot.user.username +
")<br>";
var boostback = "shared";
var uniqueid=toot.id;
var toot = toot.renote;
var dis_name=escapeHTMLtemp(toot.user.name);
if(!toot.text){
var toot = toot.renote;
}
var dis_name=escapeHTML(toot.user.name);
var uniqueid=toot.id;
var actemojick=false
} else {
@@ -338,7 +342,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if(toot.viaMobile){
var via = '<span style="font-style: italic;">Mobile</span>';
}else{
var via = '<span style="font-style: italic;">Unknown</span>';
var via = '';
}
} else {
var via = toot.app.name;
@@ -358,7 +362,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
});
}
if ((toot.cw || toot.cw=="") && cw) {
var content = toot.text;
var content = escapeHTML(toot.text);
var spoil = escapeHTMLtemp(toot.cw);
var spoiler = "cw cw_hide_" + toot.id;
var api_spoil = "gray";
@@ -614,7 +618,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
for( var i=0; i<tickerdata.length; i++) {
var value=tickerdata[i];
if(value.domain==thisdomain){
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+value.name+'</span></div>';
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+escapeHTML(value.name)+'</span></div>';
break;
}
}
@@ -630,13 +634,15 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
}else{
var myvote="";
}
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+toot.id+'\','+choice.id+')">'+choice.text+'('+choice.votes+''+myvote+')</div>';
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+toot.id+'\','+choice.id+')">'+escapeHTML(choice.text)+'('+choice.votes+''+myvote+')</div>';
});
poll='<div class="vote_'+toot.id+'">'+poll+'</div>';
}
/*
*/
//引用Renote
if(toot.renote){
poll=poll+'<div class="quote-renote"><div class="renote-icon"><a onclick="udg(\'' + toot.renote.user.id +
'\',' + acct_id + ');" user="' + toot.renote.user.username + '" class="udg"><img src="'+toot.renote.user.avatarUrl+'"></a></div><div class="renote-user">'+escapeHTML(toot.renote.user.name)+'</div><div class="renote-text">'+escapeHTML(toot.renote.text)+'</div></div>'
}
if(localStorage.getItem("emojiReaction_" + acct_id)=="disabled"){
var freeReact="hide";
}else{
@@ -665,7 +671,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var emoji = obj[i];
if (":"+emoji.shortcode+":"==keye) {
if (emoji) {
addReact=addReact+ '<span class="reaction "><a onclick="reaction(\''+keye+'\',\'' + toot.id + '\',' + acct_id +
addReact=addReact+ '<span class="reaction"><a onclick="reaction(\''+keye+'\',\'' + toot.id + '\',' + acct_id +
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;"><img src="'+emoji.url+'" style="width:13px;"></a><span class="re-'+emoji.shortcode+'ct">'+thisReact+
'</span></span>';
}
@@ -777,7 +783,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
toot.user.username + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'https://' +domain+"/notes/"+
toot.id + '\');" title="' + date(toot.createdAt, 'absolute') +
'('+lang.lang_parse_clickcopyurl+')"><i class="fa fa-clock-o"></i>' +
'('+lang.lang_parse_clickcopyurl+')"><i class="far fa-clock"></i>' +
date(toot.createdAt, datetype) + '</span>' +
'</div></div>' +
'<div class="area-toot">'+tickerdom+'<span class="toot ' + spoiler + '">' + content +
@@ -814,28 +820,28 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
'<div class="action '+disp["re"]+' '+noauth+'"><a onclick="misskeyreply(\'' + toot.id +
'\',\'' + acct_id + '\',' +
acct_id + ',\''+visen+
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_replyto+'"><i class="fa fa-share"></i></a></div>' +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_replyto+'"><i class="fas fa-share"></i></a></div>' +
'<div class="action '+can_rt+' '+disp["rt"]+' '+noauth+'"><a onclick="renote(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renote+'"><i class="text-darken-3 fa fa-retweet ' +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renote+'"><i class="text-darken-3 fas fa-retweet ' +
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct"></span></a></div>' +
'<div class="action '+can_rt+' '+disp["qt"]+' '+noauth+'"><a onclick="renoteqt(\'' + toot.id + '\',' + acct_id +
',\'misskey.xyz\',\'misskey.xyz\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renoteqt+'"><i class="text-darken-3 fa fa-quote-right"></i></a></div>' +
',\'misskey.xyz\',\'misskey.xyz\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renoteqt+'"><i class="text-darken-3 fas fa-quote-right"></i></a></div>' +
'<div class="action '+disp["fav"]+' '+noauth+'"><a onclick="reactiontoggle(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_reaction+'"><i class="fa text-darken-3 fa-plus' +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_reaction+'"><i class="fas text-darken-3 fa-plus' +
if_fav + ' fav_' + toot.id + '"></i></div>' +
'<div class="' + if_mine + ' action '+disp["del"]+' '+noauth+'"><a onclick="del(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'"><i class="fa fa-trash-o"></i></a></div>' +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'"><i class="fas fa-trash"></i></a></div>' +
'<div class="' + if_mine + ' action pin '+disp["pin"]+' '+noauth+'"><a onclick="pin(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'"><i class="fa fa-map-pin pin_' + toot.id + '"></i></a></div>'
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'"><i class="fas fa-map-pin pin_' + toot.id + '"></i></a></div>'
+'<div class="' + if_mine + ' action '+disp["red"]+' '+noauth+'"><a onclick="redraft(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_redraft+'"><i class="material-icons">redo</i></a></div>'+trans+
'<span class="cbadge viabadge waves-effect '+viashow+' '+mine_via+'" onclick="client(\''+$.strip_tagstemp(via)+'\')" title="via ' + $.strip_tagstemp(via) + '">via ' +
via +
escapeHTML(via) +
'</span>'+
'</div><div class="area-side '+mouseover+'"><div class="action ' + if_mine + ' '+noauth+'"><a onclick="toggleAction(\'' + toot.id + '\',\''+tlid+'\',\''+acct_id+'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 material-icons act-icon">expand_more</i></a></div>' +
'<div class="action '+noauth+'"><a onclick="details(\'' + toot.id + '\',' + acct_id +
@@ -867,7 +873,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
var ftxt=lang.lang_parse_followed;
if(popup > 0 || popup==-1){
var notftext='<span class="cbadge"title="' + date(toot.createdAt,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="fa fa-clock-o"></i>' + date(toot.createdAt,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="far fa-clock"></i>' + date(toot.createdAt,
datetype) +
'</span>'+ftxt+'<br>';
var toot = toot.user;
@@ -911,7 +917,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
var dis_name=escapeHTMLtemp(toot.name);
dis_name=twemoji.parse(dis_name);
}else{
var dis_name=toot.name;
var dis_name=toot.username;
}
templete = templete +
'<div class="cvo" style="padding-top:5px;" user-id="' + toot.id + '"><div class="area-notice">' +

View File

@@ -94,12 +94,14 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
websocketLocal[wslid] = new WebSocket(startLocal);
websocketHome[wshid].onopen = function(mess) {
localStorage.setItem("wssH_" + tlid, wshid);
console.log("Connect Streaming API(Integrated:Home)");
console.log(tlid + ":Connect Streaming API(Integrated:Home)");
console.log(mess);
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocketLocal[wslid].onopen = function(mess) {
localStorage.setItem("wssL_" + tlid, wslid);
console.log("Connect Streaming API(Integrated:Local)");
console.log(tlid + ":Connect Streaming API(Integrated:Local)");
console.log(mess);
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocketLocal[wslid].onmessage = function(mess) {
@@ -195,39 +197,57 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
}
websocketLocal[wslid].onerror = function(error) {
console.error('WebSocket Error ' + error);
console.error('WebSocketLocal Error')
console.error(error);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error);
}else{
reconnector(tlid,TLtype,acct_id,"","error");
var errorct=localStorage.getItem("wserror_" + tlid)*1+1;
localStorage.setItem("wserror_" + tlid,errorct);
if(errorct<3){
reconnector(tlid,TLtype,acct_id,"","error");
}
}
};
websocketLocal[wslid].onclose = function() {
console.error('WebSocketLocal Closing by error:' + tlid);
console.log('WebSocketLocal Closing:' + tlid);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
}else{
reconnector(tlid,TLtype,acct_id,"","error");
var errorct=localStorage.getItem("wserror_" + tlid)*1+1;
localStorage.setItem("wserror_" + tlid,errorct);
if(errorct<3){
reconnector(tlid,TLtype,acct_id,"","error");
}
}
};
websocketHome[wshid].onerror = function(error) {
console.error('WebSocket Error ' + error);
console.error('WebSocketHome Error')
console.error(error);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error);
}else{
reconnector(tlid,TLtype,acct_id,"","error");
var errorct=localStorage.getItem("wserror_" + tlid)*1+1;
localStorage.setItem("wserror_" + tlid,errorct);
if(errorct<3){
reconnector(tlid,TLtype,acct_id,"","error");
}
}
};
websocketHome[wshid].onclose = function() {
console.error('WebSocketHome Closing by error:' + tlid);
console.log('WebSocketHome Closing:' + tlid);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
}else{
reconnector(tlid,TLtype,acct_id,"","error");
var errorct=localStorage.getItem("wserror_" + tlid)*1+1;
localStorage.setItem("wserror_" + tlid,errorct);
if(errorct<3){
reconnector(tlid,TLtype,acct_id,"","error");
}
}
};

View File

@@ -112,73 +112,6 @@ function notfColumn(acct_id, tlid, sys){
at;
}
console.log(start);
var wsid = websocketNotf.length;
websocketNotf[acct_id] = new WebSocket(start);
console.log(websocketNotf);
websocketNotf[acct_id].onopen = function(mess) {
console.log("Connect Streaming API(Notf):");
console.log(mess);
$("i[data-notf=" + acct_id +"]").removeClass("red-text");
}
websocketNotf[acct_id].onmessage = function(mess) {
console.log("Receive Streaming API(Notf):"+acct_id);
var popup = localStorage.getItem("popup");
if (!popup) {
popup = 0;
}
console.log(domain)
if(misskey){
console.log("misskey")
console.log(JSON.parse(mess.data));
if (JSON.parse(mess.data).type == "notification") {
var obj = JSON.parse(mess.data).body;
console.log(obj);
if(obj.type!="follow"){
templete = misskeyParse([obj], 'notf', acct_id, 'notf', popup);
}else{
templete = misskeyUserparse([obj], 'notf', acct_id, 'notf', popup);
}
if(obj.type=="reaction"){
console.log("refresh")
reactRefresh(acct_id,obj.note.id)
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$("div[data-notf=" + acct_id +"]").prepend(templete);
}
jQuery("time.timeago").timeago();
}else if(JSON.parse(mess.data).type == "note-updated"){
var obj = JSON.parse(mess.data).body.note;
reactRefreshCore(obj)
}
}else{
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "notification") {
var templete="";
localStorage.setItem("lastnotf_" + acct_id,obj.id);
if(obj.type!="follow"){
templete = parse([obj], 'notf', acct_id, 'notf', popup);
}else{
templete = userparse([obj], 'notf', acct_id, 'notf', popup);
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$(".tl[data-notf=" + acct_id +"]").prepend(templete);
}
$(".notf-timeline[data-acct=" + acct_id +"]").prepend(templete);
jQuery("time.timeago").timeago();
} else if (type == "delete") {
$("[toot-id=" + obj + "]").hide();
$("[toot-id=" + obj + "]").remove();
}
}
}
websocketNotf[acct_id].onerror = function(error) {
console.error('WebSocket Error ' + error);
};
}
function notfCommon(acct_id, tlid, sys) {
todo("Notifications Loading...");
@@ -233,13 +166,13 @@ function notfCommon(acct_id, tlid, sys) {
var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform;
var options = {
body: ct+lang.lang_notf_new[lang],
body: ct+lang.lang_notf_new,
icon: localStorage.getItem("prof_"+acct_id)
};
if(os=="darwin"){
var n = new Notification('TheDesk:'+domain, options);
}else{
ipc.send('native-notf', ['TheDesk:'+domain,ct+lang.lang_notf_new[lang],localStorage.getItem("prof_"+acct_id)]);
ipc.send('native-notf', ['TheDesk:'+domain,ct+lang.lang_notf_new,localStorage.getItem("prof_"+acct_id)]);
}
}
@@ -318,6 +251,7 @@ function notfCommon(acct_id, tlid, sys) {
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$("div[data-notf=" + acct_id +"]").prepend(templete);
$("div[data-const=notf_"+acct_id+"]").prepend(templete);
}
jQuery("time.timeago").timeago();
}else if(JSON.parse(mess.data).type == "note-updated"){
@@ -338,6 +272,7 @@ function notfCommon(acct_id, tlid, sys) {
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$("div[data-notf=" + acct_id +"]").prepend(templete);
$("div[data-const=notf_"+acct_id+"]").prepend(templete);
}
jQuery("time.timeago").timeago();
} else if (type == "delete") {

View File

@@ -236,9 +236,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var icon = "fa-tasks purple-text";
}
var noticetext = '<span class="cbadge cbadge-hover"title="' + date(toot.created_at,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="fa fa-clock-o"></i>' + date(toot.created_at,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="far fa-clock"></i>' + date(toot.created_at,
datetype) +
'</span><i class="big-text fa '+icon+'"></i><a onclick="udg(\'' + toot.account.id +
'</span><i class="big-text fas '+icon+'"></i><a onclick="udg(\'' + toot.account.id +
'\',\'' + acct_id + '\')" class="pointer grey-text">' + dis_name +
"(@" + toot.account.acct +
")</a>";
@@ -251,16 +251,28 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
$(".notf-reply_" + acct_id).text(replyct*1-(-1));
localStorage.setItem("notf-reply_" + acct_id,replyct*1-(-1))
$(".notf-reply_" + acct_id).removeClass("hide")
var sound=localStorage.getItem("replySound");
if(sound=="default"){
var file="../../source/notif3.wav"
}
}else if (toot.type == "reblog") {
var btct=localStorage.getItem("notf-bt_" + acct_id)
$(".notf-bt_" + acct_id).text(btct*1-(-1));
localStorage.setItem("notf-bt_" + acct_id,btct*1-(-1))
$(".notf-bt_" + acct_id).removeClass("hide")
var sound=localStorage.getItem("btSound");
if(sound=="default"){
var file="../../source/notif2.wav"
}
}else if (toot.type == "favourite") {
var favct=localStorage.getItem("notf-fav_" + acct_id)
$(".notf-fav_" + acct_id).text(favct*1-(-1));
localStorage.setItem("notf-fav_" + acct_id,favct*1-(-1))
$(".notf-fav_" + acct_id).removeClass("hide")
var sound=localStorage.getItem("favSound");
if(sound=="default"){
var file="../../source/notif.wav"
}
}
}
@@ -268,6 +280,23 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if(popup>0){
Materialize.toast("["+domain+"]"+escapeHTML(toot.account.display_name)+what, popup * 1000);
}
//通知音
if(sound=="c1"){
var file=localStorage.getItem("custom1");
}else if(sound=="c2"){
var file=localStorage.getItem("custom2");
}else if(sound=="c3"){
var file=localStorage.getItem("custom3");
}else if(sound=="c4"){
var file=localStorage.getItem("custom4");
}
if(file){
request = new XMLHttpRequest();
request.open("GET", file, true);
request.responseType = "arraybuffer";
request.onload = playSound;
request.send();
}
if(native=="yes"){
var electron = require("electron");
var ipc = electron.ipcRenderer;
@@ -334,7 +363,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
}else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){
rebtxt = "がしばいた";
}
var notice = '<i class="big-text fa '+rticon+'"></i>'+ dis_name + "(@" + toot.account.acct +
var notice = '<i class="big-text fas '+rticon+'"></i>'+ dis_name + "(@" + toot.account.acct +
")<br>";
var boostback = "shared";
var uniqueid=toot.id;
@@ -387,7 +416,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var divider = '<div class="divider"></div>';
}
if (toot.account.locked) {
var locked = ' <i class="fa fa-lock red-text"></i>';
var locked = ' <i class="fas fa-lock red-text"></i>';
} else {
var locked = "";
}
@@ -395,7 +424,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var via = '';
viashow="hide";
} else {
var via = toot.application.name;
var via = escapeHTML(toot.application.name);
//強調チェック
Object.keys(emp).forEach(function(key6) {
var cli = emp[key6];
@@ -452,6 +481,40 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var viewer = "";
var hasmedia = "";
var youtube = "";
//Poll
var poll="";
if(toot.poll){
var choices=toot.poll.options;
if(toot.poll.voted){
var myvote=lang.lang_parse_voted;
var result_hide="";
}else{
var myvote='<a onclick="voteMastodon(\''+acct_id+'\',\''+toot.poll.id+'\')" class="votebtn">'+lang.lang_parse_vote+'</a><br>';
if(choices[0].votes_count===0 || choices[0].votes_count>0){
myvote=myvote+'<a onclick="showResult(\''+acct_id+'\',\''+toot.poll.id+'\')" class="pointer">'+lang.lang_parse_unvoted+"</a>";
}
var result_hide="hide";
}
if(toot.poll.expired){
var ended=lang.lang_parse_endedvote;
}else{
var ended=date(toot.poll.expires_at, datetype);
}
Object.keys(choices).forEach(function(keyc) {
var choice = choices[keyc];
if(!toot.poll.voted && !toot.poll.expired){
var votesel='voteSelMastodon(\''+acct_id+'\',\''+toot.poll.id+'\','+keyc+','+toot.poll.multiple+')';
var voteclass="pointer waves-effect waves-light";
}else{
var votesel="";
var voteclass="";
}
poll=poll+'<div class="'+voteclass+' vote vote_'+acct_id+'_'+toot.poll.id+'_'+keyc+'" onclick="'+votesel+'">'+escapeHTML(choice.title)+'<span class="vote_'+acct_id+'_'+toot.poll.id+'_result '+result_hide+'">('+choice.votes_count+')</span></div>';
});
poll='<div class="vote_'+acct_id+'_'+toot.poll.id+'">'+poll+myvote+'<span class="cbadge cbadge-hover" title="' + date(toot.poll.expires_at, 'absolute') +
'"><i class="far fa-calendar-times"></i>' +
ended+ '</span></div>';
}
if(toot.emojis){
var emojick = toot.emojis[0];
}else{
@@ -467,6 +530,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var regExp = new RegExp(":" + shortcode + ":", "g");
content = content.replace(regExp, emoji_url);
spoil = spoil.replace(regExp, emoji_url);
poll = poll.replace(regExp, emoji_url);
});
}
//ニコフレ絵文字
@@ -475,7 +539,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
}else{
var nicoemojick=false;
}
//絵文字があれば
//絵文字があれば(nico)
if (nicoemojick) {
Object.keys(toot.profile_emojis).forEach(function(keynico) {
var emoji = toot.profile_emojis[keynico];
@@ -485,6 +549,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var regExp = new RegExp(":" + shortcode + ":", "g");
content = content.replace(regExp, emoji_url);
spoil = spoil.replace(regExp, emoji_url);
poll = poll.replace(regExp, emoji_url);
});
}
//デフォ絵文字
@@ -501,6 +566,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if(notice){
notice=twemoji.parse(notice);
}
if(poll){
poll=twemoji.parse(poll);
}
var mediack = toot.media_attachments[0];
//メディアがあれば
var media_ids="";
@@ -512,16 +580,25 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var purl = media.preview_url;
media_ids=media_ids+media.id+",";
var url = media.url;
var nsfwmes=""
if (toot.sensitive && nsfw) {
var sense = "sensitive"
var blur=media.blurhash
if(blur){
nsfwmes='<span class="gray">NSFW media</span>'
purl=parseBlur(blur)
var sense=""
}
} else {
var sense = ""
var blur=null
}
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url +
'" data-type="' + media.type + '" class="img-parsed"><img draggable="false" src="' +
purl + '" class="' + sense +
' toot-img pointer" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"></a></span>';
' toot-img pointer" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"></a>'+nsfwmes;
});
media_ids = media_ids.slice(0, -1) ;
} else {
@@ -698,45 +775,15 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
for( var i=0; i<tickerdata.length; i++) {
var value=tickerdata[i];
if(value.domain==thisdomain){
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img draggable="false" src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+value.name+'</span></div>';
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img draggable="false" src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+escapeHTML(value.name)+'</span></div>';
break;
}
}
}
}
//Poll
var poll="";
if(toot.poll){
var choices=toot.poll.options;
if(toot.poll.voted){
var myvote=lang.lang_parse_voted;
var result_hide="";
}else{
myvote='<a onclick="voteMastodon(\''+acct_id+'\',\''+toot.poll.id+'\')" class="votebtn">'+lang.lang_parse_vote+'</a><br>';
if(choices[0].votes_count===0 || choices[0].votes_count>0){
myvote=myvote+'<a onclick="showResult(\''+acct_id+'\',\''+toot.poll.id+'\')" class="pointer">'+lang.lang_parse_unvoted+"</a>";
}
var result_hide="hide";
}
if(toot.poll.expired){
var ended=lang.lang_parse_endedvote;
}else{
var ended=date(toot.poll.expires_at, datetype);
}
Object.keys(choices).forEach(function(keyc) {
var choice = choices[keyc];
if(!toot.poll.voted && !toot.poll.expired){
var votesel='voteSelMastodon(\''+acct_id+'\',\''+toot.poll.id+'\','+keyc+','+toot.poll.multiple+')';
var voteclass="pointer waves-effect waves-light";
}else{
var votesel="";
var voteclass="";
}
poll=poll+'<div class="'+voteclass+' vote vote_'+acct_id+'_'+toot.poll.id+'_'+keyc+'" onclick="'+votesel+'">'+choice.title+'<span class="vote_'+acct_id+'_'+toot.poll.id+'_result '+result_hide+'">('+choice.votes_count+')</span></div>';
});
poll='<div class="vote_'+acct_id+'_'+toot.poll.id+'">'+poll+myvote+'<span class="cbadge cbadge-hover" title="' + date(toot.poll.expires_at, 'absolute') +
'"><i class="fa fa-calendar-times-o"></i>' +
ended+ '</span></div>';
//Quote
if(toot.quote){
poll=poll+'<div class="quote-renote"><div class="renote-icon"><img src="'+toot.quote.account.avatar+'"></div><div class="renote-user">'+escapeHTML(toot.quote.account.display_name)+'</div><div class="renote-text">'+toot.quote.content+'</div></div>'
}
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + pin_app +
@@ -755,13 +802,13 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
toot.account.acct + locked + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'' +
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
'('+lang.lang_parse_clickcopyurl+')"><i class="fa fa-clock-o"></i>' +
'('+lang.lang_parse_clickcopyurl+')"><i class="far fa-clock"></i>' +
date(toot.created_at, datetype) + '</span>' +
'</div></div>' +
'<div class="area-toot">'+tickerdom+'<span class="' +
api_spoil + ' cw_text_' + toot.id + '"><span class="cw_text">' + spoil + "</span>" + spoiler_show +
'</span><span class="toot ' + spoiler + '">' + content +poll+
'</span>' +
'</span><span class="toot ' + spoiler + '">' + content +
'</span>' + poll +
'' + viewer + '' +
'</div><div class="area-additional"><span class="additional">' + analyze +
'</span>' +
@@ -774,27 +821,27 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
'<div class="action '+disp["re"]+' '+noauth+'"><a onclick="re(\'' + toot.id +
'\',\'' + to_mention + '\',' +
acct_id + ',\''+visen+
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_replyto+'"><i class="fa fa-share"></i><span class="rep_ct">' + replyct +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_replyto+'"><i class="fas fa-share"></i><span class="rep_ct">' + replyct +
'</a></span></a></div>' +
'<div class="action '+can_rt+' '+disp["rt"]+' '+noauth+'"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_bt+'"><i class="fa fa-retweet ' +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_bt+'"><i class="fas fa-retweet ' +
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
'</span></a></div>' +
'<div class="action '+can_rt+' '+disp["qt"]+' '+noauth+' '+qtClass+'"><a onclick="qt(\'' + toot.id + '\',' + acct_id +
',\'' + toot.account.acct +'\',\''+toot.url+
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_quote+'"><i class="text-darken-3 fa fa-quote-right"></i></a></div>' +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_quote+'"><i class="text-darken-3 fas fa-quote-right"></i></a></div>' +
'<div class="action '+disp["fav"]+' '+noauth+'"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_fav+'"><i class="fa text-darken-3 fa-star' +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_fav+'"><i class="fas text-darken-3 fa-star' +
if_fav + ' fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
'</a></span></div>' +
'<div class="' + if_mine + ' action '+disp["del"]+' '+noauth+'"><a onclick="del(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'"><i class="fa fa-trash-o"></i></a></div>' +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'"><i class="fas fa-trash"></i></a></div>' +
'<div class="' + if_mine + ' action pin '+disp["pin"]+' '+noauth+'"><a onclick="pin(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'"><i class="fa fa-map-pin pin_' + toot.id + ' '+if_pin+'"></i></a></div>'
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'"><i class="fas fa-map-pin pin_' + toot.id + ' '+if_pin+'"></i></a></div>'
+'<div class="' + if_mine + ' action '+disp["red"]+' '+noauth+'"><a onclick="redraft(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_redraft+'"><i class="material-icons">redo</i></a></div>'+trans+
@@ -833,7 +880,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var notf=false;
}
if (toot.locked) {
var locked = ' <i class="fa fa-lock red-text"></i>';
var locked = ' <i class="fas fa-lock red-text"></i>';
} else {
var locked = "";
}
@@ -962,7 +1009,7 @@ function client(name) {
if(!obj){
var obj=[];
obj.push(name);
Materialize.toast(name+lang.lang_status_emphas, 2000);
Materialize.toast(escapeHTML(name)+lang.lang_status_emphas, 2000);
}else{
var can;
Object.keys(obj).forEach(function(key) {
@@ -972,12 +1019,12 @@ function client(name) {
}else{
can=true;
obj.splice(key, 1);
Materialize.toast(name+lang.lang_status_unemphas, 2000);
Materialize.toast(escapeHTML(name)+lang.lang_status_unemphas, 2000);
}
});
if(!can){
obj.push(name);
Materialize.toast(name+lang.lang_status_emphas, 2000);
Materialize.toast(escapeHTML(name)+lang.lang_status_emphas, 2000);
}else{
}
@@ -993,7 +1040,7 @@ function client(name) {
obj.push(name);
var json = JSON.stringify(obj);
localStorage.setItem("client_mute", json);
Materialize.toast(name+lang.lang_parse_mute, 2000);
Materialize.toast(escapeHTML(name)+lang.lang_parse_mute, 2000);
}else{
return;
}

View File

@@ -108,10 +108,10 @@ function voteMastodonrefresh(acct_id,id){
if(!json.voted){
votesel='voteSelMastodon(\''+acct_id+'\',\''+json.id+'\','+keyc+','+json.multiple+')';
}
poll=poll+'<div class="pointer vote vote_'+acct_id+'_'+json.id+'_'+keyc+'" onclick="'+votesel+'">'+choice.title+'<span class="vote_'+acct_id+'_'+json.id+'_result '+result_hide+'">('+choice.votes_count+')</span></div>';
poll=poll+'<div class="pointer vote vote_'+acct_id+'_'+json.id+'_'+keyc+'" onclick="'+votesel+'">'+escapeHTML(choice.title)+'<span class="vote_'+acct_id+'_'+json.id+'_result '+result_hide+'">('+choice.votes_count+')</span></div>';
});
poll=poll+myvote+'<span class="cbadge cbadge-hover" title="' + date(json.expires_at, 'absolute') +
'"><i class="fa fa-calendar-times-o"></i>' +
'"><i class="far fa-calendar-times"></i>' +
date(json.expires_at, datetype) + '</span>';
$('.vote_'+acct_id+'_'+json.id).html(poll)
}

View File

@@ -52,7 +52,7 @@ function src(mode) {
var tag = json.hashtags[key4];
if(mode){
tags = tags + '<a onclick="tl(\'tag\',\'' + tag + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + tag + '</a><br> ';
'\',\'add\')" class="pointer">#' + escapeHTML(tag) + '</a><br> ';
}else{
tags=tags+graphDraw(tag);
}
@@ -186,13 +186,13 @@ function graphDraw(tag){
var zero=50-(his[0].uses/max*50);
if(max===0){
tags = '<br><br><svg version="1.1" viewbox="0 0 60 50" width="60" height="50">'+
'</svg><span style="font-size:200%">'+his[0].uses+'</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + tag.name + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + tag.name + '</a>&nbsp;'+his[0].accounts+lang.lang_src_people;
'</svg><span style="font-size:200%">'+his[0].uses+'</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + escapeHTML(tag.name) + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + escapeHTML(tag.name) + '</a>&nbsp;'+his[0].accounts+lang.lang_src_people;
}else{
tags = '<br><br><svg version="1.1" viewbox="0 0 60 50" width="60" height="50">'+
'<g><path d="M0,'+six+' L10,'+five+' 20,'+four+' 30,'+three+' 40,'+two+' 50,'+one+' 60,'+zero+'" style="stroke: #9e9e9e; stroke-width: 1;fill: none;"></path></g>'+
'</svg><span style="font-size:200%">'+his[0].uses+'</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + tag.name + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + tag.name + '</a>&nbsp;'+his[0].accounts+lang.lang_src_people;
'</svg><span style="font-size:200%">'+his[0].uses+'</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + escapeHTML(tag.name) + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + escapeHTML(tag.name) + '</a>&nbsp;'+his[0].accounts+lang.lang_src_people;
}
return tags;

View File

@@ -65,6 +65,7 @@ function favTag(){
var ptt=lang.lang_tags_unrealtime;
var nowon="("+lang.lang_tags_realtime+")";
}
tag=escapeHTML(tag);
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a>'+nowon+'<span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="' +lang.lang_parse_tagTL.replace("{{tag}}" ,'#'+tag)+ '">TL</a> <a onclick="brInsert(\'#' + tag + '\')" class="pointer" title="' + lang.lang_parse_tagtoot.replace("{{tag}}" ,'#'+tag) + '">Toot</a> '+
'<a onclick="autoToot(\'' + tag + '\');" class="pointer" title="'+lang.lang_tags_always + lang.lang_parse_tagtoot.replace("{{tag}}" ,'#'+tag) + '">'+ptt+'</a> <a onclick="tagRemove(\'' + key + '\')" class="pointer" title="' +lang.lang_tags_tagunpin.replace("{{tag}}" ,'#'+tag)+ '">'+lang.lang_del+'</a></span> ';
});
@@ -96,6 +97,7 @@ function trendTag(){
var tags="";
json=json.score;
Object.keys(json).forEach(function(tag) {
tag=escapeHTML(tag);
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="show();brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a></span> ';
});
$("#taglist").append('<div class="trendtag">アイマストドントレンドタグ<i class="material-icons pointer" onclick="trendTag()" style="font-size:12px">refresh</i>:' + tags+'</div>');
@@ -115,6 +117,7 @@ function tagTL(a,b,c,d){
tl(a,b,acct_id,d);
}
function autoToot(tag){
tag=escapeHTML(tag)
var nowPT=localStorage.getItem("stable")
if(nowPT==tag){
localStorage.removeItem("stable");

View File

@@ -337,8 +337,8 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
return false;
};
websocket[wsid].onclose = function() {
console.error("Closing");
console.error(tlid);
console.log("Closing");
console.log(tlid);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
@@ -660,7 +660,7 @@ function cap(type, data, acct_id) {
var response="Federated TL(Media)";
}
} else if (type == "tag") {
var response= "#" + data
var response= "#" + escapeHTML(data)
} else if (type == "list") {
var ltitle=localStorage.getItem("list_"+data+"_"+acct_id);
var response= "List(" + ltitle + ")"
@@ -685,7 +685,7 @@ function cap(type, data, acct_id) {
}else if (type == "webview") {
var response="Twitter"
}else if (type == "tootsearch") {
var response="tootsearch(" + data + ")";
var response="tootsearch(" + escapeHTML(data) + ")";
}
return response;
}
@@ -788,7 +788,7 @@ function strAliveInt(){
}
function reconnector(tlid,type,acct_id,data,mode){
console.log("Reconnector:"+mode)
if(type=="mix" || type=="plus"){
if(type=="mix" || type=="integrated" || type=="plus"){
if(localStorage.getItem("voice_" + tlid)){
var voice=true;
}else{
@@ -801,10 +801,11 @@ function reconnector(tlid,type,acct_id,data,mode){
}
var wssh=localStorage.getItem("wssH_" + tlid);
websocketHome[wssh].close();
var wssh=localStorage.getItem("wssL_" + tlid);
var wssl=localStorage.getItem("wssL_" + tlid);
websocketLocal[wssl].close();
mixre(acct_id, tlid, type, mute,"",voice,mode);
}else if(type=="notf"){
notfColumn(acct_id, tlid, "")
}else{
var wss=localStorage.getItem("wss_" + tlid);
websocket[wss].close();

View File

@@ -28,6 +28,9 @@ function parseColumn() {
$(".toot-reset").css("font-size", size + "px");
$(".cont-series").css("font-size", size + "px");
}
if(localStorage.getItem("menu-done")){
$("#fukidashi").addClass("hide")
}
tlCloser();
var multi = localStorage.getItem("multi");
if (multi) {
@@ -153,15 +156,15 @@ function parseColumn() {
var animecss="";
}
if(acct.type=="notf"){
var exclude=lang.lang_excluded+':<br><input type="checkbox" class="filled-in" id="exc-reply-'+key+'" '+excludeCk(key,"mention")+' /><label for="exc-reply-'+key+'" class="exc-chb"><i class="fa fa-share exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-fav-'+key+'" '+excludeCk(key,"favourite")+' /><label for="exc-fav-'+key+'" class="exc-chb"><i class="fa fa-star exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-bt-'+key+'" '+excludeCk(key,"reblog")+' /><label for="exc-bt-'+key+'" class="exc-chb" ><i class="fa fa-retweet exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"follow")+' /><label for="exc-follow-'+key+'" class="exc-chb" ><i class="fa fa-users exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"poll")+' /><label for="exc-poll-'+key+'" class="exc-chb" ><i class="fa fa-tasks exc-icons"></i></label> '+
var exclude=lang.lang_excluded+':<br><input type="checkbox" class="filled-in" id="exc-reply-'+key+'" '+excludeCk(key,"mention")+' /><label for="exc-reply-'+key+'" class="exc-chb"><i class="fas fa-share exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-fav-'+key+'" '+excludeCk(key,"favourite")+' /><label for="exc-fav-'+key+'" class="exc-chb"><i class="fas fa-star exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-bt-'+key+'" '+excludeCk(key,"reblog")+' /><label for="exc-bt-'+key+'" class="exc-chb" ><i class="fas fa-retweet exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"follow")+' /><label for="exc-follow-'+key+'" class="exc-chb" ><i class="fas fa-users exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"poll")+' /><label for="exc-poll-'+key+'" class="exc-chb" ><i class="fas fa-tasks exc-icons"></i></label> '+
'<button class="btn waves-effect" style="width:60px; padding:0;" onclick="exclude('+key+')">Filter</button><br>';
}else if(acct.type=="home"){
var exclude='<a onclick="ebtToggle(' + key +
')" class="setting nex"><i class="fa fa-retweet waves-effect nex" title="'+lang.lang_layout_excludingbt +'" style="font-size:24px"></i><span id="sta-bt-' +
')" class="setting nex"><i class="fas fa-retweet waves-effect nex" title="'+lang.lang_layout_excludingbt +'" style="font-size:24px"></i><span id="sta-bt-' +
key + '">Off</span></a>'+lang.lang_layout_excludingbt+'<br>';
}else{
var exclude="";
@@ -198,8 +201,8 @@ function parseColumn() {
key + '">On</span></a>'+lang.lang_layout_linkana +'<br><a onclick="voiceToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang.lang_layout_tts +'">hearing</i><span id="sta-voice-' +
key + '">On</span></a>'+lang.lang_layout_tts +'TL<br><a onclick="reconnector(' + key +
',\''+acct.type+'\',\''+acct.domain+'\',\''+acct.data+'\')" class="setting nex '+if_notf+'"><i class="material-icons waves-effect nex '+if_notf+'" title="'+lang.lang_layout_reconnect+'">low_priority</i></a><span class="'+if_notf+'">'+lang.lang_layout_reconnect+'</span><br>'+lang.lang_layout_headercolor +'<br><div id="picker_'+key+'" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl '+acct.type+'-timeline " tlid="' + key + '" data-type="' + acct.type + '" data-acct="'+acct.domain+'"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div>'
',\''+acct.type+'\',\''+acct.domain+'\',\''+escapeHTML(acct.data)+'\')" class="setting nex '+if_notf+'"><i class="material-icons waves-effect nex '+if_notf+'" title="'+lang.lang_layout_reconnect+'">low_priority</i></a><span class="'+if_notf+'">'+lang.lang_layout_reconnect+'</span><br>'+lang.lang_layout_headercolor +'<br><div id="picker_'+key+'" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl '+acct.type+'-timeline " tlid="' + key + '" data-type="' + acct.type + '" data-acct="'+acct.domain+'" data-const="' + acct.type + '_'+acct.domain+'"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div>'
$('#timeline_box_' + basekey + '_parentBox').append(html);
localStorage.removeItem("pool_" + key);
if (acct.data) {
@@ -445,7 +448,7 @@ function coloradd(key,bg,txt){
function webviewParse(url,key,insert,icnsert,css){
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
'" style="'+css+'"><div class="notice-box z-depth-2" id="menu_'+key+'" style="'+insert+'">'+
'<div class="area-notice"><i class="fa fa-twitter waves-effect" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>'+
'<div class="area-notice"><i class="fab fa-twitter waves-effect" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>'+
'<div class="area-notice_name tl-title">WebView('+url+')</div>'+
'<div class="area-sta"><input type="checkbox" id="webviewsel" value="true" class="filled-in"><label for="webviewsel">'+lang.lang_layout_webviewmode +'</label></div>'+
'<div class="area-a2"><a onclick="removeColumn(' + key +

View File

@@ -1,4 +1,6 @@
function menu(){
localStorage.setItem("menu-done",true);
$("#fukidashi").addClass("hide")
if(!$("#menu").hasClass("appear")){
$("#menu").addClass("appear")
var left=localStorage.getItem("menu-left");

View File

@@ -123,6 +123,10 @@ function load() {
var font = "";
}
$("#font").val(font);
$("#c1-file").text(localStorage.getItem("custom1"))
$("#c2-file").text(localStorage.getItem("custom2"));
$("#c3-file").text(localStorage.getItem("custom3"));
$("#c4-file").text(localStorage.getItem("custom4"));
}
function climute(){
@@ -636,6 +640,22 @@ ipc.on('theme-json-create-complete', function (event, args) {
$("#custom_import").val("");
ctLoad()
});
function customSound(key){
var electron = require("electron");
var remote=electron.remote;
var dialog=remote.dialog;
dialog.showOpenDialog(null, {
title: 'Custom sound',
properties: ['openFile'],
filters: [
{name: 'Audio', extensions: ['mp3','aac','wav','flac','m4a']},
{name: 'All', extensions: ['*']},
]
}, (fileNames) => {
localStorage.setItem("custom"+key,fileNames[0]);
$("#c1-file").text(fileNames[0])
});
}
window.onload = function() {
//最初に読む
load();
@@ -648,3 +668,4 @@ oksload();
npprovider();
ctLoad()
};

View File

@@ -32,7 +32,7 @@ function sortload(){
var acctdata=user+"@"+domain;
}
var html='<li class="drag-content" data-id="'+key+'" data-flag="'+flag+'"'+insert+'><div class="sorticon"><i class="material-icons">'+icon(acct.type)+'</i></div><div class="sorttitle">'+cap(acct.type, acct.data,acct.domain)+'</div><div class="sortaction"><a onclick="goColumn(' + key +
var html='<li class="drag-content" data-id="'+key+'" data-flag="'+flag+'"'+insert+'><div class="sorticon"><i class="material-icons">'+icon(acct.type)+'</i></div><div class="sorttitle">'+cap(acct.type, escapeHTML(acct.data),acct.domain)+'</div><div class="sortaction"><a onclick="goColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="'+lang.lang_sort_gothis+'">forward</i></a> <a onclick="removeColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除">cancel</i></a></div><div class="sortacct">'+acctdata+'</div></li>';
$("#sort").append(html);
@@ -103,7 +103,7 @@ function sort(){
var json = JSON.stringify(newobj);
localStorage.setItem("column", json);
$("#sort").html("");
Materialize.toast("並べ替え完了。", 3000);
Materialize.toast("Sorted", 3000);
sortload();
parseColumn();
sortMenu()

View File

@@ -129,6 +129,10 @@ function nowplaying(mode){
ipc.send('itunes', "");
ipc.once('itunes-np', function (event, arg) {
if (arg.cmd) {
console.error(arg);
return;
}
console.log(arg);
var content=localStorage.getItem("np-temp");
if(!content || content=="" || content=="null"){
@@ -142,8 +146,8 @@ function nowplaying(mode){
media(arg.path,"image/png","new");
}
}else if(platform=="darwin"){
if(flag && arg.artworks[0]){
ipc.send('bmp-image', [arg.artworks[0].path,0]);
if(flag && arg.existsArtwork){
media(arg.artworks[0].data,"image/png","new");
}
}
var regExp = new RegExp("{song}", "g");

View File

@@ -57,7 +57,7 @@ function startmem(){
var use=arg[0];
var cpu=arg[1];
var total=arg[2]
$("#tips-text").html(cpu+"<br>Memory:"+Math.floor(use/1024/1024/102.4)/10+"/"+Math.floor(total/1024/1024/102.4)/10+"GB("+Math.floor(use/total*100)+"%)")
$("#tips-text").html(escapeHTML(cpu)+"<br>Memory:"+Math.floor(use/1024/1024/102.4)/10+"/"+Math.floor(total/1024/1024/102.4)/10+"GB("+Math.floor(use/total*100)+"%)")
})
}
//トレンドタグ
@@ -83,7 +83,7 @@ function trendTagonTip(){
var tags="";
json=json.score;
Object.keys(json).forEach(function(tag) {
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="show();brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a></span><br>';
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + escapeHTML(tag) + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="show();brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a></span><br>';
});
$("#tips-text").html('<div class="trendtag">トレンドタグ<i class="material-icons pointer" onclick="trendTagonTip()" style="font-size:12px">refresh</i>:<br>' + tags+'</div>');
trendTagonTipInterval()

View File

@@ -553,6 +553,51 @@ function showFrl(more, acct_id) {
});
}
//Keybase
function udAdd(start) {
fetch(start, {
method: 'GET',
headers: {
'Accept': 'application/json'
},
//body: JSON.stringify({})
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
var fields=json.attachment;
for(var i=0;i<fields.length;i++){
if(fields[i].type=="IdentityProof"){
if(fields[i].signatureAlgorithm=="keybase"){
var html='<a href="https://keybase.io/'+fields[i].name+'" target="_blank" class="cbadge teal waves-effect" style="max-width:200px;" title="'+lang.lang_hisdata_key.replace("{{set}}",escapeHTML(fields[i].signatureAlgorithm))+'"><i class="fas fa-key" aria-hidden="true"></i>'+escapeHTML(fields[i].signatureAlgorithm)+':'+escapeHTML(fields[i].name)+'</a>';
}else{
var html='<span class="cbadge teal" style="max-width:200px;" title="'+lang.lang_hisdata_key.replace("{{set}}",escapeHTML(fields[i].signatureAlgorithm))+'"><i class="fas fa-key" aria-hidden="true"></i>'+escapeHTML(fields[i].signatureAlgorithm)+':'+escapeHTML(fields[i].name)+'</span>';
}
$("#his-proof-prof").append(html)
}
}
});
fetch("https://notestock.osa-p.net/api/v1/isstock.json?id="+start.replace("@","users/"), {
method: 'GET',
headers: {
'Accept': 'application/json'
},
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
if(json.user.public_view){
var html='<a href="'+json.user.url+'" target="_blank" class="cbadge purple waves-effect" style="max-width:200px;" title="Notestock">Notestock</a>';
$("#his-proof-prof").append(html)
}
});
}
//ユーザーマッチングリスト
function showMat() {

View File

@@ -105,6 +105,7 @@ function udg(user, acct_id) {
fer(json.id, '', acct_id);
var dis_name=escapeHTML(json.display_name);
dis_name=twemoji.parse(dis_name);
var note=json.note;
if(json.emojis){
var actemojick = json.emojis[0];
@@ -123,6 +124,12 @@ function udg(user, acct_id) {
note = note.replace(regExp, emoji_url);
});
}
//noteの解析
//var tags = '<a onclick="tl(\'tag\',\'$1\',' + acct_id +',\'add\')" class="pointer parsed">#$1</a>';
//var mens = '<a onclick="udgEx(\'$1\',' + acct_id +')" class="pointer parsed">@$1</a>';
//note=note.replace(/#(\S+)/gi, tags)
console.log(note)
//note=note.replace(/\s@([a-zA-Z_0-9@.-]+)/gi, mens)
$("#his-name").html(dis_name);
$("#his-acct").text(json.acct);
$("#his-acct").attr("fullname",fullname);
@@ -150,8 +157,7 @@ function udg(user, acct_id) {
var when="";
var color="inherit"
}
fval=twemoji.parse(fval);
note=note+'<tr><td class="his-field-title">'+fname+'</td><td class="his-field-content" title="'+when+'" style="background-color:'+color+'">'+fval+'</td></tr>';
note=note+'<tr><td class="his-field-title">'+twemoji.parse(escapeHTML(fname))+'</td><td class="his-field-content" title="'+when+'" style="background-color:'+color+'">'+twemoji.parse(fval)+'</td></tr>';
}
note=note+'</table>'
$("#his-des").html(twemoji.parse(note));
@@ -164,6 +170,7 @@ function udg(user, acct_id) {
if(json.bot){
$("#his-bot").html(lang.lang_showontl_botacct);
}
$("#his-des").attr("data-acct",acct_id);
$('#his-data').css('background-size', 'cover');
$("#his-data .tab-content").css("height",$("#his-float-timeline").height()-70+"px")
localStorage.setItem("history" , user);
@@ -177,10 +184,10 @@ function udg(user, acct_id) {
showFrl('', acct_id);
$("#his-name-val").val(json.display_name);
if(json.fields.length>0){
$("#his-f1-name").val(json.fields[0].name); $("#his-f1-val").val($.strip_tags(json.fields[0].value));
$("#his-f2-name").val(json.fields[1].name); $("#his-f2-val").val($.strip_tags(json.fields[1].value));
$("#his-f3-name").val(json.fields[2].name); $("#his-f3-val").val($.strip_tags(json.fields[2].value));
$("#his-f4-name").val(json.fields[3].name); $("#his-f4-val").val($.strip_tags(json.fields[3].value));
if(json.fields[0]){$("#his-f1-name").val(json.fields[0].name); $("#his-f1-val").val($.strip_tags(json.fields[0].value));}
if(json.fields[1]){$("#his-f2-name").val(json.fields[1].name); $("#his-f2-val").val($.strip_tags(json.fields[1].value));}
if(json.fields[2]){$("#his-f3-name").val(json.fields[2].name); $("#his-f3-val").val($.strip_tags(json.fields[2].value));}
if(json.fields[3]){$("#his-f4-name").val(json.fields[3].name); $("#his-f4-val").val($.strip_tags(json.fields[3].value));}
}
var des = json.note;
des = des.replace(/<br \/>/g, "\n")
@@ -200,6 +207,8 @@ function udg(user, acct_id) {
$(".only-his-data").show();
}
todc();
//外部データ取得(死かもしれないので)
udAdd(json.url);
});
}
function misskeyUdg(user, acct_id) {
@@ -269,7 +278,7 @@ function misskeyUdg(user, acct_id) {
$("#his-follow").text(json.followingCount);
$("#his-follower").text(json.followersCount);
$("#his-since").text(crat(json.createdAt));
var note=json.description;
var note=escapeHTML(json.description);
$("#his-des").html(twemoji.parse(note));
if(json.isCat){
$("#his-bot").html("Cat"+twemoji.parse("😺"));
@@ -468,6 +477,7 @@ function reset(){
$("#his-openin").attr("data-href", "");
$("#his-float-timeline").show();
$("#his-float-blocked").hide();
$("#his-proof-prof").html("")
}
$('#my-data-nav .custom-tab').on('click',function(){
var target=$(this).find("a").attr("go");

View File

@@ -4,7 +4,7 @@ function np(mainWindow){
const app = electron.app;
const fs = require("fs");
var ipc = electron.ipcMain;
ipc.on('itunes', (e, args) => {
ipc.on('itunes', async (e, args) => {
//Verified on Windows
console.log("Access");
if(args[0]=="set"){
@@ -25,13 +25,15 @@ function np(mainWindow){
var platform=process.platform;
var bit=process.arch;
if(platform=="darwin"){
const nowplaying = require("itunes-nowplaying-mac")
nowplaying.getRawData().then(function (value) {
try {
const nowplaying = require("itunes-nowplaying-mac");
const value = await nowplaying.getRawData();
mainWindow.webContents.send('itunes-np', value);
}).catch(function (error) {
// 非同期処理失敗。呼ばれない
console.log(error);
});
} catch (error) {
// エラーを返す
console.error(error);
mainWindow.webContents.send('itunes-np', error);
}
}else{
var {NowPlaying,PlayerName} = require("nowplaying-node");
var nppath=join(app.getPath("userData"), "nowplaying");

View File

@@ -11,7 +11,6 @@ function system(mainWindow, dir, lang) {
const BrowserWindow = electron.BrowserWindow;
const dialog = electron.dialog;
const os = require('os')
const fm = require('font-manager');
const language=require("../main/language.js");
ipc.on('native-notf', function(e, args) {
@@ -172,6 +171,7 @@ function system(mainWindow, dir, lang) {
fn(data); // ソート後の配列を返す
}
ipc.on('fonts', (e, arg) => {
const fm = require('font-manager');
var fonts = fm.getAvailableFontsSync();
object_array_sort(fonts, 'family', 'asc', function(fonts_sorted) {
mainWindow.webContents.send('font-list', fonts_sorted);

1878
app/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,13 @@
{
"name": "thedesk",
"version": "18.2.0",
"version": "18.3.3",
"description": "TheDesk is a Mastodon client for PC.",
"repository": "https://github.com/cutls/TheDesk",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dist": "build --linux snap",
"build": "electron-builder",
"build:all": "electron-builder --win --linux",
"build:win": "electron-builder --win"
},
@@ -33,14 +35,13 @@
},
{
"name": "kPherox",
"url": "https://www.kr-kp.com/",
"url": "https://pawoo.net/@kPherox",
"email": "admin@mail.kr-kp.com"
}
],
"license": "GPL-3.0",
"dependencies": {
"electron-dl": "^1.11.0",
"font-manager": "^0.3.0",
"jimp": "^0.2.28",
"json5": "^2.1.0",
"node-notifier": "^5.2.1",
@@ -48,12 +49,16 @@
"vue": "^2.6.9"
},
"optionalDependencies": {
"nowplaying-node": "^0.1.3",
"itunes-nowplaying-mac": "git+https://github.com/rinsuki/itunes-nowplaying-mac#pull/1/head"
"nowplaying-node": "git+https://github.com/cutls/nowplaying-node",
"itunes-nowplaying-mac": "git+https://github.com/rinsuki/itunes-nowplaying-mac#pull/4/head",
"font-manager": "^0.3.0"
},
"build": {
"productName": "TheDesk",
"appId": "top.thedesk",
"asarUnpack": [
"node_modules/itunes-nowplaying-mac"
],
"directories": {
"output": "../build"
},
@@ -83,21 +88,23 @@
"linux": {
"icon": "build/icons",
"target": [
"snap"
"zip"
],
"category": "Network"
},
"mac": {
"target": "dmg"
"target": [
"dmg",
"zip"
]
},
"electronDownload": {
"version": "4.0.6"
"version": "4.1.4"
},
"electronVersion": "4.0.6"
"electronVersion": "4.1.4"
},
"devDependencies": {
"electron": "^4.0.6",
"electron-packager": "^13.1.1",
"electron-rebuild": "^1.8.4"
"electron": "^4.1.4",
"electron-builder": "^20.39.0"
}
}

BIN
app/source/notif.wav Normal file

Binary file not shown.

BIN
app/source/notif2.wav Normal file

Binary file not shown.

BIN
app/source/notif3.wav Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@
<script type="text/javascript" src="../../js/platform/first.js"></script>
<script type="text/javascript" src="../../js/common/materialize.js"></script>
<a href="setting.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>Back</a>
LICENSE of TheDesk:<a href="https://github.com/cutls/TheDesk/blob/master/LICENSE.md">TheDesk LICENSE (Latest Ver.)</a><br>
LICENSE of TheDesk:<a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">TheDesk LICENSE (Latest Ver.)</a><br>
<article style="width:500px; max-width:100%; margin:15px; font-family:Arial,Helvetica">
<h5>TheDesk</h5>
<i class="fa fa-github"></i><a href="https://github.com/cutls/TheDesk" target="_blank">cutls/TheDesk</a><br>

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
@@ -22,7 +22,6 @@
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
@@ -47,7 +46,7 @@
<div class="collapsible-body">
<h5>Languages</h5>
To translate with Crowdin, you have to login Crowdin and restart TheDesk when login is finished.<br>
<a href="../ja/setting.html" onclick="changelang('ja')">日本語(Japanese)</a>/<a href="../en/setting.html" onclick="changelang('en')">English</a>/<a href="../ps/setting.html" onclick="changelang('ps')">Crowdin web translate</a>/
<a onclick="changelang('ja')" class="pointer" style="margin-right:5px;">日本語</a><a onclick="changelang('en')" class="pointer" style="margin-right:5px;">English</a><a onclick="changelang('ps')" class="pointer" style="margin-right:5px;">Crowdin translate system(beta)</a>
<h5>Import and export of preferences</h5>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3"
style="width:100%; max-width:200px;">Export</button>
@@ -56,8 +55,8 @@
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">Notification test</a><br></template>
@@ -85,7 +84,7 @@
</template>
</div>
<h5>Font</h5>
Select your favorite font to 'Select'<br>
Select your favorite font to 'Select'(Windows/ macOS only)<br>
<button class="btn waves-effect" style="width:100px;" onclick="font()">Select</button><br>
<div id="fonts" class="hide" style="overflow-y:scroll; width:300px; height:500px;"></div>
<br>
@@ -131,9 +130,9 @@
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="About this theme..."></textarea></div>
<h5>Color scheme</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
@@ -158,11 +157,11 @@
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>Background of boosts
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
<h5>Accent</h5>Background of boosts
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">Change</button>&nbsp;<button
@@ -184,8 +183,8 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -210,6 +209,11 @@
</template><br>
</template>
</div>
<h5>Custom sound</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span id="c4-file"></span><br>
</div>
</li>
<li>
@@ -220,8 +224,8 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -253,7 +257,7 @@
</li>
<li>
<div class="collapsible-header">
<i class="material-icons">Fkeyboard</i>Keyboard shortcut Preferences
<i class="material-icons">keyboard</i>Keyboard shortcut Preferences
</div>
<div class="collapsible-body">
<h5>Easy inserter</h5>
@@ -403,29 +407,27 @@
class="material-icons left">info</i>About TheDesk</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>Website</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">trending_up</i>Support(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>Support(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>Help/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2"
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">Check update</a><br>
<a href="oss.html">OSS License</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
<span style="font-family:Open Sans;">Copyright &copy; Cutls P 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value:"no"
}
];
var sound=[
{
text:"None",
value:"none"
},{
text:"Default",
value:"default"
},{
text:"Custom 1",
value:"c1"
},{
text:"Custom 2",
value:"c2"
},{
text:"Custom 3",
value:"c3"
},{
text:"Custom 4",
value:"c4"
}
];
var envConstruction=[
{
id:"popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc:"",
checkbox:yesno
}
},{
id:"replySound",
storage:"replySound",
checkbox:true,
setValue:"none",
text:{
head:"Sound(Reply)",
desc:"",
checkbox:sound
}
},{
id:"favSound",
storage:"favSound",
checkbox:true,
setValue:"none",
text:{
head:"Sound(Fav)",
desc:"",
checkbox:sound
}
},{
id:"btSound",
storage:"btSound",
checkbox:true,
setValue:"none",
text:{
head:"Sound(Boost)",
desc:"",
checkbox:sound
}
},{
id:"followSound",
storage:"followSound",
checkbox:true,
setValue:"none",
text:{
head:"Sound(Follow)",
desc:"",
checkbox:sound
}
}
];
var postConstruction=[

View File

@@ -197,10 +197,24 @@ function verck(){
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
$("#det").html(json.detail);
console.log(json);
if(platform=="win32"){
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
}else if(platform=="linux"){
$("#ver").text(json.desk_linux);
localStorage.setItem("next-ver",json.desk_linux);
}else if(platform=="darwin"){
$("#ver").text(json.desk_mac);
localStorage.setItem("next-ver",json.desk_mac);
}
var lang="en";
if(lang=="ja"){
$("#det").html(json.detail);
}else{
$("#det").html(json.detail_en);
}
$("#now").text(localStorage.getItem("ver"));
});

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="ja">
<html lang="ja" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
@@ -22,7 +22,6 @@
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
@@ -47,7 +46,7 @@
<div class="collapsible-body">
<h5>言語</h5>
To translate with Crowdin, you have to login Crowdin and restart TheDesk when login is finished.<br>
<a href="../ja/setting.html" onclick="changelang('ja')">日本語(Japanese)</a>/<a href="../en/setting.html" onclick="changelang('en')">English</a>/<a href="../ps/setting.html" onclick="changelang('ps')">Crowdin web translate</a>/
<a onclick="changelang('ja')" class="pointer" style="margin-right:5px;">日本語</a><a onclick="changelang('en')" class="pointer" style="margin-right:5px;">English</a><a onclick="changelang('ps')" class="pointer" style="margin-right:5px;">Crowdin translate system(beta)</a>
<h5>設定のインポートとエクスポート</h5>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3"
style="width:100%; max-width:200px;">エクスポート</button>
@@ -56,8 +55,8 @@
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">通知テスト</a><br></template>
@@ -85,7 +84,7 @@
</template>
</div>
<h5>フォント</h5>
「選択」を押してフォントを選んでください。<br>
「選択」を押してフォントを選んでください。(Linuxでは動きません)<br>
<button class="btn waves-effect" style="width:100px;" onclick="font()">選択</button><br>
<div id="fonts" class="hide" style="overflow-y:scroll; width:300px; height:500px;"></div>
<br>
@@ -131,9 +130,9 @@
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="説明..."></textarea></div>
<h5>色の系統</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
@@ -158,11 +157,11 @@
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>ブーストの背景色など
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
<h5>Accent</h5>ブーストの背景色など
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">変更</button>&nbsp;<button
@@ -184,8 +183,8 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -210,6 +209,11 @@
</template><br>
</template>
</div>
<h5>カスタム通知音</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span id="c4-file"></span><br>
</div>
</li>
<li>
@@ -220,8 +224,8 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -253,7 +257,7 @@
</li>
<li>
<div class="collapsible-header">
<i class="material-icons">Fkeyboard</i>キーボードショートカットの設定
<i class="material-icons">keyboard</i>キーボードショートカットの設定
</div>
<div class="collapsible-body">
<h5>簡単文字入力</h5>
@@ -403,29 +407,27 @@
class="material-icons left">info</i>このソフトについて</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>公式HP</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">trending_up</i>支援(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>支援(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>ヘルプ/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2"
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">アップデートを確認</a><br>
<a href="oss.html">OSS License(オープンソースライセンス)</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
<span style="font-family:Open Sans;">Copyright &copy; Cutls P 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value:"no"
}
];
var sound=[
{
text:"なし",
value:"none"
},{
text:"既定",
value:"default"
},{
text:"Custom 1",
value:"c1"
},{
text:"Custom 2",
value:"c2"
},{
text:"Custom 3",
value:"c3"
},{
text:"Custom 4",
value:"c4"
}
];
var envConstruction=[
{
id:"popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc:"",
checkbox:yesno
}
},{
id:"replySound",
storage:"replySound",
checkbox:true,
setValue:"none",
text:{
head:"リプライの通知音",
desc:"",
checkbox:sound
}
},{
id:"favSound",
storage:"favSound",
checkbox:true,
setValue:"none",
text:{
head:"お気に入り登録の通知音",
desc:"",
checkbox:sound
}
},{
id:"btSound",
storage:"btSound",
checkbox:true,
setValue:"none",
text:{
head:"ブーストの通知音",
desc:"",
checkbox:sound
}
},{
id:"followSound",
storage:"followSound",
checkbox:true,
setValue:"none",
text:{
head:"フォローの通知音",
desc:"",
checkbox:sound
}
}
];
var postConstruction=[

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="ja">
<head>
<title>Update - TheDesk</title>
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
@@ -197,10 +197,24 @@ function verck(){
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
$("#det").html(json.detail);
console.log(json);
if(platform=="win32"){
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
}else if(platform=="linux"){
$("#ver").text(json.desk_linux);
localStorage.setItem("next-ver",json.desk_linux);
}else if(platform=="darwin"){
$("#ver").text(json.desk_mac);
localStorage.setItem("next-ver",json.desk_mac);
}
var lang="ja";
if(lang=="ja"){
$("#det").html(json.detail);
}else{
$("#det").html(json.detail_en);
}
$("#now").text(localStorage.getItem("ver"));
});

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="{{lang}}">
<html lang="@@lang@@">
<head>
<title>Account Manager - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
@@ -28,19 +28,19 @@ body,html{overflow-y: scroll;}
}
</style>
<meta charset="utf-8">
{{comment-start}}
@@comment-start@@
<script type="text/javascript">
var _jipt = [];
_jipt.push(['project', 'thedesk']);
</script>
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
{{comment-end}}
@@comment-end@@
</head>
<body id="mainView">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
<script type="text/javascript" src="../../js/common/materialize.js"></script>
<script type="text/javascript" src="../../js/lang/lang.{{lang}}.js"></script>
<script type="text/javascript" src="../../js/lang/lang.@@lang@@.js"></script>
<script>
var misskeytoken=false;
</script>
@@ -48,23 +48,23 @@ body,html{overflow-y: scroll;}
<script type="text/javascript" src="../../js/common/time.js"></script>
<script type="text/javascript" src="../../js/common/modal.js"></script>
<div class="hide-first">
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;">{{back}}</a><br>
<h5>{{list}}</h5>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;">@@back@@</a><br>
<h5>@@list@@</h5>
<div id="acct-list"></div>
<div class="divider"></div>
</div>
<div>
<h5>{{add}}</h5><br>
<h5>@@add@@</h5><br>
<div id="add">
<div class="row">
<div class="col s8">
<input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp">
<div id="ins-suggest"></div>
{{codesetupwarn}}<br>
@@codesetupwarn@@<br>
<input type="checkbox" class="filled-in" id="linux" />
<label for="linux">{{codesetup}}</label><br>
<label for="linux">@@codesetup@@</label><br>
<input type="checkbox" class="filled-in" id="misskey" />
<label for="misskey">{{thisismisskey}}</label><br>
<label for="misskey">@@thisismisskey@@</label><br>
<button class="btn waves-effect" onclick="instance()">Login</button><br>
</div>
<div class="col s4">
@@ -73,21 +73,21 @@ body,html{overflow-y: scroll;}
</div>
</div></div>
<div id="auth" style="display:none">
{{codepastewarn}}<br>
<input type="text" id="code" placeholder="{{codepaste}}">
@@codepastewarn@@<br>
<input type="text" id="code" placeholder="@@codepaste@@">
<button class="btn waves-effect" onclick="code()">Auth</button><br>
</div>
<div id="misskeylogin" style="display:none">
<h5>AppSecret</h5>
{{misskeylogin}}<br>
@@misskeylogin@@<br>
<input type="hidden" id="misskey-url">
<input type="text" id="misskey-key" placeholder="{{codepaste}}">
<input type="text" id="misskey-key" placeholder="@@codepaste@@">
<button class="btn waves-effect" onclick="misskeyLogin()">Auth</button><br>
</div>
</div>
<div class="hide-first">
<h5>{{mainacct}}</h5>
<div class="input-field" style="width:300px"><span data-trans="your_acct">{{selacct}}</span>
<h5>@@mainacct@@</h5>
<div class="input-field" style="width:300px"><span data-trans="your_acct">@@selacct@@</span>
<br>
<select id="main-acct-sel" class="acct-sel" style="color:black" onchange="mainacct()"></select>
<label></label>
@@ -98,12 +98,12 @@ Administered by:<a id="ins-admin"></a><br>
<span id="ins-desc"></span><br>
<img src="../../img/loading.svg" id="ins-prof" width="200"><br>
<br>
{{domain}}:<span id="ins-name"></span><br>
{{connect}}:<span id="ins-connect"></span>{{ko}}<br>
{{toots}}:<span id="ins-toot"></span>{{ko}}<br>
{{users}}:<span id="ins-user"></span>{{users}}<br>
{{safety}}:<span id="ins-per"></span>%<br>
{{ver}}:<span id="ins-ver"></span>@<span id="ins-upd"></span><br>
@@domain@@:<span id="ins-name"></span><br>
@@connect@@:<span id="ins-connect"></span>@@ko@@<br>
@@toots@@:<span id="ins-toot"></span>@@ko@@<br>
@@users@@:<span id="ins-user"></span>@@users@@<br>
@@safety@@:<span id="ins-per"></span>%<br>
@@ver@@:<span id="ins-ver"></span>@<span id="ins-upd"></span><br>
</div>
<script type="text/javascript" src="../../js/ui/theme.js"></script>
<script type="text/javascript" src="../../js/platform/end.js"></script>

File diff suppressed because it is too large Load Diff

View File

@@ -56,6 +56,9 @@
"contextAfter":"Context after this toot",
"beforeLTL":"Local TL before this toot",
"beforeUTL":"User TL before this toot",
"afterLTL":"Local TL after this toot)",
"afterUTL":"User TL before this toot",
"afterFTL":"Federated TL after this toot",
"favedPeople":"People who favourited it",
"btedPeople":"People who boosted it",
"useOtherAcct1":"Use other account",
@@ -158,5 +161,6 @@
"ramTips":"RAM status",
"changeTips":"Change Tips",
"help":"Help",
"about":"About TheDesk"
"about":"About TheDesk",
"hereAddColumns":"<- Add TL"
}

View File

@@ -56,6 +56,9 @@
"contextAfter":"これより後の会話",
"beforeLTL":"これより前のLocal TL(エアリプソース確認)",
"beforeUTL":"これより前のユーザーTL(BTソース確認)",
"afterLTL":"これより後のLocal TL(言及確認)",
"afterUTL":"これより後のユーザーTL(言及確認)",
"afterFTL":"これより後の連合TL(言及確認)",
"favedPeople":"このトゥートをお気に入りに登録した人",
"btedPeople":"このトゥートをブーストした人",
"useOtherAcct1":"他のアカウントを使用",
@@ -158,5 +161,6 @@
"ramTips":"システムメモリ容量",
"changeTips":"Tips変更",
"help":"ヘルプ",
"about":"このソフトについて"
"about":"このソフトについて",
"hereAddColumns":"←ここからTL追加"
}

View File

@@ -3,6 +3,8 @@
"set":"Save",
"yes":"Yes",
"no":"No",
"none":"None",
"default":"Default",
"change":"Change",
"select":"Select",
"env":"System Preferences",
@@ -25,7 +27,7 @@
"fixwidthwarn":"",
"above":"above",
"font":"Font",
"fontwarn":"Select your favorite font to 'Select'",
"fontwarn":"Select your favorite font to 'Select'(Windows/ macOS only)",
"fontsize":"Font size",
"savefolder":"Folder to save",
"savefolderwarn":"TheDesk uses this value when it try to save pictures or take screenshots.",
@@ -85,6 +87,11 @@
"ticker":"Enable #InstanceTicker",
"tickerwarn":"Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
"animation":"Animation of timelines",
"replySound":"Sound(Reply)",
"favSound":"Sound(Fav)",
"btSound":"Sound(Boost)",
"followSound":"Sound(Follow)",
"customSound":"Custom sound",
"post":"Posting Preferences",
"autocw":"Alert before posting a long toot.",
"autocwwarn":"Show dialog whether you make too-long text hidden.",

View File

@@ -3,6 +3,8 @@
"set":"設定",
"yes":"はい",
"no":"いいえ",
"none":"なし",
"default":"既定",
"change":"変更",
"select":"選択",
"env":"環境設定",
@@ -25,7 +27,7 @@
"fixwidthwarn":"",
"above":"以上",
"font":"フォント",
"fontwarn":"「選択」を押してフォントを選んでください。",
"fontwarn":"「選択」を押してフォントを選んでください。(Linuxでは動きません)",
"fontsize":"フォントサイズ",
"savefolder":"デフォルトの保存先",
"savefolderwarn":"画像ダウンロードやスクリーンショットに影響します。",
@@ -85,6 +87,11 @@
"ticker":"#InstanceTickerを使う",
"tickerwarn":"トゥートした人の所属サーバーをわかりやすく彩ります(自サーバー以外のトゥート向け)。<a href=\"https://cdn.weep.me/mastodon/\">#InstanceTickerについて</a> Copyright 2018 weepjp, kyori19.",
"animation":"タイムラインのアニメーション",
"replySound":"リプライの通知音",
"favSound":"お気に入り登録の通知音",
"btSound":"ブーストの通知音",
"followSound":"フォローの通知音",
"customSound":"カスタム通知音",
"post":"投稿設定",
"autocw":"長文投稿時に警告",
"autocwwarn":"下で指定した以上のトゥートを投稿するときにCWするかのダイアログを表示します。",

37
app/view/make/make.js Normal file
View File

@@ -0,0 +1,37 @@
const fs = require("fs")
const ver="Usamin (18.3.3)"
const langs=["ja","en","ps"]
const langsh=["日本語","English","Crowdin translate system(beta)"]
const simples=["acct","index","setting","update","setting"]
const samples=["acct.sample.html","index.sample.html","setting.sample.html","update.sample.html","setting.sample.js"]
const pages=["acct.html","index.html","setting.html","update.html","setting.vue.js"]
let langstr=""
for(let n=0; n<langs.length; n++){
let lang=langs[n]
langstr=langstr+'<a onclick="changelang(\''+lang+'\')" class="pointer" style="margin-right:5px;">'+langsh[n]+'</a>'
}
for(let i=0; i<samples.length; i++){
let sample=samples[i]
let sourceParent = fs.readFileSync(sample, 'utf8')
for(let j=0; j<langs.length; j++){
let source=sourceParent
let lang=langs[j]
let target = JSON.parse(fs.readFileSync("language/"+simples[i]+"."+lang+".json", 'utf8'))
Object.keys(target).forEach(function(key) {
let str = target[key]
var regExp = new RegExp("@@" + key + "@@", "g")
source = source.replace(regExp, str)
})
if(lang=="ps"){
source = source.replace(/@@comment-start@@/g, "")
source = source.replace(/@@comment-end@@/g, "")
}else{
source = source.replace(/@@comment-start@@/g, "<!--")
source = source.replace(/@@comment-end@@/g, "-->")
}
source = source.replace(/@@versionLetter@@/g, ver)
source = source.replace(/@@lang@@/g, lang)
source = source.replace(/@@langlist@@/g, langstr)
fs.writeFileSync("../"+lang+"/"+pages[i], source)
}
}

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="@@lang@@">
<html lang="@@lang@@" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
@@ -22,7 +22,6 @@
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
@@ -56,8 +55,8 @@
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">@@nntest@@</a><br></template>
@@ -131,9 +130,9 @@
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="@@desc@@..."></textarea></div>
<h5>@@customthemeDirection@@</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
@@ -158,11 +157,11 @@
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>@@accent@@
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
<h5>Accent</h5>@@accent@@
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">@@change@@</button>&nbsp;<button
@@ -184,8 +183,8 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -210,6 +209,11 @@
</template><br>
</template>
</div>
<h5>@@customSound@@</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span id="c4-file"></span><br>
</div>
</li>
<li>
@@ -220,8 +224,8 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -253,7 +257,7 @@
</li>
<li>
<div class="collapsible-header">
<i class="material-icons">Fkeyboard</i>@@keysc@@
<i class="material-icons">keyboard</i>@@keysc@@
</div>
<div class="collapsible-body">
<h5>@@iks@@</h5>
@@ -403,29 +407,27 @@
class="material-icons left">info</i>@@about@@</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>@@hp@@</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">trending_up</i>@@support@@(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>@@support@@(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>@@help@@/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2"
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">@@checkup@@</a><br>
<a href="oss.html">OSS License@@ossJP@@</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
<span style="font-family:Open Sans;">Copyright &copy; Cutls P 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value:"no"
}
];
var sound=[
{
text:"@@none@@",
value:"none"
},{
text:"@@default@@",
value:"default"
},{
text:"Custom 1",
value:"c1"
},{
text:"Custom 2",
value:"c2"
},{
text:"Custom 3",
value:"c3"
},{
text:"Custom 4",
value:"c4"
}
];
var envConstruction=[
{
id:"popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc:"",
checkbox:yesno
}
},{
id:"replySound",
storage:"replySound",
checkbox:true,
setValue:"none",
text:{
head:"@@replySound@@",
desc:"",
checkbox:sound
}
},{
id:"favSound",
storage:"favSound",
checkbox:true,
setValue:"none",
text:{
head:"@@favSound@@",
desc:"",
checkbox:sound
}
},{
id:"btSound",
storage:"btSound",
checkbox:true,
setValue:"none",
text:{
head:"@@btSound@@",
desc:"",
checkbox:sound
}
},{
id:"followSound",
storage:"followSound",
checkbox:true,
setValue:"none",
text:{
head:"@@followSound@@",
desc:"",
checkbox:sound
}
}
];
var postConstruction=[

View File

@@ -1,18 +1,18 @@
<!doctype html>
<html lang="en">
<html lang="@@lang@@">
<head>
<title>Update - TheDesk</title>
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
<link href="../../css/master.css" type="text/css" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<meta charset="utf-8">
{{comment-start}}
@@comment-start@@
<script type="text/javascript">
var _jipt = [];
_jipt.push(['project', 'thedesk']);
</script>
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
{{comment-end}}
@@comment-end@@
</head>
<body>
<style>
@@ -72,27 +72,27 @@ a,button,input,label,i{
<div id="start">
<div id="box" class="show">
<h2>TheDesk</h2>
<p>{{updatehere}}</p>
<p>@@updatehere@@</p>
<span id="now"></span><b id="ver"></b><br>
<span id="det"></span><br>
<button class="waves-effect btn windows hide" onclick="update('install')" style="margin-left:15px;">{{installer}}</button>
<button class="waves-effect btn windows hide" onclick="update('portable')" style="margin-left:15px;">{{portable}}</button>
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left:15px;">{{download}}</button>
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left:15px;">{{download}}</button>
<button class="waves-effect btn windows hide" onclick="update('install')" style="margin-left:15px;">@@installer@@</button>
<button class="waves-effect btn windows hide" onclick="update('portable')" style="margin-left:15px;">@@portable@@</button>
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left:15px;">@@download@@</button>
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left:15px;">@@download@@</button>
<br>
{{problem1}}<br>{{problem2}}
@@problem1@@<br>@@problem2@@
</div>
<div id="skipper" class="hide">
<h4>{{sureupd}}</h4>
{{skipupd}}<br>
<h4>@@sureupd@@</h4>
@@skipupd@@<br>
<div id="updskip">
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light"><div>{{nexttl}}</div></a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light"><div>{{nextver}}</div></a>
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light"><div>@@nexttl@@</div></a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light"><div>@@nextver@@</div></a>
</div>
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">{{continue}}</a>
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">@@continue@@</a>
</div>
<div id="dlnow" class="hide">
<h4>{{dlnow}}</h4>
<h4>@@dlnow@@</h4>
<h4 id="prog"></h4>
</div>
</div>
@@ -197,10 +197,24 @@ function verck(){
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
$("#det").html(json.detail);
console.log(json);
if(platform=="win32"){
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
}else if(platform=="linux"){
$("#ver").text(json.desk_linux);
localStorage.setItem("next-ver",json.desk_linux);
}else if(platform=="darwin"){
$("#ver").text(json.desk_mac);
localStorage.setItem("next-ver",json.desk_mac);
}
var lang="@@lang@@";
if(lang=="ja"){
$("#det").html(json.detail);
}else{
$("#det").html(json.detail_en);
}
$("#now").text(localStorage.getItem("ver"));
});

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="ps">
<html lang="ps" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
@@ -22,7 +22,6 @@
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
@@ -47,7 +46,7 @@
<div class="collapsible-body">
<h5>crwdns530:0crwdne530:0</h5>
To translate with Crowdin, you have to login Crowdin and restart TheDesk when login is finished.<br>
<a href="../ja/setting.html" onclick="changelang('ja')">日本語(Japanese)</a>/<a href="../en/setting.html" onclick="changelang('en')">English</a>/<a href="../ps/setting.html" onclick="changelang('ps')">Crowdin web translate</a>/
<a onclick="changelang('ja')" class="pointer" style="margin-right:5px;">日本語</a><a onclick="changelang('en')" class="pointer" style="margin-right:5px;">English</a><a onclick="changelang('ps')" class="pointer" style="margin-right:5px;">Crowdin translate system(beta)</a>
<h5>crwdns531:0crwdne531:0</h5>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3"
style="width:100%; max-width:200px;">crwdns533:0crwdne533:0</button>
@@ -56,8 +55,8 @@
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">crwdns540:0crwdne540:0</a><br></template>
@@ -131,9 +130,9 @@
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="crwdns2440:0crwdne2440:0..."></textarea></div>
<h5>crwdns2426:0crwdne2426:0</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
@@ -158,11 +157,11 @@
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>crwdns2434:0crwdne2434:0
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
<h5>Accent</h5>crwdns2434:0crwdne2434:0
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">crwdns528:0crwdne528:0</button>&nbsp;<button
@@ -184,8 +183,8 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -210,6 +209,11 @@
</template><br>
</template>
</div>
<h5>@@customSound@@</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span id="c4-file"></span><br>
</div>
</li>
<li>
@@ -220,8 +224,8 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<template v-if=item.text.desc>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
@@ -253,7 +257,7 @@
</li>
<li>
<div class="collapsible-header">
<i class="material-icons">Fkeyboard</i>crwdns611:0crwdne611:0
<i class="material-icons">keyboard</i>crwdns611:0crwdne611:0
</div>
<div class="collapsible-body">
<h5>crwdns612:0crwdne612:0</h5>
@@ -403,29 +407,27 @@
class="material-icons left">info</i>crwdns662:0crwdne662:0</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>crwdns663:0crwdne663:0</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">trending_up</i>crwdns664:0crwdne664:0(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>crwdns664:0crwdne664:0(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>crwdns665:0crwdne665:0/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2"
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">crwdns667:0crwdne667:0</a><br>
<a href="oss.html">OSS Licensecrwdns668:0crwdne668:0</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
<span style="font-family:Open Sans;">Copyright &copy; Cutls P 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value:"no"
}
];
var sound=[
{
text:"@@none@@",
value:"none"
},{
text:"@@default@@",
value:"default"
},{
text:"Custom 1",
value:"c1"
},{
text:"Custom 2",
value:"c2"
},{
text:"Custom 3",
value:"c3"
},{
text:"Custom 4",
value:"c4"
}
];
var envConstruction=[
{
id:"popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc:"",
checkbox:yesno
}
},{
id:"replySound",
storage:"replySound",
checkbox:true,
setValue:"none",
text:{
head:"@@replySound@@",
desc:"",
checkbox:sound
}
},{
id:"favSound",
storage:"favSound",
checkbox:true,
setValue:"none",
text:{
head:"@@favSound@@",
desc:"",
checkbox:sound
}
},{
id:"btSound",
storage:"btSound",
checkbox:true,
setValue:"none",
text:{
head:"@@btSound@@",
desc:"",
checkbox:sound
}
},{
id:"followSound",
storage:"followSound",
checkbox:true,
setValue:"none",
text:{
head:"@@followSound@@",
desc:"",
checkbox:sound
}
}
];
var postConstruction=[

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="ps">
<head>
<title>Update - TheDesk</title>
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
@@ -197,10 +197,24 @@ function verck(){
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
$("#det").html(json.detail);
console.log(json);
if(platform=="win32"){
$("#ver").text(json.desk);
localStorage.setItem("next-ver",json.desk);
}else if(platform=="linux"){
$("#ver").text(json.desk_linux);
localStorage.setItem("next-ver",json.desk_linux);
}else if(platform=="darwin"){
$("#ver").text(json.desk_mac);
localStorage.setItem("next-ver",json.desk_mac);
}
var lang="ps";
if(lang=="ja"){
$("#det").html(json.detail);
}else{
$("#det").html(json.detail_en);
}
$("#now").text(localStorage.getItem("ver"));
});

View File

@@ -1,27 +1,11 @@
language: objective-c
cache:
directories:
- node_modules
env:
- NODE_VERSION="9.9.0"
before_install:
# nvm をインストールする。Travis の OS X 環境には nvm はデフォルトで入っていない
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
- source /tmp/.nvm/nvm.sh
# 指定バージョンの Node をインストールする
- nvm install $NODE_VERSION
# 指定バージョンの Node を有効にする
- nvm use --delete-prefix $NODE_VERSION
- node --version
script:
- node --version
os: windows
language: node_js
node_js:
- '10.15.2'
script: node -v
before_deploy:
- brew update
- brew install wine
- wine --version
- brew install makensis
- npm install electron-builder -g
- cd app
- npm install electron-builder -g
- npm install
- electron-builder --win --ia32
- mv ../build/TheDesk-setup.exe ../TheDesk-setup-ia32.exe
@@ -29,24 +13,22 @@ before_deploy:
- electron-builder --win --x64
- mv ../build/TheDesk-setup.exe ../TheDesk-setup.exe
- mv ../build/TheDesk*.exe ../TheDesk.exe
- electron-builder --linux --x64
- mv ../build/thedesk*.snap ../TheDesk.snap
- electron-builder --mac --x64
- mv ../build/TheDesk*.dmg ../TheDesk.dmg
- cd ../
- ls
after_deploy: ls
deploy:
skip_cleanup: true
provider: releases
# GitHub にリリースするための API KEY を暗号化した値
api_key:
secure: jndR02p5KRTtcJk18b3YsXL2cC+yzEf1AOqXdpWciF8f3lO5oY01jlxd17xdHIcK7VywSsLVZpLToSdqAoIEhJ5OxEQ/FmA3FlmbwwD6ou13gLa4VGIvsBHveCmKGjVu0Z++atIy76tZYU1SOWFWv4B0ZhnVz2ca2VZynvLgw3YNsPJH7rHO966GXgRkGYJAJ4UvLg3sj/iztVh2FSfbUj5IGO1e/JHJO63wAo1MSQtRjkutVgl/djnBLC6vbL4YHkM3Ynpkx/YQEcxwrmeY0Ra8D5yYDq4MNIDMmZahWC+k4u2eA2Cj2ifBFNxbZvTN75vLwRBp6DsTNHsiqkXrSPDBdNeet31RbwTQ6LtsK8jqmL4S/59dmLcj7uCU2WxyBLPbJdbdZWlqW2ZQvfQY8QVAYy7S3MiHQWQN0oP5wqXk89jcgR42ig/zsqFNPpXHM4mExR7l/gDLPg0j9c3XEF6sWtk3FmJN1i4+B+9kn09b6UKlV7EFPKp8XcFNrz4ZcE9/I8lKwsqLVG2jAXIk7Z9LwDRcAmK5eG348X5zwFtOY6raKIvRw2cn92bPnEI+55v8A4WANS2647GFTgxHj30D0d/sOZmJ5BS34zpdWTgE0AlKg7sOqkncjqoW5J5zCh5Ow7b3KXvEvlAts44mAag8tZTectxMP4iguXvTnv4=
# Releases ページにアップロードするファイル
file:
file:
- TheDesk.exe
- TheDesk-setup.exe
- TheDesk-ia32.exe
- TheDesk-setup-ia32.exe
- TheDesk.snap
- TheDesk.dmg
skip_cleanup: true
on:
repo: cutls/TheDesk
repo: cutls/TheDesk
branches:
only:
- master