Commit 6b74f77c authored by Chunchi Che's avatar Chunchi Che

rename function

parent 310c9bf5
...@@ -12,10 +12,7 @@ export interface Room { ...@@ -12,10 +12,7 @@ export interface Room {
// 通过房间ID和external_id加密得出房间密码 // 通过房间ID和external_id加密得出房间密码
// //
// 用于加入MC服房间 // 用于加入MC服房间
export function getEncryptedPasswd( export function getJoinRoomPasswd(roomID: string, external_id: number): string {
roomID: string,
external_id: number,
): string {
const optionsBuffer = new Uint8Array(6); const optionsBuffer = new Uint8Array(6);
optionsBuffer[1] = 3 << 4; optionsBuffer[1] = 3 << 4;
......
...@@ -9,7 +9,7 @@ import { useEffect, useState } from "react"; ...@@ -9,7 +9,7 @@ import { useEffect, useState } from "react";
import { LoaderFunction, useNavigate } from "react-router-dom"; import { LoaderFunction, useNavigate } from "react-router-dom";
import { useSnapshot } from "valtio"; import { useSnapshot } from "valtio";
import { getEncryptedPasswd, match } from "@/api"; import { getJoinRoomPasswd, match } from "@/api";
import { useConfig } from "@/config"; import { useConfig } from "@/config";
import { accountStore, deckStore, resetUniverse, roomStore } from "@/stores"; import { accountStore, deckStore, resetUniverse, roomStore } from "@/stores";
import { Background, IconFont, Select } from "@/ui/Shared"; import { Background, IconFont, Select } from "@/ui/Shared";
...@@ -87,7 +87,7 @@ export const Component: React.FC = () => { ...@@ -87,7 +87,7 @@ export const Component: React.FC = () => {
(server) => server.name === "mycard-athletic", (server) => server.name === "mycard-athletic",
); );
if (mcServer) { if (mcServer) {
const passWd = getEncryptedPasswd( const passWd = getJoinRoomPasswd(
watchStore.watchID, watchStore.watchID,
user.external_id, user.external_id,
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment