初次提交
46
.github/workflows/publish.yml
vendored
@ -1,11 +1,38 @@
|
||||
name: "publish"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release
|
||||
tags:
|
||||
- 'v*' # 推送事件匹配 v*, 例如 v1.0,v20.15.10 等来触发工作流
|
||||
|
||||
jobs:
|
||||
# 任务:创建 release 版本
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# 查询版本号(tag)
|
||||
- name: Query version number
|
||||
id: get_version
|
||||
shell: bash
|
||||
run: |
|
||||
echo "using version tag ${GITHUB_REF:10}"
|
||||
echo ::set-output name=version::"${GITHUB_REF:10}"
|
||||
|
||||
# 根据查询到的版本号创建 release
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: '${{ steps.get_version.outputs.VERSION }}'
|
||||
release_name: '唐僧叨叨 ${{ steps.get_version.outputs.VERSION }}'
|
||||
body: 'See the assets to download this version and install.'
|
||||
publish-tauri:
|
||||
needs: create-release
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -29,14 +56,15 @@ jobs:
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: install app dependencies and build it
|
||||
run: yarn && yarn build
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
- uses: tauri-apps/tauri-action@v0.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} # 密钥,需要提前配置在 Github Secrets中
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_PRIVATE_KEY_PASSWORD }} # 密钥的加密文本,与ssh-keygen时输入的密码一致即可。 需要提前配置在 Github Secrets中
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} # 密钥的加密文本,与ssh-keygen时输入的密码一致即可。 需要提前配置在 Github Secrets中
|
||||
with:
|
||||
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
|
||||
releaseName: "v__VERSION__"
|
||||
releaseBody: "See the assets to download this version and install."
|
||||
releaseDraft: true # 不需要 draft 的可以改成 false
|
||||
prerelease: false
|
||||
releaseId: ${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}
|
||||
# tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
|
||||
# releaseName: "v__VERSION__"
|
||||
# releaseBody: "See the assets to download this version and install."
|
||||
# releaseDraft: true # 不需要 draft 的可以改成 false
|
||||
# prerelease: false
|
||||
|
8
Makefile
@ -1,6 +1,6 @@
|
||||
build:
|
||||
docker build -t tsdaodaoweb .
|
||||
docker build -t tangsengdaodaoweb .
|
||||
deploy:
|
||||
docker build -t tsdaodaoweb .
|
||||
docker tag tsdaodaoweb registry.cn-shanghai.aliyuncs.com/wukongim/tsdaodaoweb:latest
|
||||
docker push registry.cn-shanghai.aliyuncs.com/wukongim/tsdaodaoweb:latest
|
||||
docker build -t tangsengdaodaoweb .
|
||||
docker tag tangsengdaodaoweb registry.cn-shanghai.aliyuncs.com/wukongim/tangsengdaodaoweb:latest
|
||||
docker push registry.cn-shanghai.aliyuncs.com/wukongim/tangsengdaodaoweb:latest
|
@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
## 运行
|
||||
|
||||
1. yarn install
|
||||
@ -37,7 +39,7 @@ yarn tauri build --target universal-apple-darwin (通用架构,生成可在 Ap
|
||||
icon生成
|
||||
|
||||
```
|
||||
npx @tauri-apps/tauricon [ICON-PATH]
|
||||
tauri icon [ICON-PATH]
|
||||
```
|
||||
|
||||
准备一张1024x1024的icon 执行上面命令 即可生成各种尺寸的icon
|
||||
@ -65,7 +67,7 @@ tauri signer generate -w ~/.tauri/tsdaodao.key
|
||||
|
||||
上面 的命令会自动生成一个公钥、私钥对。公钥可以公开分享,私钥必须严密保存。
|
||||
|
||||
在Github Secrets中 配置 TAURI_PRIVATE_KEY 和 TAURI_PRIVATE_KEY_PASSWORD
|
||||
在Github Secrets中 配置 TAURI_PRIVATE_KEY 和 TAURI_KEY_PASSWORD
|
||||
|
||||
|
||||
(参考:https://www.banyudu.com/posts/tauri-version-release-and-update-guide)
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 71 KiB |
@ -6,7 +6,6 @@
|
||||
|
||||
mod menu;
|
||||
|
||||
|
||||
fn main() {
|
||||
let context = tauri::generate_context!();
|
||||
tauri::Builder::default()
|
||||
|
@ -7,7 +7,7 @@
|
||||
"distDir": "../build"
|
||||
},
|
||||
"package": {
|
||||
"productName": "唐僧叨叨",
|
||||
"productName": "tangsegndaodao",
|
||||
"version": "../package.json"
|
||||
},
|
||||
"tauri": {
|
||||
@ -68,7 +68,7 @@
|
||||
"https://api.githubim.com/v1/common/updater/{{target}}/{{current_version}}"
|
||||
],
|
||||
"dialog": false,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEVGMTY1NjkzNzE1ODk0RTQKUldUa2xGaHhrMVlXN3lpSUNSazBqcVNTWFRnUWFrVHZKOHN2SUdKaWgzRXBYRGtvQVlkcWdzN3oK"
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOTBCMTNGNDczQTEzREIKUldUYkV6cEhQN0dRMGd2MWkzdUNMTmlhRXVWbXluamlDSUlVajFWK0p5YXAwanJDREhyajJNclIK"
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
13
apps/web/src/App/assets/ContactsTab.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>address book_02</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-91.000000, -149.000000)">
|
||||
<g id="编组-8" transform="translate(91.000000, 149.000000)">
|
||||
<rect id="Rectangle-5-Copy-4" stroke="#F3CDC2" stroke-width="2" fill-rule="nonzero" x="5.88461538" y="3" width="17.2307692" height="21" rx="2"></rect>
|
||||
<path d="" id="形状结合" stroke="#F3CDC2" fill="#F3CDC2" fill-rule="nonzero"></path>
|
||||
<rect id="矩形备份-5" fill="#FFFFFF" opacity="0" x="0" y="0" width="26" height="26"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 881 B |
Before Width: | Height: | Size: 6.4 KiB |
19
apps/web/src/App/assets/ContactsTabSelected.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>address book_01</title>
|
||||
<defs>
|
||||
<linearGradient x1="96.2278107%" y1="100%" x2="3.77218935%" y2="0%" id="linearGradient-1">
|
||||
<stop stop-color="#FF5A33" offset="0%"></stop>
|
||||
<stop stop-color="#FFA98C" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-91.000000, -107.000000)">
|
||||
<g id="编组-8" transform="translate(91.000000, 107.000000)">
|
||||
<path d="M22.1153846,2 C23.2199541,2 24.1153846,2.8954305 24.1153846,4 L24.1153846,23 C24.1153846,24.1045695 23.2199541,25 22.1153846,25 L6.88461538,25 C5.78004588,25 4.88461538,24.1045695 4.88461538,23 L4.884,20.208 L2.95833333,20.2083333 C2.42906045,20.2083333 2,19.7792729 2,19.25 C2,18.7207271 2.42906045,18.2916667 2.95833333,18.2916667 L4.884,18.291 L4.884,14.458 L2.95833333,14.4583333 C2.42906045,14.4583333 2,14.0292729 2,13.5 C2,12.9707271 2.42906045,12.5416667 2.95833333,12.5416667 L4.884,12.541 L4.884,8.708 L2.95833333,8.70833333 C2.42906045,8.70833333 2,8.27927289 2,7.75 C2,7.22072711 2.42906045,6.79166667 2.95833333,6.79166667 L4.884,6.791 L4.88461538,4 C4.88461538,2.8954305 5.78004588,2 6.88461538,2 L22.1153846,2 Z" id="形状结合" fill="url(#linearGradient-1)"></path>
|
||||
<rect id="矩形" fill="#FFFFFF" opacity="0.8" x="17.0384615" y="8.19230769" width="1.76923077" height="10.6153846" rx="0.884615385"></rect>
|
||||
<rect id="矩形备份-4" fill="#FFFFFF" opacity="0" x="0" y="0" width="26" height="26"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.6 KiB |
12
apps/web/src/App/assets/HomeTab.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>home_02</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-33.000000, -149.000000)">
|
||||
<g id="Group-15-Copy" transform="translate(33.000000, 149.000000)">
|
||||
<path d="M13.5,3 C16.3994949,3 19.0244949,4.17525253 20.9246212,6.0753788 C22.8247475,7.97550506 24,10.6005051 24,13.5 C24,16.3994949 22.8247475,19.0244949 20.9246212,20.9246212 C19.0244949,22.8247475 16.3994949,24 13.5,24 C12.0729495,24 10.7123067,23.7156187 9.47191784,23.1998793 C9.19285754,23.0838492 8.27714111,22.9945143 7.20546167,22.9409959 L7.20546167,22.9409959 L6.27074653,22.8910664 C5.45798319,22.8420233 4.53788674,22.9244189 4.32596956,22.7136211 C4.02141915,22.4106793 4.13193508,20.8897627 4.07191065,19.7760028 C4.0147968,18.7162488 3.92323065,17.8222156 3.80996404,17.5516744 C3.2880036,16.3049542 3,14.9361036 3,13.5 C3,10.6005051 4.17525253,7.97550506 6.0753788,6.0753788 C7.97550506,4.17525253 10.6005051,3 13.5,3 Z" id="Oval-14" stroke="#F3CDC2" stroke-width="2"></path>
|
||||
<rect id="矩形备份-7" fill="#FFFFFF" opacity="0" x="0" y="0" width="26" height="26"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 4.2 KiB |
19
apps/web/src/App/assets/HomeTabSelected.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>home_01</title>
|
||||
<defs>
|
||||
<linearGradient x1="100%" y1="100%" x2="0%" y2="0%" id="linearGradient-1">
|
||||
<stop stop-color="#FF5A33" offset="0%"></stop>
|
||||
<stop stop-color="#FFA98C" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-33.000000, -106.000000)">
|
||||
<g id="Group-15-Copy" transform="translate(33.000000, 106.000000)">
|
||||
<path d="M13.5,25 C19.8512746,25 25,19.8512746 25,13.5 C25,7.14872538 19.8512746,2 13.5,2 C7.14872538,2 2,7.14872538 2,13.5 C2,15.073038 2.31583219,16.5723095 2.88754349,17.9378613 C3.13929263,18.5391727 3.01561889,22.8206752 3.62073765,23.4225978 C4.2099763,24.0087241 8.47546922,23.8685633 9.08799349,24.1232438 C10.4466062,24.6881394 11.9368836,25 13.5,25 Z" id="Oval-14" fill="url(#linearGradient-1)"></path>
|
||||
<path d="M10.8461538,16.1538462 C10.8461538,17.6195249 12.0343212,18.8076923 13.5,18.8076923 C14.9656788,18.8076923 16.1538462,17.6195249 16.1538462,16.1538462" id="Oval-2" stroke="#FFFFFF" stroke-width="2" opacity="0.804848" stroke-linecap="round" stroke-linejoin="round" fill-rule="nonzero"></path>
|
||||
<rect id="矩形备份-6" fill="#FFFFFF" opacity="0" x="0" y="0" width="26" height="26"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
@ -25,8 +25,8 @@ function registerMenus() {
|
||||
|
||||
WKApp.menus.register("chat", (context) => {
|
||||
const m = new Menus("chat", "/", "会话",
|
||||
<img alt='会话' src={require("./assets/HomeTab.png").default}></img>,
|
||||
<img alt='会话' src={require("./assets/HomeTabSelected.png").default}></img>)
|
||||
<img alt='会话' src={require("./assets/HomeTab.svg").default}></img>,
|
||||
<img alt='会话' src={require("./assets/HomeTabSelected.svg").default}></img>)
|
||||
let badge = 0
|
||||
for (const conversation of WKSDK.shared().conversationManager.conversations) {
|
||||
if (!conversation.channelInfo?.mute) {
|
||||
@ -39,8 +39,8 @@ function registerMenus() {
|
||||
|
||||
WKApp.menus.register("contacts", (param) => {
|
||||
const m = new Menus("contacts", "/contacts", "通讯录",
|
||||
<img alt='通讯录' src={require("./assets/ContactsTab.png").default}></img>,
|
||||
<img alt='通讯录' src={require("./assets/ContactsTabSelected.png").default}></img>)
|
||||
<img alt='通讯录' src={require("./assets/ContactsTab.svg").default}></img>,
|
||||
<img alt='通讯录' src={require("./assets/ContactsTabSelected.svg").default}></img>)
|
||||
|
||||
m.badge = WKApp.shared.getFriendApplysUnreadCount()
|
||||
return m
|
||||
|
@ -79,53 +79,4 @@ export class MainPage extends Component {
|
||||
|
||||
</Provider>
|
||||
}
|
||||
|
||||
// render() {
|
||||
// return <Provider create={() => {
|
||||
// return new MainVM()
|
||||
// }} render={(vm: MainVM) => {
|
||||
// return <div className="wk-main">
|
||||
// <div className="wk-main-sider">
|
||||
// <ul className="wk-main-sider-content">
|
||||
// <li className="wk-main-sider-avatar">
|
||||
// <img alt="" src={WKApp.shared.avatarUser(WKApp.loginInfo.uid || "")}></img>
|
||||
// </li>
|
||||
// {
|
||||
// vm.menusList.map((menus: Menus) => {
|
||||
// return <li className="wk-main-sider-item" title={menus.title} key={menus.id} onClick={() => {
|
||||
// vm.currentMenus = menus
|
||||
// if(menus.onPress) {
|
||||
// menus.onPress()
|
||||
// }else{
|
||||
// WKApp.route.push(menus.routePath)
|
||||
// }
|
||||
|
||||
// }}>
|
||||
// {
|
||||
// menus.id === vm.currentMenus?.id ? menus.selectedIcon : menus.icon
|
||||
// }
|
||||
// </li>
|
||||
// })
|
||||
// }
|
||||
// <li className={classnames("wk-main-sider-setting",vm.settingSelected?"collapsed":undefined)} onClick={()=>{
|
||||
// vm.settingSelected = !vm.settingSelected
|
||||
// }}>
|
||||
// <span className="wk-sider-setting-position-re wk-icon-bar"></span>
|
||||
// <span className="wk-icon-bar"></span>
|
||||
// <span className="wk-sider-setting-position-re wk-icon-bar"></span>
|
||||
// </li>
|
||||
// </ul>
|
||||
// <ul className={classnames("wk-sider-setting-list",vm.settingSelected?"open":undefined)}>
|
||||
// <li>检查版本更新</li>
|
||||
// <li>关闭桌面通知</li>
|
||||
// <li>退出登录</li>
|
||||
// </ul>
|
||||
// </div>
|
||||
// <div className="wk-main-content">
|
||||
// {WKApp.shared.content||""}
|
||||
// </div>
|
||||
// </div>
|
||||
// }}></Provider>
|
||||
// }
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
.wk-main-sider-avatar {
|
||||
margin-top: 50px;
|
||||
margin-top: 10px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
@ -29,7 +29,7 @@
|
||||
.wk-main-sider-avatar img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
border-radius: 40%;
|
||||
}
|
||||
|
||||
.wk-main-sider-item {
|
||||
|
@ -1,22 +0,0 @@
|
||||
|
||||
.titlebar {
|
||||
height: 30px;
|
||||
background: #329ea3;
|
||||
user-select: none;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.titlebar-button {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.titlebar-button:hover {
|
||||
background: #5bbec3;
|
||||
}
|
@ -9,7 +9,7 @@ import { DataSourceModule } from '@tsdaodao/datasource';
|
||||
import {ContactsModule} from '@tsdaodao/contacts';
|
||||
|
||||
|
||||
WKApp.apiClient.config.apiURL = "https://chatapi.githubim.com/v1/"
|
||||
WKApp.apiClient.config.apiURL = "https://api.botgate.cn/v1/"
|
||||
// WKApp.apiClient.config.apiURL = "/api/v1/" // 正式环境地址 (通用打包镜像,用此相对地址)
|
||||
WKApp.apiClient.config.tokenCallback = ()=> {
|
||||
return WKApp.loginInfo.token
|
||||
|
@ -8,6 +8,7 @@ gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
@ -27,30 +27,30 @@ export enum ThemeMode {
|
||||
}
|
||||
export class WKConfig {
|
||||
appName: string = "唐僧叨叨"
|
||||
appVersion:string = "0.0.0" // app版本
|
||||
appVersion: string = "0.0.0" // app版本
|
||||
themeColor: string = "#E46342" // 主题颜色
|
||||
secondColor: string = "rgba(232, 234, 237)"
|
||||
pageSize: number = 15 // 数据页大小
|
||||
pageSizeOfMessage: number = 30 // 每次请求消息数量
|
||||
fileHelperUID: string = "fileHelper" // 文件助手UID
|
||||
systemUID: string = "u_10000" // 系统uid
|
||||
|
||||
|
||||
private _themeMode: ThemeMode = ThemeMode.light // 主题模式
|
||||
|
||||
set themeMode(v: ThemeMode) {
|
||||
this._themeMode = v
|
||||
const body = document.body;
|
||||
if(v === ThemeMode.dark) {
|
||||
if (v === ThemeMode.dark) {
|
||||
if (body.hasAttribute('theme-mode')) {
|
||||
body.removeAttribute('theme-mode');
|
||||
body.setAttribute('theme-mode', 'dark');
|
||||
} else {
|
||||
body.setAttribute('theme-mode', 'dark');
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
body.removeAttribute('theme-mode');
|
||||
}
|
||||
StorageService.shared.setItem("theme-mode",`${v}`)
|
||||
StorageService.shared.setItem("theme-mode", `${v}`)
|
||||
WKApp.shared.notifyListener()
|
||||
}
|
||||
|
||||
@ -61,13 +61,13 @@ export class WKConfig {
|
||||
}
|
||||
|
||||
export class WKRemoteConfig {
|
||||
revokeSecond:number = 2 * 60 // 撤回时间
|
||||
requestSuccess:boolean = false
|
||||
revokeSecond: number = 2 * 60 // 撤回时间
|
||||
requestSuccess: boolean = false
|
||||
|
||||
async startRequestConfig() {
|
||||
await this.requestConfig()
|
||||
|
||||
if(!this.requestSuccess) {
|
||||
if (!this.requestSuccess) {
|
||||
setTimeout(() => {
|
||||
this.startRequestConfig()
|
||||
}, 3000);
|
||||
@ -75,7 +75,7 @@ export class WKRemoteConfig {
|
||||
}
|
||||
|
||||
requestConfig() {
|
||||
return WKApp.apiClient.get("common/appconfig").then((result)=>{
|
||||
return WKApp.apiClient.get("common/appconfig").then((result) => {
|
||||
this.requestSuccess = true
|
||||
this.revokeSecond = result["revoke_second"]
|
||||
})
|
||||
@ -92,7 +92,7 @@ export class LoginInfo {
|
||||
name: string | undefined
|
||||
role!: string
|
||||
isWork!: boolean
|
||||
sex!:number
|
||||
sex!: number
|
||||
|
||||
/**
|
||||
* save 保存登录信息
|
||||
@ -106,7 +106,7 @@ export class LoginInfo {
|
||||
this.setStorageItemForSID("name", this.name ?? "");
|
||||
this.setStorageItemForSID("role", this.role ?? "")
|
||||
this.setStorageItemForSID("is_work", this.isWork ? "1" : "0")
|
||||
this.setStorageItemForSID("sex", this.sex==1?"1":"0")
|
||||
this.setStorageItemForSID("sex", this.sex == 1 ? "1" : "0")
|
||||
}
|
||||
|
||||
// 获取查询参数
|
||||
@ -142,10 +142,10 @@ export class LoginInfo {
|
||||
}
|
||||
|
||||
public setStorageItem(key: string, value: string) {
|
||||
StorageService.shared.setItem(key,value)
|
||||
StorageService.shared.setItem(key, value)
|
||||
}
|
||||
public getStorageItem(key: string): string | null {
|
||||
return StorageService.shared.getItem(key)
|
||||
return StorageService.shared.getItem(key)
|
||||
}
|
||||
public removeStorageItem(key: string) {
|
||||
StorageService.shared.removeItem(key)
|
||||
@ -170,9 +170,9 @@ export class LoginInfo {
|
||||
}
|
||||
|
||||
const sexStr = this.getStorageItemForSID("sex")
|
||||
if(sexStr === "1") {
|
||||
if (sexStr === "1") {
|
||||
this.sex = 1
|
||||
}else {
|
||||
} else {
|
||||
this.sex = 0
|
||||
}
|
||||
}
|
||||
@ -206,7 +206,7 @@ export default class WKApp extends ProviderListener {
|
||||
static menus = MenusManager.shared // 菜单
|
||||
static apiClient = APIClient.shared // api客户端
|
||||
static config: WKConfig = new WKConfig() // app配置
|
||||
static remoteConfig:WKRemoteConfig = new WKRemoteConfig() // 远程配置
|
||||
static remoteConfig: WKRemoteConfig = new WKRemoteConfig() // 远程配置
|
||||
static loginInfo: LoginInfo = new LoginInfo() // 登录信息
|
||||
static endpoints: EndpointCommon = new EndpointCommon() // 常用端点
|
||||
static conversationProvider: IConversationProvider // 最近会话相关数据源
|
||||
@ -224,17 +224,17 @@ export default class WKApp extends ProviderListener {
|
||||
openChannel?: Channel // 当前打开的会话频道
|
||||
content?: JSX.Element
|
||||
|
||||
baseContext!:WKBaseContext // 唐僧叨叨基础上下文
|
||||
|
||||
baseContext!: WKBaseContext // 唐僧叨叨基础上下文
|
||||
|
||||
private _notificationIsClose:boolean = false // 通知是否关闭
|
||||
|
||||
private _notificationIsClose: boolean = false // 通知是否关闭
|
||||
|
||||
private wsaddrs = new Array<string>() // ws的连接地址
|
||||
private addrUsed = false // 地址是否被使用
|
||||
|
||||
set notificationIsClose(v:boolean) {
|
||||
set notificationIsClose(v: boolean) {
|
||||
this._notificationIsClose = v
|
||||
StorageService.shared.setItem("NotificationIsClose",v?"1":"")
|
||||
StorageService.shared.setItem("NotificationIsClose", v ? "1" : "")
|
||||
}
|
||||
|
||||
get notificationIsClose() {
|
||||
@ -246,21 +246,21 @@ export default class WKApp extends ProviderListener {
|
||||
startup() {
|
||||
WKApp.loginInfo.load() // 加载登录信息
|
||||
|
||||
const themeMode = StorageService.shared.getItem("theme-mode")
|
||||
if(themeMode === "1") {
|
||||
WKApp.config.themeMode = ThemeMode.dark
|
||||
}
|
||||
const themeMode = StorageService.shared.getItem("theme-mode")
|
||||
if (themeMode === "1") {
|
||||
WKApp.config.themeMode = ThemeMode.dark
|
||||
}
|
||||
|
||||
WKSDK.shared().config.provider.connectAddrCallback = async (callback: ConnectAddrCallback) => {
|
||||
if(!this.wsaddrs || this.wsaddrs.length == 0) {
|
||||
this.wsaddrs = await WKApp.dataSource.commonDataSource.imConnectAddrs()
|
||||
if (!this.wsaddrs || this.wsaddrs.length == 0) {
|
||||
this.wsaddrs = await WKApp.dataSource.commonDataSource.imConnectAddrs()
|
||||
}
|
||||
if(this.wsaddrs.length>0) {
|
||||
console.log("connectAddrs--->",this.wsaddrs)
|
||||
if (this.wsaddrs.length > 0) {
|
||||
console.log("connectAddrs--->", this.wsaddrs)
|
||||
this.addrUsed = true
|
||||
callback(this.wsaddrs[0])
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
WKApp.endpoints.addOnLogin(() => {
|
||||
@ -273,28 +273,28 @@ export default class WKApp extends ProviderListener {
|
||||
|
||||
WKSDK.shared().connectManager.addConnectStatusListener((status: ConnectStatus, reasonCode?: number) => {
|
||||
if (status === ConnectStatus.ConnectKick) {
|
||||
console.log("被踢--->",reasonCode)
|
||||
console.log("被踢--->", reasonCode)
|
||||
WKApp.shared.logout()
|
||||
}else if(reasonCode == 2) { // 认证失败!
|
||||
} else if (reasonCode == 2) { // 认证失败!
|
||||
WKApp.shared.logout()
|
||||
}else if(status === ConnectStatus.Disconnect) {
|
||||
if(this.addrUsed && this.wsaddrs.length>1) {
|
||||
} else if (status === ConnectStatus.Disconnect) {
|
||||
if (this.addrUsed && this.wsaddrs.length > 1) {
|
||||
const oldwsAddr = this.wsaddrs[0]
|
||||
this.wsaddrs.splice(0,1)
|
||||
this.wsaddrs.splice(0, 1)
|
||||
this.wsaddrs.push(oldwsAddr)
|
||||
this.addrUsed = false
|
||||
console.log("连接失败!切换地址->",this.wsaddrs)
|
||||
console.log("连接失败!切换地址->", this.wsaddrs)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
// 通知设置
|
||||
const notificationIsClose = StorageService.shared.getItem("NotificationIsClose")
|
||||
if(notificationIsClose === "1") {
|
||||
if (notificationIsClose === "1") {
|
||||
this._notificationIsClose = true
|
||||
}else{
|
||||
} else {
|
||||
this._notificationIsClose = false
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ export default class WKApp extends ProviderListener {
|
||||
this.notifyListener()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 是否登录
|
||||
isLogined() {
|
||||
@ -339,23 +339,23 @@ export default class WKApp extends ProviderListener {
|
||||
return ""
|
||||
}
|
||||
let avatarTag = this.getChannelAvatarTag()
|
||||
if(!avatarTag) {
|
||||
if (!avatarTag) {
|
||||
avatarTag = "0"
|
||||
}
|
||||
const channelInfo = WKSDK.shared().channelManager.getChannelInfo(channel)
|
||||
if(channelInfo && channelInfo.logo && channelInfo.logo !== "") {
|
||||
if (channelInfo && channelInfo.logo && channelInfo.logo !== "") {
|
||||
let logo = channelInfo.logo;
|
||||
if(logo.indexOf("?")!=-1) {
|
||||
logo += "&v="+avatarTag
|
||||
}else {
|
||||
logo += "?v="+avatarTag
|
||||
if (logo.indexOf("?") != -1) {
|
||||
logo += "&v=" + avatarTag
|
||||
} else {
|
||||
logo += "?v=" + avatarTag
|
||||
}
|
||||
return WKApp.dataSource.commonDataSource.getImageURL(logo)
|
||||
}
|
||||
const baseURl = WKApp.apiClient.config.apiURL
|
||||
if (channel.channelType === ChannelTypePerson) {
|
||||
return `${baseURl}users/${channel.channelID}/avatar?v=${avatarTag}`
|
||||
}else if(channel.channelType == ChannelTypeGroup) {
|
||||
} else if (channel.channelType == ChannelTypeGroup) {
|
||||
return `${baseURl}groups/${channel.channelID}/avatar?v=${avatarTag}`
|
||||
}
|
||||
return ""
|
||||
@ -368,16 +368,20 @@ export default class WKApp extends ProviderListener {
|
||||
|
||||
// 我的用户头像发送改变
|
||||
myUserAvatarChange() {
|
||||
this.changeChannelAvatarTag()
|
||||
this.changeChannelAvatarTag()
|
||||
}
|
||||
|
||||
changeChannelAvatarTag() {
|
||||
let myAvatarTag = "channelAvatarTag"
|
||||
WKApp.loginInfo.setStorageItem(myAvatarTag,new Date().getTime()+"")
|
||||
WKApp.loginInfo.setStorageItem(myAvatarTag, new Date().getTime() + "")
|
||||
}
|
||||
getChannelAvatarTag() {
|
||||
let myAvatarTag = "channelAvatarTag"
|
||||
return WKApp.loginInfo.getStorageItem(myAvatarTag)
|
||||
const tag = WKApp.loginInfo.getStorageItem(myAvatarTag)
|
||||
if (!tag) {
|
||||
return ""
|
||||
}
|
||||
return tag
|
||||
}
|
||||
|
||||
avatarGroup(groupNo: string) {
|
||||
@ -386,8 +390,8 @@ export default class WKApp extends ProviderListener {
|
||||
}
|
||||
|
||||
// 注册频道设置
|
||||
channelSettingRegister(sectionID: string, sectionFnc: (context: RouteContext<any>) => Section | undefined,sort?:number) {
|
||||
WKApp.sectionManager.register(EndpointCategory.channelSetting, sectionID, sectionFnc,sort)
|
||||
channelSettingRegister(sectionID: string, sectionFnc: (context: RouteContext<any>) => Section | undefined, sort?: number) {
|
||||
WKApp.sectionManager.register(EndpointCategory.channelSetting, sectionID, sectionFnc, sort)
|
||||
}
|
||||
|
||||
// 获取频道设置
|
||||
@ -405,7 +409,7 @@ export default class WKApp extends ProviderListener {
|
||||
return WKApp.sectionManager.sections(EndpointCategory.channelManage, context)
|
||||
}
|
||||
|
||||
chatMenusRegister(sid: string, f: (param:any) => ChatMenus, sort?: number) {
|
||||
chatMenusRegister(sid: string, f: (param: any) => ChatMenus, sort?: number) {
|
||||
WKApp.endpointManager.setMethod(sid, (param) => {
|
||||
return f(param)
|
||||
}, {
|
||||
@ -428,7 +432,7 @@ export default class WKApp extends ProviderListener {
|
||||
}
|
||||
|
||||
// 注册用户信息
|
||||
userInfoRegister(sectionID: string, sectionFnc: (context: RouteContext<any>) => Section | undefined,sort?:number) {
|
||||
userInfoRegister(sectionID: string, sectionFnc: (context: RouteContext<any>) => Section | undefined, sort?: number) {
|
||||
WKApp.sectionManager.register(EndpointCategory.userInfo, sectionID, sectionFnc)
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
.wk-subscribers-item img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
border-radius: 40%;
|
||||
}
|
||||
|
||||
.wk-subscribers-item-name {
|
||||
|
@ -42,7 +42,7 @@ body[theme-mode=dark] .wk-userInfo-footer {
|
||||
|
||||
.wk-userinfo-user-avatar {
|
||||
margin-left: 20px;
|
||||
border-radius: 50%;
|
||||
border-radius: 40%;
|
||||
background-color: var(--wk-color-item);
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
@ -54,7 +54,7 @@ body[theme-mode=dark] .wk-userInfo-footer {
|
||||
.wk-userinfo-user-avatar img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
border-radius: 40%;
|
||||
}
|
||||
|
||||
.wk-userinfo-user-info-name {
|
||||
|
@ -55,7 +55,7 @@
|
||||
.senderAvatar img {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 34px;
|
||||
border-radius: 40%;
|
||||
}
|
||||
|
||||
.wk-message-base-box {
|
||||
|
@ -180,7 +180,7 @@ body[theme-mode=dark] .wk-chat-conversation-header {
|
||||
.wk-chat-conversation-header-channel-avatar img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
border-radius: 40%;
|
||||
}
|
||||
|
||||
.wk-chat-conversation-header-channel-info {
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>pc_expression</title>
|
||||
<defs>
|
||||
<linearGradient x1="100%" y1="100%" x2="0%" y2="0%" id="linearGradient-1">
|
||||
<stop stop-color="#F6603E" offset="0%"></stop>
|
||||
<stop stop-color="#F17C55" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-63.000000, -37.000000)">
|
||||
<g id="编组-2" transform="translate(63.000000, 37.000000)">
|
||||
<rect id="矩形备份" fill="#FFFFFF" opacity="0.01" x="0" y="0" width="20" height="20"></rect>
|
||||
<path d="M10,1 C14.9705629,1 19,5.02943709 19,10 C19,14.9705629 14.9705629,19 10,19 C5.02943709,19 1,14.9705629 1,10 C1,5.02943709 5.02943709,1 10,1 Z M10,2.18782119 C5.68544371,2.18782119 2.18782119,5.68544371 2.18782119,10 C2.18782119,14.3145563 5.68544371,17.8121788 10,17.8121788 C14.3145563,17.8121788 17.8121788,14.3145563 17.8121788,10 C17.8121788,5.68544371 14.3145563,2.18782119 10,2.18782119 Z M6.59257616,11.7460993 C7.56827152,13.052351 8.69213907,13.6812781 10.0009338,13.6812781 C11.3144371,13.6812781 12.4737483,13.0474636 13.5105364,11.7336026 C13.7137417,11.4761192 14.0871921,11.4321126 14.3446755,11.635298 C14.6021589,11.8384834 14.6461854,12.2119536 14.443,12.4694371 C13.1927152,14.0537748 11.701457,14.8690993 10.0009338,14.8690993 C8.29568212,14.8690993 6.83007285,14.0489073 5.6409404,12.4569404 C5.44464901,12.1941523 5.49854967,11.8219934 5.76133775,11.625702 C6.02412583,11.4294106 6.39628477,11.4833113 6.59257616,11.7460993 L6.59257616,11.7460993 Z M7.35024503,6.66497351 C8.10719868,6.66497351 8.72080795,7.27860265 8.72080795,8.03553642 C8.72080795,8.79249007 8.10719868,9.40609934 7.35024503,9.40609934 C6.59331126,9.40609934 5.97970199,8.7924702 5.97970199,8.03553642 C5.97970199,7.27858278 6.59331126,6.66497351 7.35024503,6.66497351 Z M12.7868013,6.66497351 C13.543755,6.66497351 14.1573642,7.27860265 14.1573642,8.03553642 C14.1573642,8.79249007 13.5437351,9.40609934 12.7868013,9.40609934 C12.0298477,9.40609934 11.4162384,8.7924702 11.4162384,8.03553642 C11.4162384,7.27858278 12.0298675,6.66497351 12.7868013,6.66497351 Z" id="形状" fill="url(#linearGradient-1)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.9 KiB |
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>pc_@</title>
|
||||
<defs>
|
||||
<linearGradient x1="100%" y1="98.4211526%" x2="0%" y2="1.57884739%" id="linearGradient-1">
|
||||
<stop stop-color="#F6603E" offset="0%"></stop>
|
||||
<stop stop-color="#F17C55" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-124.000000, -37.000000)">
|
||||
<g id="pc_@" transform="translate(124.000000, 37.000000)">
|
||||
<rect id="矩形备份-2" fill="#FFFFFF" opacity="0.01" x="0" y="0" width="20" height="20"></rect>
|
||||
<path d="M10.3277454,1 C7.57018568,1 5.31618037,1.88721485 3.54175066,3.68562334 C1.83925729,5.36413793 1,7.45029178 1,9.96806366 C1,12.653687 1.83925729,14.7877984 3.54175066,16.4183554 C5.19628647,18.0009549 7.45029178,18.7922546 10.3277454,18.7922546 C12.222069,18.7922546 13.9245623,18.4085942 15.4592042,17.665252 C17.0418037,16.897931 18.2407427,15.7949072 19.08,14.3561804 L17.4014854,14.3561804 C16.7300796,15.3153316 15.8428647,16.0586737 14.7398408,16.6101857 C13.4929443,17.2096552 12.0062599,17.5213793 10.3277454,17.5213793 C7.97782493,17.5213793 6.13145889,16.8739523 4.78864721,15.6270557 C3.34992042,14.3082228 2.65453581,12.437878 2.65453581,10.0160212 C2.65453581,7.80997347 3.34992042,5.96360743 4.76466844,4.52488064 C6.20339523,3.06217507 8.02578249,2.34281167 10.2318302,2.34281167 C12.2940053,2.34281167 13.9725199,2.94228117 15.2194164,4.16519894 C16.3703979,5.29220159 16.9458886,6.7069496 16.9458886,8.40944297 C16.9458886,9.89612732 16.5142706,11.1909814 15.6510345,12.2940053 C14.9076923,13.2291777 14.1643501,13.7087533 13.421008,13.7087533 C12.9654111,13.7087533 12.7496021,13.4929443 12.7496021,13.1092838 C12.7496021,12.8215385 12.8455172,12.3419629 13.0373475,11.6465782 L14.7398408,5.38811671 L13.1812202,5.38811671 L12.8215385,6.73092838 C12.437878,5.53198939 11.670557,4.93251989 10.5195756,4.93251989 C9.08084881,4.93251989 7.85793103,5.55596817 6.80286472,6.85082228 C5.69984085,8.14567639 5.17230769,9.70429708 5.17230769,11.4787268 C5.17230769,12.5098143 5.48403183,13.3730504 6.10748011,14.0444562 C6.73092838,14.7158621 7.5462069,15.0755438 8.55331565,15.0755438 C9.75225464,15.0755438 10.7593634,14.5240318 11.5746419,13.4449867 C11.670557,14.5000531 12.222069,15.0275862 13.2291777,15.0275862 C14.4760743,15.0275862 15.6270557,14.3561804 16.682122,13.0373475 C17.7371883,11.6465782 18.2887003,10.1119363 18.2887003,8.38546419 C18.2887003,6.32328912 17.6172944,4.62079576 16.2744828,3.25400531 C14.8117772,1.74334218 12.8215385,1 10.3277454,1 Z M10.7833422,6.44318302 C11.2629178,6.44318302 11.6465782,6.63501326 11.9583024,7.01867374 C12.222069,7.33039788 12.3659416,7.71405836 12.3659416,8.14567639 C12.3659416,8.28954907 12.2700265,8.67320955 12.1261538,9.29665782 L11.5986207,11.2629178 C11.4067905,11.886366 11.02313,12.4618568 10.4476393,12.9414324 C9.87214854,13.421008 9.27267905,13.6607958 8.67320955,13.6607958 C8.07374005,13.6607958 7.61814324,13.4689655 7.3064191,13.085305 C6.99469496,12.7016446 6.85082228,12.1980902 6.85082228,11.5506631 C6.85082228,10.1359151 7.25846154,8.93697613 8.07374005,7.92986737 C8.84106101,6.92275862 9.75225464,6.44318302 10.7833422,6.44318302 Z" id="形状" fill="url(#linearGradient-1)"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>pc_screenshot</title>
|
||||
<defs>
|
||||
<linearGradient x1="100%" y1="100%" x2="0%" y2="0%" id="linearGradient-1">
|
||||
<stop stop-color="#F6603E" offset="0%"></stop>
|
||||
<stop stop-color="#F17C55" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="PC切图" transform="translate(-33.000000, -37.000000)">
|
||||
<g id="pc_screenshot" transform="translate(33.000000, 37.000000)">
|
||||
<rect id="矩形" fill="#FFFFFF" opacity="0.01" x="0" y="0" width="20" height="20"></rect>
|
||||
<g id="jiandaojianqie" transform="translate(1.000000, 1.000000)" fill="url(#linearGradient-1)">
|
||||
<path d="M13.7500007,9.72972 C13.4897589,9.72972 13.2360186,9.75607714 12.9885153,9.79989429 L10.0606564,6.95118857 L15.0836639,2.06398286 C15.669426,1.49402571 15.669426,0.569957143 15.0836639,0 L9.00005286,5.91919714 L2.91638892,0 C2.33062686,0.569957143 2.33062686,1.49402571 2.91638892,2.06398286 L7.93939643,6.95118857 L5.01153752,9.79992 C4.76403429,9.75610286 4.51032034,9.72974571 4.24999927,9.72974571 C1.90650171,9.72974571 0,11.5847229 0,13.8648857 C0,16.1450486 1.90650171,18 4.24999927,18 C6.59349682,18 8.5,16.1450229 8.5,13.86486 C8.5,12.40272 7.71393459,11.1184714 6.53350404,10.3829914 L9,7.98318 L11.466496,10.3830171 C10.2860654,11.1184971 9.5,12.40272 9.5,13.86486 C9.5,16.1450229 11.4065032,18 13.7500007,18 C16.0934983,18 18,16.1450229 18,13.86486 C18,11.5846971 16.0934983,9.72972 13.7500007,9.72972 Z M4.24999927,16.5405343 C2.7336356,16.5405343 1.5000044,15.3402429 1.5000044,13.86486 C1.5000044,12.3894771 2.7336356,11.1891857 4.24999927,11.1891857 C5.76636293,11.1891857 6.99999413,12.3894771 6.99999413,13.86486 C6.99999413,15.3402429 5.76636293,16.5405343 4.24999927,16.5405343 Z M13.7500007,16.5405343 C12.2336371,16.5405343 11.0000059,15.3402429 11.0000059,13.86486 C11.0000059,12.3894771 12.2336371,11.1891857 13.7500007,11.1891857 C15.2663644,11.1891857 16.4999956,12.3894771 16.4999956,13.86486 C16.4999956,15.3402429 15.266338,16.5405343 13.7500007,16.5405343 Z" id="形状"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
@ -315,7 +315,7 @@ export default class BaseModule implements IModule {
|
||||
|
||||
registerChatToolbars() {
|
||||
WKApp.endpoints.registerChatToolbar("chattoolbar.emoji", (ctx) => {
|
||||
return <EmojiToolbar conversationContext={ctx} icon={require("./assets/toolbars/func_face_normal.png").default}></EmojiToolbar>
|
||||
return <EmojiToolbar conversationContext={ctx} icon={require("./assets/toolbars/func_face_normal.svg").default}></EmojiToolbar>
|
||||
})
|
||||
|
||||
WKApp.endpoints.registerChatToolbar("chattoolbar.mention", (ctx) => {
|
||||
@ -323,14 +323,14 @@ export default class BaseModule implements IModule {
|
||||
if (channel.channelType === ChannelTypePerson) {
|
||||
return undefined
|
||||
}
|
||||
return <IconClick icon={require("./assets/toolbars/func_mention_normal.png").default} onClick={() => {
|
||||
return <IconClick icon={require("./assets/toolbars/func_mention_normal.svg").default} onClick={() => {
|
||||
ctx.messageInputContext().insertText("@")
|
||||
}}></IconClick>
|
||||
})
|
||||
|
||||
WKApp.endpoints.registerChatToolbar("chattoolbar.screenshot", (ctx) => {
|
||||
|
||||
return <IconClick icon={require("./assets/toolbars/func_screenshot.png").default} onClick={() => {
|
||||
return <IconClick icon={require("./assets/toolbars/func_screenshot.svg").default} onClick={() => {
|
||||
window.open("https://jietu.qq.com")
|
||||
}}></IconClick>
|
||||
})
|
||||
|
@ -225,13 +225,20 @@ export class CommonDataSource implements ICommonDataSource {
|
||||
}
|
||||
imConnectAddr(): Promise<string> {
|
||||
return WKApp.apiClient.get(`users/${WKApp.loginInfo.uid}/im`).then((resp) => {
|
||||
|
||||
return resp.resp.ws_addr
|
||||
let addr = resp.wss_addr
|
||||
if(!addr || addr==='') {
|
||||
addr = resp.ws_addr
|
||||
}
|
||||
return addr
|
||||
});
|
||||
}
|
||||
imConnectAddrs(): Promise<string[]> {
|
||||
return WKApp.apiClient.get(`users/${WKApp.loginInfo.uid}/im`).then((resp) => {
|
||||
return [resp.ws_addr]
|
||||
let addr = resp.wss_addr
|
||||
if(!addr || addr==='') {
|
||||
addr = resp.ws_addr
|
||||
}
|
||||
return [addr]
|
||||
});
|
||||
}
|
||||
|
||||
|