Updated the icon and the favicon icon handler
parent
03f8d1290a
commit
987db2cebc
|
@ -7,6 +7,7 @@
|
||||||
- Rendering the server icon
|
- Rendering the server icon
|
||||||
- Changing the favicon according to the clients status
|
- Changing the favicon according to the clients status
|
||||||
- Aborting all replaying audio streams when client mutes himself
|
- Aborting all replaying audio streams when client mutes himself
|
||||||
|
- Fixed issue [#139](https://github.com/TeaSpeak/TeaWeb/issues/139)
|
||||||
|
|
||||||
* **17.09.20**
|
* **17.09.20**
|
||||||
- Added a settings registry and some minor bug fixing
|
- Added a settings registry and some minor bug fixing
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="client-client_hide" width="16"
|
|
||||||
height="16" viewBox="0 0 16 16" x="0" y="96">
|
|
||||||
<path fill="#a9aaac"
|
|
||||||
d="M6.939 1.291c-2.031 0-3.023 0.365-3.371 0.522s-0.521 0.313-0.591 0.643c-0.057 0.273-0.449 2.206-0.582 2.865-0.709 0.295-1.208 0.996-1.208 1.813 0 1.085 0.879 1.964 1.964 1.964s1.964-0.879 1.964-1.964c0-0.708-0.376-1.33-0.939-1.675v-3.645c0 0 0.643-0.222 2.277-0.222 2.457 0 7.368 1.74 7.368 6.403 0 4.456-4.814 6.245-7.612 6.245-2.085 0-2.885-0.452-2.885-0.452l-0.348 0.192c0 0 1.338 0.73 3.736 0.73 3.84 0 8.099-2.492 8.099-6.715 0-4.304-4.554-6.702-7.873-6.702z"></path>
|
|
||||||
<path fill="#a9aaac"
|
|
||||||
d="M7.31 6.172c0.049 0.311-0.343 0.481-0.343 0.714 0 0.2 0.85 1.406 1.087 1.785 0.224 0.36 0.076 0.514-0.36 0.619s-0.384 0.311-0.384 0.478 0.168 0.315 0.168 0.43c0 0.114-0.29 0.255-0.29 0.358s0.21 0.209 0.21 0.292c0 0.083-0.266 0.192-0.284 0.4-0.019 0.226 0.364 0.668-0.035 1.155s-2.172 0.131-2.172 0.131 1.547-1.477 1.547-3.718c0-2.242-1.738-3.372-1.738-3.372s0-2.538 0-3.024c0.958 0 2.31 1.966 2.595 3.751z"></path>
|
|
||||||
<path fill="#a9aaac"
|
|
||||||
d="M7.567 12.573c0 0 0.266-0.379 0.199-0.644s-0.158-0.585-0.094-0.688c0.065-0.102 0.246-0.114 0.246-0.337 0-0.122-0.042-0.179-0.079-0.214 0.063-0.040 0.118-0.054 0.118-0.076 0-0.011-0.037-0.053-0.149-0.035 0.060-0.071 0.195-0.193 0.195-0.338 0-0.187-0.157-0.272-0.157-0.471s0.206-0.211 0.375-0.259c0.168-0.049 0.507-0.158 0.507-0.495 0-0.338-1.201-1.846-1.201-2.033s0.364-0.353 0.307-0.79c-0.008-0.062-0.021-0.137-0.039-0.222 0.29-0.050 1.588-0.627 1.427-1.030-0.246-0.616-2.188-1.723-2.871-1.904-0.27-0.311-0.58-0.585-0.929-0.789 2.72-0.349 7.324 1.499 7.324 5.163-0 3.663-3.781 4.978-5.177 5.162z"></path>
|
|
||||||
<path fill="#fff"
|
|
||||||
d="M7.838 10.689c-0.019-0.021-0.059-0.039-0.059-0.056s0.006-0.031 0.027-0.055c0.898-0.401 1.675-1.227 1.675-2.284s-0.891-1.973-1.688-2.324c-0.144-0.666-0.61-1.974-1.444-2.934 1.362-0.152 4.812 1.248 4.812 3.743 0 2.724-2.75 3.761-3.322 3.91z"></path>
|
|
||||||
<path fill="#fff"
|
|
||||||
d="M4.171 7.322c0 0.736-0.597 1.334-1.333 1.334s-1.334-0.598-1.334-1.334c0-0.736 0.598-1.334 1.334-1.334s1.333 0.598 1.333 1.334z"></path>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.2 KiB |
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="client-client_show" width="16"
|
|
||||||
height="16" viewBox="0 0 16 16" x="32" y="96">
|
|
||||||
<path fill="#426080"
|
|
||||||
d="M6.939 1.291c-2.031 0-3.023 0.365-3.371 0.522s-0.521 0.313-0.591 0.643c-0.057 0.273-0.449 2.206-0.582 2.865-0.709 0.295-1.208 0.996-1.208 1.813 0 1.085 0.879 1.964 1.964 1.964s1.964-0.879 1.964-1.964c0-0.708-0.376-1.33-0.939-1.675v-3.645c0 0 0.643-0.222 2.277-0.222 2.457 0 7.368 1.74 7.368 6.403 0 4.456-4.814 6.245-7.612 6.245-2.085 0-2.885-0.452-2.885-0.452l-0.348 0.192c0 0 1.338 0.73 3.736 0.73 3.84 0 8.099-2.492 8.099-6.715 0-4.304-4.554-6.702-7.873-6.702z"></path>
|
|
||||||
<path fill="#426080"
|
|
||||||
d="M7.31 6.172c0.049 0.311-0.343 0.481-0.343 0.714 0 0.2 0.85 1.406 1.087 1.785 0.224 0.36 0.076 0.514-0.36 0.619s-0.384 0.311-0.384 0.478 0.168 0.315 0.168 0.43c0 0.114-0.29 0.255-0.29 0.358s0.21 0.209 0.21 0.292c0 0.083-0.266 0.192-0.284 0.4-0.019 0.226 0.364 0.668-0.035 1.155s-2.172 0.131-2.172 0.131 1.547-1.477 1.547-3.718c0-2.242-1.738-3.372-1.738-3.372s0-2.538 0-3.024c0.958 0 2.31 1.966 2.595 3.751z"></path>
|
|
||||||
<path fill="#cdd7e5"
|
|
||||||
d="M7.567 12.573c0 0 0.266-0.379 0.199-0.644s-0.158-0.585-0.094-0.688c0.065-0.102 0.246-0.114 0.246-0.337s-0.139-0.229-0.139-0.277c0-0.049 0.223-0.199 0.223-0.386s-0.157-0.272-0.157-0.471c0-0.199 0.206-0.211 0.375-0.259 0.168-0.049 0.506-0.158 0.506-0.495 0-0.338-1.201-1.846-1.201-2.033s0.364-0.353 0.307-0.79c-0.090-0.705-0.848-3.031-2.412-3.945 2.72-0.349 7.324 1.499 7.324 5.163-0 3.663-3.781 4.978-5.177 5.162z"></path>
|
|
||||||
<path fill="#819cbd"
|
|
||||||
d="M7.838 10.689c-0.019-0.021-0.059-0.039-0.059-0.056s0.006-0.031 0.027-0.055c0.898-0.401 1.675-1.227 1.675-2.284s-0.891-1.973-1.688-2.324c-0.144-0.666-0.61-1.974-1.444-2.934 1.362-0.152 4.812 1.248 4.812 3.743 0 2.724-2.75 3.761-3.322 3.91z"></path>
|
|
||||||
<path fill="#1ca037"
|
|
||||||
d="M4.171 7.322c0 0.736-0.597 1.334-1.333 1.334s-1.334-0.598-1.334-1.334c0-0.736 0.598-1.334 1.334-1.334s1.333 0.598 1.333 1.334z"></path>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1,20 @@
|
||||||
|
<svg style="clip-rule:evenodd;fill-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m.75 6.0556s3.1105-2 7.25-2 7.2445 2 7.2445 2l-7.2445 7.3335z" style="fill:#be1515;stroke-width:.5"/>
|
||||||
|
<path d="m8.0995 4.0561.0965.001.096.0015.096.0025.095.0035.095.004.0945.0045.094.005.0935.006.093.006.093.0075.092.0075.092.008.0915.009.0905.0095.0905.01.09.0105.0895.011.089.0115.0885.012.088.013.0875.013.087.0135.0865.014.086.0145.0855.015.085.0155.0845.0155.084.0165.083.0165.083.017.082.0175.0815.018.081.018.0805.0185.08.0185.079.019.079.0195.078.02.0775.02.0765.02.0765.0205.0755.021.075.021.0745.0215.0735.021.073.022.0725.022.1425.044.14.045.1375.0455.1345.046.1315.0465.129.0465.126.0465.1225.047.12.047.1165.0465.114.0465.1105.0465.107.046.104.0455.1005.045.0975.044.0935.044.0905.0425.087.042.0835.0405.0795.04.076.0385.0725.037.0685.036.065.0345.061.033.057.031.0535.0295.0945.0535.078.045.0615.0365.044.027.036.0225-7.25 7.3335-7.2445-7.3335.036-.0225.0445-.027.061-.0365.0785-.045.094-.0535.0535-.0295.057-.031.061-.033.065-.0345.0685-.036.0725-.037.076-.0385.0795-.04.0835-.0405.087-.042.0905-.0425.0935-.044.0975-.044.1005-.045.104-.0455.1075-.046.11-.0465.114-.0465.1165-.0465.12-.047.123-.047.1255-.0465.129-.0465.1315-.0465.1345-.046.1375-.0455.14-.045.1425-.044.0725-.022.073-.022.0735-.021.0745-.0215.075-.021.0755-.021.0765-.0205.0765-.02.0775-.02.078-.02.079-.0195.079-.019.08-.0185.0805-.0185.081-.018.0815-.018.0825-.0175.0825-.017.167-.033.0845-.0155.085-.0155.0855-.015.086-.0145.0865-.014.087-.0135.0875-.013.088-.013.0885-.012.089-.0115.0895-.011.09-.0105.0905-.01.091-.0095.091-.009.092-.008.185-.015.093-.006.0935-.006.0945-.005.094-.0045.095-.004.0955-.0035.0955-.0025.096-.0015.0965-.001.097-5e-4zm-.19.5-.0925.001-.0925.0015-.092.0025-.0915.003-.182.008-.0905.005-.09.0055-.09.0065-.089.0065-.089.0075-.0885.008-.088.0085-.0875.009-.087.0095-.087.0105-.086.0105-.086.011-.0855.012-.0845.012-.0845.0125-.084.0135-.0835.0135-.083.014-.0825.0145-.082.0145-.0815.0155-.081.0155-.08.016-.08.0165-.0795.017-.079.017-.078.0175-.078.018-.077.018-.0765.0185-.076.019-.0755.019-.075.019-.0745.02-.0735.0195-.073.02-.0725.0205-.072.0205-.0715.021-.0705.021-.0695.021-.1385.043-.1355.0435-.133.044-.13.0445-.1275.0445-.125.0455-.1215.045-.119.0455-.116.0455-.113.045-.11.045-.1065.045-.104.0445-.1005.044-.097.043-.094.043-.0905.042-.0875.0415-.0835.04-.0805.0395-.0765.038-.0735.037-.0695.036-.034.018 6.4295 6.5085 6.435-6.5085-.034-.018-.0695-.036-.0735-.037-.0765-.038-.0805-.0395-.0835-.04-.0875-.0415-.0905-.042-.094-.043-.097-.043-.1005-.044-.104-.0445-.1065-.045-.11-.045-.113-.045-.116-.0455-.119-.0455-.1215-.045-.125-.0455-.1275-.0445-.13-.0445-.133-.044-.1355-.0435-.1385-.043-.0695-.021-.0705-.021-.0715-.021-.072-.0205-.0725-.0205-.073-.02-.0735-.0195-.0745-.02-.075-.019-.0755-.019-.076-.019-.0765-.0185-.077-.018-.078-.018-.078-.0175-.079-.017-.0795-.017-.08-.0165-.08-.016-.081-.0155-.0815-.0155-.082-.0145-.0825-.0145-.083-.014-.0835-.0135-.084-.0135-.0845-.0125-.0845-.012-.0855-.012-.086-.011-.086-.0105-.087-.0105-.087-.0095-.0875-.009-.088-.0085-.0885-.008-.089-.0075-.089-.0065-.09-.0065-.09-.0055-.0905-.005-.0905-.004-.0915-.004-.0915-.003-.092-.0025-.0925-.0015-.0925-.001-.093-5e-4z" style="fill:#ccd7e4;stroke-width:.5"/>
|
||||||
|
<path d="m.7555 6.1576s3.105-1.898 7.2445-1.898 7.2445 1.898 7.2445 1.898l-7.2445 7.2315z" style="fill:none;stroke-width:.5px;stroke:#ccd7e4"/>
|
||||||
|
<path d="m8.1005 3.5561.1005.001.0995.002.0995.0025.0985.0035.0985.004.098.0045.098.0055.097.006.0965.0065.096.0075.096.008.095.0085.095.009.188.02.093.011.093.0115.092.012.092.0125.091.013.0905.0135.0905.014.0895.015.089.015.0885.0155.0875.0155.0875.0165.087.017.086.017.0855.0175.085.018.0845.0185.0835.0185.0835.0195.0825.019.082.02.081.02.081.0205.08.0205.0795.021.0785.021.0785.0215.154.044.076.022.151.045.1465.046.145.046.1415.047.139.0475.136.048.133.048.13.048.127.0485.1235.0485.1205.048.1175.0485.114.0475.111.0475.1075.047.104.0465.1005.046.0975.045.0935.044.09.0435.0865.0425.083.041.079.04.075.0385.0715.0375.0675.036.064.034.06.033.056.031.099.056.083.048.066.039.049.03.0385.024.043.03.04.035.0355.0385.032.042.027.0455.022.0475.017.05.0115.0515.006.052 5e-4.053-.005.0525-.0105.0515-.0155.05-.021.0485-.026.046-.031.0425-.035.0395-7.25 7.3335-.039.0355-.0425.031-.0455.0265-.048.0215-.05.0165-.052.011-.052.0055h-.053l-.0525-.0055-.0515-.011-.05-.0165-.048-.0215-.0455-.0265-.0425-.0315-.039-.0355-7.2445-7.333-.035-.0395-.031-.043-.0255-.0455-.0215-.0485-.0155-.05-.0105-.0515-.005-.0525 5e-4-.0525.006-.0525.0115-.0515.017-.0495.022-.048.027-.045.0315-.0425.036-.0385.0395-.0345.0435-.0305.038-.024.0495-.03.0655-.039.083-.048.0985-.056.0565-.031.0595-.0325.064-.0345.0675-.036.071-.037.0755-.039.079-.04.0825-.041.0865-.0425.09-.043.0935-.0445.097-.045.1005-.046.104-.0465.107-.047.111-.0475.114-.0475.117-.048.1205-.0485.124-.0485.1265-.0485.13-.048.1325-.048.136-.048.139-.0475.1415-.047.1445-.046.147-.0455.075-.023.0755-.0225.076-.022.0765-.022.0775-.022.078-.021.079-.0215.079-.021.08-.0205.081-.0205.081-.02.082-.02.0825-.019.083-.0195.084-.0185.0845-.0185.0845-.018.086-.0175.086-.017.0865-.017.0875-.0165.176-.031.089-.015.0895-.015.09-.014.091-.0135.091-.013.0915-.0125.0925-.012.0925-.0115.0935-.011.0935-.01.0945-.01.0945-.009.095-.0085.096-.008.096-.0075.0965-.0065.0975-.006.0975-.0055.098-.0045.0985-.004.0985-.0035.0995-.0025.0995-.002.1005-.001.1005-5e-4zm-.1975.5-.0965.001-.096.0015-.0955.0025-.095.0035-.095.004-.0945.0045-.094.005-.0935.006-.093.006-.093.0075-.092.0075-.092.008-.0915.009-.091.0095-.09.01-.09.0105-.0895.011-.089.0115-.0885.012-.088.013-.0875.013-.087.0135-.0865.014-.086.0145-.0855.015-.085.0155-.0845.0155-.167.033-.0825.017-.082.0175-.082.018-.081.018-.16.037-.0795.019-.0785.0195-.078.02-.0775.02-.077.02-.076.0205-.0755.021-.075.021-.0745.0215-.0735.021-.073.022-.072.022-.143.044-.14.045-.137.0455-.1345.046-.1315.0465-.129.0465-.1255.0465-.123.047-.1195.047-.117.0465-.1135.0465-.1105.0465-.107.046-.104.0455-.1005.045-.097.044-.094.044-.0905.0425-.0865.042-.0835.0405-.0795.04-.076.0385-.0725.037-.0685.036-.065.0345-.061.033-.057.031-.053.0295-.0945.0535-.078.045-.0615.0365-.044.027-.036.0225 7.2445 7.3335 7.25-7.3335-.036-.0225-.0445-.027-.061-.0365-.0785-.045-.0945-.0535-.053-.0295-.0575-.031-.061-.033-.0645-.0345-.069-.036-.0725-.037-.076-.0385-.08-.04-.083-.0405-.087-.042-.0905-.0425-.094-.044-.0975-.044-.1005-.045-.104-.0455-.1075-.046-.1105-.0465-.1135-.0465-.117-.0465-.1195-.047-.123-.047-.126-.0465-.129-.0465-.1315-.0465-.1345-.046-.1375-.0455-.14-.045-.143-.044-.0725-.022-.073-.022-.0735-.021-.0745-.0215-.075-.021-.0755-.021-.0765-.0205-.077-.02-.0775-.02-.078-.02-.0785-.0195-.0795-.019-.0795-.0185-.0805-.0185-.163-.036-.082-.0175-.083-.017-.083-.0165-.084-.0165-.0845-.0155-.085-.0155-.0855-.015-.086-.0145-.0865-.014-.087-.0135-.0875-.013-.088-.013-.0885-.012-.089-.0115-.0895-.011-.09-.0105-.0905-.01-.091-.0095-.0915-.009-.0915-.008-.185-.015-.187-.012-.094-.005-.0945-.0045-.095-.004-.095-.0035-.0955-.0025-.096-.0015-.0965-.001-.097-5e-4z" style="fill:#425f80;stroke-width:.5"/>
|
||||||
|
<path d="m10.046 7.0556c-1.186-.3285 0 2.6665 0 2.6665" style="fill:none;stroke-width:.25px;stroke:#fff"/>
|
||||||
|
<path d="m15.244 6.1576-.4265.5645-6.818 1-6.818-1-.4265-.5645c-.1695.619-.2555 1.257-.2555 1.898 0 4.0475 3.3605 7.3335 7.5 7.3335s7.5-3.286 7.5-7.3335c0-.641-.086-1.279-.2555-1.898z" style="fill:#ccd7e4;stroke-width:.5"/>
|
||||||
|
<path d="m.841 9.0556s3.0685 2.75 7.159 2.75 7.159-2.25 7.159-2.25" style="fill:none;stroke-width:.5px;stroke:#819cbc"/>
|
||||||
|
<path d="m.841 9.0556s3.0685 2.6665 7.159 2.6665 7.159-2.6665 7.159-2.6665" style="fill:none;stroke-width:.5px;stroke:#819cbc"/>
|
||||||
|
<path d="m.841 9.0556s3.0685 2.25 7.159 2.25 7.159-2.75 7.159-2.75" style="fill:none;stroke-width:.5px;stroke:#819cbc"/>
|
||||||
|
<path d="m.841 9.0556s3.0685 2.1665 7.159 2.1665 7.159-3.1665 7.159-3.1665" style="fill:none;stroke-width:.5px;stroke:#819cbc"/>
|
||||||
|
<path d="m.841 9.0556s3.0685 1.75 7.159 1.75 7.159-3.25 7.159-3.25" style="fill:none;stroke-width:.5px;stroke:#819cbc"/>
|
||||||
|
<path d="m.7555 6.0556c-.1695.6035-.2555 1.2255-.2555 1.8505 0 3.946 3.3605 7.1495 7.5 7.1495s7.5-3.2035 7.5-7.1495c0-.625-.086-1.247-.2555-1.8505" style="fill:none;stroke-width:1px;stroke:#425f80"/>
|
||||||
|
<path d="m.5 7.0556c0 4.004 3.358 7.25 7.5 7.25s7.5-3.246 7.5-7.25" style="fill:none;stroke-width:.75px;stroke:#425f80"/>
|
||||||
|
<path d="m.7555 6.0556s3.105 2 7.2445 2 7.2445-2 7.2445-2" style="fill:none;stroke-width:1px;stroke:#425f80"/>
|
||||||
|
<path d="m12.014 14.616-.431-.212-1.2855-3.7975.2165-.421 2.5895-.838.4305.212 1.2855 3.797-.2165.4215z" style="fill:#be1515;stroke-width:.25px;stroke:#fff"/>
|
||||||
|
<path d="m13.534 9.5596 1.2855 3.797-.2165.4215-2.589.838-.431-.212-1.2855-3.7975.2165-.421 2.5895-.838zm-2.6695 1.038-.0255.0495 1.151 3.4.0625.0305 2.2005-.712.025-.049-1.151-3.4-.0625-.031z" style="fill:#fff;stroke-width:.5"/>
|
||||||
|
<path d="m13.14 8.8491.032.003.0315.0055.0315.0075.0305.0095.03.011.0295.0135.4305.2115.027.014.0255.016.025.0175.024.0185.0225.0205.0215.0215.0195.0225.019.024.017.025.0155.026.014.027.012.0275.0105.0285 1.2855 3.7975.009.0295.0075.03.005.03.0035.031.0015.0305-5e-4.031-.002.0305-.0045.0305-.006.0305-.008.0295-.0095.0295-.0115.0285-.013.0275-.2165.4215-.015.0265-.016.025-.0175.0245-.019.0235-.0205.022-.022.021-.0225.0195-.0245.018-.025.0165-.026.015-.027.0135-.0275.012-.0285.01-2.589.838-.031.009-.031.007-.032.0045-.032.003-.032.001-.032-.0015-.032-.0035-.0315-.005-.031-.0075-.031-.0095-.03-.011-.029-.0135-.431-.2115-.0265-.0145-.026-.0155-.025-.0175-.0235-.0185-.0225-.0205-.0215-.0215-.02-.0225-.0185-.024-.017-.025-.0155-.026-.014-.027-.0125-.0275-.0105-.0285-1.2855-3.7975-.009-.0295-.007-.03-.0055-.03-.003-.031-.0015-.0305v-.031l.0025-.0305.004-.0305.006-.0305.008-.0295.01-.0295.0115-.0285.013-.028.2165-.421.0145-.0265.016-.0255.018-.024.019-.0235.0205-.022.0215-.021.023-.0195.024-.018.025-.0165.026-.015.027-.0135.028-.012.028-.01 2.5895-.838.0305-.009.0315-.007.0315-.005.032-.0025.032-.001zm-2.625 1.3365-.2165.421 1.2855 3.7975.431.212 2.589-.838.2165-.4215-1.2855-3.797-.4305-.212z" style="stroke-width:.5"/>
|
||||||
|
<path d="m11.916 10.083c-.74-2.781-1.871-3.0275-1.871-3.0275" style="fill:none;stroke-width:.25px;stroke:#fff"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB |
|
@ -154,6 +154,7 @@ export interface ClientEvents extends ChannelTreeEntryEvents {
|
||||||
notify_mute_state_change: { muted: boolean }
|
notify_mute_state_change: { muted: boolean }
|
||||||
notify_speak_state_change: { speaking: boolean },
|
notify_speak_state_change: { speaking: boolean },
|
||||||
notify_audio_level_changed: { newValue: number },
|
notify_audio_level_changed: { newValue: number },
|
||||||
|
notify_status_icon_changed: { newIcon: ClientIcon },
|
||||||
|
|
||||||
music_status_update: {
|
music_status_update: {
|
||||||
player_buffered_index: number,
|
player_buffered_index: number,
|
||||||
|
@ -170,6 +171,16 @@ export interface ClientEvents extends ChannelTreeEntryEvents {
|
||||||
playlist_song_loaded: { song_id: number, success: boolean, error_msg?: string, metadata?: string },
|
playlist_song_loaded: { song_id: number, success: boolean, error_msg?: string, metadata?: string },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const StatusIconUpdateKeys: (keyof ClientProperties)[] = [
|
||||||
|
"client_away",
|
||||||
|
"client_input_hardware",
|
||||||
|
"client_output_hardware",
|
||||||
|
"client_output_muted",
|
||||||
|
"client_input_muted",
|
||||||
|
"client_is_channel_commander",
|
||||||
|
"client_talk_power"
|
||||||
|
];
|
||||||
|
|
||||||
export class ClientEntry extends ChannelTreeEntry<ClientEvents> {
|
export class ClientEntry extends ChannelTreeEntry<ClientEvents> {
|
||||||
readonly events: Registry<ClientEvents>;
|
readonly events: Registry<ClientEvents>;
|
||||||
readonly view: React.RefObject<ClientEntryView> = React.createRef<ClientEntryView>();
|
readonly view: React.RefObject<ClientEntryView> = React.createRef<ClientEntryView>();
|
||||||
|
@ -207,6 +218,16 @@ export class ClientEntry extends ChannelTreeEntry<ClientEvents> {
|
||||||
this._channel = null;
|
this._channel = null;
|
||||||
|
|
||||||
this.voiceCallbackStateChanged = this.handleVoiceStateChange.bind(this);
|
this.voiceCallbackStateChanged = this.handleVoiceStateChange.bind(this);
|
||||||
|
|
||||||
|
this.events.on(["notify_speak_state_change", "notify_mute_state_change"], () => this.events.fire_async("notify_status_icon_changed", { newIcon: this.getStatusIcon() }));
|
||||||
|
this.events.on("notify_properties_updated", event => {
|
||||||
|
for (const key of StatusIconUpdateKeys) {
|
||||||
|
if (key in event.updated_properties) {
|
||||||
|
this.events.fire_async("notify_status_icon_changed", { newIcon: this.getStatusIcon() })
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
|
@ -218,6 +239,7 @@ export class ClientEntry extends ChannelTreeEntry<ClientEvents> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this._channel = undefined;
|
this._channel = undefined;
|
||||||
|
this.events.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
setVoiceClient(handle: VoiceClient) {
|
setVoiceClient(handle: VoiceClient) {
|
||||||
|
@ -596,8 +618,6 @@ export class ClientEntry extends ChannelTreeEntry<ClientEvents> {
|
||||||
callback: () => {
|
callback: () => {
|
||||||
createInputModal(tr("Change client description"), tr("New description:<br>"), () => true, result => {
|
createInputModal(tr("Change client description"), tr("New description:<br>"), () => true, result => {
|
||||||
if(typeof(result) === "string") {
|
if(typeof(result) === "string") {
|
||||||
//TODO tr
|
|
||||||
console.log("Changing " + this.clientNickName() + "'s description to " + result);
|
|
||||||
this.channelTree.client.serverConnection.send_command("clientedit", {
|
this.channelTree.client.serverConnection.send_command("clientedit", {
|
||||||
clid: this.clientId(),
|
clid: this.clientId(),
|
||||||
client_description: result
|
client_description: result
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,9 +2,8 @@ import * as loader from "tc-loader";
|
||||||
import {Stage} from "tc-loader";
|
import {Stage} from "tc-loader";
|
||||||
import {ConnectionHandler, ConnectionState} from "tc-shared/ConnectionHandler";
|
import {ConnectionHandler, ConnectionState} from "tc-shared/ConnectionHandler";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import {useState} from "react";
|
|
||||||
import * as ReactDOM from "react-dom";
|
import * as ReactDOM from "react-dom";
|
||||||
import {ClientStatusIndicator} from "tc-shared/ui/tree/Client";
|
import {useState} from "react";
|
||||||
import {server_connections} from "tc-shared/ConnectionManager";
|
import {server_connections} from "tc-shared/ConnectionManager";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -67,12 +66,11 @@ const HandlerFaviconRenderer = (props: { connection: ConnectionHandler }) => {
|
||||||
const [ showClientStatus, setShowClientStatus ] = useState(props.connection.connection_state === ConnectionState.CONNECTED);
|
const [ showClientStatus, setShowClientStatus ] = useState(props.connection.connection_state === ConnectionState.CONNECTED);
|
||||||
props.connection.events().reactUse("notify_connection_state_changed", event => setShowClientStatus(event.new_state === ConnectionState.CONNECTED));
|
props.connection.events().reactUse("notify_connection_state_changed", event => setShowClientStatus(event.new_state === ConnectionState.CONNECTED));
|
||||||
|
|
||||||
|
const [ statusIcon, setStatusIcon ] = useState<ClientIcon>(props.connection.getClient().getStatusIcon());
|
||||||
|
props.connection.getClient().events.reactUse("notify_status_icon_changed", event => setStatusIcon(event.newIcon));
|
||||||
|
|
||||||
if(showClientStatus) {
|
if(showClientStatus) {
|
||||||
return <ClientStatusIndicator
|
return <ClientIconFaviconRenderer icon={statusIcon} key={"server"} />;
|
||||||
client={props.connection.getClient()}
|
|
||||||
renderer={icon => <ClientIconFaviconRenderer icon={icon} key={icon} />}
|
|
||||||
key={"server"}
|
|
||||||
/>;
|
|
||||||
} else {
|
} else {
|
||||||
return <DefaultFaviconRenderer key={"default"} />;
|
return <DefaultFaviconRenderer key={"default"} />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,6 @@ pub fn audio_client_create() -> AudioClientId {
|
||||||
client.client_id
|
client.client_id
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Let the audio client say hi (mutable).
|
|
||||||
/// If an error occurs or the client isn't known an exception will be thrown.
|
/// If an error occurs or the client isn't known an exception will be thrown.
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn audio_client_enqueue_buffer(client_id: AudioClientId, buffer: &[u8], packet_id: u16, codec: u8, is_head_packet: bool) -> Result<(), JsValue> {
|
pub fn audio_client_enqueue_buffer(client_id: AudioClientId, buffer: &[u8], packet_id: u16, codec: u8, is_head_packet: bool) -> Result<(), JsValue> {
|
||||||
|
|
Loading…
Reference in New Issue