Compare commits
60 Commits
v22.1.1
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d3d6a0aa | ||
|
|
7db8989cd8 | ||
|
|
b047c80768 | ||
|
|
d224e597fd | ||
|
|
f5956fed06 | ||
|
|
28f6ccbfee | ||
|
|
e9aa22f5cf | ||
|
|
2c3fc66b0f | ||
|
|
d2ac0f8421 | ||
|
|
d20d7c622f | ||
|
|
297306491e | ||
|
|
70f5fefeab | ||
|
|
da054f0a2e | ||
|
|
ef1a16516f | ||
|
|
f570ed36e8 | ||
|
|
8bcd23c0ea | ||
|
|
b3d6d582d9 | ||
|
|
bfcda76819 | ||
|
|
6a48143b20 | ||
|
|
05ca174df8 | ||
|
|
a7349d574d | ||
|
|
3e0a048e28 | ||
|
|
54031da417 | ||
|
|
fcedefe815 | ||
|
|
c35a27eda6 | ||
|
|
b6b8fa27d5 | ||
|
|
59a0aae887 | ||
|
|
0698ce07fd | ||
|
|
77e4dd6c41 | ||
|
|
db90eddf31 | ||
|
|
a8f060578a | ||
|
|
8621b66203 | ||
|
|
cff6be6af0 | ||
|
|
57b4518b61 | ||
|
|
de13191674 | ||
|
|
6b609a1877 | ||
|
|
901c536974 | ||
|
|
f719caab4b | ||
|
|
6a1e5e9e40 | ||
|
|
4b30c22cfb | ||
|
|
6384d0ea8c | ||
|
|
77f832447e | ||
|
|
d7eadd03f2 | ||
|
|
c7b55f6edb | ||
|
|
48b98eb55a | ||
|
|
7d318a688c | ||
|
|
93b5b98f23 | ||
|
|
f27737158c | ||
|
|
63bcb03abd | ||
|
|
660c91e230 | ||
|
|
594a8c9494 | ||
|
|
83dee56266 | ||
|
|
4e2f3ad68a | ||
|
|
36d1293759 | ||
|
|
6ba75c93e4 | ||
|
|
ef8074b9cb | ||
|
|
ad5d15b0c3 | ||
|
|
aa7d5e4586 | ||
|
|
e2c0fda4c9 | ||
|
|
b42105fabe |
49
.github/dependabot.yml
vendored
Normal file
49
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/app"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "20:00"
|
||||
open-pull-requests-limit: 10
|
||||
ignore:
|
||||
- dependency-name: font-manager
|
||||
versions:
|
||||
- "> 0.3.0, < 0.4"
|
||||
- dependency-name: sweetalert2
|
||||
versions:
|
||||
- 10.14.1
|
||||
- 10.15.0
|
||||
- 10.15.1
|
||||
- 10.15.2
|
||||
- 10.15.3
|
||||
- 10.15.5
|
||||
- 10.15.6
|
||||
- 10.16.0
|
||||
- 10.16.2
|
||||
- 10.16.5
|
||||
- dependency-name: electron
|
||||
versions:
|
||||
- 11.2.1
|
||||
- 12.0.2
|
||||
- 12.0.3
|
||||
- 12.0.4
|
||||
- dependency-name: eslint
|
||||
versions:
|
||||
- 7.18.0
|
||||
- 7.19.0
|
||||
- 7.20.0
|
||||
- 7.21.0
|
||||
- 7.22.0
|
||||
- 7.24.0
|
||||
- dependency-name: itunes-nowplaying-mac
|
||||
versions:
|
||||
- 0.4.0
|
||||
- dependency-name: electron-dl
|
||||
versions:
|
||||
- 3.0.3
|
||||
- 3.1.0
|
||||
- 3.2.0
|
||||
- dependency-name: electron-rebuild
|
||||
versions:
|
||||
- 2.3.4
|
||||
43
.github/workflows/build-linux.yml
vendored
Normal file
43
.github/workflows/build-linux.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Linux build
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: cd app && yarn
|
||||
- run: cd app && yarn build:all
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.zip"
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.snap"
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.deb"
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.AppImage"
|
||||
42
.github/workflows/build-macos.yml
vendored
Normal file
42
.github/workflows/build-macos.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: macOS build
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: macos-latest
|
||||
environment:
|
||||
name: build
|
||||
env:
|
||||
APPLEID: ${{ secrets.APPLEID }}
|
||||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
CSC_LINK: ${{ secrets.CSC_LINK}}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: cd app && yarn
|
||||
- run: cd app && yarn build:all
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.zip"
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.dmg"
|
||||
35
.github/workflows/build.yml
vendored
Normal file
35
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Windows build
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: cd app && yarn
|
||||
- run: cd app && yarn build:all
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.exe"
|
||||
- uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: "build/*.appx"
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -21,6 +21,7 @@ app/view/cs
|
||||
app/view/ps
|
||||
app/view/es-AR
|
||||
app/view/it-IT
|
||||
app/view/pl-PL
|
||||
app/git
|
||||
*.code-workspace
|
||||
releasenote.md
|
||||
@@ -32,4 +33,8 @@ app/view/no-NO
|
||||
app/view/zh-CN
|
||||
app/view/ru-RU
|
||||
app/view/zh-TW
|
||||
app/view/pt-BR
|
||||
app/view/pt-BR
|
||||
app/build.js
|
||||
app/view/make/make.js
|
||||
app/view/make/makeCli.ts
|
||||
app/.env
|
||||
|
||||
49
.travis.yml
49
.travis.yml
@@ -1,54 +1,19 @@
|
||||
os:
|
||||
- windows
|
||||
- linux
|
||||
- osx
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
osx_image: xcode11.3
|
||||
language: node_js
|
||||
env:
|
||||
- YARN_GPG=no
|
||||
node_js:
|
||||
- '12.17.0'
|
||||
- '14.16.1'
|
||||
cache:
|
||||
yarn: true
|
||||
script: node -v
|
||||
before_deploy:
|
||||
- yarn global add electron-builder
|
||||
- yarn global add browserify
|
||||
- cd app
|
||||
- VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
|
||||
- yarn install --no-lockfile --prod
|
||||
- yarn construct:store
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ];then electron-builder --mac -p never;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ];then cd ../build;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ];then mv *.dmg TheDesk-$VERSION-store.dmg;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ];then cd ../app;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then electron-builder --linux snap:x64 -p never;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then mv *.snap TheDesk-$VERSION-store.snap;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../app;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then yarn add electron-builder;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then electron-builder --win appx:x64 -p never ;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../build;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv *.appx TheDesk-$VERSION-store.appx;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../app;else :;fi
|
||||
- yarn construct
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ];then electron-builder --mac -p never;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then electron-builder --linux --x64 -p never;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then ls;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then mv thedesk-*.zip thedesk.zip;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../app;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then electron-builder --win --ia32 -p never;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../build;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then ls;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv TheDesk-setup.exe TheDesk-setup-ia32.exe;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv *$VERSION.exe TheDesk-ia32.exe;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../app;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then electron-builder --win --x64 -p never;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../build;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then ls;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv ../build/TheDesk-setup.exe ../build/TheDesk-setup.exe;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv ../build/*$VERSION.exe ../build/TheDesk.exe;else :;fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../app;else :;fi
|
||||
- yarn
|
||||
- yarn build:all
|
||||
- cd ../
|
||||
- ls build
|
||||
deploy:
|
||||
|
||||
177
README.md
177
README.md
@@ -1,9 +1,14 @@
|
||||
<img src="https://thedesk.top/img/top.png" width="300" align="left">
|
||||
<img src="https://thedesk.top/img/desk.png" width="150" align="right">
|
||||
|
||||
# TheDesk
|
||||
**English** | [日本語](README_ja.md)
|
||||
|
||||
[](https://travis-ci.org/cutls/TheDesk)
|
||||
<div align="center">
|
||||
|
||||
<img src="https://thedesk.top/img/desk.png" width="150" align="center">
|
||||
|
||||
<h1 align="center">TheDesk</h1>
|
||||
|
||||
[](https://github.com/cutls/TheDesk/actions/workflows/build.yml)
|
||||
[](https://github.com/cutls/TheDesk/actions/workflows/build-linux.yml)
|
||||
[](https://github.com/cutls/TheDesk/actions/workflows/build-macos.yml)
|
||||
[](https://translate.thedesk.top/project/thedesk)
|
||||
[](https://bit.ly/31zqMmZ)
|
||||
[](https://github.com/cutls/TheDesk/releases)
|
||||
@@ -11,158 +16,42 @@
|
||||
Mastodon/Misskey client for PC(Windows/Linux/macOS)
|
||||
オープンソースSNSマストドン/MisskeyのPC向けクライアント[日本語はこちら](README_ja.md)
|
||||
|
||||
Download:[TheDesk](https://thedesk.top)
|
||||
[](https://thedesk.top)
|
||||
|
||||
On GitHub Releases, `-store.*` assets are made for some application store or manager(Snapcraft, Homebrew, Microsoft Store).
|
||||
They do not check the latest version(Which you can get the latest ver or not depends on the store)
|
||||
</div>
|
||||
|
||||
<a href="https://www.patreon.com/cutls"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" width="160"></a>
|
||||
<a href="https://liberapay.com/cutls/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
|
||||

|
||||
|
||||
## License
|
||||
## Build and Development
|
||||
|
||||
[GNU General Public License v3.0](https://github.com/cutls/TheDesk/blob/master/LICENSE)
|
||||
See [Wiki](https://github.com/cutls/TheDesk/wiki)
|
||||
|
||||
The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/)
|
||||
[Press Kit](https://d2upiril6ywqp9.cloudfront.net/press/TheDesk+PressKit.zip)
|
||||
|
||||
* [PNG 512x512](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.png)
|
||||
* [SVG 4095x4096](https://d2upiril6ywqp9.cloudfront.net/press/thedesk-fullcolor.svg)
|
||||
* [ico 256x256](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ico)
|
||||
* [icns old](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.icns)
|
||||
* [Illustrator .ai](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ai)
|
||||
|
||||
The default sounds of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/)
|
||||
|
||||
## Privacy Policy
|
||||
|
||||
* [プライバシーポリシー(Privacy Policy(ja))](https://thedesk.top/priv.html)
|
||||
|
||||
## Language
|
||||
|
||||
* 日本語(Japanese)
|
||||
* 日本語, 関西(Japanese, Kansai)
|
||||
* English
|
||||
* български(Bulgarian) with [translate project](https://translate.thedesk.top/project/thedesk/bg)
|
||||
* Česky(Czech) with [translate project](https://translate.thedesk.top/project/thedesk/cs)
|
||||
* Deutsch(German) with [translate project](https://translate.thedesk.top/project/thedesk/de)
|
||||
* Español, argentina(Spanish, Argentina) with [translate project](https://translate.thedesk.top/project/thedesk/es-AR)
|
||||
* italiano(Italian) with [translate project](https://translate.thedesk.top/project/thedesk/it-IT)
|
||||
|
||||
### Translation
|
||||
## Translation
|
||||
|
||||
Crowdin project is available! Visit: https://translate.thedesk.top
|
||||
|
||||
### Run on developer mode
|
||||
|
||||
`npm run dev` on `app` folder.(before you should run `yarn construct` to make HTML views)
|
||||
|
||||
If you change HTML or language files, you should rub to `yarn construct`. Or `yarn watchview` can always watch and construct such files with 1 process.
|
||||
|
||||
## Contributors
|
||||
|
||||
Build for macOS(Now: Travis CI)
|
||||
|
||||
* [toneji](https://minohdon.jp/@toneji)
|
||||
|
||||
Build for Linux(Now: Travis CI)
|
||||
|
||||
* [popn_ja](https://popon.pptdn.jp/@popn_ja)
|
||||
|
||||
Fellow coder
|
||||
|
||||
* [kPherox](https://pl.kpherox.dev/kPherox)
|
||||
|
||||
## Build
|
||||
|
||||
You should use `yarn` but you can use also `npm`, but if you build on Windows, you should strongly use `yarn`
|
||||
`yarn ***` and `npm run ***` has the same meaning,
|
||||
|
||||
### npm
|
||||
|
||||
```sh
|
||||
git clone https://github.com/cutls/TheDesk
|
||||
cd TheDesk/app
|
||||
npm install
|
||||
npm install --only=dev
|
||||
npm run construct
|
||||
```
|
||||
|
||||
### yarn
|
||||
|
||||
```sh
|
||||
git clone https://github.com/cutls/TheDesk
|
||||
cd TheDesk/app
|
||||
# Linux or macOS
|
||||
yarn install --no-lockfile
|
||||
# Windows
|
||||
yarn install
|
||||
|
||||
yarn construct
|
||||
```
|
||||
|
||||
run `yarn dev` to launch developer version with console(click `view`)
|
||||
|
||||
### electron-builder(Recommended)
|
||||
Use scripts(they can work well with npm, **yarn**).
|
||||
|
||||
```sh
|
||||
# Build for current platform
|
||||
yarn build
|
||||
|
||||
# Select build target
|
||||
## Windows
|
||||
yarn build:win
|
||||
|
||||
## Windows and Linux (The macOS target should run on macOS. So, this option hasn't include the build for macOS)
|
||||
yarn build:all
|
||||
```
|
||||
|
||||
|
||||
Config is all on package.json
|
||||
|
||||
### electron-packager
|
||||
`yarn --D electron-rebuild`
|
||||
|
||||
Linux/macOS
|
||||
`./node_modules/.bin/electron-rebuild`
|
||||
Windows
|
||||
`.\node_modules\.bin\electron-rebuild.cmd`
|
||||
|
||||
To install Python 2.x and Visual C++ for Windows, before running `npm install --save-dev electron-rebuild`
|
||||
`npm install --global windows-build-tools`
|
||||
|
||||
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
|
||||
```
|
||||
electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=linux --arch=x64,ia32 --electron-version=4.0.5 --overwrite
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
### PWA support
|
||||
|
||||
TheDesk is a web-based app, so you can run it on a browser. Of course, the main stream is as Electron. Some features won't work as well as Electron.
|
||||
|
||||
You can run `npm run build:pwa` to build as PWA, including `manifest.json` and the ServiceWorker.
|
||||
|
||||
**You have to rename `node_modules` to `dependencies` to run as a web application. (restricted by Netlify, but always you should do to run as PWA)**
|
||||
|
||||
Check the app on Chrome or Firefox: [Here](https://app.thedesk.top) (it follows the `master` branch, so not stable.)
|
||||
[](https://app.netlify.com/sites/thedesk/deploys)
|
||||
|
||||
## Pleroma support
|
||||
|
||||
Did you find a bug with Pleroma accounts?
|
||||
Pleroma **does not** follow Mastodon API rules completely although Pleroma developers say so.
|
||||
Please write issues to improve TheDesk affinity with Pleroma.
|
||||
|
||||
## Vulnerabilities when `yarn install`???
|
||||
## License
|
||||
|
||||
No, if your npm says materialize-css has vulnerabilities(CVE-2019-11002/3/4), look at [here](https://github.com/Dogfalo/materialize/issues/6286) under discussion, but I do not think this report is really fatal.
|
||||
* [GNU General Public License v3.0](https://github.com/cutls/TheDesk/blob/master/LICENSE)
|
||||
* [License of other assets](https://github.com/cutls/TheDesk/wiki/License-of-other-assets)
|
||||
* [プライバシーポリシー(Privacy Policy(ja))](https://thedesk.top/priv.html)
|
||||
|
||||
## Contributors
|
||||
|
||||
* <img src="https://user-images.githubusercontent.com/17561618/66582029-162df380-ebbc-11e9-8a6f-1832b3a35d89.png" width="20">[toneji](https://minohdon.jp/@toneji) Build for macOS(Now: Travis CI)
|
||||
* <img src="https://avatars3.githubusercontent.com/u/24523508?s=88&v=4" width="20">[popn_ja](https://popon.pptdn.jp/@popn_ja) Build for Linux(Now: Travis CI)
|
||||
* <img src="https://user-images.githubusercontent.com/17561618/66582379-a3714800-ebbc-11e9-8402-d81a35a3be9f.png" width="20">[kPherox](https://pl.kpherox.dev/kPherox) Fellow coder
|
||||
|
||||
## Support
|
||||
|
||||
<a href="https://www.patreon.com/cutls"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" height="30"></a>
|
||||
<a href="https://liberapay.com/cutls/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg" height="30"></a>
|
||||
<a href="https://cutls.fanbox.cc"><img alt="PixivFANBOX" src="https://thedesk.top/img/fanbox.png" height="30"></a>
|
||||
|
||||
Or [others](https://cutls.dev) to support me.
|
||||
|
||||
177
README_ja.md
177
README_ja.md
@@ -1,160 +1,34 @@
|
||||
<img src="https://thedesk.top/img/top.png" width="300" align="left">
|
||||
<img src="https://thedesk.top/img/desk.png" width="150" align="right">
|
||||
|
||||
# TheDesk
|
||||
[English](README.md) | **日本語**
|
||||
|
||||
[](https://travis-ci.org/cutls/TheDesk)
|
||||
<div align="center">
|
||||
|
||||
<img src="https://thedesk.top/img/desk.png" width="150" align="center">
|
||||
|
||||
<h1 align="center">TheDesk</h1>
|
||||
|
||||
[](https://github.com/cutls/TheDesk/actions/workflows/build.yml)
|
||||
[](https://github.com/cutls/TheDesk/actions/workflows/build-linux.yml)
|
||||
[](https://github.com/cutls/TheDesk/actions/workflows/build-macos.yml)
|
||||
[](https://translate.thedesk.top/project/thedesk)
|
||||
[](https://bit.ly/31zqMmZ)
|
||||
[](https://github.com/cutls/TheDesk/releases)
|
||||

|
||||
Mastodon/Misskey client for PC(Windows/Linux/macOS)
|
||||
オープンソースSNSマストドン/MisskeyのPC向けクライアント
|
||||
Download:[TheDesk](https://thedesk.top)
|
||||
|
||||
[Pixiv FANBOX](https://www.pixiv.net/fanbox/creator/28105985)
|
||||
[](https://thedesk.top)
|
||||
|
||||
`-store.*`とあるアセットはストアやパッケージマネージャ向けのもので、アップデートの確認をソフト本体で行いません。
|
||||
</div>
|
||||
|
||||

|
||||
|
||||
## ライセンス
|
||||
|
||||
[GNU General Public License v3.0](https://github.com/cutls/TheDesk/blob/master/LICENSE)
|
||||
|
||||
アイコンは[クリエイティブ・コモンズ 表示-非営利-継承](https://creativecommons.org/licenses/by-nc-sa/4.0/)で提供されています。
|
||||
[プレスキット](https://d2upiril6ywqp9.cloudfront.net/press/TheDesk+PressKit.zip)
|
||||
|
||||
* [PNG 512x512](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.png)
|
||||
* [SVG 4095x4096](https://d2upiril6ywqp9.cloudfront.net/press/thedesk-fullcolor.svg)
|
||||
* [ico 256x256](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ico)
|
||||
* [icns old](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.icns)
|
||||
* [Illustrator .ai](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ai)
|
||||
|
||||
標準の通知音は [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/) で提供されています。
|
||||
|
||||
## プライバシーポリシー
|
||||
|
||||
* [プライバシーポリシー](https://thedesk.top/priv.html)
|
||||
|
||||
## 言語
|
||||
|
||||
* 日本語
|
||||
* 日本語(関西)
|
||||
* English(英語)
|
||||
* ドイツ語, チェコ語, ブルガリア語, イタリア語, スペイン語アルゼンチン方言 (from [Crowdin](https://translate.thedesk.top))
|
||||
|
||||
### 翻訳
|
||||
## 翻訳
|
||||
|
||||
Crowdinから翻訳に参加してみませんか?: https://translate.thedesk.top
|
||||
|
||||
以下、`yarn ***`は全て`npm run ***`で実行できます。(yarnが推奨)
|
||||
## ビルドと開発
|
||||
|
||||
### デベロッパーモード
|
||||
|
||||
`yarn dev`を`app`フォルダ内で実行。
|
||||
ただし、最初に`yarn construct`必須。
|
||||
|
||||
watchモード(ホットリロードはしません): `yarn construct`の代わりに`yarn watchview`
|
||||
HTMLや言語定義の変更について、このコマンドで継続監視します。その他のアセットの変更には不要です。
|
||||
プロセス1つを占拠するので、`yarn dev`は他のプロセスで行ってください。
|
||||
|
||||
## 主なコントリビューター
|
||||
|
||||
macOSビルダー(現在はTravis CI)
|
||||
|
||||
* [とねぢ](https://minohdon.jp/@toneji)
|
||||
|
||||
Linuxビルダー(現在はTravis CI)
|
||||
|
||||
* [ぽぷんじゃ](https://popon.pptdn.jp/@popn_ja)
|
||||
|
||||
コーダー
|
||||
|
||||
* [kPherox](https://pl.kpherox.dev/kPherox)
|
||||
|
||||
## ビルド
|
||||
|
||||
npmでもyarnでも好きな方を選んでください。Windows環境ではyarnを強く推奨します。
|
||||
|
||||
### npm
|
||||
|
||||
```sh
|
||||
git clone https://github.com/cutls/TheDesk
|
||||
cd TheDesk/app
|
||||
npm install
|
||||
npm install --only=dev
|
||||
npm run construct
|
||||
```
|
||||
|
||||
### yarn
|
||||
|
||||
```sh
|
||||
git clone https://github.com/cutls/TheDesk
|
||||
cd TheDesk/app
|
||||
# Linux or macOS
|
||||
yarn install --no-lockfile
|
||||
# Windows
|
||||
yarn install
|
||||
|
||||
yarn construct
|
||||
```
|
||||
|
||||
### electron-builder(推奨)
|
||||
|
||||
scriptsを利用します
|
||||
|
||||
```sh
|
||||
# 実行している環境向けにビルド
|
||||
yarn build
|
||||
|
||||
# ターゲットを指定してビルド
|
||||
## Windows
|
||||
yarn build:win
|
||||
|
||||
## macOS向けのビルドにはmacOSで実行する必要があるためこのコマンドではビルドされません
|
||||
yarn build:all
|
||||
```
|
||||
|
||||
|
||||
ビルド設定はすべてpackage.jsonに記載しています。
|
||||
|
||||
### electron-packager(非推奨)
|
||||
`yarn -D electron-rebuild`
|
||||
|
||||
Linux/macOS
|
||||
`./node_modules/.bin/electron-rebuild`
|
||||
Windows
|
||||
`.\node_modules\.bin\electron-rebuild.cmd`
|
||||
|
||||
WindowsでPython 2.xやVisualC++を一発でインストールできるツールもあります(`npm install --save-dev electron-rebuild`の前に)
|
||||
`npm install --global windows-build-tools`
|
||||
|
||||
日本語話者向けですが、macOSビルドにはXCodeが要るとの情報があります。([とねぢ](https://minohdon.jp/@toneji)氏談)
|
||||
|
||||
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
|
||||
```
|
||||
electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=linux --arch=x64,ia32 --electron-version=4.0.5 --overwrite
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
### PWAとして実行
|
||||
|
||||
TheDeskはウェブ技術を使用して作られているので、ブラウザで動かすこともできます。もちろん、Electron向けに設計されているので一部機能は動きません。
|
||||
|
||||
`yarn build:pwa`でビルドできます。PWAに必要な`manifest.json`やサービスワーカーなども用意されています。
|
||||
|
||||
**`node_modules`を`dependencies`にリネームしないと動きません。(Netlifyの制限ですが、Netlify以外で動かす場合にも必須です)**
|
||||
|
||||
ChromeまたはFirefoxでチェック: [こちら](https://app.thedesk.top) (`master`ブランチに追従しています。不安定です。)
|
||||
[](https://app.netlify.com/sites/thedesk/deploys)
|
||||
[Wiki](https://github.com/cutls/TheDesk/wiki)を参照。
|
||||
|
||||
## Pleromaのサポート
|
||||
|
||||
@@ -165,7 +39,22 @@ Issuesに書いてある問題についてはなるべく対処しますので
|
||||
|
||||
[TheDesk - マストドン日本語ウィキ](https://ja.mstdn.wiki/TheDesk)
|
||||
|
||||
## `yarn install`したら脆弱性あるって言われた
|
||||
## ライセンス
|
||||
|
||||
materialize-cssの脆弱性(CVE-2019-11002/3/4)については[こちら](https://github.com/Dogfalo/materialize/issues/6286)で本当に脆弱性かどうか議論しています。
|
||||
実際には害が無いものと思われます。
|
||||
* [GNU General Public License v3.0](https://github.com/cutls/TheDesk/blob/master/LICENSE)
|
||||
* [License of other assets](https://github.com/cutls/TheDesk/wiki/License-of-other-assets)
|
||||
* [プライバシーポリシー](https://thedesk.top/priv.html)
|
||||
|
||||
## 主なコントリビューター
|
||||
|
||||
* <img src="https://user-images.githubusercontent.com/17561618/66582029-162df380-ebbc-11e9-8a6f-1832b3a35d89.png" width="20">[とねぢ](https://minohdon.jp/@toneji) macOSビルダー(現在はTravis CI)
|
||||
* <img src="https://avatars3.githubusercontent.com/u/24523508?s=88&v=4" width="20">[ぽぷんじゃ](https://popon.pptdn.jp/@popn_ja) Linuxビルダー(現在はTravis CI)
|
||||
* <img src="https://user-images.githubusercontent.com/17561618/66582379-a3714800-ebbc-11e9-8402-d81a35a3be9f.png" width="20">[kPherox](https://pl.kpherox.dev/kPherox)
|
||||
|
||||
## 支援
|
||||
|
||||
<a href="https://www.patreon.com/cutls"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" height="30"></a>
|
||||
<a href="https://liberapay.com/cutls/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg" height="30"></a>
|
||||
<a href="https://cutls.fanbox.cc"><img alt="PixivFANBOX" src="https://thedesk.top/img/fanbox.png" height="30"></a>
|
||||
|
||||
[その他の支援法](https://cutls.dev)
|
||||
@@ -1,4 +1,6 @@
|
||||
const { AiScript, parse, values, utils } = require('@syuilo/aiscript')
|
||||
const gcc = require('textarea-caret')
|
||||
global.getCaretCoordinates = gcc
|
||||
global.sanitizeHtml = require('sanitize-html')
|
||||
global.asValue = values
|
||||
global.AiScript = AiScript
|
||||
|
||||
14
app/build.d.ts
vendored
Normal file
14
app/build.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
declare function _exports(options?: {
|
||||
onlyStore?: boolean;
|
||||
withStore?: boolean;
|
||||
withIa32?: boolean;
|
||||
withArm64?: boolean;
|
||||
windows?: boolean;
|
||||
linux?: boolean;
|
||||
macOS?: boolean;
|
||||
skipWindows?: boolean;
|
||||
skipLinux?: boolean;
|
||||
skipMacOS?: boolean;
|
||||
unnotarize?: boolean;
|
||||
}): void;
|
||||
export = _exports;
|
||||
298
app/build.js
298
app/build.js
@@ -1,112 +1,226 @@
|
||||
const builder = require("electron-builder");
|
||||
const fs = require('fs');
|
||||
const os = process.platform;
|
||||
const builder = require('electron-builder')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const basefile = __dirname + '/'
|
||||
const package = fs.readFileSync(basefile + 'package.json')
|
||||
const data = JSON.parse(package)
|
||||
const version = data.version
|
||||
const codename = data.codename
|
||||
const ver = `${version} (${codename})`
|
||||
const construct = require('./view/make/make.js')
|
||||
const { platform, arch } = process
|
||||
const Platform = builder.Platform
|
||||
const Arch = builder.Arch
|
||||
const targets = new Map();
|
||||
const archToType = new Map();
|
||||
const pref = {
|
||||
productName: "TheDesk",
|
||||
appId: "top.thedesk",
|
||||
asarUnpack: [
|
||||
"node_modules/itunes-nowplaying-mac"
|
||||
],
|
||||
const artifactName = 'TheDesk-setup-${arch}.${ext}'
|
||||
const config = {
|
||||
productName: 'TheDesk',
|
||||
appId: 'top.thedesk',
|
||||
asarUnpack: ['node_modules/itunes-nowplaying-mac', 'main/script'],
|
||||
afterSign: 'build/notarize.js',
|
||||
directories: {
|
||||
output: "../build/"
|
||||
output: '../build',
|
||||
},
|
||||
win: {
|
||||
icon: "build/thedesk.ico",
|
||||
target: [
|
||||
"nsis",
|
||||
"portable",
|
||||
"appx"
|
||||
]
|
||||
icon: 'build/thedesk.ico',
|
||||
target: ['nsis', 'appx', 'portable'],
|
||||
publish: []
|
||||
},
|
||||
appx: {
|
||||
identityName: "53491Cutls.TheDesk",
|
||||
applicationId: "Cutls.TheDesk",
|
||||
publisherDisplayName: "Cutls",
|
||||
publisher: "CN=629757F5-A5EE-474F-9562-B304A89A9FD1",
|
||||
languages: [
|
||||
"JA-JP",
|
||||
"EN-US"
|
||||
]
|
||||
identityName: '53491Cutls.TheDesk',
|
||||
applicationId: 'Cutls.TheDesk',
|
||||
publisherDisplayName: 'Cutls',
|
||||
publisher: 'CN=629757F5-A5EE-474F-9562-B304A89A9FD1',
|
||||
languages: ['JA-JP', 'EN-US'],
|
||||
},
|
||||
nsis: {
|
||||
oneClick: false,
|
||||
allowToChangeInstallationDirectory: true
|
||||
allowToChangeInstallationDirectory: true,
|
||||
artifactName: 'TheDesk-setup-${arch}.${ext}',
|
||||
},
|
||||
linux: {
|
||||
icon: "build/icons",
|
||||
target: [
|
||||
"zip",
|
||||
"snap"
|
||||
],
|
||||
category: "Network"
|
||||
target: ['zip', 'appImage', 'snap', 'deb'],
|
||||
category: 'Network',
|
||||
},
|
||||
mac: {
|
||||
target: [
|
||||
"dmg",
|
||||
"zip"
|
||||
]
|
||||
hardenedRuntime: true,
|
||||
gatekeeperAssess: false,
|
||||
entitlements: 'build/entitlements.mac.plist',
|
||||
entitlementsInherit: 'build/entitlements.mac.plist',
|
||||
},
|
||||
electronDownload: {
|
||||
version: "5.0.1"
|
||||
dmg: {
|
||||
sign: false,
|
||||
},
|
||||
electronVersion: "5.0.1"
|
||||
}
|
||||
const json = JSON.parse(fs.readFileSync("package.json", 'utf8'));
|
||||
const version = json.version;
|
||||
|
||||
|
||||
if (os == "win32") {
|
||||
archToType.set(Arch.ia32, []);
|
||||
targets.set(Platform.WINDOWS, archToType);
|
||||
} else if (os == "linux") {
|
||||
archToType.set(Arch.x64, []);
|
||||
archToType.set(Arch.ia32, []);
|
||||
targets.set(Platform.LINUX, archToType);
|
||||
} else if (os == "darwin") {
|
||||
archToType.set(Arch.x64, []);
|
||||
targets.set(Platform.MAC, archToType);
|
||||
} else {
|
||||
async function build(os, arch, config) {
|
||||
let targets = new Map()
|
||||
let archToType = new Map()
|
||||
archToType.set(arch, [])
|
||||
targets.set(os, archToType)
|
||||
await builder.build({
|
||||
targets: targets,
|
||||
config: config,
|
||||
publish: 'never'
|
||||
})
|
||||
}
|
||||
async function cmd(options) {
|
||||
if (isTrue(options, 'help', 'h')) {
|
||||
return console.log(help())
|
||||
}
|
||||
if (isTrue(options, 'onlyStore') || isTrue(options, 'withStore')) {
|
||||
console.log('start building for application stores')
|
||||
construct(ver, basefile, false, true)
|
||||
if ((platform == 'win32' && !isTrue(options, 'skiWindows')) || isTrue(options, 'windows', 'w')) {
|
||||
if ((isTrue(options, 'withIa32') && arch == 'x64') || arch == 'ia32') {
|
||||
config.nsis.artifactName = artifactName.replace('${arch}', 'ia32')
|
||||
await build(Platform.WINDOWS, Arch.ia32, config)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk ${version}.exe`,
|
||||
'../build/TheDesk-ia32-store.exe'
|
||||
)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk-setup-ia32.exe`,
|
||||
'../build/TheDesk-setup-ia32-store.exe'
|
||||
)
|
||||
}
|
||||
if (arch == 'x64') {
|
||||
config.nsis.artifactName = artifactName.replace('${arch}', 'x64')
|
||||
await build(Platform.WINDOWS, Arch.x64, config)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk ${version}.exe`,
|
||||
'../build/TheDesk-store.exe'
|
||||
)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk-setup-x64.exe`,
|
||||
'../build/TheDesk-setup-store.exe'
|
||||
)
|
||||
}
|
||||
}
|
||||
if ((platform == 'linux' && !isTrue(options, 'skipLinux')) || isTrue(options, 'linux', 'l')) {
|
||||
if (arch == 'ia32') {
|
||||
await build(Platform.LINUX, Arch.ia32, config)
|
||||
}
|
||||
if ((isTrue(options, 'withIa32') && arch == 'x64')) {
|
||||
console.log('snapcraft does not curretly support builing i386 on amd64')
|
||||
}
|
||||
if (arch == 'x64') {
|
||||
await build(Platform.LINUX, Arch.x64, config)
|
||||
if (!isTrue(options, 'onlyStore')) {
|
||||
fs.renameSync(
|
||||
`../build/thedesk_${version}_amd64.snap`,
|
||||
`../build/thedesk_${version}_amd64-store.snap`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isTrue(options, 'onlyStore')) {
|
||||
console.log('start building for normal usage')
|
||||
construct(ver, basefile, false, false)
|
||||
if ((platform == 'win32' && !isTrue(options, 'skiWindows')) || isTrue(options, 'windows', 'w')) {
|
||||
if ((isTrue(options, 'withIa32') && arch == 'x64') || arch == 'ia32') {
|
||||
config.nsis.artifactName = artifactName.replace('${arch}', 'ia32')
|
||||
await build(Platform.WINDOWS, Arch.ia32, config)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk ${version}.exe`,
|
||||
'../build/TheDesk-ia32.exe'
|
||||
)
|
||||
}
|
||||
if (arch == 'x64') {
|
||||
config.nsis.artifactName = artifactName.replace('${arch}', 'x64')
|
||||
await build(Platform.WINDOWS, Arch.x64, config)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk ${version}.exe`,
|
||||
'../build/TheDesk.exe'
|
||||
)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk-setup-x64.exe`,
|
||||
'../build/TheDesk-setup.exe'
|
||||
)
|
||||
}
|
||||
if ((isTrue(options, 'withArm64') && arch == 'x64') || arch == 'arm64') {
|
||||
config.nsis.artifactName = artifactName.replace('${arch}', 'arm64')
|
||||
await build(Platform.WINDOWS, Arch.arm64, config)
|
||||
fs.renameSync(
|
||||
`../build/TheDesk ${version}.exe`,
|
||||
'../build/TheDesk-arm64.exe'
|
||||
)
|
||||
}
|
||||
}
|
||||
if ((platform == 'linux' && !isTrue(options, 'skipLinux')) || isTrue(options, 'linux', 'l')) {
|
||||
if (arch == 'ia32') {
|
||||
await build(Platform.LINUX, Arch.ia32, config)
|
||||
}
|
||||
if (isTrue(options, 'withIa32') && arch == 'x64') {
|
||||
console.log('snapcraft does not curretly support builing i386 on amd64')
|
||||
}
|
||||
if (arch == 'x64') {
|
||||
await build(Platform.LINUX, Arch.x64, config)
|
||||
fs.renameSync(
|
||||
`../build/thedesk_${version}_amd64.snap`,
|
||||
`../build/thedesk_${version}_amd64-normal.snap`
|
||||
)
|
||||
if (isTrue(options, 'onlyStore') || isTrue(options, 'withStore')) {
|
||||
fs.renameSync(
|
||||
`../build/thedesk_${version}_amd64-store.snap`,
|
||||
`../build/thedesk_${version}_amd64.snap`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (platform == 'darwin' && !isTrue(options, 'skipMacOS')) {
|
||||
if(isTrue(options, 'unnotarize')) delete config.afterSign
|
||||
await build(Platform.MAC, Arch.x64, config)
|
||||
}
|
||||
}
|
||||
}
|
||||
function isTrue(options, long, short) {
|
||||
const { argv } = process
|
||||
if (options ? options[long] : 0) return true
|
||||
if (argv.includes(`--${long}`)) return true
|
||||
if (short && argv.includes(`-${short}`)) return true
|
||||
return false
|
||||
}
|
||||
builder.build({
|
||||
targets: targets,
|
||||
config: pref
|
||||
})
|
||||
.then(() => {
|
||||
console.log("Done on "+os)
|
||||
if (os == "win32") {
|
||||
console.log("Windows")
|
||||
fs.renameSync('../build/TheDesk ' + version + '.exe', '../build/TheDesk-ia32.exe');
|
||||
fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup-ia32.exe');
|
||||
retry()
|
||||
}else if (os == "linux") {
|
||||
console.log("Linux")
|
||||
fs.renameSync('../build/thedesk-' + version + '.zip', '../build/TheDesk.zip');
|
||||
fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup-ia32.exe');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
// handle error
|
||||
})
|
||||
function retry(){
|
||||
console.log("Windows x64")
|
||||
const targetsAlt = new Map();
|
||||
const archToTypeAlt = new Map();
|
||||
targetsAlt.set(Platform.WINDOWS, archToTypeAlt);
|
||||
archToTypeAlt.set(Arch.x64, []);
|
||||
builder.build({
|
||||
targets: targetsAlt,
|
||||
config: pref
|
||||
})
|
||||
.then(() => {
|
||||
fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup.exe');
|
||||
fs.renameSync('../build/TheDesk ' + version + '.exe', '../build/TheDesk.exe');
|
||||
})
|
||||
.catch((error) => {
|
||||
// handle error
|
||||
})
|
||||
}
|
||||
function help() {
|
||||
return `
|
||||
TheDesk Builder command tool
|
||||
yarn build [options] (or node build.js [options])
|
||||
yarn build:[preset] (check package.json)
|
||||
|
||||
--help or -h: show help
|
||||
|
||||
[Build for other platforms]
|
||||
--windows (-w)
|
||||
--linux (-l)
|
||||
|
||||
--skipWindows
|
||||
--skipLinux
|
||||
--skipMacOS
|
||||
To skip building for itself platform.
|
||||
|
||||
|
||||
[only Windows, Linux]
|
||||
--onlyStore: application store of platforms assets(without update check)
|
||||
--withStore: application store assets and normal version
|
||||
|
||||
[only Windows]
|
||||
|
||||
--withIa32: ia32 build on x64 system(if your machine is ia32, it will be built if this arg is not passed)
|
||||
--withArm64(beta) arm64 build on x64 system(if your machine is arm64, it will be built if this arg is not passed, and not build store build for arm64)
|
||||
|
||||
[only macOS]
|
||||
--unnotarize: Without notarize
|
||||
`
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder
|
||||
* @module builder
|
||||
* @param {Object} [options] - Options
|
||||
* @param {boolean} [options.onlyStore] - App Store of platforms assets(without update check)
|
||||
* @param {boolean} [options.withStore] - App Store of platforms assets(without update check) assets and normal version
|
||||
* @param {boolean} [options.withIa32] - [Windows only] ia32 build on x64 system(if your machine is ia32, it will be built if this arg is not passed)
|
||||
* @param {boolean} [options.withArm64] - [Windows only(beta)] arm64 build on x64 system(if your machine is arm64, it will be built if this arg is not passed, and not build store build for arm64)
|
||||
* @return {void}
|
||||
*/
|
||||
module.exports = cmd
|
||||
8
app/build/entitlements.mac.plist
Normal file
8
app/build/entitlements.mac.plist
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
23
app/build/notarize.js
Normal file
23
app/build/notarize.js
Normal file
@@ -0,0 +1,23 @@
|
||||
require('dotenv').config()
|
||||
const { notarize } = require('electron-notarize')
|
||||
|
||||
// Notarizeをしない場合、下のuseNotarizeをtrueからfalseに変更してください。
|
||||
const useNotarize = true
|
||||
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
const { electronPlatformName, appOutDir } = context
|
||||
if (electronPlatformName !== 'darwin' || !useNotarize) return
|
||||
const appName = context.packager.appInfo.productFilename
|
||||
console.log(`start notarize: ${appOutDir}/${appName}.app`)
|
||||
try {
|
||||
return await notarize({
|
||||
appBundleId: 'top.thedesk',
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLEID,
|
||||
appleIdPassword: process.env.APPLEIDPASS,
|
||||
})
|
||||
} catch (e) {
|
||||
throw console.log(e)
|
||||
}
|
||||
}
|
||||
2
app/buildCli.js
Normal file
2
app/buildCli.js
Normal file
@@ -0,0 +1,2 @@
|
||||
const cmd = require('./build')
|
||||
cmd()
|
||||
@@ -91,4 +91,19 @@ i.left {
|
||||
}
|
||||
.text-line-icon {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.loginBtnWrap {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
#add {
|
||||
max-width: 1000px;
|
||||
}
|
||||
.autocomplete-content {
|
||||
min-width: 450px;
|
||||
}
|
||||
.autocomplete-content li {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -91,19 +91,18 @@ option {
|
||||
height: 100%;
|
||||
}
|
||||
#imagewrap img.rotate-90 {
|
||||
transform: rotate(-90deg)
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
#imagewrap img.rotate-180 {
|
||||
transform: rotate(-180deg)
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
#imagewrap img.rotate-270 {
|
||||
transform: rotate(-270deg)
|
||||
transform: rotate(-270deg);
|
||||
}
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.badge {
|
||||
min-width: 0 !important;
|
||||
margin-left: 0.4rem !important;
|
||||
}
|
||||
.unvisible {
|
||||
@@ -418,13 +417,23 @@ input[type='color']::-webkit-color-swatch {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
width: 13rem;
|
||||
height: 3.1rem;
|
||||
min-width: 150px;
|
||||
width: 50%;
|
||||
height: 2.5rem;
|
||||
cursor: pointer;
|
||||
color: var(--text);
|
||||
}
|
||||
#tltype .type div {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
#tltype .type span {
|
||||
width: calc(100% - 2.3rem);
|
||||
width: calc(100% - 4rem);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
}
|
||||
#tltype .type:hover {
|
||||
background-color: var(--beforehover);
|
||||
@@ -499,13 +508,25 @@ textarea {
|
||||
font-size: 1rem !important;
|
||||
font-family: inherit;
|
||||
}
|
||||
.swal2-popup {
|
||||
.swal2-popup,
|
||||
.swal2-header {
|
||||
background-color: var(--subcolor) !important;
|
||||
}
|
||||
.swal2-title,
|
||||
.swal2-content {
|
||||
color: var(--text) !important;
|
||||
}
|
||||
h2.swal2-title {
|
||||
margin: 0;
|
||||
line-height: 100%;
|
||||
}
|
||||
.swal2-close:focus {
|
||||
background-color: inherit !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.swal2-actions {
|
||||
background-color: var(--modalfooter);
|
||||
}
|
||||
#src-contents svg {
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
@@ -548,6 +569,7 @@ textarea {
|
||||
background-color: var(--emphasized);
|
||||
}
|
||||
#pageSrc {
|
||||
border-radius: 10px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: calc(50vw - 11.53rem);
|
||||
@@ -555,10 +577,22 @@ textarea {
|
||||
max-width: 100%;
|
||||
background-color: var(--subcolor);
|
||||
z-index: 501;
|
||||
padding: 0.4rem;
|
||||
}
|
||||
#pageSrcInput {
|
||||
width: 12.3rem;
|
||||
.pageSrcBtn:hover {
|
||||
background-color: var(--selected);
|
||||
}
|
||||
.srcQ {
|
||||
margin-top: 0.4rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
.lastPSB {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.pageSrcBtn {
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
.voice {
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
@@ -679,10 +713,10 @@ button {
|
||||
}
|
||||
.pluginNex {
|
||||
width: 2rem;
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
.pluginNex span {
|
||||
font-size: 2rem;
|
||||
position: relative;
|
||||
top: -4px;
|
||||
}
|
||||
position: relative;
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,20 @@ textarea {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#suggest {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: var(--bg);
|
||||
z-index: 2;
|
||||
border-radius: 0.5rem;
|
||||
display: none;
|
||||
max-height: 10rem;
|
||||
}
|
||||
#suggest a {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
#emoji-list {
|
||||
width: 100%;
|
||||
height: 15.4rem;
|
||||
|
||||
8
app/css/sweetalert2-material.min.css
vendored
Normal file
8
app/css/sweetalert2-material.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
134
app/css/tl.css
134
app/css/tl.css
@@ -260,7 +260,7 @@ iframe,
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 3.3rem 2fr 1fr;
|
||||
grid-template-rows: auto 1.6rem 1fr auto 2.5rem;
|
||||
grid-template-rows: auto 1.6rem 1fr auto 1.9rem;
|
||||
grid-template-areas: 'notice notice notice' 'icon display_name display_name' 'space toot toot' 'space additional additional' 'vis actions side';
|
||||
}
|
||||
.hide-actions {
|
||||
@@ -353,15 +353,26 @@ iframe,
|
||||
.area-actions {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
top: -0.4rem;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
max-width: 100%;
|
||||
grid-area: actions;
|
||||
}
|
||||
.area-actions .btn-flat {
|
||||
height: 1.3rem;
|
||||
line-height: 1.3rem;
|
||||
}
|
||||
.area-actions .btn-flat,
|
||||
.area-vis i,
|
||||
.area-side .btn-flat {
|
||||
margin: 0;
|
||||
}
|
||||
.area-side i {
|
||||
line-height: initial;
|
||||
}
|
||||
|
||||
.area-vis {
|
||||
margin: 0.4rem;
|
||||
margin: 0.2rem;
|
||||
grid-area: vis;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -373,7 +384,14 @@ iframe,
|
||||
margin: 0.15rem;
|
||||
grid-area: side;
|
||||
}
|
||||
|
||||
.notf-udg-text {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
max-width: calc(100% - 150px);
|
||||
display: inline-block;
|
||||
}
|
||||
.cusr {
|
||||
user-select: text;
|
||||
padding-left: 0.4rem;
|
||||
@@ -534,15 +552,67 @@ p:not(:last-child) {
|
||||
grid-template-rows: 2.3rem 2.3rem;
|
||||
grid-template-areas: 'notice notice_name notice_name a2' 'notice a1 sta a3' 'notf-box notf-box notf-box notf-box';
|
||||
}
|
||||
.small-header.notice-box {
|
||||
min-height: 2rem;
|
||||
grid-template-columns: 2.3rem 1fr 5rem 2rem 2rem;
|
||||
grid-template-rows: 1.8rem;
|
||||
grid-template-areas: 'notice notice_name a1 a3 a2';
|
||||
}
|
||||
.small-header.has-notf.notice-box {
|
||||
min-height: 2rem;
|
||||
grid-template-columns: 2.3rem 1fr 8rem 5rem 2rem 2rem;
|
||||
grid-template-rows: 1.8rem;
|
||||
grid-template-areas: 'notice notice_name sta a1 a3 a2';
|
||||
}
|
||||
.emp {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.rotate-90 {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.area-notice {
|
||||
grid-area: notice;
|
||||
}
|
||||
|
||||
.small-header .area-notice {
|
||||
margin: 0;
|
||||
}
|
||||
.small-header .area-sta {
|
||||
display: none;
|
||||
}
|
||||
.small-header.has-notf .area-sta {
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
height: 2rem;
|
||||
width: 8rem;
|
||||
display: flex;
|
||||
}
|
||||
.small-header .area-sta::-webkit-scrollbar {
|
||||
height: 5px;
|
||||
}
|
||||
#tagContextMenu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: var(--subcolor);
|
||||
z-index: 2;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
#tagContextMenu a {
|
||||
display: block;
|
||||
color: var(--text);
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
#tagContextMenu a:hover {
|
||||
background-color: var(--selected);
|
||||
}
|
||||
.firstTCM {
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
.lastTCM {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.area-notice_name {
|
||||
grid-area: notice_name;
|
||||
overflow: hidden;
|
||||
@@ -558,6 +628,10 @@ p:not(:last-child) {
|
||||
grid-area: a1;
|
||||
}
|
||||
.area-sta {
|
||||
display: none;
|
||||
}
|
||||
.has-notf .area-sta {
|
||||
display: block;
|
||||
text-align: center;
|
||||
grid-area: sta;
|
||||
}
|
||||
@@ -624,24 +698,37 @@ p:not(:last-child) {
|
||||
border: thin solid gray;
|
||||
border-bottom: 2px solid white;
|
||||
grid-area: notf-box;
|
||||
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
||||
0 5px 5px -3px rgba(0, 0, 0, 0.3), 0px -10px 10px 0px rgba(0, 0, 0, 0.3) inset;
|
||||
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.3), 0px -10px 10px 0px rgba(0, 0, 0, 0.3) inset;
|
||||
}
|
||||
.notf-indv-box label span {
|
||||
padding-left: 23px !important;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.columnSettings {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.notf-indv-box .setting {
|
||||
font-size: 1rem;
|
||||
width: calc(25% - 3px);
|
||||
text-align: left;
|
||||
padding: 5px;
|
||||
height: 70px;
|
||||
text-align: center;
|
||||
width: calc(25% - 6px);
|
||||
margin: 3px;
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 17px;
|
||||
border: 1px solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.notf-indv-box .setting:hover {
|
||||
color: var(--text);
|
||||
}
|
||||
.notf-exclude-btn {
|
||||
border: 1px solid;
|
||||
}
|
||||
.notf-exclude-btn:hover {
|
||||
background-color: inherit !important;
|
||||
border: 1px solid;
|
||||
filter: brightness(70%);
|
||||
}
|
||||
.type-b {
|
||||
display: none;
|
||||
@@ -673,6 +760,9 @@ p:not(:last-child) {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-content li {
|
||||
padding-top: 0.4rem;
|
||||
}
|
||||
.fa-2x > .emoji-img {
|
||||
width: 2.3rem !important;
|
||||
height: 2.3rem !important;
|
||||
@@ -756,7 +846,9 @@ p:not(:last-child) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.fav_ct, .rt_ct, .rep_ct {
|
||||
.fav_ct,
|
||||
.rt_ct,
|
||||
.rep_ct {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.shared.selectedToot {
|
||||
@@ -856,6 +948,14 @@ audio {
|
||||
.box .ui-resizable-se {
|
||||
display: none !important;
|
||||
}
|
||||
.small-header .top-icon {
|
||||
font-size: 2rem !important;
|
||||
padding-top: 0%;
|
||||
}
|
||||
.top-icon {
|
||||
font-size: 40px !important;
|
||||
padding-top: 25%;
|
||||
}
|
||||
.announcement {
|
||||
padding: 0.38rem;
|
||||
border-bottom: 1px solid;
|
||||
@@ -883,4 +983,4 @@ audio {
|
||||
}
|
||||
.reactionsPack {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,8 +155,16 @@
|
||||
#hisdropdown li:hover {
|
||||
background-color: var(--active);
|
||||
}
|
||||
#his-data-title {
|
||||
#his-data-title-wrap {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 1.5rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#his-data-title .material-icons {
|
||||
position: relative;
|
||||
top: 7px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
6
app/gitHash.js
Normal file
6
app/gitHash.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const fs = require('fs')
|
||||
const execSync = require('child_process').execSync
|
||||
const gitHash = execSync('git rev-parse HEAD')
|
||||
.toString()
|
||||
.trim()
|
||||
fs.writeFileSync('git', gitHash)
|
||||
@@ -537,9 +537,10 @@ function multiSelector(parseC) {
|
||||
}
|
||||
last = last + ''
|
||||
var sel
|
||||
const webview = localStorage.getItem('webview_setting') === 'true'
|
||||
if (obj.length < 1) {
|
||||
$('#src-acct-sel').html('<option value="tootsearch">Tootsearch</option>')
|
||||
$('#add-acct-sel').html('<option value="noauth">' + lang.lang_login_noauth + '</option>')
|
||||
$('#add-acct-sel').html('<option value="noauth">' + lang.lang_login_noauth + `</option>${webview ? `<option value="webview">TweetDeck</option>` : ''}`)
|
||||
} else {
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
var acct = obj[key]
|
||||
@@ -610,7 +611,7 @@ function multiSelector(parseC) {
|
||||
$('#add-acct-sel').append(
|
||||
'<option value="noauth">' +
|
||||
lang.lang_login_noauth +
|
||||
'</option><!--option value="webview">Twitter</option-->'
|
||||
`</option>${webview ? `<option value="webview">TweetDeck</option>` : ''}`
|
||||
)
|
||||
$('#dir-acct-sel').append('<option value="noauth">' + lang.lang_login_noauth + '</option>')
|
||||
}
|
||||
|
||||
@@ -205,8 +205,6 @@ function multiDel(target) {
|
||||
text: obj[target]['user'] + '@' + obj[target]['domain'] + lang.lang_manager_confirm,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no
|
||||
}).then(result => {
|
||||
@@ -299,8 +297,6 @@ function multiDel2(target) {
|
||||
text: obj[target]['user'] + '@' + obj[target]['domain'] + lang.lang_manager_confirm,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no
|
||||
}).then(result => {
|
||||
@@ -427,10 +423,6 @@ function login(url) {
|
||||
versionChecker(url)
|
||||
$('#add').hide()
|
||||
postMessage(['openUrl', auth], '*')
|
||||
if ($('#linux:checked').val() == 'on') {
|
||||
} else {
|
||||
postMessage(['sendSinmpleIpc', 'quit'], '*')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -629,15 +621,16 @@ function misskeyAuth(url, mkc) {
|
||||
|
||||
//テキストボックスにURL入れた
|
||||
function instance() {
|
||||
var url = $('#url').val()
|
||||
var url = $('#autocomplete-input').val()
|
||||
if (url.indexOf('@') != -1 || url.indexOf('https') != -1) {
|
||||
alert('入力形式が違います。(Cutls@mstdn.jpにログインする場合、入力するのは"mstdn.jp"です。)')
|
||||
return false
|
||||
}
|
||||
login(url)
|
||||
login(url)
|
||||
}
|
||||
//コード入れてAccessTokenゲット
|
||||
function code(code) {
|
||||
var red = localStorage.getItem('redirect')
|
||||
localStorage.removeItem('redirect')
|
||||
if (!code) {
|
||||
var code = $('#code').val()
|
||||
@@ -700,7 +693,7 @@ function code(code) {
|
||||
}
|
||||
return
|
||||
} else {
|
||||
var red = 'urn:ietf:wg:oauth:2.0:oob'
|
||||
if (!red) red = 'urn:ietf:wg:oauth:2.0:oob'
|
||||
if (~url.indexOf('pixelfed')) {
|
||||
red = 'https://thedesk.top/hello.html'
|
||||
}
|
||||
@@ -724,6 +717,7 @@ function code(code) {
|
||||
if (httpreq.readyState === 4) {
|
||||
var json = httpreq.response
|
||||
if (this.status !== 200) {
|
||||
M.toast({ html: lang.lang_fatalerroroccured + 'Error: cannot complete', displayLength: 5000 })
|
||||
setLog(start, this.status, json)
|
||||
}
|
||||
if (json['access_token']) {
|
||||
@@ -1093,15 +1087,14 @@ function coloradd(key, bg, txt) {
|
||||
//入力時にハッシュタグと@をサジェスト
|
||||
var timer = null
|
||||
|
||||
var input = document.getElementById('url')
|
||||
|
||||
var input = document.getElementById('autocomplete-input')
|
||||
var prev_val = input.value
|
||||
var oldSuggest
|
||||
var suggest
|
||||
input.addEventListener(
|
||||
'focus',
|
||||
function () {
|
||||
$('#ins-suggest').html('')
|
||||
const instance = M.Autocomplete.getInstance(input)
|
||||
window.clearInterval(timer)
|
||||
timer = window.setInterval(function () {
|
||||
var new_val = input.value
|
||||
@@ -1112,7 +1105,7 @@ input.addEventListener(
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
@@ -1129,21 +1122,20 @@ input.addEventListener(
|
||||
})
|
||||
.then(function (json) {
|
||||
if (!json.error) {
|
||||
var urls = 'Suggest:'
|
||||
let data = {}
|
||||
Object.keys(json.data).forEach(function (key) {
|
||||
var url = json.data[key]
|
||||
urls =
|
||||
urls +
|
||||
`<a onclick="login('${url.uri}')" class="pointer" title="${url.uri}">${escapeHTML(url.title ? url.title : url.uri)}</a>, `
|
||||
data[url.uri] = escapeHTML(url.title ? url.title : url.uri)
|
||||
})
|
||||
$('#ins-suggest').html(urls)
|
||||
instance.updateData(data)
|
||||
instance.open()
|
||||
} else {
|
||||
console.error(json.error)
|
||||
}
|
||||
})
|
||||
}
|
||||
oldSuggest = suggest
|
||||
prev_value = new_val
|
||||
prev_val = new_val
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
@@ -1161,3 +1153,12 @@ input.addEventListener(
|
||||
function asReadEnd() {
|
||||
postMessage(['asReadComp', ''], '*')
|
||||
}
|
||||
|
||||
// Or with jQuery
|
||||
|
||||
$(document).ready(function(){
|
||||
$('input.autocomplete').autocomplete({
|
||||
data: {},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -186,7 +186,7 @@ onmessage = function (e) {
|
||||
} else if (e.data[0] == 'asReadEnd') {
|
||||
asReadEnd()
|
||||
} else if (e.data[0] == 'accessibility') {
|
||||
console.log('atrue')
|
||||
console.log('accessibility mode')
|
||||
$('body').addClass('accessibility')
|
||||
$('.window-title').before('<div class="accessMark">Screen Reader Optimized</div>')
|
||||
} else if (e.data[0] == 'logData') {
|
||||
@@ -198,6 +198,24 @@ onmessage = function (e) {
|
||||
type: 'info',
|
||||
title: e.data[1]
|
||||
})
|
||||
} else if (e.data[0] == 'twitterLoginComplete') {
|
||||
location.reload()
|
||||
} else if (e.data[0] == 'customUrl') {
|
||||
const mode = e.data[1][0]
|
||||
const codex = e.data[1][1]
|
||||
if (mode === 'share') {
|
||||
$('textarea').focus()
|
||||
$('#textarea').val(decodeURI(codex))
|
||||
show()
|
||||
$('body').removeClass('mini-post')
|
||||
$('.mini-btn').text('expand_less')
|
||||
} else if (mode === 'manager' || mode === 'login') {
|
||||
code(codex)
|
||||
} else if (mode === 'spotify') {
|
||||
var coder = codex.split(':')
|
||||
localStorage.setItem('spotify', coder[0])
|
||||
localStorage.setItem('spotify-refresh', coder[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
/* PWA */
|
||||
@@ -234,3 +252,34 @@ const connection = function (event) {
|
||||
}
|
||||
window.onoffline = connection
|
||||
window.ononline = connection
|
||||
|
||||
let lastSelection = null
|
||||
let isSame = true
|
||||
$(document).on('keyup mouseup', function (e) {
|
||||
lastSelection = (window.getSelection().toString() !== '') ? window.getSelection().getRangeAt(0) : null
|
||||
if (!isSame) $('#pageSrc').addClass('hide')
|
||||
})
|
||||
|
||||
// カスタム右クリックメニュー
|
||||
$(document).on('contextmenu', function (e) {
|
||||
// テキスト選択中であれば何もしない
|
||||
if (lastSelection !== null) {
|
||||
const currentSelection = window.getSelection().getRangeAt(0)
|
||||
for (let key in currentSelection) {
|
||||
if (currentSelection[key] != lastSelection[key]) {
|
||||
isSame = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (isSame && currentSelection != '') {
|
||||
$('#pageSrc').removeClass('hide')
|
||||
$('#pageSrc').css('left', e.pageX)
|
||||
$('#pageSrc').css('top', e.pageY)
|
||||
$('.srcQ').text(currentSelection)
|
||||
}
|
||||
}
|
||||
})
|
||||
$('textarea, input').on('contextmenu', function (e) {
|
||||
postMessage(['textareaContextMenu', { x: e.pageX, y: e.pageY }], '*')
|
||||
})
|
||||
@@ -3,7 +3,7 @@ window.onload = function () {
|
||||
initPostbox()
|
||||
connection()
|
||||
initPlugin(plugins)
|
||||
if(localStorage.getItem('control-center-np')) $('#ccnp').removeClass('hide')
|
||||
if (localStorage.getItem('control-center-np')) $('#ccnp').removeClass('hide')
|
||||
}
|
||||
$.strip_tags = function (str, allowed) {
|
||||
if (!str) {
|
||||
@@ -290,3 +290,23 @@ function statusModel(now) {
|
||||
poll: null
|
||||
}
|
||||
}
|
||||
function webviewFinder() {
|
||||
const webview = document.querySelector('webview')
|
||||
webview.addEventListener('did-navigate', (e) => {
|
||||
const url = webview.getURL()
|
||||
if (url.match('https://mobile.twitter.com/login')) {
|
||||
postMessage(['twitterLogin', null], '*')
|
||||
} else if (url.match('https://mobile.twitter.com/logout')) {
|
||||
postMessage(['twitterLogin', true], '*')
|
||||
}
|
||||
})
|
||||
}
|
||||
function initWebviewEvent() {
|
||||
if (document.querySelector('webview')) { webviewFinder() } else {
|
||||
const timerWV = setInterval(function () {
|
||||
document.querySelector('webview')
|
||||
? (webviewFinder(), clearInterval(timerWV))
|
||||
: console.log('まだロード中')
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,8 @@ onmessage = function(e) {
|
||||
ipc.send('theme-json-request', e.data[1])
|
||||
} else if (e.data[0] == 'ha') {
|
||||
ipc.send('ha', e.data[1])
|
||||
} else if (e.data[0] == 'webviewSetting') {
|
||||
ipc.send('webview', e.data[1])
|
||||
} else if (e.data[0] == 'frameSet') {
|
||||
ipc.send('frameSet', e.data[1])
|
||||
} else if (e.data[0] == 'ua') {
|
||||
@@ -64,7 +66,9 @@ onmessage = function(e) {
|
||||
console.log('NowPlaying')
|
||||
ipc.send('itunes', e.data[1])
|
||||
} else if (e.data[0] == 'themeCSSRequest') {
|
||||
ipc.send('theme-css-request', e.data[1])
|
||||
ipc.send('theme-css-request', e.data)
|
||||
} else if (e.data[0] == 'themeCSSPreview') {
|
||||
ipc.send('theme-css-request', e.data)
|
||||
} else if (e.data[0] == 'customCSSRequest') {
|
||||
ipc.send('custom-css-request', e.data[1])
|
||||
} else if (e.data[0] == 'downloadButton') {
|
||||
@@ -77,6 +81,10 @@ onmessage = function(e) {
|
||||
ipc.send('copy', e.data[1])
|
||||
} else if (e.data[0] == 'log') {
|
||||
ipc.send('log', e.data[1])
|
||||
} else if (e.data[0] == 'twitterLogin') {
|
||||
ipc.send('twitterLogin', e.data[1])
|
||||
} else if (e.data[0] == 'textareaContextMenu') {
|
||||
ipc.send('textareaContextMenu', e.data[1])
|
||||
}
|
||||
}
|
||||
//version.js
|
||||
@@ -227,9 +235,12 @@ ipc.on('asReadEnd', function(event, arg) {
|
||||
ipc.on('accessibility', function(event, arg) {
|
||||
postMessage(['accessibility', 'true'], '*')
|
||||
})
|
||||
var webviewDom = document.getElementById('webview')
|
||||
if (webviewDom) {
|
||||
webviewDom.addEventListener('new-window', function(e) {
|
||||
shell.openExternal(e.url)
|
||||
})
|
||||
}
|
||||
ipc.on('twitterLoginComplete', function(event, arg) {
|
||||
postMessage(['twitterLoginComplete', ''], '*')
|
||||
})
|
||||
ipc.on('alert', function(event, arg) {
|
||||
postMessage(['alert', arg], '*')
|
||||
})
|
||||
ipc.on('customUrl', function(event, args) {
|
||||
postMessage(['customUrl', args], '*')
|
||||
})
|
||||
@@ -126,8 +126,10 @@ function emojiGet(parse, started) {
|
||||
|
||||
md['if_categorized'] = if_categorized
|
||||
localStorage.setItem('emojis_' + acct_id, JSON.stringify(md))
|
||||
localStorage.setItem(`emojis_raw_${acct_id}`, JSON.stringify(json))
|
||||
} else {
|
||||
localStorage.setItem('emojis_' + acct_id, JSON.stringify(md))
|
||||
localStorage.setItem(`emojis_raw_${acct_id}`, JSON.stringify(json))
|
||||
}
|
||||
localStorage.setItem('emojiseek', 0)
|
||||
if (!started) {
|
||||
|
||||
@@ -276,8 +276,6 @@ function deleteImage(key) {
|
||||
title: lang.lang_postimg_delete,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no
|
||||
}).then(result => {
|
||||
|
||||
@@ -55,8 +55,6 @@ function post(mode, postvis, dry) {
|
||||
text: lang.lang_post_cwtxt + plus,
|
||||
type: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#3085d6',
|
||||
confirmButtonText: lang.lang_post_btn2,
|
||||
cancelButtonText: lang.lang_post_btn3,
|
||||
showCloseButton: true,
|
||||
|
||||
@@ -259,8 +259,6 @@ function block(acct_id) {
|
||||
text: '',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no
|
||||
}).then(result => {
|
||||
@@ -312,8 +310,6 @@ function muteDo(acct_id) {
|
||||
text: '',
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no
|
||||
}).then(result => {
|
||||
@@ -393,8 +389,6 @@ function redraft(id, acct_id) {
|
||||
text: lang.lang_status_redraft,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no
|
||||
}).then(result => {
|
||||
|
||||
@@ -9,183 +9,162 @@ var suggest
|
||||
|
||||
input.addEventListener(
|
||||
'focus',
|
||||
function() {
|
||||
function () {
|
||||
localStorage.removeItem('cursor')
|
||||
var acct_id = $('#post-acct-sel').val()
|
||||
$('#suggest').html('')
|
||||
$('#suggest').hide()
|
||||
window.clearInterval(timer)
|
||||
timer = window.setInterval(function() {
|
||||
timer = window.setInterval(function () {
|
||||
var new_val = input.value
|
||||
if (new_val == '') {
|
||||
$('#suggest').html('')
|
||||
if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide') && $('#draft').hasClass('hide')) {
|
||||
$('#right-side').hide()
|
||||
$('#right-side').css('width', '300px')
|
||||
$('#left-side').css('width', '100%')
|
||||
var width = localStorage.getItem('postbox-width')
|
||||
if (width) {
|
||||
width = width.replace('px', '') * 1
|
||||
} else {
|
||||
width = 300
|
||||
}
|
||||
$('#post-box').css('width', width + 'px')
|
||||
}
|
||||
$('#suggest').hide()
|
||||
return
|
||||
}
|
||||
if (prev_val != new_val) {
|
||||
var tag = new_val.match(/#(\S{3,})/)
|
||||
var acct = new_val.match(/@(\S{3,})/)
|
||||
if (tag && tag[1]) {
|
||||
var q = tag[1]
|
||||
} else if (acct && acct[1]) {
|
||||
var q = acct[1]
|
||||
const pos = input.selectionStart
|
||||
let startI = pos - 1
|
||||
let hasDomain = false
|
||||
let hasDomainOnce = false
|
||||
for (startI = pos - 1; startI >= 0; startI--) {
|
||||
if (new_val[startI].match(/\./)) hasDomain = true
|
||||
if (new_val[startI].match(/#|@|:/) && !hasDomain) break
|
||||
if (new_val[startI].match(/@/) && hasDomainOnce) break
|
||||
if (new_val[startI].match(/@/) && !hasDomainOnce) hasDomainOnce = true
|
||||
}
|
||||
const target = new_val.substr(startI, pos - startI)
|
||||
var tag = target.match(/#(\S{3,})/g)
|
||||
var acct = target.match(/@(\S{3,})(@(\S{3,}))?/g)
|
||||
var emoji = target.match(/:(\S{1,})/g)
|
||||
if (emoji && emoji[0]) {
|
||||
const l = emoji[0]
|
||||
const emojis = localStorage.getItem('emojis_raw_' + acct_id)
|
||||
const json = emojis ? JSON.parse(emojis) : []
|
||||
const reg = new RegExp(`${emoji[0]}`)
|
||||
let listHtml = ''
|
||||
for (const emoji of json) {
|
||||
const { shortcode, url } = emoji
|
||||
if (`:${shortcode}`.match(reg)) {
|
||||
listHtml = listHtml + `${listHtml ? `<br>` : ``}<a onclick="tagInsert(':${shortcode}:','${l}')" class="pointer"><img src="${url}" width="15">:${shortcode}:</a>`
|
||||
}
|
||||
}
|
||||
$('#suggest').html(listHtml)
|
||||
$('#suggest').show()
|
||||
} else if (tag && tag[0]) {
|
||||
var q = tag[0]
|
||||
} else if (acct && acct[0]) {
|
||||
var q = acct[0]
|
||||
} else {
|
||||
$('#suggest').html('')
|
||||
if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide') && $('#draft').hasClass('hide')) {
|
||||
$('#right-side').hide()
|
||||
$('#right-side').css('width', '300px')
|
||||
$('#left-side').css('width', '100%')
|
||||
var width = localStorage.getItem('postbox-width')
|
||||
if (width) {
|
||||
width = width.replace('px', '') * 1
|
||||
} else {
|
||||
width = 300
|
||||
}
|
||||
$('#post-box').css('width', width + 'px')
|
||||
}
|
||||
$('#suggest').hide()
|
||||
return
|
||||
}
|
||||
var domain = localStorage.getItem('domain_' + acct_id)
|
||||
var at = localStorage.getItem('acct_' + acct_id + '_at')
|
||||
suggest = 'https://' + domain + '/api/v2/search?q=' + q
|
||||
if (suggest != oldSuggest) {
|
||||
console.log('Try to get suggest at ' + suggest)
|
||||
fetch(suggest, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
Authorization: 'Bearer ' + at
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
if (q) {
|
||||
var domain = localStorage.getItem('domain_' + acct_id)
|
||||
var at = localStorage.getItem('acct_' + acct_id + '_at')
|
||||
suggest = 'https://' + domain + '/api/v2/search?q=' + encodeURIComponent(q)
|
||||
if (suggest != oldSuggest) {
|
||||
console.log('Try to get suggest at ' + suggest)
|
||||
fetch(suggest, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
Authorization: 'Bearer ' + at
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
todo(error)
|
||||
setLog(start, 'JSON', error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
console.log(['Search', json])
|
||||
//ハッシュタグ
|
||||
if (json.hashtags[0] && tag) {
|
||||
if (tag[1]) {
|
||||
var tags = []
|
||||
Object.keys(json.hashtags).forEach(function(key4) {
|
||||
var tag = json.hashtags[key4]
|
||||
var his = tag.history
|
||||
var uses =
|
||||
his[0].uses * 1 +
|
||||
his[1].uses * 1 +
|
||||
his[2].uses * 1 +
|
||||
his[3].uses * 1 +
|
||||
his[4].uses * 1 +
|
||||
his[5].uses * 1 +
|
||||
his[6].uses * 1
|
||||
tagHTML = `<br><a onclick="tagInsert('#${escapeHTML(
|
||||
tag.name
|
||||
)}','#${q}')" class="pointer">#${escapeHTML(tag.name)}</a> ${uses}toot(s)`
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, 'JSON', error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function (json) {
|
||||
console.log(['Search', json])
|
||||
//ハッシュタグ
|
||||
if (json.hashtags[0] && tag) {
|
||||
if (tag[0]) {
|
||||
var tags = []
|
||||
Object.keys(json.hashtags).forEach(function (key4) {
|
||||
var tag = json.hashtags[key4]
|
||||
var his = tag.history
|
||||
var uses =
|
||||
his[0].uses * 1 +
|
||||
his[1].uses * 1 +
|
||||
his[2].uses * 1 +
|
||||
his[3].uses * 1 +
|
||||
his[4].uses * 1 +
|
||||
his[5].uses * 1 +
|
||||
his[6].uses * 1
|
||||
tagHTML = `<br><a onclick="tagInsert('#${escapeHTML(
|
||||
tag.name
|
||||
)}','${q}')" class="pointer">#${escapeHTML(tag.name)}</a> ${uses}toot(s)`
|
||||
|
||||
var item = {
|
||||
uses: uses,
|
||||
html: tagHTML
|
||||
}
|
||||
tags.push(item)
|
||||
})
|
||||
var num_a = -1
|
||||
var num_b = 1
|
||||
tags = tags.sort(function(a, b) {
|
||||
var x = a['uses']
|
||||
var y = b['uses']
|
||||
if (x > y) return num_a
|
||||
if (x < y) return num_b
|
||||
return 0
|
||||
})
|
||||
var ins = ''
|
||||
var nev = false
|
||||
Object.keys(tags).forEach(function(key7) {
|
||||
ins = ins + tags[key7].html
|
||||
if (key7 <= 0 && !nev) {
|
||||
ins = ins + '<br>'
|
||||
nev = true
|
||||
}
|
||||
})
|
||||
$('#suggest').html(ins)
|
||||
$('#right-side').show()
|
||||
$('#right-side').css('width', '200px')
|
||||
$('#left-side').css('width', 'calc(100% - 200px)')
|
||||
var width = localStorage.getItem('postbox-width')
|
||||
if (width) {
|
||||
width = width.replace('px', '') * 1 + 200
|
||||
} else {
|
||||
width = 500
|
||||
var item = {
|
||||
uses: uses,
|
||||
html: tagHTML
|
||||
}
|
||||
tags.push(item)
|
||||
})
|
||||
var num_a = -1
|
||||
var num_b = 1
|
||||
tags = tags.sort(function (a, b) {
|
||||
var x = a['uses']
|
||||
var y = b['uses']
|
||||
if (x > y) return num_a
|
||||
if (x < y) return num_b
|
||||
return 0
|
||||
})
|
||||
var ins = ''
|
||||
var nev = false
|
||||
Object.keys(tags).forEach(function (key7) {
|
||||
ins = ins + tags[key7].html
|
||||
if (key7 <= 0 && !nev) {
|
||||
//ins = ins + '<br>'
|
||||
nev = true
|
||||
}
|
||||
})
|
||||
$('#suggest').html(ins)
|
||||
$('#suggest').show()
|
||||
}
|
||||
$('#post-box').css('width', width + 'px')
|
||||
$('#poll').addClass('hide')
|
||||
$('#emoji').addClass('hide')
|
||||
$('#draft').addClass('hide')
|
||||
}
|
||||
} else if (json.accounts[0] && acct[1]) {
|
||||
var accts = ''
|
||||
Object.keys(json.accounts).forEach(function(key3) {
|
||||
var acct = json.accounts[key3]
|
||||
if (acct.acct != q) {
|
||||
//Instance Actorって…
|
||||
if (acct.username.indexOf('.') < 0) {
|
||||
accts =
|
||||
accts +
|
||||
`<a onclick="tagInsert('@${acct.acct}','@${q}')" class="pointer">@${acct.acct}</a><br>`
|
||||
} else if (json.accounts[0] && acct[0]) {
|
||||
var accts = ''
|
||||
Object.keys(json.accounts).forEach(function (key3) {
|
||||
var acct = json.accounts[key3]
|
||||
if (acct.acct != q) {
|
||||
//Instance Actorって…
|
||||
if (acct.username.indexOf('.') < 0) {
|
||||
accts =
|
||||
accts +
|
||||
`<a onclick="tagInsert('@${acct.acct}','${q}')" class="pointer">@${acct.acct}</a><br>`
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
$('#right-side').show()
|
||||
$('#right-side').css('width', '200px')
|
||||
$('#left-side').css('width', 'calc(100% - 200px)')
|
||||
var width = localStorage.getItem('postbox-width')
|
||||
if (width) {
|
||||
width = width.replace('px', '') * 1 + 200
|
||||
})
|
||||
$('#suggest').html(accts)
|
||||
$('#suggest').show()
|
||||
} else {
|
||||
width = 500
|
||||
|
||||
}
|
||||
$('#post-box').css('width', width + 'px')
|
||||
$('#suggest').html(accts)
|
||||
$('#poll').addClass('hide')
|
||||
$('#emoji').addClass('hide')
|
||||
$('#draft').addClass('hide')
|
||||
} else {
|
||||
if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide') && $('#draft').hasClass('hide')) {
|
||||
$('#right-side').hide()
|
||||
$('#right-side').css('width', '300px')
|
||||
$('#left-side').css('width', '100%')
|
||||
var width = localStorage.getItem('postbox-width')
|
||||
if (width) {
|
||||
width = width.replace('px', '') * 1
|
||||
} else {
|
||||
width = 300
|
||||
}
|
||||
$('#post-box').css('width', width + 'px')
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
oldSuggest = suggest
|
||||
prev_value = new_val
|
||||
prev_val = new_val
|
||||
|
||||
const rectTextarea = document.querySelector('#textarea')
|
||||
const rect = rectTextarea.getBoundingClientRect()
|
||||
const caret = getCaretCoordinates(rectTextarea, rectTextarea.selectionEnd)
|
||||
$('#suggest').css('top', `calc(${caret.top}px + 1rem)`)
|
||||
const left = rect.width / 2 < caret.left ? rect.width / 2 : caret.left
|
||||
$('#suggest').css('left', left)
|
||||
}, 1000)
|
||||
},
|
||||
false
|
||||
@@ -193,15 +172,20 @@ input.addEventListener(
|
||||
|
||||
input.addEventListener(
|
||||
'blur',
|
||||
function() {
|
||||
function () {
|
||||
window.clearInterval(timer)
|
||||
favTag()
|
||||
},
|
||||
false
|
||||
)
|
||||
function tagInsert(code, del) {
|
||||
var blankBefore = ' '
|
||||
var blankAfter = ' '
|
||||
function tagInsert(code, del, emoji) {
|
||||
if (localStorage.getItem('emoji-zero-width') == 'yes' && emoji) {
|
||||
var blankBefore = ''
|
||||
var blankAfter = ''
|
||||
} else {
|
||||
var blankBefore = ' '
|
||||
var blankAfter = ' '
|
||||
}
|
||||
var textarea = document.querySelector('#textarea')
|
||||
var sentence = textarea.value
|
||||
var len = sentence.length
|
||||
@@ -217,10 +201,10 @@ function tagInsert(code, del) {
|
||||
var after = sentence.substr(pos, len)
|
||||
var start = after.substr(0, 1)
|
||||
if (start == ' ') blankAfter = ''
|
||||
if (len == 0) {
|
||||
var word = code
|
||||
if (len === delLen) {
|
||||
var word = code + blankAfter
|
||||
} else if (len == pos) {
|
||||
var word = blankBefore + code
|
||||
var word = blankBefore + code + blankAfter
|
||||
} else if (pos == 0) {
|
||||
var word = code + blankAfter
|
||||
} else {
|
||||
@@ -228,17 +212,9 @@ function tagInsert(code, del) {
|
||||
}
|
||||
sentence = before + word + after
|
||||
textarea.value = sentence
|
||||
if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide') && $('#draft').hasClass('hide')) {
|
||||
$('#right-side').hide()
|
||||
$('#right-side').css('width', '300px')
|
||||
$('#left-side').css('width', '50%')
|
||||
var width = localStorage.getItem('postbox-width').replace('px', '') * 1
|
||||
if (!width) {
|
||||
width = 300
|
||||
}
|
||||
$('#post-box').css('width', width + 'px')
|
||||
}
|
||||
$('#suggest').html('')
|
||||
$('#suggest').hide()
|
||||
$('#textarea').focus()
|
||||
}
|
||||
function cgNPs(q) {
|
||||
suggest = 'https://cg.toot.app/api/v1/search/light?q=' + q
|
||||
@@ -250,23 +226,23 @@ function cgNPs(q) {
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, 'JSON', error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
if (json[0]) {
|
||||
var tags = ''
|
||||
Object.keys(json).forEach(function(key4) {
|
||||
Object.keys(json).forEach(function (key4) {
|
||||
var tag = json[key4]
|
||||
tags =
|
||||
tags +
|
||||
|
||||
@@ -17,7 +17,8 @@ function additional(acct_id, tlid) {
|
||||
}
|
||||
|
||||
if (tagThis) {
|
||||
$(this).attr('href', "javascript:tagShow('" + tagThis + "')")
|
||||
$(this).attr('href', "#")
|
||||
$(this).attr('onclick', "tagShow('" + tagThis + "', this)")
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -518,7 +518,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||
if (tagck) {
|
||||
Object.keys(toot.tags).forEach(function (key4) {
|
||||
var tag = toot.tags[key4]
|
||||
var tags = '<a onclick="tagShow(\'' + tag + '\')" class="pointer parsed">#' + tag + '</a><span class="hide" data-tag="' + tag + '" data-regTag="'+tag.toLowerCase()+'">#' + tag + ':<a onclick="tl(\'tag\',\'' + tag + '\',' + acct_id +
|
||||
var tags = '<a onclick="tagShow(\'' + tag + '\', this)" class="pointer parsed">#' + tag + '</a><span class="hide" data-tag="' + tag + '" data-regTag="'+tag.toLowerCase()+'">#' + tag + ':<a onclick="tl(\'tag\',\'' + tag + '\',' + acct_id +
|
||||
',\'add\')" class="pointer parsed" title="' + lang.lang_parse_tagTL.replace("{{tag}}", '#' + tag) + '">TL</a> <a onclick="brInsert(\'#' + tag + '\')" class="pointer parsed" title="' + lang.lang_parse_tagtoot.replace("{{tag}}", '#' + tag) + '">Toot</a> ' +
|
||||
'<a onclick="tagPin(\'' + tag + '\')" class="pointer parsed" title="' + lang.lang_parse_tagpin.replace("{{tag}}", '#' + tag) + '">Pin</a></span> '
|
||||
content = content.replace("#" + tag, tags)
|
||||
|
||||
@@ -415,6 +415,7 @@ function notfCanceler(acct) {
|
||||
$('.notf-icon_' + acct).removeClass('red-text')
|
||||
var id = $('#announce_' + acct + ' .announcement').first().attr('data-id')
|
||||
$('.notf-announ_' + acct + '_ct').text("")
|
||||
$(`.boxIn[data-acct=${acct}] .notice-box`).removeClass('has-notf')
|
||||
if(id) {
|
||||
localStorage.setItem('announ_' + acct, id)
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
</span>
|
||||
<span class="voice">${date(toot.created_at, 'absolute')}(${lang.lang_parse_notftime})</span>
|
||||
<i class="big-text fas ${icon}"></i>
|
||||
<a onclick="udg('${toot.account.id}','${acct_id}')" class="pointer grey-text">
|
||||
<a onclick="udg('${toot.account.id}','${acct_id}')" class="pointer grey-text notf-udg-text">
|
||||
${dis_name}(@${toot.account.acct})
|
||||
</a>`
|
||||
var notice = noticetext
|
||||
@@ -290,6 +290,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
$('.notf-reply_' + acct_id).text(replyct * 1 - -1)
|
||||
localStorage.setItem('notf-reply_' + acct_id, replyct * 1 - -1)
|
||||
$('.notf-reply_' + acct_id).removeClass('hide')
|
||||
$(`.boxIn[data-acct=${acct_id}] .notice-box`).addClass('has-notf')
|
||||
var sound = localStorage.getItem('replySound')
|
||||
if (sound == 'default') {
|
||||
var file = '../../source/notif3.wav'
|
||||
@@ -299,6 +300,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
$('.notf-bt_' + acct_id).text(btct * 1 - -1)
|
||||
localStorage.setItem('notf-bt_' + acct_id, btct * 1 - -1)
|
||||
$('.notf-bt_' + acct_id).removeClass('hide')
|
||||
$(`.boxIn[data-acct=${acct_id}] .notice-box`).addClass('has-notf')
|
||||
var sound = localStorage.getItem('btSound')
|
||||
if (sound == 'default') {
|
||||
var file = '../../source/notif2.wav'
|
||||
@@ -308,6 +310,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
$('.notf-fav_' + acct_id).text(favct * 1 - -1)
|
||||
localStorage.setItem('notf-fav_' + acct_id, favct * 1 - -1)
|
||||
$('.notf-fav_' + acct_id).removeClass('hide')
|
||||
$(`.boxIn[data-acct=${acct_id}] .notice-box`).addClass('has-notf')
|
||||
var sound = localStorage.getItem('favSound')
|
||||
if (sound == 'default') {
|
||||
var file = '../../source/notif.wav'
|
||||
@@ -700,31 +703,6 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
${lang.lang_parse_thread}
|
||||
</a></div>`
|
||||
}
|
||||
var tagck = toot.tags[0]
|
||||
var tags = ''
|
||||
//タグであれば
|
||||
if (tagck) {
|
||||
Object.keys(toot.tags).forEach(function (key4) {
|
||||
var tag = toot.tags[key4]
|
||||
var featured = ` <a onclick="tagFeature('${tag.name}','${acct_id}')" class="pointer" title="add it to Featured tags">Feature</a> `
|
||||
tags =
|
||||
tags +
|
||||
`<span class="hide" data-tag="${tag.name}" data-regTag="${tag.name.toLowerCase()}">#${tag.name
|
||||
}:
|
||||
<a onclick="tl('tag','${tag.name}','${acct_id}','add')" class="pointer"
|
||||
title="${lang.lang_parse_tagTL.replace(
|
||||
'{{tag}}',
|
||||
'#' + tag.name
|
||||
)}">TL</a> <a onclick="brInsert('#${tag.name}')"
|
||||
class="pointer" title="${lang.lang_parse_tagtoot.replace('{{tag}}', '#' + tag.name)}">Toot</a>
|
||||
<a onclick="tagPin('${tag.name}')" class="pointer" title="${lang.lang_parse_tagpin.replace(
|
||||
'{{tag}}',
|
||||
'#' + tag.name
|
||||
)}
|
||||
">Pin</a>${featured}</span> `
|
||||
})
|
||||
tags = '<div style="float:right" aria-hidden="true">' + tags + '</div>'
|
||||
}
|
||||
//リプ数
|
||||
if (toot.replies_count || toot.replies_count === 0) {
|
||||
var replyct = toot.replies_count
|
||||
@@ -901,7 +879,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
//日本語じゃない
|
||||
if (toot.language != lang.language && toot.language) {
|
||||
var trans = `<li onclick="trans('${toot.language}','${lang.language}', $(this))"
|
||||
style="padding:0">
|
||||
style="padding:0; padding-top: 5px;">
|
||||
<i class="material-icons" aria-hidden="true">g_translate</i>${lang.lang_parse_trans}
|
||||
</li>`
|
||||
} else {
|
||||
@@ -1074,7 +1052,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
</div>
|
||||
<div class="area-additional grid">
|
||||
<span class="additional">${analyze}</span>
|
||||
${mentions}${tags}
|
||||
${mentions}
|
||||
</div>
|
||||
<div class="area-vis grid">${vis}</div>
|
||||
<div class="area-actions grid">
|
||||
@@ -1154,23 +1132,23 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type, onlyContent) {
|
||||
</li>
|
||||
<div>
|
||||
<li onclick="bkm('${uniqueid}','${acct_id}','${tlid}')"
|
||||
class="bkm-btn bkmStr_${uniqueid}" style="padding:0">
|
||||
class="bkm-btn bkmStr_${uniqueid}" style="padding:0; padding-top: 5px;">
|
||||
<i class="fas text-darken-3 fa-bookmark bkm_${toot.id} ${if_bkm}"></i>${bkmStr}
|
||||
</li>
|
||||
<li class="${if_mine}" onclick="del('${uniqueid}','${acct_id}')"
|
||||
style="padding:0">
|
||||
style="padding:0; padding-top: 5px;">
|
||||
<i class="fas fa-trash"></i>${lang.lang_parse_del}
|
||||
</li>
|
||||
<li class="${if_mine}" onclick="pin('${uniqueid}','${acct_id}')" style="padding:0" class="pinStr_${uniqueid}">
|
||||
<li class="${if_mine}" onclick="pin('${uniqueid}','${acct_id}')" style="padding:0; padding-top: 5px;" class="pinStr_${uniqueid}">
|
||||
<i class="fas fa-map-pin pin_${uniqueid} ${if_pin}"></i>${pinStr}
|
||||
</li>
|
||||
<li class="${if_mine}" onclick="redraft('${uniqueid}','${acct_id}')"
|
||||
style="padding:0">
|
||||
style="padding:0; padding-top: 5px;">
|
||||
<i class="material-icons" aria-hidden="true">redo</i>${lang.lang_parse_redraft}
|
||||
</li>
|
||||
${trans}
|
||||
<li onclick="postMessage(['openUrl', '${toot.url}'], '*')"
|
||||
style="padding:0">
|
||||
style="padding:0; padding-top: 5px;">
|
||||
<i class="fas text-darken-3 fa-globe"></i>${lang.lang_parse_link}
|
||||
</li>
|
||||
${pluginHtml}
|
||||
@@ -1370,8 +1348,6 @@ function client(name) {
|
||||
text: name + lang.lang_parse_clienttxt,
|
||||
type: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#3085d6',
|
||||
confirmButtonText: lang.lang_parse_clientmute,
|
||||
cancelButtonText: lang.lang_parse_clientemp,
|
||||
showCloseButton: true,
|
||||
|
||||
@@ -314,39 +314,19 @@ function trend() {
|
||||
})
|
||||
}
|
||||
function srcBox(mode) {
|
||||
var selectedText = window.getSelection().toString()
|
||||
if (mode == 'open') {
|
||||
$('#pageSrc').removeClass('hide')
|
||||
} else if (mode == 'close') {
|
||||
if(!selectedText) {
|
||||
$('#pageSrc').addClass('hide')
|
||||
$('#pageSrc').removeClass('keep')
|
||||
}
|
||||
$('#pageSrc').addClass('hide')
|
||||
$('#pageSrc').removeClass('keep')
|
||||
} else {
|
||||
$('#pageSrc').toggleClass('hide')
|
||||
}
|
||||
if(!$('#pageSrc').hasClass('keep')) {
|
||||
$('#pageSrcInput').val(selectedText)
|
||||
}
|
||||
}
|
||||
$('#pageSrcInput').click(function() {
|
||||
$('#pageSrc').addClass('keep')
|
||||
})
|
||||
$('#pageSrcInput').on('input', function(evt) {
|
||||
if(!$('#pageSrcInput').val()) {
|
||||
$('#pageSrc').removeClass('keep')
|
||||
}
|
||||
})
|
||||
document.addEventListener('selectionchange', function() {
|
||||
var selectedText = window.getSelection().toString()
|
||||
if (selectedText && !$('input').is(':focus') && !$('textarea').is(':focus')) {
|
||||
srcBox('open')
|
||||
}
|
||||
})
|
||||
function doSrc(type) {
|
||||
$('#pageSrc').addClass('hide')
|
||||
$('#pageSrc').removeClass('keep')
|
||||
var q = $('#pageSrcInput').val()
|
||||
var q = $('.srcQ').text()
|
||||
if(type == 'web') {
|
||||
var start = localStorage.getItem('srcUrl')
|
||||
if(!start) {
|
||||
@@ -356,5 +336,9 @@ function doSrc(type) {
|
||||
postMessage(["openUrl", start], "*")
|
||||
} else if(type == 'ts') {
|
||||
tsAdd(q)
|
||||
} else if(type == 'copy') {
|
||||
execCopy(q)
|
||||
} else if(type == 'toot') {
|
||||
brInsert(q)
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,46 @@ if (location.search) {
|
||||
}
|
||||
}
|
||||
//よく使うタグ
|
||||
function tagShow(tag) {
|
||||
console.log('[data-regTag=' + decodeURI(tag).toLowerCase() + ']')
|
||||
$('[data-regTag=' + decodeURI(tag).toLowerCase() + ']').toggleClass('hide')
|
||||
function tagShow(tag, elm) {
|
||||
const tagTL = lang.lang_parse_tagTL.replace('{{tag}}', '#' + tag)
|
||||
const tagPin = lang.lang_parse_tagpin.replace('{{tag}}', '#' + tag)
|
||||
const tagToot = lang.lang_parse_tagtoot.replace('{{tag}}', '#' + tag)
|
||||
$('#tagCMTL').text(tagTL)
|
||||
$('#tagCMPin').text(tagPin)
|
||||
$('#tagCMToot').text(tagToot)
|
||||
const acct_id = $(elm).parents('.tl').attr('data-acct')
|
||||
const rect = elm.getBoundingClientRect()
|
||||
$('#tagContextMenu').css('top', `calc(${rect.top}px + 1rem)`)
|
||||
$('#tagContextMenu').css('left', `${rect.left}px`)
|
||||
$('#tagContextMenu').attr('data-tag', tag)
|
||||
$('#tagContextMenu').attr('data-acct', acct_id)
|
||||
$('#tagContextMenu').removeClass('hide')
|
||||
setTimeout(() => tShowBox('open'), 500)
|
||||
}
|
||||
function tShowBox(mode) {
|
||||
if (mode == 'open') {
|
||||
$('#tagContextMenu').removeClass('hide')
|
||||
} else if (mode == 'close') {
|
||||
if (!$('#tagContextMenu').hasClass('hide')) $('#tagContextMenu').addClass('hide')
|
||||
$('#tagContextMenu').removeClass('keep')
|
||||
} else {
|
||||
$('#tagContextMenu').toggleClass('hide')
|
||||
}
|
||||
}
|
||||
function doTShowBox(type) {
|
||||
$('#tagContextMenu').addClass('hide')
|
||||
$('#tagContextMenu').removeClass('keep')
|
||||
const q = $('#tagContextMenu').attr('data-tag')
|
||||
const acct_id = $('#tagContextMenu').attr('data-acct')
|
||||
if (type == 'tl') {
|
||||
tl('tag', q, acct_id, 'add')
|
||||
} else if (type == 'toot') {
|
||||
brInsert(`#${q}`)
|
||||
} else if (type == 'pin') {
|
||||
tagPin(q)
|
||||
} else if (type == 'f') {
|
||||
tagFeature(q, acct_id)
|
||||
}
|
||||
}
|
||||
//タグ追加
|
||||
function tagPin(tag) {
|
||||
@@ -22,7 +59,7 @@ function tagPin(tag) {
|
||||
var obj = JSON.parse(tags)
|
||||
}
|
||||
var can
|
||||
Object.keys(obj).forEach(function(key) {
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
var tagT = obj[key]
|
||||
if (tagT == tag) {
|
||||
can = true
|
||||
@@ -56,7 +93,7 @@ function favTag() {
|
||||
}
|
||||
var tags = ''
|
||||
var nowPT = localStorage.getItem('stable')
|
||||
Object.keys(obj).forEach(function(key) {
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
var tag = obj[key]
|
||||
if (nowPT != tag) {
|
||||
console.log('stable tags:' + nowPT + '/' + tag)
|
||||
@@ -69,28 +106,31 @@ function favTag() {
|
||||
tag = escapeHTML(tag)
|
||||
tags =
|
||||
tags +
|
||||
`<a onclick="tagShow('${tag}')" class="pointer">#${tag}</a>
|
||||
`<a onclick="tagShowHorizon('${tag}')" class="pointer">#${tag}</a>
|
||||
${nowon}<span class="hide" data-tag="${tag}" data-regTag="${tag.toLowerCase()}">
|
||||
<a onclick=\"tagTL('tag','${tag}',false,'add')" class="pointer" title="${lang.lang_parse_tagTL.replace('{{tag}}', '#' + tag)}">
|
||||
TL
|
||||
</a>
|
||||
</a>
|
||||
<a onclick="brInsert('#${tag}')" class="pointer" title="${lang.lang_parse_tagtoot.replace('{{tag}}', '#' + tag)}">
|
||||
Toot
|
||||
</a>
|
||||
</a>
|
||||
<a onclick="autoToot('${tag}');" class="pointer" title="${lang.lang_tags_always}${lang.lang_parse_tagtoot.replace('{{tag}}', '#' + tag)}">
|
||||
${ptt}
|
||||
</a>
|
||||
</a>
|
||||
<a onclick="tagRemove('${key}')" class="pointer" title="${lang.lang_tags_tagunpin.replace('{{tag}}', '#' + tag)}">
|
||||
${lang.lang_del}
|
||||
</a>
|
||||
</span> `
|
||||
})
|
||||
if (obj.length > 0) {
|
||||
$('#taglist').append('My Tags:' + tags)
|
||||
$('#taglist').append('My Tags: ' + tags)
|
||||
} else {
|
||||
$('#taglist').append('')
|
||||
}
|
||||
}
|
||||
function tagShowHorizon(tag) {
|
||||
$('[data-regTag=' + decodeURI(tag).toLowerCase() + ']').toggleClass('hide')
|
||||
}
|
||||
function trendTag() {
|
||||
$('.trendtag').remove()
|
||||
var domain = 'imastodon.net'
|
||||
@@ -103,28 +143,28 @@ function trendTag() {
|
||||
Authorization: 'Bearer ' + at
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, 'JSON', error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
if (json) {
|
||||
var tags = ''
|
||||
json = json.score
|
||||
Object.keys(json).forEach(function(tag) {
|
||||
Object.keys(json).forEach(function (tag) {
|
||||
tag = escapeHTML(tag)
|
||||
tags =
|
||||
tags +
|
||||
`<a onclick="tagShow('${tag}')" class="pointer">#${tag}</a>
|
||||
`<a onclick="tagShow('${tag}', this)" class="pointer">#${tag}</a>
|
||||
<span class="hide" data-tag="${tag}" data-regTag="${tag.toLowerCase()}">
|
||||
<a onclick=\"tagTL('tag','${tag}',false,'add')" class="pointer" title="#${tag}のタイムライン">TL</a>
|
||||
<a onclick="show();brInsert('#${tag}')" class="pointer" title="#${tag}でトゥート">
|
||||
@@ -134,8 +174,8 @@ function trendTag() {
|
||||
})
|
||||
$('#taglist').append(
|
||||
'<div class="trendtag">アイマストドントレンドタグ<i class="material-icons pointer" onclick="trendTag()" style="font-size:12px">refresh</i>:' +
|
||||
tags +
|
||||
'</div>'
|
||||
tags +
|
||||
'</div>'
|
||||
)
|
||||
trendintervalset()
|
||||
} else {
|
||||
@@ -182,18 +222,18 @@ function tagFeature(name, acct_id) {
|
||||
name: name
|
||||
})
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
return false
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
console.log(json)
|
||||
M.toast({ html: 'Complete: ' + escapeHTML(name), displayLength: 3000 })
|
||||
})
|
||||
@@ -202,7 +242,7 @@ function tagFeature(name, acct_id) {
|
||||
function addTag(id) {
|
||||
var columns = JSON.parse(localStorage.getItem('column'))
|
||||
var column = columns[id]
|
||||
if(!column.data.name) {
|
||||
if (!column.data.name) {
|
||||
var name = column.data
|
||||
} else {
|
||||
var name = column.data.name
|
||||
@@ -219,7 +259,7 @@ function addTag(id) {
|
||||
o[id] = obj
|
||||
var json = JSON.stringify(o)
|
||||
console.log(json)
|
||||
localStorage.setItem('column',json)
|
||||
localStorage.setItem('column', json)
|
||||
columnReload(id, 'tag')
|
||||
}
|
||||
|
||||
|
||||
@@ -1331,6 +1331,7 @@ function asReadEnd() {
|
||||
Swal.fire({
|
||||
title: lang.lang_tl_postmarkers_title,
|
||||
html: lang.lang_tl_postmarkers,
|
||||
showConfirmButton: false,
|
||||
timer: 3000,
|
||||
onBeforeOpen: () => {
|
||||
Swal.showLoading()
|
||||
|
||||
@@ -52,7 +52,7 @@ function parseColumn(target, dontclose) {
|
||||
localStorage.setItem('domain_' + key, acct.domain)
|
||||
localStorage.setItem('acct_' + key + '_at', acct.at)
|
||||
localStorage.setItem('acct_' + key + '_rt', acct.rt ? acct.rt : null)
|
||||
if(!target) mastodonBaseStreaming(key)
|
||||
if (!target) mastodonBaseStreaming(key)
|
||||
ckdb(key)
|
||||
//フィルターデータ読もう
|
||||
getFilter(key)
|
||||
@@ -167,11 +167,11 @@ function parseColumn(target, dontclose) {
|
||||
}
|
||||
var maxWidth = localStorage.getItem('max-width')
|
||||
if (maxWidth) {
|
||||
css = css +'max-width:' + maxWidth + 'px;'
|
||||
css = css + 'max-width:' + maxWidth + 'px;'
|
||||
}
|
||||
var margin = localStorage.getItem('margin')
|
||||
if (margin) {
|
||||
css = css +'margin-right:' + margin + 'px;'
|
||||
css = css + 'margin-right:' + margin + 'px;'
|
||||
}
|
||||
if (acct.width) {
|
||||
css = css + ' min-width:' + acct.width + 'px !important;max-width:' + acct.width + 'px !important;'
|
||||
@@ -185,6 +185,7 @@ function parseColumn(target, dontclose) {
|
||||
}
|
||||
var html = webviewParse('https://tweetdeck.twitter.com', key, insert, icnsert, css)
|
||||
$('#timeline-container').append(html)
|
||||
initWebviewEvent()
|
||||
} else if (acct.type == 'tootsearch') {
|
||||
if (!acct.left_fold) {
|
||||
basekey = key
|
||||
@@ -230,14 +231,14 @@ function parseColumn(target, dontclose) {
|
||||
}
|
||||
var unread = `<a id="unread_${key}" onclick="showUnread('${key}','${acct.type}','${acct.domain}')"
|
||||
class="setting nex waves-effect" title="${lang.lang_layout_unread}">
|
||||
<i class="material-icons waves-effect nex">more</i><br />${lang.lang_layout_unread}
|
||||
<i class="material-icons waves-effect nex">more</i><span>${lang.lang_layout_unread}</span>
|
||||
</a>`
|
||||
var notfDomain = acct.domain
|
||||
var notfKey = key
|
||||
var if_tag = ''
|
||||
var if_tag_btn = ''
|
||||
if (acct.type == 'notf') {
|
||||
var exclude =
|
||||
var excludeNotf =
|
||||
`<div style="border: 1px solid; padding: 5px; margin-top: 5px; margin-bottom: 5px;">${lang.lang_layout_excluded}:<br>
|
||||
<label>
|
||||
<input type="checkbox" class="filled-in" id="exc-reply-${key}" ${excludeCk(key, 'mention')} />
|
||||
@@ -271,20 +272,21 @@ function parseColumn(target, dontclose) {
|
||||
</label> <br />
|
||||
<button class="btn btn-flat waves-effect notf-exclude-btn waves-light" style="width:calc(50% - 11px); padding:0;" onclick="exclude('${key}')">Filter</button>`
|
||||
if (checkNotfFilter(key)) {
|
||||
exclude =
|
||||
exclude +
|
||||
excludeNotf =
|
||||
excludeNotf +
|
||||
`<button class="btn btn-flat red-text waves-effect notf-exclude-btn waves-light" style="width:calc(50% - 11px); padding:0;" onclick="resetNotfFilter('${key}')">
|
||||
Clear all
|
||||
</button>`
|
||||
}
|
||||
exclude = exclude + '</div>'
|
||||
excludeNotf = excludeNotf + '</div>'
|
||||
notfDomain = 'dummy'
|
||||
notfKey = 'dummy'
|
||||
var excludeHome =''
|
||||
} else if (acct.type == 'home') {
|
||||
var exclude = `<a onclick="ebtToggle('${key}')" class="setting nex waves-effect">
|
||||
var excludeNotf = ''
|
||||
var excludeHome = `<a onclick="ebtToggle('${key}')" class="setting nex waves-effect">
|
||||
<i class="fas fa-retweet nex" title="${lang.lang_layout_excludingbt}" style="font-size: 24px"></i>
|
||||
<span id="sta-bt-${key}">Off</span><br />
|
||||
${lang.lang_layout_excludingbt}
|
||||
<span>${lang.lang_layout_excludingbt}</span><span id="sta-bt-${key}">Off</span>
|
||||
</a>`
|
||||
} else if (acct.type == 'tag') {
|
||||
if (acct.data.name) {
|
||||
@@ -312,10 +314,12 @@ function parseColumn(target, dontclose) {
|
||||
<i class="material-icons waves-effect nex">note_add</i>
|
||||
</a>`
|
||||
unread = ''
|
||||
var exclude = ''
|
||||
var excludeNotf = ''
|
||||
var excludeHome = ''
|
||||
var if_notf = 'hide'
|
||||
} else {
|
||||
var exclude = ''
|
||||
var excludeNotf = ''
|
||||
var excludeHome = ''
|
||||
unread = ''
|
||||
}
|
||||
|
||||
@@ -325,6 +329,7 @@ function parseColumn(target, dontclose) {
|
||||
} else {
|
||||
markers = false
|
||||
}
|
||||
const smallHeader = localStorage.getItem('smallHeader') === 'yes'
|
||||
if (!markers) {
|
||||
unread = ''
|
||||
}
|
||||
@@ -335,12 +340,12 @@ function parseColumn(target, dontclose) {
|
||||
$('#timeline-container').append(basehtml)
|
||||
}
|
||||
var left_hold = `<a onclick="leftFoldSet('${key}')" class="setting nex waves-effect">
|
||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftFold}">view_agenda</i><br />
|
||||
${lang.lang_layout_leftFold}</a>`
|
||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftFold}">view_agenda</i>
|
||||
<span>${lang.lang_layout_leftFold}</span></a>`
|
||||
} else {
|
||||
var left_hold = `<a onclick="leftFoldRemove('${key}')" class="setting nex waves-effect">
|
||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftUnfold}">view_column</i><br />
|
||||
${lang.lang_layout_leftUnfold}</a>`
|
||||
<i class="material-icons waves-effect nex" title="${lang.lang_layout_leftUnfold}">view_column</i>
|
||||
<span>${lang.lang_layout_leftUnfold}</span></a>`
|
||||
}
|
||||
if (key === 0) {
|
||||
left_hold = ''
|
||||
@@ -361,8 +366,7 @@ function parseColumn(target, dontclose) {
|
||||
if (acct.type != 'pub' && acct.type != 'pub-media') {
|
||||
var mediaFil = `<a onclick="mediaToggle('${key}')" class="setting nex waves-effect">
|
||||
<i class="material-icons nex" title="${lang.lang_layout_mediafil}">perm_media</i>
|
||||
<span id="sta-media-${key}">On</span><br />
|
||||
${lang.lang_layout_mediafil}</a>`
|
||||
<span>${lang.lang_layout_mediafil}</span/><span id="sta-media-${key}">On</span></a>`
|
||||
} else {
|
||||
var mediaFil = `<a onclick="remoteOnly('${key}','${acct.type}')" class="setting nex waves-effect">
|
||||
<i class="material-icons nex" title="${lang.lang_layout_remoteOnly}">perm_media</i><br />
|
||||
@@ -371,10 +375,9 @@ function parseColumn(target, dontclose) {
|
||||
}
|
||||
var html = `
|
||||
<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}" data-acct="${acct.domain}" style="${addHeight}">
|
||||
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert}">
|
||||
<div class="notice-box ${smallHeader ? 'small-header' : ''} z-depth-2" id="menu_${key}" style="${insert}">
|
||||
<div class="area-notice">
|
||||
<i class="material-icons waves-effect ${isMisRed} notice_icon_acct_${acct.domain}" id="notice_icon_${key}" ${notf_attr}
|
||||
style="font-size:40px; padding-top:25%;"
|
||||
<i class="material-icons waves-effect ${isMisRed} notice_icon_acct_${acct.domain} top-icon" id="notice_icon_${key}" ${notf_attr}
|
||||
onclick="checkStr('${acct.type}','${data}','${acct.domain}', '${key}', '${delc}','${voice}',null)"
|
||||
title="${lang.lang_layout_gotop}" aria-hidden="true">
|
||||
</i>
|
||||
@@ -397,10 +400,10 @@ function parseColumn(target, dontclose) {
|
||||
${if_tag_btn}
|
||||
</div>
|
||||
<div class="area-sta">
|
||||
<span class="new badge teal notf-reply_${acct.domain} hide" data-badge-caption="Reply" aria-hidden="true">0</span>
|
||||
<span class="new badge yellow black-text notf-fav_${acct.domain} hide" data-badge-caption="Fav" aria-hidden="true">0</span>
|
||||
<span class="new badge teal notf-reply_${acct.domain} hide" data-badge-caption="Rp" aria-hidden="true">0</span>
|
||||
<span class="new badge yellow black-text notf-fav_${acct.domain} hide" data-badge-caption="Fv" aria-hidden="true">0</span>
|
||||
<span class="new badge blue notf-bt_${acct.domain} hide" data-badge-caption="BT" aria-hidden="true">0</span>
|
||||
<span class="new badge orange notf-follow_${acct.domain} hide" data-badge-caption="Follow" aria-hidden="true">0</span>
|
||||
<span class="new badge orange notf-follow_${acct.domain} hide" data-badge-caption="Fw" aria-hidden="true">0</span>
|
||||
</div>
|
||||
<div class="area-a2">
|
||||
<a onclick="removeColumn('${key}')" class="setting nex">
|
||||
@@ -421,32 +424,29 @@ function parseColumn(target, dontclose) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-hide notf-indv-box" id="util-box_${key}" style="padding:5px;">
|
||||
${exclude}
|
||||
${excludeNotf}
|
||||
<div class="columnSettings">
|
||||
${excludeHome}
|
||||
${unread}
|
||||
${left_hold}
|
||||
${mediaFil}
|
||||
<a onclick="cardToggle('${key}')" class="setting nex waves-effect">
|
||||
<i class="material-icons nex" title="${lang.lang_layout_linkanades}">link</i>
|
||||
<span id="sta-card-${key}">On</span><br />
|
||||
${lang.lang_layout_linkana}
|
||||
<span>${lang.lang_layout_linkana}</span><span id="sta-card-${key}">On</span>
|
||||
</a>
|
||||
<a onclick="voiceToggle('${key}')" class="setting nex waves-effect">
|
||||
<i class="material-icons nex" title="${lang.lang_layout_tts}">hearing</i>
|
||||
<span id="sta-voice-${key}">On</span><br />
|
||||
${lang.lang_layout_tts}
|
||||
TL</a>
|
||||
<span>${lang.lang_layout_tts}TL</span/><span id="sta-voice-${key}">On</span>
|
||||
</a>
|
||||
<a onclick="columnReload('${key}','${acct.type}')" class="setting nex ${if_misskey_hide} waves-effect">
|
||||
<i class="material-icons nex" title="${lang.lang_layout_reconnect}">refresh</i>
|
||||
<br />
|
||||
${lang.lang_layout_reconnect}
|
||||
<span>${lang.lang_layout_reconnect}</span>
|
||||
</a>
|
||||
<a onclick="resetWidth('${key}')" class="setting nex waves-effect">
|
||||
<i class="material-icons nex" title="${lang.lang_layout_resetWidth}">refresh</i>
|
||||
<br />
|
||||
${lang.lang_layout_resetWidth}
|
||||
</a><br />
|
||||
${lang.lang_layout_headercolor}
|
||||
<br>
|
||||
<i class="material-icons nex rotate-90" title="${lang.lang_layout_resetWidth}">height</i>
|
||||
<span>${lang.lang_layout_resetWidth}</span>
|
||||
</a></div>
|
||||
<p>${lang.lang_layout_headercolor}</p>
|
||||
<div id="picker_${key}" class="color-picker"></div>
|
||||
</div>${if_tag}
|
||||
<div class="tl-box" tlid="${key}">
|
||||
@@ -643,8 +643,6 @@ function removeColumn(tlid) {
|
||||
text: lang.lang_layout_deleteColumnDesc,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no,
|
||||
}).then((result) => {
|
||||
|
||||
@@ -101,6 +101,7 @@ if (location.search) {
|
||||
$('.mini-btn').text('expand_less')
|
||||
}
|
||||
}
|
||||
|
||||
function initPostbox() {
|
||||
$('#posttgl').click(function (e) {
|
||||
if (!$('#post-box').hasClass('appear')) {
|
||||
@@ -124,6 +125,7 @@ function initPostbox() {
|
||||
selectedToot = 0
|
||||
localStorage.removeItem('nohide')
|
||||
srcBox('close')
|
||||
tShowBox('close')
|
||||
})
|
||||
$('#textarea,#cw-text').focusout(function (e) {
|
||||
localStorage.setItem('nohide', true)
|
||||
|
||||
@@ -5,26 +5,29 @@ var envView = new Vue({
|
||||
methods: {
|
||||
complete: function (i, val) {
|
||||
var ls = envView.config[i]
|
||||
let header = ls.text.head
|
||||
if (!ls.data) {
|
||||
ls = [ls]
|
||||
} else {
|
||||
ls = ls.data
|
||||
}
|
||||
for (var j = 0; j < ls.length; j++) {
|
||||
M.toast({ html: 'Complete', displayLength: 3000 })
|
||||
var id = ls[j].id
|
||||
var val = $('#' + id).val()
|
||||
localStorage.setItem(ls[j].storage, val)
|
||||
}
|
||||
if (ls == 'ha') {
|
||||
if (ls[0].id == 'ha') {
|
||||
hardwareAcceleration(val)
|
||||
}
|
||||
if (ls == 'ua_setting') {
|
||||
if (ls[0].id == 'webview') {
|
||||
postMessage(['webviewSetting', val], '*')
|
||||
}
|
||||
if (ls[0].id == 'ua_setting') {
|
||||
useragent(val)
|
||||
}
|
||||
if (ls == 'frame') {
|
||||
if (ls[0].id == 'frame') {
|
||||
frameSet(val)
|
||||
}
|
||||
M.toast({ html: `Updated: ${header}`, displayLength: 3000 })
|
||||
return true
|
||||
},
|
||||
},
|
||||
@@ -35,6 +38,7 @@ var tlView = new Vue({
|
||||
methods: {
|
||||
complete: function (i, val) {
|
||||
var ls = tlView.config[i]
|
||||
let header = ls.text.head
|
||||
if (val) {
|
||||
localStorage.setItem(ls.storage, val)
|
||||
} else {
|
||||
@@ -44,12 +48,12 @@ var tlView = new Vue({
|
||||
ls = ls.data
|
||||
}
|
||||
for (var j = 0; j < ls.length; j++) {
|
||||
M.toast({ html: 'Complete', displayLength: 3000 })
|
||||
var id = ls[j].id
|
||||
var val = $('#' + id).val()
|
||||
localStorage.setItem(ls[j].storage, val)
|
||||
}
|
||||
}
|
||||
M.toast({ html: `Updated: ${header}`, displayLength: 3000 })
|
||||
return true
|
||||
},
|
||||
},
|
||||
@@ -64,6 +68,7 @@ var postView = new Vue({
|
||||
methods: {
|
||||
complete: function (i, val) {
|
||||
var ls = postView.config[i]
|
||||
let header = ls.text.head
|
||||
if (val) {
|
||||
localStorage.setItem(ls.storage, val)
|
||||
} else {
|
||||
@@ -79,6 +84,7 @@ var postView = new Vue({
|
||||
localStorage.setItem(ls[j].storage, val)
|
||||
}
|
||||
}
|
||||
M.toast({ html: `Updated: ${header}`, displayLength: 3000 })
|
||||
return true
|
||||
},
|
||||
},
|
||||
@@ -302,17 +308,16 @@ function oksload() {
|
||||
function changeLang() {
|
||||
const lang = $('#langsel-sel').val()
|
||||
console.log(lang)
|
||||
if(lang) postMessage(['lang', lang], '*')
|
||||
if (lang) postMessage(['lang', lang], '*')
|
||||
}
|
||||
function exportSettings() {
|
||||
var exp = exportSettingsCore()
|
||||
$('#imp-exp').val(JSON5.stringify(exp))
|
||||
Swal.fire({
|
||||
title: lang.lang_setting_exportwarn,
|
||||
title: 'Warning',
|
||||
text: lang.lang_setting_exportwarn,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no,
|
||||
}).then((result) => {
|
||||
@@ -387,20 +392,19 @@ function exportSettingsCore() {
|
||||
return exp
|
||||
}
|
||||
function importSettings() {
|
||||
if ($('#imp-exp').val()) {
|
||||
importSettingsCore(JSON5.parse($('#imp-exp').val()))
|
||||
return false
|
||||
}
|
||||
Swal.fire({
|
||||
title: lang.lang_setting_importwarn,
|
||||
title: 'Warning',
|
||||
text: lang.lang_setting_importwarn,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: lang.lang_yesno,
|
||||
cancelButtonText: lang.lang_no,
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
if ($('#imp-exp').val()) {
|
||||
importSettingsCore(JSON5.parse($('#imp-exp').val()))
|
||||
return false
|
||||
}
|
||||
postMessage(['importSettings', ''], '*')
|
||||
}
|
||||
})
|
||||
@@ -549,9 +553,9 @@ function copyColor(from, to) {
|
||||
i++
|
||||
}
|
||||
}
|
||||
function customComp() {
|
||||
function customComp(preview) {
|
||||
var nameC = $('#custom_name').val()
|
||||
if (!nameC) {
|
||||
if (!nameC && !preview) {
|
||||
return false
|
||||
}
|
||||
var descC = $('#custom_desc').val()
|
||||
@@ -583,7 +587,7 @@ function customComp() {
|
||||
if (id == 'add_new' || defaults.includes(id)) {
|
||||
id = makeCID()
|
||||
}
|
||||
localStorage.setItem('customtheme-id', id)
|
||||
if (!preview) localStorage.setItem('customtheme-id', id)
|
||||
var json = {
|
||||
name: nameC,
|
||||
author: my,
|
||||
@@ -600,38 +604,18 @@ function customComp() {
|
||||
version: '2'
|
||||
}
|
||||
$('#custom_json').val(JSON.stringify(json))
|
||||
let timerInterval
|
||||
Swal.fire({
|
||||
title: 'Saving...',
|
||||
html: '',
|
||||
timer: 1000,
|
||||
timerProgressBar: true,
|
||||
onBeforeOpen: () => {
|
||||
Swal.showLoading()
|
||||
},
|
||||
onClose: () => {
|
||||
clearInterval(timerInterval)
|
||||
}
|
||||
}).then((result) => {
|
||||
themes()
|
||||
ctLoad()
|
||||
if (preview) {
|
||||
postMessage(['themeCSSPreview', json], '*')
|
||||
} else {
|
||||
$('#custom-edit-sel').val(id)
|
||||
$('select').formSelect()
|
||||
Swal.fire({
|
||||
title: 'Refreshing...',
|
||||
html: '',
|
||||
timer: 1000,
|
||||
timerProgressBar: true,
|
||||
onBeforeOpen: () => {
|
||||
Swal.showLoading()
|
||||
},
|
||||
onClose: () => {
|
||||
clearInterval(timerInterval)
|
||||
}
|
||||
}).then((result) => {
|
||||
$('#custom-edit-sel').val(id)
|
||||
$('select').formSelect()
|
||||
type: 'success',
|
||||
title: 'Saved',
|
||||
})
|
||||
})
|
||||
postMessage(['themeJsonCreate', JSON.stringify(json)], '*')
|
||||
postMessage(['themeJsonCreate', JSON.stringify(json)], '*')
|
||||
}
|
||||
|
||||
}
|
||||
function deleteIt() {
|
||||
var id = $('#custom-sel-sel').val()
|
||||
@@ -787,13 +771,14 @@ function completePlugin(comp) {
|
||||
var pgns = localStorage.getItem('plugins')
|
||||
var args = JSON.parse(pgns ? pgns : '[]')
|
||||
var id = $('#plugin').attr('data-id')
|
||||
|
||||
|
||||
var inputPlugin = editor.getValue()
|
||||
var meta = getMeta(inputPlugin)
|
||||
if (!meta.data) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: `error on line ${meta.location.start.line}`,
|
||||
title: 'Syntax Error',
|
||||
text: `error on line ${meta.location.start.line}`,
|
||||
text: meta,
|
||||
})
|
||||
return false
|
||||
@@ -801,7 +786,7 @@ function completePlugin(comp) {
|
||||
if (!meta.data.name || !meta.data.version || !meta.data.event || !meta.data.author) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'error',
|
||||
title: 'Meta data error',
|
||||
title: 'Syntax Error of META DATA',
|
||||
})
|
||||
return false
|
||||
@@ -821,7 +806,7 @@ function completePlugin(comp) {
|
||||
}
|
||||
var ss = args
|
||||
localStorage.setItem('plugins', JSON.stringify(ss))
|
||||
if(comp) return false
|
||||
if (comp) return false
|
||||
$('#plugin').attr('data-id', 'add_new')
|
||||
editor.setValue('', -1)
|
||||
pluginLoad()
|
||||
@@ -832,7 +817,8 @@ function testExecTrg() {
|
||||
if (meta.location) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: `error on line ${meta.location.start.line}`,
|
||||
title: 'Error',
|
||||
text: `error on line ${meta.location.start.line}`,
|
||||
text: meta,
|
||||
})
|
||||
return false
|
||||
@@ -920,13 +906,13 @@ function checkupd() {
|
||||
if (newest == ver) {
|
||||
Swal.fire({
|
||||
type: 'info',
|
||||
title: lang.lang_setting_noupd,
|
||||
text: lang.lang_setting_noupd,
|
||||
html: ver,
|
||||
})
|
||||
} else if (ver.indexOf('beta') != -1 || winstore) {
|
||||
Swal.fire({
|
||||
type: 'info',
|
||||
title: lang.lang_setting_thisisbeta,
|
||||
text: lang.lang_setting_thisisbeta,
|
||||
html: ver,
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -166,7 +166,7 @@ function nowplaying(mode) {
|
||||
} else {
|
||||
Swal.fire({
|
||||
type: 'info',
|
||||
title: lang.lang_spotify_acct,
|
||||
text: lang.lang_spotify_acct,
|
||||
})
|
||||
}
|
||||
} else if (mode == 'itunes') {
|
||||
@@ -239,7 +239,7 @@ function nowplaying(mode) {
|
||||
} else {
|
||||
Swal.fire({
|
||||
type: 'info',
|
||||
title: lang.lang_spotify_acct,
|
||||
text: lang.lang_spotify_acct,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ function trendTagonTip() {
|
||||
Object.keys(json).forEach(function(tag) {
|
||||
tags =
|
||||
tags +
|
||||
`<a onclick="tagShow('${tag}')" class="pointer">
|
||||
`<a onclick="tagShow('${tag}', this)" class="pointer">
|
||||
#${escapeHTML(tag)}
|
||||
</a>
|
||||
<span class="hide" data-tag="${tag}" data-regTag="${tag.toLowerCase()}">
|
||||
@@ -226,7 +226,7 @@ function spotifytips() {
|
||||
} else {
|
||||
Swal.fire({
|
||||
type: 'info',
|
||||
title: lang.lang_spotify_acct
|
||||
text: lang.lang_spotify_acct
|
||||
})
|
||||
tips('ver')
|
||||
return false
|
||||
|
||||
@@ -33,20 +33,20 @@ function udgEx(user, acct_id) {
|
||||
Authorization: "Bearer " + at
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, "JSON", error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
if (json.accounts[0]) {
|
||||
var id = json.accounts[0].id
|
||||
udg(id, acct_id)
|
||||
@@ -76,20 +76,20 @@ function udg(user, acct_id) {
|
||||
Authorization: "Bearer " + at
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, "JSON", error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
//一つ前のユーザーデータ
|
||||
if (!localStorage.getItem("history")) {
|
||||
$("#his-history-btn").prop("disabled", true)
|
||||
@@ -129,7 +129,7 @@ function udg(user, acct_id) {
|
||||
}
|
||||
//絵文字があれば
|
||||
if (actemojick) {
|
||||
Object.keys(json.emojis).forEach(function(key5) {
|
||||
Object.keys(json.emojis).forEach(function (key5) {
|
||||
var emoji = json.emojis[key5]
|
||||
var shortcode = emoji.shortcode
|
||||
var emoji_url = '<img src="' + emoji.url + '" class="emoji-img" data-emoji="' + shortcode + '" draggable="false">'
|
||||
@@ -147,6 +147,11 @@ function udg(user, acct_id) {
|
||||
$("#his-acct").text(json.acct)
|
||||
$("#his-acct").attr("fullname", fullname)
|
||||
$("#his-prof").attr("src", json.avatar)
|
||||
$("#util-add").removeClass("hide")
|
||||
const title = $('.column-first').html()
|
||||
$("#my-data-nav .anc-link").removeClass("active-back")
|
||||
$('.column-first').addClass("active-back")
|
||||
$('#his-data-title').html(title)
|
||||
$("#his-data").css("background-image", "url(" + json.header + ")")
|
||||
$("#his-sta").text(json.statuses_count)
|
||||
$("#his-follow").text(json.following_count)
|
||||
@@ -186,6 +191,7 @@ function udg(user, acct_id) {
|
||||
$("#his-des").html(twemoji.parse(note))
|
||||
if (json.bot) {
|
||||
$("#his-bot").html(lang.lang_showontl_botacct)
|
||||
$("#his-bot").removeClass("hide")
|
||||
}
|
||||
$("#his-des").attr("data-acct", acct_id)
|
||||
$("#his-data").css("background-size", "cover")
|
||||
@@ -239,7 +245,7 @@ function udg(user, acct_id) {
|
||||
$(".only-his-data").show()
|
||||
}
|
||||
todc()
|
||||
if(json.locked) {
|
||||
if (json.locked) {
|
||||
$('#his-data').addClass('locked')
|
||||
} else {
|
||||
$('#his-data').removeClass('locked')
|
||||
@@ -271,20 +277,20 @@ function misskeyUdg(user, acct_id) {
|
||||
userId: user
|
||||
})
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, "JSON", error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
//一つ前のユーザーデータ
|
||||
if (!localStorage.getItem("history")) {
|
||||
$("#his-history-btn").prop("disabled", true)
|
||||
@@ -402,22 +408,22 @@ function relations(user, acct_id) {
|
||||
Authorization: "Bearer " + at
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (!response.ok) {
|
||||
response.text().then(function(text) {
|
||||
response.text().then(function (text) {
|
||||
setLog(response.url, response.status, text)
|
||||
})
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
todo(error)
|
||||
setLog(start, "JSON", error)
|
||||
console.error(error)
|
||||
})
|
||||
.then(function(json) {
|
||||
.then(function (json) {
|
||||
var json = json[0]
|
||||
if(json.requested) {
|
||||
if (json.requested) {
|
||||
//フォロリク中
|
||||
$('#his-data').addClass('following')
|
||||
$("#his-follow-btn-text").text(lang.lang_status_requesting)
|
||||
@@ -516,6 +522,7 @@ function reset() {
|
||||
$("#his-end-btn").removeClass("endorsed")
|
||||
$("#his-des").css("max-height", "250px")
|
||||
$("#his-bot").html("")
|
||||
$("#his-bot").addClass("hide")
|
||||
$("#his-follow-btn").show()
|
||||
$("#his-block-btn").show()
|
||||
$("#his-mute-btn").show()
|
||||
@@ -551,11 +558,13 @@ function reset() {
|
||||
$('#his-data').removeClass('locked')
|
||||
$('#his-data').removeClass('requesting')
|
||||
}
|
||||
$("#my-data-nav .anc-link").on("click", function() {
|
||||
$("#my-data-nav .anc-link").on("click", function () {
|
||||
var target = $(this).attr("go")
|
||||
if (target) {
|
||||
const title = $(this).html()
|
||||
$('#his-data-title').html(title)
|
||||
let title = $(this).html()
|
||||
if (target === '#his-tl') $("#util-add").removeClass("hide")
|
||||
if (target != '#his-tl') $("#util-add").addClass("hide")
|
||||
$('#his-data-title').html(title)
|
||||
$("#my-data-nav .anc-link").removeClass("active-back")
|
||||
$(this).addClass("active-back")
|
||||
$(target).show()
|
||||
|
||||
69
app/main.js
69
app/main.js
@@ -14,12 +14,12 @@ const dl = require('./main/dl.js')
|
||||
const img = require('./main/img.js')
|
||||
const np = require('./main/np.js')
|
||||
const systemFunc = require('./main/system.js')
|
||||
const Menu = electron.Menu
|
||||
const { Menu, MenuItem, BrowserWindow, ipcMain } = electron
|
||||
const join = require('path').join
|
||||
// ウィンドウを作成するモジュール
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
// メインウィンドウはGCされないようにグローバル宣言
|
||||
let mainWindow
|
||||
let opening = true
|
||||
|
||||
// アプリが多重起動しないようにする
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
@@ -27,9 +27,12 @@ const gotTheLock = app.requestSingleInstanceLock()
|
||||
if (!gotTheLock) {
|
||||
app.quit()
|
||||
} else {
|
||||
app.on('second-instance', () => {
|
||||
// 多重起動を試みた場合、既に存在するウィンドウにフォーカスを移す
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
app.on('second-instance', (event, commandLine, workingDirector) => {
|
||||
opening = false
|
||||
const m = commandLine[2].match(/([a-zA-Z0-9]+)\/\?[a-zA-Z-0-9]+=(.+)/)
|
||||
if (m) {
|
||||
mainWindow.send('customUrl', [m[1], m[2]])
|
||||
}
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||
mainWindow.focus()
|
||||
@@ -39,7 +42,7 @@ if (!gotTheLock) {
|
||||
|
||||
// 全てのウィンドウが閉じたら終了
|
||||
app.on('window-all-closed', function () {
|
||||
electron.session.defaultSession.clearCache(() => {})
|
||||
electron.session.defaultSession.clearCache(() => { })
|
||||
app.quit()
|
||||
})
|
||||
function isFile(file) {
|
||||
@@ -76,25 +79,26 @@ function createWindow() {
|
||||
if (!packaged) console.log('launch:' + lang)
|
||||
//Opening
|
||||
const package = fs.readFileSync(__dirname + '/package.json')
|
||||
if(lang == 'ja') {
|
||||
if (lang == 'ja') {
|
||||
const maxims = JSON.parse(fs.readFileSync(__dirname + '/maxim.ja.json'))
|
||||
var show = maxims[Math.floor(Math.random() * maxims.length)]
|
||||
} else if(lang == 'ja-KS') {
|
||||
} else if (lang == 'ja-KS') {
|
||||
//ja-KSも作れたらいいね
|
||||
const maxims = JSON.parse(fs.readFileSync(__dirname + '/maxim.ja.json'))
|
||||
var show = maxims[Math.floor(Math.random() * maxims.length)]
|
||||
} else{
|
||||
} else {
|
||||
var show = 'TheDesk 2018'
|
||||
}
|
||||
const data = JSON.parse(package)
|
||||
const version = data.version
|
||||
const codename = data.codename
|
||||
var openingWindow = new BrowserWindow({
|
||||
const openingWindow = new BrowserWindow({
|
||||
width: 300,
|
||||
height: 400,
|
||||
transparent: false,
|
||||
frame: false,
|
||||
resizable: false,
|
||||
show: opening
|
||||
})
|
||||
openingWindow.loadURL(`${__dirname}/opening.html?ver=${version}&codename=${codename}&maxim=${encodeURI(show)}`)
|
||||
|
||||
@@ -104,18 +108,18 @@ function createWindow() {
|
||||
var packaged = false
|
||||
console.log(
|
||||
'||\\\\\\ \n' +
|
||||
'|||| \\\\\\\\ \n' +
|
||||
'|||| \\\\\\\\ \n' +
|
||||
'|||| Am I a \\\\\\\\ \n' +
|
||||
'|||| cat? ^ ^ \\\\\\\\\\ _____ _ ____ _ \n' +
|
||||
'|||| (.-.) \\\\\\\\\\ |_ _| |__ ___| _ \\ ___ ___| | __\n' +
|
||||
"|||| ___> ) ||||| | | | '_ \\ / _ \\ | | |/ _ \\/ __| |/ /\n" +
|
||||
'|||| < _ _) ////// | | | | | | __/ |_| | __/__ \\ < \n' +
|
||||
'|||| |_||_| ///// |_| |_| |_|\\___|____/ \\___||___/_|\\_\\ \n' +
|
||||
'|||| ///// \n' +
|
||||
'|||| /////\n' +
|
||||
'|||| /////\n' +
|
||||
'||||//////'
|
||||
'|||| \\\\\\\\ \n' +
|
||||
'|||| \\\\\\\\ \n' +
|
||||
'|||| Am I a \\\\\\\\ \n' +
|
||||
'|||| cat? ^ ^ \\\\\\\\\\ _____ _ ____ _ \n' +
|
||||
'|||| (.-.) \\\\\\\\\\ |_ _| |__ ___| _ \\ ___ ___| | __\n' +
|
||||
"|||| ___> ) ||||| | | | '_ \\ / _ \\ | | |/ _ \\/ __| |/ /\n" +
|
||||
'|||| < _ _) ////// | | | | | | __/ |_| | __/__ \\ < \n' +
|
||||
'|||| |_||_| ///// |_| |_| |_|\\___|____/ \\___||___/_|\\_\\ \n' +
|
||||
'|||| ///// \n' +
|
||||
'|||| /////\n' +
|
||||
'|||| /////\n' +
|
||||
'||||//////'
|
||||
)
|
||||
console.log('If it does not show the window, you might forget `npm run construct`.')
|
||||
}
|
||||
@@ -123,6 +127,7 @@ function createWindow() {
|
||||
var info_path = join(app.getPath('userData'), 'window-size.json')
|
||||
var max_info_path = join(app.getPath('userData'), 'max-window-size.json')
|
||||
var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
|
||||
var wv_path = join(app.getPath('userData'), 'webview')
|
||||
var ua_path = join(app.getPath('userData'), 'useragent')
|
||||
try {
|
||||
fs.readFileSync(ha_path, 'utf8')
|
||||
@@ -131,6 +136,8 @@ function createWindow() {
|
||||
} catch {
|
||||
if (!packaged) console.log('enabled: Hardware Acceleration')
|
||||
}
|
||||
let webviewEnabled = false
|
||||
if (fs.existsSync(wv_path, 'utf8')) webviewEnabled = true
|
||||
var window_size
|
||||
try {
|
||||
window_size = JSON.parse(fs.readFileSync(info_path, 'utf8'))
|
||||
@@ -156,7 +163,7 @@ function createWindow() {
|
||||
var bit = process.arch
|
||||
var arg = {
|
||||
webPreferences: {
|
||||
webviewTag: true,
|
||||
webviewTag: webviewEnabled,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
spellcheck: false,
|
||||
@@ -187,13 +194,13 @@ function createWindow() {
|
||||
})
|
||||
mainWindow.webContents.on('page-title-updated', () => {
|
||||
const url = mainWindow.webContents.getURL()
|
||||
if(url.match(/https:\/\/crowdin.com\/profile/)) {
|
||||
if (url.match(/https:\/\/crowdin.com\/profile/)) {
|
||||
app.relaunch()
|
||||
app.exit()
|
||||
}
|
||||
})
|
||||
if (!packaged) mainWindow.toggleDevTools()
|
||||
electron.session.defaultSession.clearCache(() => {})
|
||||
electron.session.defaultSession.clearCache(() => { })
|
||||
if (process.argv) {
|
||||
if (process.argv[1]) {
|
||||
var m = process.argv[1].match(/([a-zA-Z0-9]+)\/\?[a-zA-Z-0-9]+=(.+)/)
|
||||
@@ -226,7 +233,7 @@ function createWindow() {
|
||||
}
|
||||
// ウィンドウが閉じられたらアプリも終了
|
||||
mainWindow.on('closed', function () {
|
||||
electron.ipcMain.removeAllListeners()
|
||||
ipcMain.removeAllListeners()
|
||||
mainWindow = null
|
||||
})
|
||||
closeArg = false
|
||||
@@ -236,10 +243,10 @@ function createWindow() {
|
||||
e.preventDefault()
|
||||
}
|
||||
const promise = new Promise(function (resolve) {
|
||||
mainWindow.webContents.send('asReadEnd', '')
|
||||
mainWindow.send('asReadEnd', '')
|
||||
let wait = 3000
|
||||
const url = mainWindow.webContents.getURL()
|
||||
if(!url.match(/index.html/)) wait = 0
|
||||
if (!url.match(/index.html/)) wait = 0
|
||||
setTimeout(function () {
|
||||
resolve()
|
||||
}, wait)
|
||||
@@ -249,7 +256,7 @@ function createWindow() {
|
||||
mainWindow.close()
|
||||
})
|
||||
})
|
||||
electron.ipcMain.on('sendMarkersComplete', function (e, arg) {
|
||||
ipcMain.on('sendMarkersComplete', function (e, arg) {
|
||||
closeArg = true
|
||||
mainWindow.close()
|
||||
})
|
||||
@@ -283,7 +290,7 @@ function createWindow() {
|
||||
})
|
||||
mainWindow.on('minimize', function () {
|
||||
writePos(mainWindow)
|
||||
mainWindow.webContents.send('asRead', '')
|
||||
mainWindow.send('asRead', '')
|
||||
})
|
||||
|
||||
var platform = process.platform
|
||||
@@ -319,7 +326,7 @@ function mouseTrack(mainWindow) {
|
||||
if (unchanged > 60 && !locked) {
|
||||
unchanged = 0
|
||||
locked = true
|
||||
mainWindow.webContents.send('asRead', '')
|
||||
mainWindow.send('asRead', '')
|
||||
}
|
||||
}
|
||||
x = xNow
|
||||
|
||||
@@ -10,7 +10,7 @@ function css(mainWindow) {
|
||||
|
||||
ipc.on('custom-css-create', function (e, arg) {
|
||||
fs.writeFileSync(customcss, arg);
|
||||
e.sender.webContents.send('custom-css-create-complete', "");
|
||||
e.sender.send('custom-css-create-complete', "");
|
||||
})
|
||||
ipc.on('custom-css-request', function (e, arg) {
|
||||
try {
|
||||
@@ -18,29 +18,29 @@ function css(mainWindow) {
|
||||
} catch (e) {
|
||||
var css = "";
|
||||
}
|
||||
e.sender.webContents.send('custom-css-response', css);
|
||||
e.sender.send('custom-css-response', css);
|
||||
})
|
||||
ipc.on('theme-json-create', function (e, arg) {
|
||||
var themecss = join(app.getPath("userData"), JSON5.parse(arg)["id"] +
|
||||
".thedesktheme");
|
||||
fs.writeFileSync(themecss, JSON5.stringify(JSON5.parse(arg)));
|
||||
if (JSON5.parse(arg)["id"]) {
|
||||
e.sender.webContents.send('theme-json-create-complete', "");
|
||||
e.sender.send('theme-json-create-complete', "");
|
||||
} else {
|
||||
e.sender.webContents.send('theme-json-create-complete', "error");
|
||||
e.sender.send('theme-json-create-complete', "error");
|
||||
}
|
||||
})
|
||||
ipc.on('theme-json-delete', function (e, arg) {
|
||||
try{
|
||||
try {
|
||||
var themecss = join(app.getPath("userData"), arg);
|
||||
console.log(themecss);
|
||||
fs.unlink(themecss, function (err) {
|
||||
e.sender.webContents.send('theme-json-delete-complete', "");
|
||||
e.sender.send('theme-json-delete-complete', "");
|
||||
});
|
||||
} catch {
|
||||
e.sender.webContents.send('theme-json-delete-complete', 'cannot delete');
|
||||
e.sender.send('theme-json-delete-complete', 'cannot delete');
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
ipc.on('theme-json-request', function (e, arg) {
|
||||
try {
|
||||
@@ -52,15 +52,19 @@ function css(mainWindow) {
|
||||
var raw = fs.readFileSync(themecss, 'utf8')
|
||||
var json = JSON5.parse(raw)
|
||||
}
|
||||
e.sender.webContents.send('theme-json-response', [json, raw]);
|
||||
e.sender.send('theme-json-response', [json, raw]);
|
||||
})
|
||||
ipc.on('theme-css-request', function (e, arg) {
|
||||
try {
|
||||
var themecss = join(app.getAppPath(), '/source/themes', arg)
|
||||
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
|
||||
} catch {
|
||||
var themecss = join(app.getPath("userData"), arg)
|
||||
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
|
||||
ipc.on('theme-css-request', function (e, args) {
|
||||
if (args[0] === 'themeCSSPreview') {
|
||||
var json = args[1]
|
||||
} else {
|
||||
try {
|
||||
var themecss = join(app.getAppPath(), '/source/themes', args[1])
|
||||
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
|
||||
} catch {
|
||||
var themecss = join(app.getPath("userData"), args[1])
|
||||
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -149,7 +153,7 @@ function css(mainWindow) {
|
||||
} else {
|
||||
var css = compatibleTheme(json)
|
||||
}
|
||||
e.sender.webContents.send('theme-css-response', css);
|
||||
e.sender.send('theme-css-response', css);
|
||||
} catch (e) {
|
||||
var css = "";
|
||||
}
|
||||
@@ -270,7 +274,7 @@ function css(mainWindow) {
|
||||
default: false
|
||||
})
|
||||
}
|
||||
e.sender.webContents.send('theme-json-list-response', themes);
|
||||
e.sender.send('theme-json-list-response', themes);
|
||||
})
|
||||
}
|
||||
exports.css = css;
|
||||
|
||||
@@ -41,19 +41,19 @@ function dl(mainWindow, lang_path, base, dirname) {
|
||||
//アプデDL
|
||||
ipc.on('download-btn', async (e, args) => {
|
||||
function dl(url, file, dir, e) {
|
||||
e.sender.webContents.send('mess', 'Start...')
|
||||
e.sender.send('mess', 'Start...')
|
||||
const opts = {
|
||||
directory: dir,
|
||||
filename: file,
|
||||
openFolderWhenDone: true,
|
||||
onProgress: function(event) {
|
||||
e.sender.webContents.send('prog', [event, args[2]])
|
||||
e.sender.send('prog', [event, args[2]])
|
||||
},
|
||||
saveAs: false
|
||||
}
|
||||
download(updatewin, url, opts)
|
||||
.then(dl => {
|
||||
e.sender.webContents.send('mess', 'ダウンロードが完了しました。')
|
||||
e.sender.send('mess', 'ダウンロードが完了しました。')
|
||||
app.quit()
|
||||
})
|
||||
.catch(console.error)
|
||||
@@ -111,7 +111,7 @@ function dl(mainWindow, lang_path, base, dirname) {
|
||||
filename: name,
|
||||
openFolderWhenDone: false,
|
||||
onProgress: function(e) {
|
||||
event.sender.webContents.send('general-dl-prog', e)
|
||||
event.sender.send('general-dl-prog', e)
|
||||
},
|
||||
saveAs: false
|
||||
}
|
||||
@@ -126,7 +126,7 @@ function dl(mainWindow, lang_path, base, dirname) {
|
||||
} else {
|
||||
var name = dir
|
||||
}
|
||||
event.sender.webContents.send('general-dl-message', name)
|
||||
event.sender.send('general-dl-message', name)
|
||||
})
|
||||
.catch(console.error)
|
||||
})
|
||||
|
||||
@@ -26,14 +26,14 @@ function img(mainWindow, dir) {
|
||||
for (var i = 0; i < fileNames.length; i++) {
|
||||
var path = fileNames[i]
|
||||
var bin = fs.readFileSync(path, 'base64')
|
||||
e.sender.webContents.send('resizeJudgement', [bin, 'new'])
|
||||
e.sender.send('resizeJudgement', [bin, 'new'])
|
||||
}
|
||||
})
|
||||
ipc.on('bmp-image', (e, args) => {
|
||||
Jimp.read(args[0], function (err, lenna) {
|
||||
if (err) throw err
|
||||
lenna.getBase64(Jimp.MIME_PNG, function (err, src) {
|
||||
e.sender.webContents.send('bmp-img-comp', [src, args[1]])
|
||||
e.sender.send('bmp-img-comp', [src, args[1]])
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -49,7 +49,7 @@ function img(mainWindow, dir) {
|
||||
Jimp.read(decodedFile, function (err, lenna) {
|
||||
if (err) throw err
|
||||
lenna.scaleToFit(args[1], args[1]).getBase64(Jimp[use], function (err, src) {
|
||||
e.sender.webContents.send('bmp-img-comp', [src, args[1]])
|
||||
e.sender.send('bmp-img-comp', [src, args[1]])
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -71,12 +71,12 @@ function img(mainWindow, dir) {
|
||||
var ave = (color.r + color.g + color.b) / 3
|
||||
if (ave > 128) {
|
||||
image.print(font, left, top, args[1]).getBase64(Jimp.MIME_PNG, function (err, src) {
|
||||
e.sender.webContents.send('bmp-img-comp', [src, args[1], true])
|
||||
e.sender.send('bmp-img-comp', [src, args[1], true])
|
||||
})
|
||||
} else {
|
||||
Jimp.loadFont(Jimp.FONT_SANS_16_WHITE).then((font) => {
|
||||
image.print(font, left, top, args[1]).getBase64(Jimp.MIME_PNG, function (err, src) {
|
||||
e.sender.webContents.send('bmp-img-comp', [src, args[1], true])
|
||||
e.sender.send('bmp-img-comp', [src, args[1], true])
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
// Create the Application's main menu
|
||||
function templete(lang, mainWindow, packaged, dir, dirname) {
|
||||
//フレーム
|
||||
if(lang !="ja" && lang != "en"){
|
||||
if (lang != "ja" && lang != "en") {
|
||||
lang = "en"
|
||||
}
|
||||
const electron = require("electron");
|
||||
const ipc = electron.ipcMain;
|
||||
const app = electron.app;
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const electron = require("electron")
|
||||
const { Menu, MenuItem, ipcMain, BrowserWindow, app } = electron
|
||||
const join = require('path').join;
|
||||
const dict = {
|
||||
"application": {
|
||||
@@ -71,7 +69,7 @@ function templete(lang, mainWindow, packaged, dir, dirname) {
|
||||
"en": "Close"
|
||||
}
|
||||
}
|
||||
if(packaged){
|
||||
if (packaged) {
|
||||
var ifDev = [
|
||||
{
|
||||
label: dict.reload[lang],
|
||||
@@ -79,12 +77,12 @@ function templete(lang, mainWindow, packaged, dir, dirname) {
|
||||
click: function () { mainWindow.reload(); }
|
||||
}
|
||||
]
|
||||
}else{
|
||||
} else {
|
||||
var ifDev = [
|
||||
{
|
||||
label: 'Toggle Developer Tools',
|
||||
accelerator: 'Alt+Command+I',
|
||||
click: function () { if (!packaged) { mainWindow.toggleDevTools(); } }
|
||||
click: function () { mainWindow.toggleDevTools(); }
|
||||
},
|
||||
{
|
||||
label: dict.reload[lang],
|
||||
@@ -104,7 +102,7 @@ function templete(lang, mainWindow, packaged, dir, dirname) {
|
||||
webviewTag: false,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
preload: join(dirname , "js", "platform", "preload.js")
|
||||
preload: join(dirname, "js", "platform", "preload.js")
|
||||
},
|
||||
width: 300, height: 500,
|
||||
"transparent": false, // ウィンドウの背景を透過
|
||||
@@ -150,6 +148,28 @@ function templete(lang, mainWindow, packaged, dir, dirname) {
|
||||
]
|
||||
}
|
||||
];
|
||||
// コピペメニュー
|
||||
const ctxMenu = new Menu()
|
||||
ctxMenu.append(new MenuItem({
|
||||
label: dict.cut[lang],
|
||||
role: 'cut',
|
||||
click: () => { console.log('Cut clicked!') }
|
||||
}))
|
||||
ctxMenu.append(new MenuItem({
|
||||
label: dict.copy[lang],
|
||||
role: 'copy',
|
||||
click: () => { console.log('Copy clicked!') }
|
||||
}))
|
||||
ctxMenu.append(new MenuItem({
|
||||
label: dict.paste[lang],
|
||||
role: 'paste',
|
||||
click: () => { console.log('Paste clicked!') }
|
||||
}))
|
||||
|
||||
|
||||
ipcMain.on('textareaContextMenu', function (e, params) {
|
||||
ctxMenu.popup(mainWindow, params.x, params.y)
|
||||
})
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ function np(mainWindow) {
|
||||
title: title,
|
||||
anynp: true
|
||||
}
|
||||
e.sender.webContents.send('itunes-np', ret)
|
||||
e.sender.send('itunes-np', ret)
|
||||
} else {
|
||||
|
||||
try {
|
||||
@@ -27,16 +27,16 @@ function np(mainWindow) {
|
||||
if(artwork) {
|
||||
const base64 = artwork.toString('base64')
|
||||
value.artwork = base64
|
||||
e.sender.webContents.send('itunes-np', value)
|
||||
e.sender.send('itunes-np', value)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
e.sender.webContents.send('itunes-np', value)
|
||||
e.sender.send('itunes-np', value)
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
e.sender.webContents.send('itunes-np', error)
|
||||
e.sender.send('itunes-np', error)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Binary file not shown.
@@ -9,6 +9,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
const clipboard = electron.clipboard
|
||||
var tmp_img = join(app.getPath('userData'), 'tmp.png')
|
||||
var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
|
||||
var wv_path = join(app.getPath('userData'), 'webview')
|
||||
var ua_path = join(app.getPath('userData'), 'useragent')
|
||||
var lang_path = join(app.getPath('userData'), 'language')
|
||||
var log_dir_path = join(app.getPath('userData'), 'logs')
|
||||
@@ -35,13 +36,13 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
} catch {
|
||||
var gitHash = null
|
||||
}
|
||||
e.sender.webContents.send('platform', [process.platform, process.arch, process.version, process.versions.chrome, process.versions.electron, gitHash])
|
||||
e.sender.send('platform', [process.platform, process.arch, process.version, process.versions.chrome, process.versions.electron, gitHash])
|
||||
})
|
||||
//言語
|
||||
ipc.on('lang', function (e, arg) {
|
||||
console.log('set:' + arg)
|
||||
fs.writeFileSync(lang_path, arg)
|
||||
e.sender.webContents.send('langres', arg)
|
||||
e.sender.send('langres', arg)
|
||||
})
|
||||
//エクスポートのダイアログ
|
||||
ipc.on('exportSettings', function (e, args) {
|
||||
@@ -53,7 +54,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
if (!savedFiles) {
|
||||
return false
|
||||
}
|
||||
e.sender.webContents.send('exportSettingsFile', savedFiles)
|
||||
e.sender.send('exportSettingsFile', savedFiles)
|
||||
})
|
||||
//インポートのダイアログ
|
||||
ipc.on('importSettings', function (e, args) {
|
||||
@@ -66,7 +67,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
if (!fileNames) {
|
||||
return false
|
||||
}
|
||||
e.sender.webContents.send('config', JSON5.parse(fs.readFileSync(fileNames[0], 'utf8')))
|
||||
e.sender.send('config', JSON5.parse(fs.readFileSync(fileNames[0], 'utf8')))
|
||||
})
|
||||
//保存フォルダのダイアログ
|
||||
ipc.on('savefolder', function (e, args) {
|
||||
@@ -77,7 +78,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
properties: ['openDirectory'],
|
||||
}
|
||||
)
|
||||
e.sender.webContents.send('savefolder', fileNames[0])
|
||||
e.sender.send('savefolder', fileNames[0])
|
||||
})
|
||||
//カスタムサウンドのダイアログ
|
||||
ipc.on('customSound', function (e, arg) {
|
||||
@@ -92,7 +93,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
],
|
||||
}
|
||||
)
|
||||
e.sender.webContents.send('customSoundRender', [arg, fileNames[0]])
|
||||
e.sender.send('customSoundRender', [arg, fileNames[0]])
|
||||
})
|
||||
|
||||
//ハードウェアアクセラレーションの無効化
|
||||
@@ -100,7 +101,16 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
if (arg == 'true') {
|
||||
fs.writeFileSync(ha_path, arg)
|
||||
} else {
|
||||
fs.unlink(ha_path, function (err) {})
|
||||
fs.unlink(ha_path, function (err) { })
|
||||
}
|
||||
app.relaunch()
|
||||
app.exit()
|
||||
})
|
||||
ipc.on('webview', function (e, arg) {
|
||||
if (arg == 'true') {
|
||||
fs.writeFileSync(wv_path, arg)
|
||||
} else {
|
||||
fs.unlink(wv_path, function (err) { })
|
||||
}
|
||||
app.relaunch()
|
||||
app.exit()
|
||||
@@ -108,7 +118,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
//ユーザーエージェント
|
||||
ipc.on('ua', function (e, arg) {
|
||||
if (arg == '') {
|
||||
fs.unlink(ua_path, function (err) {})
|
||||
fs.unlink(ua_path, function (err) { })
|
||||
} else {
|
||||
fs.writeFileSync(ua_path, arg)
|
||||
}
|
||||
@@ -124,7 +134,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
//スクリーンリーダー
|
||||
ipc.on('acsCheck', function (e, arg) {
|
||||
if (app.accessibilitySupportEnabled) {
|
||||
mainWindow.webContents.send('accessibility', 'true')
|
||||
mainWindow.send('accessibility', 'true')
|
||||
}
|
||||
})
|
||||
ipc.on('quit', (e, args) => {
|
||||
@@ -188,8 +198,8 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
})
|
||||
function mems() {
|
||||
var mem = os.totalmem() - os.freemem()
|
||||
if (mainWindow && event.webContents) {
|
||||
event.webContents.send('memory', [mem, os.cpus()[0].model, os.totalmem(), os.cpus().length, os.uptime()])
|
||||
if (mainWindow && event) {
|
||||
event.send('memory', [mem, os.cpus()[0].model, os.totalmem(), os.cpus().length, os.uptime()])
|
||||
}
|
||||
}
|
||||
ipc.on('endmem', (e, arg) => {
|
||||
@@ -200,7 +210,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
|
||||
ipc.on('export', (e, args) => {
|
||||
fs.writeFileSync(args[0], JSON5.stringify(args[1]))
|
||||
e.sender.webContents.send('exportAllComplete', '')
|
||||
e.sender.send('exportAllComplete', '')
|
||||
})
|
||||
//フォント
|
||||
function object_array_sort(data, key, order, fn) {
|
||||
@@ -239,7 +249,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
var SystemFonts = require('system-font-families').default
|
||||
var fm = new SystemFonts()
|
||||
const fontList = fm.getFontsSync()
|
||||
e.sender.webContents.send('font-list', fontList)
|
||||
e.sender.send('font-list', fontList)
|
||||
})
|
||||
//コピー
|
||||
ipc.on('copy', (e, arg) => {
|
||||
@@ -276,7 +286,7 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
logs = todayLog + yestLog + yest2Log
|
||||
})
|
||||
logs = yest2Log + yestLog + todayLog
|
||||
e.sender.webContents.send('logData', logs)
|
||||
e.sender.send('logData', logs)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -299,5 +309,28 @@ function system(mainWindow, dir, lang, dirname) {
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
ipc.on('twitterLogin', (e, args) => {
|
||||
const window = new BrowserWindow({
|
||||
webPreferences: {
|
||||
webviewTag: false,
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
preload: join(dirname, 'js', 'platform', 'preload.js'),
|
||||
},
|
||||
width: 414,
|
||||
height: 736,
|
||||
})
|
||||
const login = `https://mobile.twitter.com/login?hide_message=true&redirect_after_login=https%3A%2F%2Ftweetdeck.twitter.com%2F%3Fvia_twitter_login%3Dtrue`
|
||||
const logout = `https://mobile.twitter.com/logout?redirect_after_logout=https%3A%2F%2Ftweetdeck.twitter.com%2F`
|
||||
window.loadURL(args ? logout : login)
|
||||
window.webContents.on('did-navigate', () => {
|
||||
const url = window.webContents.getURL()
|
||||
if (url.match("https://tweetdeck.twitter.com")) {
|
||||
window.close()
|
||||
e.sender.send('twitterLoginComplete', '')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
exports.system = system
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
{
|
||||
"name": "thedesk",
|
||||
"version": "22.1.1",
|
||||
"version": "22.2.0",
|
||||
"codename": "Koume",
|
||||
"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",
|
||||
"construct": "cd view/make && node make --automatic && cd ../../ && browserify aiscript.js -o js/platform/aiscript.js",
|
||||
"construct:store": "cd view/make && node make --automatic --store && cd ../../ && browserify aiscript.js -o js/platform/aiscript.js",
|
||||
"dev": "npx electron ./ --dev",
|
||||
"dist": "build --linux snap",
|
||||
"watchview": "node view/make/make.js --automatic --watch",
|
||||
"build:js": "node build.js",
|
||||
"build": "node view/make/make.js --automatic && npx electron-builder",
|
||||
"build:pwa": "node view/make/make.js --automatic --pwa",
|
||||
"build:win:web": "node view/make/make.js --automatic && npx electron-builder --win",
|
||||
"build:win:msstore": "node view/make/make.js --automatic --store && npx electron-builder --win appx",
|
||||
"build:linux:web": "node view/make/make.js --automatic && npx electron-builder --linux",
|
||||
"build:linux:snapstore": "node view/make/make.js --automatic --store && npx electron-builder --linux",
|
||||
"build:mac:web": "node view/make/make.js --automatic && npx electron-builder --mac",
|
||||
"build:mac:homebrew": "node view/make/make.js --automatic --store && npx electron-builder --mac",
|
||||
"postinstall": "run-s util:*",
|
||||
"util:hash": "node gitHash.js",
|
||||
"util:browserify": "browserify aiscript.js -o js/platform/aiscript.js",
|
||||
"construct": "node view/make/makeCli.js",
|
||||
"construct:store": "node view/make/makeCli.js --store",
|
||||
"dev": "run-p dev:*",
|
||||
"dev:run": "electron ./ --dev",
|
||||
"dev:watchview": "node view/make/makeCli.js --watch",
|
||||
"build": "node buildCli.js",
|
||||
"build:pwa": "node view/make/makeCli.js --pwa",
|
||||
"build:all:x64": "node buildCli.js --withStore",
|
||||
"build:all": "node buildCli.js --withStore --withIa32 --withArm64",
|
||||
"lint:fix": "eslint js --fix",
|
||||
"lint": "eslint js"
|
||||
},
|
||||
@@ -62,6 +60,7 @@
|
||||
"@fortawesome/fontawesome-free": "^5.15.2",
|
||||
"@syuilo/aiscript": "^0.11.1",
|
||||
"electron-dl": "^3.2.1",
|
||||
"itunes-nowplaying-mac": "https://github.com/cutls/itunes-nowplaying-mac/releases/download/v0.4.0/itunes-nowplaying-mac-0.4.0.tgz",
|
||||
"jimp": "^0.16.1",
|
||||
"jquery": "^3.6.0",
|
||||
"jquery-ui-dist": "^1.12.1",
|
||||
@@ -72,72 +71,22 @@
|
||||
"sumchecker": "^3.0.1",
|
||||
"sweetalert2": "^10.15.7",
|
||||
"system-font-families": "^0.4.1",
|
||||
"textarea-caret": "^3.1.0",
|
||||
"vue": "^2.6.12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"itunes-nowplaying-mac": "0.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^17.0.0",
|
||||
"chokidar": "^3.5.1",
|
||||
"electron": "^10.2.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"electron": "^12.0.2",
|
||||
"electron-builder": "^22.10.5",
|
||||
"electron-notarize": "^1.0.0",
|
||||
"electron-rebuild": "^2.3.5",
|
||||
"eslint": "^7.23.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"readline-sync": "1.4.10"
|
||||
},
|
||||
"build": {
|
||||
"productName": "TheDesk",
|
||||
"appId": "top.thedesk",
|
||||
"asarUnpack": [
|
||||
"node_modules/itunes-nowplaying-mac",
|
||||
"main/script"
|
||||
],
|
||||
"directories": {
|
||||
"output": "../build"
|
||||
},
|
||||
"win": {
|
||||
"icon": "build/thedesk.ico",
|
||||
"target": [
|
||||
"nsis",
|
||||
"appx",
|
||||
"portable"
|
||||
]
|
||||
},
|
||||
"appx": {
|
||||
"identityName": "53491Cutls.TheDesk",
|
||||
"applicationId": "Cutls.TheDesk",
|
||||
"publisherDisplayName": "Cutls",
|
||||
"publisher": "CN=629757F5-A5EE-474F-9562-B304A89A9FD1",
|
||||
"languages": [
|
||||
"JA-JP",
|
||||
"EN-US"
|
||||
]
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"allowToChangeInstallationDirectory": true,
|
||||
"artifactName": "TheDesk-setup.${ext}"
|
||||
},
|
||||
"linux": {
|
||||
"icon": "build/icons",
|
||||
"target": [
|
||||
"zip",
|
||||
"appImage",
|
||||
"snap",
|
||||
"deb"
|
||||
],
|
||||
"category": "Network"
|
||||
},
|
||||
"mac": {
|
||||
"target": [
|
||||
"dmg",
|
||||
"zip"
|
||||
]
|
||||
},
|
||||
"electronDownload": {
|
||||
"version": "9.0.5"
|
||||
},
|
||||
"electronVersion": "9.0.5"
|
||||
"resolutions": {
|
||||
"@types/fs-extra": "9.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
bottom: '#eeeeee',
|
||||
emphasized: '#81c784',
|
||||
postbox: '#fff',
|
||||
active: '#009688',
|
||||
active: '#66dacf',
|
||||
selected: '#c0c0c0',
|
||||
selectedWithShared: '#b2babd',
|
||||
},
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<link href="../../css/userdata.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../@@node_base@@/@fortawesome/fontawesome-free/css/all.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link href="../../css/sweetalert2-material.min.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../css/acct.css" rel="stylesheet" type="text/css" />
|
||||
<meta charset="utf-8" />
|
||||
@@comment-start@@
|
||||
@@ -28,7 +29,7 @@
|
||||
<script type="text/javascript" src="../../js/platform/first.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/materialize-css/dist/js/materialize.js"></script>
|
||||
<script type="text/javascript" src="main.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.all.min.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.min.js"></script>
|
||||
<script>
|
||||
var misskeytoken = false
|
||||
</script>
|
||||
@@ -39,19 +40,28 @@
|
||||
<div id="acct-list"></div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="hide-second">
|
||||
<a href="setting.html">@@haveExported@@</a>
|
||||
</div>
|
||||
<div>
|
||||
<h5>@@add@@</h5>
|
||||
|
||||
<div class="hide-second">
|
||||
<a href="setting.html">@@haveExported@@</a>
|
||||
</div>
|
||||
<br />
|
||||
<div id="add">
|
||||
<div class="row">
|
||||
<div class="col s8">
|
||||
@@addAcct@@<br />
|
||||
<input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp" />
|
||||
<div id="ins-suggest"></div>
|
||||
<button class="btn waves-effect" onclick="instance()">Login</button><br />
|
||||
@@addAcct@@
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<input type="text" id="autocomplete-input" class="autocomplete" placeholder="eg) mstdn.jp">
|
||||
<label for="autocomplete-input">URL</label>
|
||||
</div>
|
||||
<div class="col s4 loginBtnWrap">
|
||||
<button class="btn waves-effect" onclick="instance()"><i
|
||||
class="material-icons left">login</i>Login</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pwa">
|
||||
@@codesetupwarn@@<br />
|
||||
<label>
|
||||
@@ -128,6 +138,7 @@
|
||||
<script type="text/javascript" src="../../js/login/manager.js"></script>
|
||||
<script type="text/javascript" src="../../js/tl/date.js"></script>
|
||||
<script>$('body').addClass(localStorage.getItem('platform'))</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -12,6 +12,7 @@
|
||||
<link href="../../css/post.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../css/master.css" type="text/css" rel="stylesheet" />
|
||||
<link href="../../css/sort.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../css/sweetalert2-material.min.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../@@node_base@@/@fortawesome/fontawesome-free/css/all.min.css" type="text/css" rel="stylesheet" />
|
||||
<meta charset="utf-8" />
|
||||
@@comment-start@@
|
||||
@@ -34,14 +35,19 @@
|
||||
</script>
|
||||
<textarea id="copy" style="top:-100px; position:fixed;"></textarea>
|
||||
<canvas id="canvas" style="top:-100px; position:fixed;width:32px;height:32px" width="32" height="32"></canvas>
|
||||
<div id="pageSrc" class="hide z-depth-5">
|
||||
<input type="text" id="pageSrcInput" placeholder="@@search@@" />
|
||||
<button class="btn waves-effect" onclick="doSrc('web')" title="@@webSrc@@">
|
||||
<i class="material-icons">open_in_browser</i>
|
||||
</button>
|
||||
<button class="btn waves-effect" onclick="doSrc('ts')" title="@@tsSrc@@">
|
||||
<i class="material-icons">chat</i>
|
||||
</button>
|
||||
<div id="pageSrc" class="hide z-depth-2">
|
||||
<div class="srcQ"></div>
|
||||
<div class="pageSrcBtn pointer" onclick="doSrc('web')">@@webSrc@@</div>
|
||||
<div class="pageSrcBtn pointer" onclick="doSrc('ts')">@@tsSrc@@</div>
|
||||
<div class="pageSrcBtn pointer" onclick="doSrc('copy')">@@copy@@</div>
|
||||
<div class="pageSrcBtn pointer lastPSB" onclick="doSrc('toot')">@@toot@@</div>
|
||||
</div>
|
||||
<div class="hide z-depth-2" id="tagContextMenu">
|
||||
<a onclick="doTShowBox('tl')" class="pointer firstTCM" id="tagCMTL"></a>
|
||||
<a onclick="doTShowBox('toot')" class="pointer" id="tagCMToot"></a>
|
||||
<a onclick="doTShowBox('pin')" class="pointer" id="tagCMPin"></a>
|
||||
<a onclick="doTShowBox('f')" class="pointer lastTCM" title="add it to Featured tags"
|
||||
id="tagCMFeature">Feature</a>
|
||||
</div>
|
||||
<div id="offline" class="hide">
|
||||
@@nowOffline@@
|
||||
@@ -200,6 +206,8 @@
|
||||
<div class="input-field col s12" id="toot-field" style="margin-top: 0;margin-bottom: 0;">
|
||||
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;"
|
||||
data-length="500"></textarea>
|
||||
|
||||
<div id="suggest"></div>
|
||||
<label for="textarea" data-trans="toot">@@toot@@</label>
|
||||
<br />
|
||||
<span class="sml gray pointer markdown mize" id="preview-btn">
|
||||
@@ -308,7 +316,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="right-side">
|
||||
<div id="suggest" class="right-side-content"></div>
|
||||
<div id="draft" class="hide right-side-content"></div>
|
||||
<!--絵文字ピッカー-->
|
||||
<div id="emoji" class="hide right-side-content">
|
||||
@@ -569,12 +576,18 @@
|
||||
class="material-icons">people</i>→@@follow@@</a>
|
||||
<a go="#his-follower-list" title="@@follower@@" class="btn anc-link waves-effect"><i
|
||||
class="material-icons">people</i>←@@follower@@</a>
|
||||
<a go="#his-fav-list" title="@@favRegist@@"
|
||||
class="btn only-my-data anc-link waves-effect"><i
|
||||
class="material-icons">star</i>@@favRegist@@</a>
|
||||
<a go="#his-fav-list" title="@@favRegist@@" class="btn only-my-data anc-link waves-effect">
|
||||
<i class="material-icons">star</i>@@favRegist@@</a>
|
||||
<a class="dropdown-trigger btn waves-effect" href="#" data-target="hisdropdown"><i
|
||||
class="material-icons">more_vert</i>@@more@@</a>
|
||||
<div id="his-data-title"><i class="material-icons">timeline</i>@@timeline@@</div>
|
||||
<div id="his-data-title-wrap">
|
||||
<span id="his-data-title"><i class="material-icons">timeline</i>@@timeline@@</span>
|
||||
<button class="btn waves-effect grey darken-2" style="width: 180px" id="util-add"
|
||||
onclick="utlAdd()">
|
||||
<i class="material-icons">add</i>
|
||||
@@utlColumn@@
|
||||
</button>
|
||||
</div>
|
||||
<!-- Dropdown Structure -->
|
||||
<ul id="hisdropdown" class="dropdown-content">
|
||||
<li class="anc-link only-his-data" go="#his-list">
|
||||
@@ -611,9 +624,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div id="his-tl" class="his-var-content">
|
||||
<button class="btn waves-effect grey" style="width:100%; padding:0;" onclick="utlAdd()">
|
||||
@@utlColumn@@
|
||||
</button>
|
||||
<div id="his-tl-contents" class="cont-series"></div>
|
||||
<button class="btn waves-effect " style="width:100%; padding:0;"
|
||||
onclick="utlShow('--now','more')">
|
||||
@@ -783,38 +793,27 @@
|
||||
<a href="https://thedesk.top" target="_blank">HP</a><br />
|
||||
<a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br />
|
||||
<br />
|
||||
<div id="release-22-1-1_Koume" class="release-do" style="display:none; ">
|
||||
<div id="release-22-2-0_Koume" class="release-do" style="display:none; ">
|
||||
<br />
|
||||
<a href="https://ja.mstdn.
|
||||
wiki/TheDesk" target="_blank">機能一覧</a><br />
|
||||
Pixiv
|
||||
FanboxやPatreonでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。最低月一更新。<br />
|
||||
困ったときは、<a href="https://docs.thedesk.top">TheDesk Docs</a>をご覧ください。
|
||||
<h5>Release Note 22.1.1 (Koume)</h5>
|
||||
<!--上のdivのidも変えてね-->
|
||||
・Fediversearchを使用するように <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a>
|
||||
<a onclick="udgEx('popn_ja@popon.pptdn.jp','main')" class="contributor"><img
|
||||
src="https://avatars3.githubusercontent.com/u/24523508?s=88&v=4">kaias1jp</a><br>
|
||||
・コンテキストツール(エアリプチェッカー)をデフォルトで無効に(#445) <a onclick="udgEx('Cutls@cutls.com','main')"
|
||||
class="contributor"><img
|
||||
<h5>Release Note 22.2.0 (Koume)</h5>
|
||||
<!--上のdivのidや1行上のところも変えてね-->
|
||||
・TweetDeck機能の復活 <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
・Pleromaでリフレッシュトークンの更新がうまくいかない不具合を修正 <a onclick="udgEx('Cutls@cutls.com','main')"
|
||||
class="contributor"><img
|
||||
・頒布されるmacOS向けビルドにNotarize(公証)を追加 <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
・Mastodonでいきなりアクセストークンが無効化してしまう不具合を修正 <a onclick="udgEx('Cutls@cutls.com','main')"
|
||||
class="contributor"><img
|
||||
・ARM版Windows向けビルドの試験頒布 <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
・カラム横幅設定が効かない不具合を修正 <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
・ダイアログのデザイン変更 <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
・一部別ドメイン提供のストリーミングで、ストリーミングに接続できない不具合を修正 <a onclick="udgEx('Cutls@cutls.com','main')"
|
||||
class="contributor"><img
|
||||
・各カラムのヘッダーの高さを減らせるように <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
・フランス語をbetaから標準翻訳に <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
・AiScriptエディタにシンタックスハイライトを導入 <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"><img
|
||||
src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">cutls</a><br>
|
||||
|
||||
<h5>ご注意ください</h5>
|
||||
・TweetDeck連携は環境設定から有効にしてからご利用いただけます。
|
||||
</div>
|
||||
<div id="release-en" style="display:none">
|
||||
<h5>Let's make it native!</h5>
|
||||
@@ -903,43 +902,43 @@
|
||||
<input type="hidden" value="local" id="type-sel" />
|
||||
@@showThisTL@@
|
||||
<div id="tltype">
|
||||
<a class="type waves-effect active" data-type="local">
|
||||
<a class="type waves-effect active" data-type="local" title="@@local@@">
|
||||
<div><i class="material-icons" aria-hidden="true">people_outline</i></div>
|
||||
<span>@@local@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="local-media">
|
||||
<a class="type waves-effect" data-type="local-media" title="@@localMedia@@">
|
||||
<div><i class="material-icons" aria-hidden="true">perm_media</i></div>
|
||||
<span>@@localMedia@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="home">
|
||||
<a class="type waves-effect" data-type="home" title="@@home@@">
|
||||
<div><i class="material-icons" aria-hidden="true">home</i></div>
|
||||
<span>@@home@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="pub">
|
||||
<a class="type waves-effect" data-type="pub" title="@@fed@@">
|
||||
<div><i class="material-icons" aria-hidden="true">language</i></div>
|
||||
<span>@@fed@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="pub-media">
|
||||
<a class="type waves-effect" data-type="pub-media" title="@@fedMedia@@">
|
||||
<div><i class="material-icons" aria-hidden="true">perm_media</i></div>
|
||||
<span>@@fedMedia@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="dm">
|
||||
<a class="type waves-effect" data-type="dm" title="@@dm@@">
|
||||
<div><i class="material-icons" aria-hidden="true">mail_outline</i></div>
|
||||
<span>@@dm@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="mix">
|
||||
<a class="type waves-effect" data-type="mix" title="@@integratedTLDes@@">
|
||||
<div><i class="material-icons" aria-hidden="true">merge_type</i></div>
|
||||
<span>@@integratedTLDes@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="plus">
|
||||
<a class="type waves-effect" data-type="plus" title="@@localPlusDes@@">
|
||||
<div><i class="material-icons" aria-hidden="true">reply</i></div>
|
||||
<span>@@localPlusDes@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="notf">
|
||||
<a class="type waves-effect" data-type="notf" title="@@notf@@">
|
||||
<div><i class="material-icons" aria-hidden="true">notifications</i></div>
|
||||
<span>@@notf@@</span>
|
||||
</a>
|
||||
<a class="type waves-effect" data-type="bookmark">
|
||||
<a class="type waves-effect" data-type="bookmark" title="@@bookmark@@">
|
||||
<div><i class="material-icons" aria-hidden="true">bookmark</i></div>
|
||||
<span>@@bookmark@@</span>
|
||||
</a>
|
||||
@@ -965,7 +964,7 @@
|
||||
<select id="src-acct-sel" class="acct-sel" onchange="trend()"></select>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input id="src" type="text" class="validate" style="width:57%" />
|
||||
<input id="src" type="text" class="validate" style="width:calc(100% - 150px)" />
|
||||
<label for="src" data-trans="src">@@search@@</label>
|
||||
<button class="btn waves-effect indigo" style="width: 36%;padding: 0;padding-left: 1.15rem;"
|
||||
onclick="src()" data-trans-i="src">
|
||||
@@ -1033,7 +1032,7 @@
|
||||
<br /><br />
|
||||
<div id="lists"></div>
|
||||
<div id="lists-user"></div>
|
||||
<input type="text" style="width:150px" id="list-add" placeholder="@@name@@" />
|
||||
<input type="text" style="width: calc(100% - 143px)" id="list-add" placeholder="@@name@@" />
|
||||
<button class="btn waves-effect" style="width:120px;" onclick="makeNewList()">
|
||||
@@makeNew@@
|
||||
</button>
|
||||
@@ -1259,7 +1258,7 @@
|
||||
<script type="text/javascript" src="../../js/common/keyshortcut.js"></script>
|
||||
<script type="text/javascript" src="../../js/common/modal.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/jquery-ui-dist/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.all.min.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/platform/punycode.js"></script>
|
||||
<script type="text/javascript" src="../../js/ui/tips.js"></script>
|
||||
<script src="https://twemoji.maxcdn.com/2/twemoji.min.js?2.7"></script>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "По подразбиране",
|
||||
"change": "Промяна",
|
||||
"select": "Избери",
|
||||
"exec": "Exec",
|
||||
"env": "Системни предпочитания",
|
||||
"setlang": "Езици",
|
||||
"backup": "Внос и износ на предпочитания",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Износ",
|
||||
"hardwareAcceleration": "Деактивиране на хардуерното ускорение",
|
||||
"hardwareAccelerationWarn": "Автоматичното рестартиране",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Теми",
|
||||
"popup": "Известие с изскачащ прозорец (за Windows)",
|
||||
"popupwarn": "Скрито ако е зададено на „0“",
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
"lang_parse_html": "Show embed HTML",
|
||||
"lang_parse_notffilter": "Show this user's notifications",
|
||||
"lang_parse_hidden": "Unvisible quoted toot",
|
||||
"lang_parse_disconnected": "Streaming has been disconnected(retry after 3s)",
|
||||
"lang_misskeyparse_renote": "Repost",
|
||||
"lang_misskeyparse_renoteqt": "Renote",
|
||||
"lang_misskeyparse_reaction": "Reaction",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Změnit",
|
||||
"select": "Vybrat",
|
||||
"exec": "Exec",
|
||||
"env": "Systémové předvolby",
|
||||
"setlang": "Jazyky",
|
||||
"backup": "Import a export předvoleb",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Motivy",
|
||||
"popup": "Popupová oznámení (na Windows)",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Standard",
|
||||
"change": "Ändern",
|
||||
"select": "Auswahl",
|
||||
"exec": "Exec",
|
||||
"env": "Systemeinstellungen",
|
||||
"setlang": "Sprachen",
|
||||
"backup": "Import und Export von Einstellungen",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Exportieren",
|
||||
"hardwareAcceleration": "Hardwarebeschleunigung deaktivieren",
|
||||
"hardwareAccelerationWarn": "Automatischer Neustart",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Designs",
|
||||
"popup": "Popup-Benachrichtigung(unter Windows)",
|
||||
"popupwarn": "Bei \"0\" Ausgeschaltet.",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "crwdns3918:0crwdne3918:0",
|
||||
"change": "crwdns3920:0crwdne3920:0",
|
||||
"select": "crwdns3922:0crwdne3922:0",
|
||||
"exec": "crwdns4576:0crwdne4576:0",
|
||||
"env": "crwdns3924:0crwdne3924:0",
|
||||
"setlang": "crwdns3926:0crwdne3926:0",
|
||||
"backup": "crwdns3928:0crwdne3928:0",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "crwdns3932:0crwdne3932:0",
|
||||
"hardwareAcceleration": "crwdns3934:0crwdne3934:0",
|
||||
"hardwareAccelerationWarn": "crwdns3936:0crwdne3936:0",
|
||||
"webview": "crwdns4578:0crwdne4578:0",
|
||||
"webviewWarn": "crwdns4580:0crwdne4580:0",
|
||||
"theme": "crwdns3938:0crwdne3938:0",
|
||||
"popup": "crwdns3940:0crwdne3940:0",
|
||||
"popupwarn": "crwdns3942:0crwdne3942:0",
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
"openBrowser":"Open in browser",
|
||||
"screenshot":"Take a screenshot",
|
||||
"copyURL":"Copy the URL",
|
||||
"copy":"Copy",
|
||||
"embed":"Embed",
|
||||
"toots":"Toots",
|
||||
"follow":"Follow",
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
@@ -70,6 +72,7 @@
|
||||
"desc": "About this theme",
|
||||
"customImport": "Import of custom themes",
|
||||
"delete": "Delete",
|
||||
"preview": "Preview",
|
||||
"timeline": "Timeline Preferences",
|
||||
"timemode": "Time format",
|
||||
"relativetime": "Relative format:\"1 minutes ago\",\"3 days ago\"",
|
||||
@@ -117,6 +120,7 @@
|
||||
"remote_imgWarn": "All previews are got from your loginned cache server.",
|
||||
"moreContextMode": "Context Tool",
|
||||
"moreContextModeWarn": "On detail of the toot modal, show toots before / after the toot on LTL, FTL, UTL",
|
||||
"smallHeader": "Minimize column headers",
|
||||
"replySound": "Sound(Reply)",
|
||||
"favSound": "Sound(Fav)",
|
||||
"btSound": "Sound(Boost)",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Predeterminado",
|
||||
"change": "Cambiar",
|
||||
"select": "Seleccionar",
|
||||
"exec": "Exec",
|
||||
"env": "Configuración del sistema",
|
||||
"setlang": "Idiomas",
|
||||
"backup": "Importación y exportación de la configuración",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Exportar",
|
||||
"hardwareAcceleration": "Deshabilitar la aceleración por hardware",
|
||||
"hardwareAccelerationWarn": "Inicio automático",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Temas",
|
||||
"popup": "Ventana emergente de notificaciones (en Windows)",
|
||||
"popupwarn": "Establecer \"0\" para ocultar",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Cambiar",
|
||||
"select": "Seleccionar",
|
||||
"exec": "Exec",
|
||||
"env": "Preferencias del sistema",
|
||||
"setlang": "Idiomas",
|
||||
"backup": "Importación y exportación de la configuración",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Exportar",
|
||||
"hardwareAcceleration": "Deshabilitar la aceleración por hardware",
|
||||
"hardwareAccelerationWarn": "Reinicio automático",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Temas",
|
||||
"popup": "Notificación emergente (en Windows)",
|
||||
"popupwarn": "Ocultar para establecer \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Par défaut",
|
||||
"change": "Modifier",
|
||||
"select": "Sélectionner",
|
||||
"exec": "Exec",
|
||||
"env": "Préférences système",
|
||||
"setlang": "Langues",
|
||||
"backup": "Importer et exporter les préférences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Exporter",
|
||||
"hardwareAcceleration": "Désactiver l'accélération matérielle",
|
||||
"hardwareAccelerationWarn": "Redémarrage Automatique",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Thèmes",
|
||||
"popup": "Notification pop-up",
|
||||
"popupwarn": "\"0\" pour cacher",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Predefinito",
|
||||
"change": "Cambia",
|
||||
"select": "Seleziona",
|
||||
"exec": "Exec",
|
||||
"env": "Preferenze Di Sistema",
|
||||
"setlang": "Lingue",
|
||||
"backup": "Importazione ed esportazione delle preferenze",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Esporta",
|
||||
"hardwareAcceleration": "Disabilita accelerazione hardware",
|
||||
"hardwareAccelerationWarn": "Riavvio automatico",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Temi",
|
||||
"popup": "Notifica popup",
|
||||
"popupwarn": "Nascondi per impostare \"0\"",
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
"openBrowser":"ブラウザで開く",
|
||||
"screenshot":"スクリーンショット",
|
||||
"copyURL":"URLをコピー",
|
||||
"copy":"コピー",
|
||||
"embed":"埋め込む",
|
||||
"toots":"トゥート",
|
||||
"follow":"フォロー",
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
"export": "エクスポート",
|
||||
"hardwareAcceleration": "ハードウェアアクセラレーションの無効化",
|
||||
"hardwareAccelerationWarn": "表示(特に設定画面)があかんときは「はい」を選んでな。再起動入るで。",
|
||||
"webview": "Webviewの使用",
|
||||
"webviewWarn": "TweetDeck使いたかったら「はい」にしてほしいんやけど、セキュリティ的には結構あかんやつやから、使わんのやったらちゃんと「いいえ」にしといてな。再起動入るで。",
|
||||
"theme": "テーマの設定",
|
||||
"popup": "新規通知のポップアップお知らせの表示秒数",
|
||||
"popupwarn": "0にしたら出さへん",
|
||||
@@ -68,6 +70,7 @@
|
||||
"name": "名前",
|
||||
"desc": "説明",
|
||||
"customImport": "カスタムテーマのインポート",
|
||||
"preview": "プレビュー",
|
||||
"delete": "削除",
|
||||
"timeline": "タイムラインの設定",
|
||||
"timemode": "時間表記設定",
|
||||
@@ -116,6 +119,7 @@
|
||||
"remote_imgWarn": "プレビューはログインサーバーのキャッシュからどちらにしろ取得する。ビューワーのみに適用されるで。",
|
||||
"moreContextMode": "コンテキストツール",
|
||||
"moreContextModeWarn": "トゥート詳細の、トゥート前後のトゥートを表示する機能",
|
||||
"smallHeader": "カラムのヘッダーの高さを小さくする",
|
||||
"replySound": "リプライの通知音",
|
||||
"favSound": "お気に入り登録の通知音",
|
||||
"btSound": "ブーストの通知音",
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
"openBrowser":"ブラウザで開く",
|
||||
"screenshot":"スクリーンショット",
|
||||
"copyURL":"URLをコピー",
|
||||
"copy":"コピー",
|
||||
"embed":"埋め込む",
|
||||
"toots":"トゥート",
|
||||
"follow":"フォロー",
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"export": "エクスポート",
|
||||
"hardwareAcceleration": "ハードウェアアクセラレーションの無効化",
|
||||
"hardwareAccelerationWarn": "表示(特に設定画面)が乱れる場合に「はい」を選択してください。自動で再起動します。",
|
||||
"webview": "Webviewの使用",
|
||||
"webviewWarn": "TweetDeckを埋め込むために必要です。セキュリティに影響するため、使用しないときは「いいえ」を選択してください。自動で再起動します。",
|
||||
"theme": "テーマの設定",
|
||||
"popup": "新規通知のポップアップお知らせの表示秒数",
|
||||
"popupwarn": "0に設定すると表示されません",
|
||||
@@ -70,6 +72,7 @@
|
||||
"desc": "説明",
|
||||
"customImport": "カスタムテーマのインポート",
|
||||
"delete": "削除",
|
||||
"preview": "プレビュー",
|
||||
"timeline": "タイムラインの設定",
|
||||
"timemode": "時間表記設定",
|
||||
"relativetime": "相対時間の例:\"1分前\",\"3日前\"",
|
||||
@@ -115,6 +118,7 @@
|
||||
"markerswarn": "Mastodon 3.0相当以上。WebUIと対応クライアントで共有されます。",
|
||||
"remote_img": "画像をリモートから取得",
|
||||
"remote_imgWarn": "プレビューはログインサーバーのキャッシュから取得されます。ビューワーのみに適用されます。",
|
||||
"smallHeader": "カラムのヘッダーの高さを小さくする",
|
||||
"replySound": "リプライの通知音",
|
||||
"favSound": "お気に入り登録の通知音",
|
||||
"btSound": "ブーストの通知音",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Standard",
|
||||
"change": "Endre",
|
||||
"select": "Velg",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Språk",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Eksporter",
|
||||
"hardwareAcceleration": "Slå av maskinvareakselerasjon",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Temaer",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Zmień",
|
||||
"select": "Wybierz",
|
||||
"exec": "Exec",
|
||||
"env": "Ustawienia systemowe",
|
||||
"setlang": "Języki",
|
||||
"backup": "Import i eksport preferencji",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Eksport",
|
||||
"hardwareAcceleration": "Wyłącz przyspieszanie sprzętowe",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Motywy",
|
||||
"popup": "Wyskakujące powiadomienia",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Padrão",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Изменить",
|
||||
"select": "Выбрать",
|
||||
"exec": "Exec",
|
||||
"env": "Системные настройки",
|
||||
"setlang": "Языки",
|
||||
"backup": "Импорт и экспорт предпочтений",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Экспорт",
|
||||
"hardwareAcceleration": "Отключить аппаратное ускорение",
|
||||
"hardwareAccelerationWarn": "Автоперезапуск",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Темы",
|
||||
"popup": "Всплывающие уведомления (на Windows)",
|
||||
"popupwarn": "Скрыть для установки \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "තෝරන්න",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "භාෂාව",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "තේමාවන්",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "Default",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "默认",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification(on Windows)",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"default": "預設",
|
||||
"change": "Change",
|
||||
"select": "Select",
|
||||
"exec": "Exec",
|
||||
"env": "System Preferences",
|
||||
"setlang": "Languages",
|
||||
"backup": "Import and export of preferences",
|
||||
@@ -17,6 +18,8 @@
|
||||
"export": "Export",
|
||||
"hardwareAcceleration": "Disable hardware acceleration",
|
||||
"hardwareAccelerationWarn": "Auto restarted",
|
||||
"webview": "Webview Integration",
|
||||
"webviewWarn": "To use TweetDeck Integration, please turn on. You should understand it may lessen security level.",
|
||||
"theme": "Themes",
|
||||
"popup": "Popup notification",
|
||||
"popupwarn": "Hide to set \"0\"",
|
||||
|
||||
2
app/view/make/make.d.ts
vendored
Normal file
2
app/view/make/make.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export = construct;
|
||||
declare function construct(ver: any, basefile: any, pwa: any, store: any): void;
|
||||
@@ -1,35 +1,13 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const basefile = path.join(__dirname, '../../')
|
||||
const package = fs.readFileSync(basefile + 'package.json')
|
||||
const data = JSON.parse(package)
|
||||
const version = data.version
|
||||
const codename = data.codename
|
||||
let ver = `${version} (${codename})`
|
||||
if (process.argv.indexOf('--automatic') === -1) {
|
||||
let input = require('readline-sync').question('version string [empty: ' + ver + ' (default)]? ')
|
||||
if (input) {
|
||||
ver = input
|
||||
}
|
||||
}
|
||||
var pwa = false
|
||||
if (process.argv.indexOf('--pwa') > 0) {
|
||||
var pwa = true
|
||||
}
|
||||
var store = false
|
||||
if (process.argv.indexOf('--store') > 0) {
|
||||
var store = true
|
||||
}
|
||||
|
||||
function main(ver, basefile, pwa, store) {
|
||||
function construct(ver, basefile, pwa, store) {
|
||||
const execSync = require('child_process').execSync
|
||||
let gitHash = execSync('git rev-parse HEAD')
|
||||
.toString()
|
||||
.trim()
|
||||
fs.writeFileSync(basefile + 'git', gitHash)
|
||||
console.log('Constructing view files ' + ver)
|
||||
const langs = ['ja', 'ja-KS', 'en', 'bg', 'cs', 'de',
|
||||
'es-AR', 'it-IT', 'zh-CN', 'zh-TW', 'fr-FR', 'no-NO', 'pt-BR', 'ru-RU', 'es-ES','pl-PL', 'ps']
|
||||
'es-AR', 'it-IT', 'zh-CN', 'fr-FR', 'zh-TW', 'no-NO', 'pt-BR', 'ru-RU', 'es-ES','pl-PL', 'ps']
|
||||
const langsh = [
|
||||
'日本語',
|
||||
'日本語(関西)',
|
||||
@@ -172,23 +150,4 @@ function main(ver, basefile, pwa, store) {
|
||||
}
|
||||
}
|
||||
}
|
||||
main(ver, basefile, pwa, store)
|
||||
|
||||
//if --watch, to yarn dev
|
||||
if (process.argv.indexOf('--watch') !== -1) {
|
||||
const chokidar = require('chokidar')
|
||||
console.log(
|
||||
'watch mode(not hot-watch): when construction files are changed, refresh view files but not reload. Please reload manually.'
|
||||
)
|
||||
const watcher = chokidar.watch(basefile + 'view/make', {
|
||||
ignored: 'view/make/make.js',
|
||||
persistent: true
|
||||
})
|
||||
watcher.on('ready', function () {
|
||||
console.log('watching...')
|
||||
watcher.on('change', function (path) {
|
||||
console.log(path + ' changed.')
|
||||
main(ver, basefile)
|
||||
})
|
||||
})
|
||||
}
|
||||
module.exports = construct
|
||||
44
app/view/make/makeCli.js
Normal file
44
app/view/make/makeCli.js
Normal file
@@ -0,0 +1,44 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const construct = require('./make.js')
|
||||
const basefile = path.join(__dirname, '../../')
|
||||
const package = fs.readFileSync(basefile + 'package.json')
|
||||
const data = JSON.parse(package)
|
||||
const version = data.version
|
||||
const codename = data.codename
|
||||
let ver = `${version} (${codename})`
|
||||
if (process.argv.indexOf('--prompt') != -1) {
|
||||
let input = require('readline-sync').question('version string [empty: ' + ver + ' (default)]? ')
|
||||
if (input) {
|
||||
ver = input
|
||||
}
|
||||
}
|
||||
var pwa = false
|
||||
if (process.argv.indexOf('--pwa') > 0) {
|
||||
var pwa = true
|
||||
}
|
||||
var store = false
|
||||
if (process.argv.indexOf('--store') > 0) {
|
||||
var store = true
|
||||
}
|
||||
|
||||
construct(ver, basefile, pwa, store)
|
||||
|
||||
//if --watch, to yarn dev
|
||||
if (process.argv.indexOf('--watch') !== -1) {
|
||||
const chokidar = require('chokidar')
|
||||
console.log(
|
||||
'watch mode(not hot-watch): when construction files are changed, refresh view files but not reload. Please reload manually.'
|
||||
)
|
||||
const watcher = chokidar.watch(basefile + 'view/make', {
|
||||
ignored: 'view/make/make.js',
|
||||
persistent: true
|
||||
})
|
||||
watcher.on('ready', function () {
|
||||
console.log('watching...')
|
||||
watcher.on('change', function (path) {
|
||||
console.log(path + ' changed.')
|
||||
construct(ver, basefile)
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -15,6 +15,8 @@
|
||||
<link href="../../css/themes.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../css/pickr.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../css/master.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../css/tl.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../css/sweetalert2-material.min.css" type="text/css" rel="stylesheet">
|
||||
<link href="../../@@node_base@@/@fortawesome/fontawesome-free/css/all.min.css" type="text/css" rel="stylesheet">
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
@@ -42,7 +44,7 @@
|
||||
<script src="../../@@node_base@@/json5/dist/index.min.js"></script>
|
||||
<script src="../../@@node_base@@/vue/dist/vue.min.js"></script>
|
||||
<script type="text/javascript" src="setting.vue.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.all.min.js"></script>
|
||||
<script type="text/javascript" src="../../@@node_base@@/sweetalert2/dist/sweetalert2.min.js"></script>
|
||||
<script>function renderMem() { return false; }</script>
|
||||
|
||||
<h4>@@setting@@</h4>
|
||||
@@ -287,6 +289,7 @@
|
||||
<input type="color" id="color-picker13_value">
|
||||
</div>
|
||||
</div><br /><br />
|
||||
<button class="btn waves-effect blue" onclick="customComp(true)">@@preview@@</button><br /><br />
|
||||
<button class="btn-large waves-effect" onclick="customComp()">@@change@@</button> <button
|
||||
class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">@@delete@@</button><br><br>
|
||||
<input type="text" style="width:22rem;height:40px;" id="custom_json" class="materialize-textarea"
|
||||
@@ -295,6 +298,84 @@
|
||||
<input type="text" style="width:22rem;height:40px;" id="custom_import" class="materialize-textarea"
|
||||
placeholder="JSON/JSON5 style">
|
||||
<button class="btn waves-effect" onclick="customImp()">@@import@@</button><br>
|
||||
<h4>@@preview@@</h4>
|
||||
<div style="max-width: 500px" class="cvo">
|
||||
<div class="area-notice grid"><span class="gray sharesta"><span class=" pointer big-text "><i class="fas fa-filter">
|
||||
</i></span>
|
||||
<span class="cbadge cbadge-hover"><i class="far fa-clock"></i>
|
||||
0:00:00
|
||||
</span>
|
||||
<i class="big-text fas fa-star yellow-text"></i>
|
||||
<a class="pointer grey-text">
|
||||
TheDesk(@thedesk@b.thedesk.tld)
|
||||
</a></span></div>
|
||||
<div class="area-icon grid">
|
||||
<a user="thedesk" class="udg">
|
||||
<img draggable="false" src="../../img/desk.svg" width="40" class="prof-img" user="TheDesk"
|
||||
onerror="this.src='../../img/loading.svg'" alt="" loading="lazy">
|
||||
</a>
|
||||
<a user="Cutls@misskey.io" class="udg">
|
||||
<img draggable="false" src="../../img/desk.svg" width="20" class="notf-icon prof-img" user="TheDesk" alt=""
|
||||
loading="lazy">
|
||||
</a>
|
||||
</div>
|
||||
<div class="area-display_name grid">
|
||||
<div class="flex-name">
|
||||
<span class="user">TheDesk<img class="emoji" draggable="false" alt="👀" src="https://twemoji.maxcdn.com/v/13.0.2/72x72/1f440.png"></span>
|
||||
<span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; cursor:text;">
|
||||
@thedesk@a.thedesk.tld <i class="fas fa-lock red-text"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex-time">
|
||||
<span class="cbadge cbadge-hover pointer waves-effect">
|
||||
<i class="far fa-clock"></i>0:00:00
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="area-toot grid">
|
||||
<div class="toot ">
|
||||
<p>Toot</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="area-vis grid"><span><i class="text-darken-3 material-icons gray sml vis-data pointer">
|
||||
public
|
||||
</i></span></div>
|
||||
<div class="area-actions grid">
|
||||
<div class="action type-a ">
|
||||
<a class="waves-effect waves-dark btn-flat actct rep-btn" style="padding:0">
|
||||
<i class="fas fa-share"></i>
|
||||
<span class="rep_ct">1</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="action type-a ">
|
||||
<a class="waves-effect waves-dark btn-flat actct bt-btn" style="padding:0">
|
||||
<i class="fas fa-retweet"></i>
|
||||
<span class="rt_ct">0</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="action type-a ">
|
||||
<a class="waves-effect waves-dark btn-flat actct fav-btn" style="padding:0">
|
||||
<i class="fas text-darken-3 fa-star"></i>
|
||||
<span class="fav_ct">1</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="area-side">
|
||||
<div class="action ">
|
||||
<a onclick="toggleAction(this)" data-target="dropdown_0ugtorxe"
|
||||
class="ctxMenu waves-effect waves-dark btn-flat" style="padding:0" id="trigger_0ugtorxe">
|
||||
<i class="text-darken-3 material-icons act-icon" aria-hidden="true">expand_more</i>
|
||||
<span class="voice">Other actions</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="action ">
|
||||
<a class="waves-effect waves-dark btn-flat details " style="padding:0">
|
||||
<i class="text-darken-3 material-icons" aria-hidden="true">menu_open</i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<div class="collapsible-header">
|
||||
@@ -405,7 +486,7 @@
|
||||
style="height: 1.5rem; margin-left: 0.4rem; margin-right: 0.4rem;">@@plugin@@
|
||||
</div>
|
||||
<div class="collapsible-body">
|
||||
<a href="https://github.com/cutls/TheDesk/blob/master/plugin.md">@@howToWritePlugin@@</a><br />
|
||||
<a href="https://github.com/cutls/TheDesk/wiki/プラグイン">@@howToWritePlugin@@</a><br />
|
||||
<div id="plugin" data-id="add_new" style="height: 600px"></div>
|
||||
<button class="btn waves-effect" style="width:7.7rem;" onclick="completePlugin()">@@change@@</button>
|
||||
<button class="btn waves-effect red disabled plugin_delete" style="width:7.7rem;"
|
||||
|
||||
@@ -154,6 +154,26 @@ var envConstruction = [
|
||||
desc: '@@useragentWarn@@'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'webview',
|
||||
storage: 'webview_setting',
|
||||
checkbox: true,
|
||||
setValue: false,
|
||||
text: {
|
||||
head: '@@webview@@',
|
||||
desc: '@@webviewWarn@@',
|
||||
checkbox: [
|
||||
{
|
||||
text: '@@yes@@',
|
||||
value: 'true'
|
||||
},
|
||||
{
|
||||
text: '@@no@@',
|
||||
value: 'false'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'srcUrl',
|
||||
storage: 'srcUrl',
|
||||
@@ -464,6 +484,17 @@ var tlConstruction = [
|
||||
checkbox: yesno
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'small-header',
|
||||
storage: 'smallHeader',
|
||||
checkbox: true,
|
||||
setValue: 'no',
|
||||
text: {
|
||||
head: '@@smallHeader@@',
|
||||
desc: '',
|
||||
checkbox: yesno
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'replySound',
|
||||
storage: 'replySound',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user