Browse Source

人事单独打包版本的背景图修改,header隐藏

Ryuiso 4 months ago
parent
commit
7b1c34c70e
2 changed files with 107 additions and 107 deletions
  1. 107 107
      app/components/chat.tsx
  2. BIN
      public/chat-bg.jpg

+ 107 - 107
app/components/chat.tsx

@@ -1865,113 +1865,113 @@ function _Chat() {
 
   return (
     <div className={styles.chat} key={session.id}>
-      {
-        <div className="window-header" data-tauri-drag-region>
-          <div style={{ display: 'flex', alignItems: 'center' }}
-            className={`window-header-title ${styles["chat-body-title"]}`}>
-            {
-              <div style={{ display: 'flex', alignItems: 'center' }}
-                className={`window-header-title ${styles["chat-body-title"]}`}>
-                <div>
-                  <img style={{ marginTop: '10%', marginRight: '10px', height: 42 }} src={faviconSrc.src} />
-                  {/* <Favicon className="window-header-icon" /> */}
-                </div>
-                <div>
-                  <div
-                    className={`window-header-main-title ${styles["chat-body-main-title"]}`}
-                  // onClickCapture={() => setIsEditingMessage(true)}
-                  >
-                    建科·小智
-                  </div>
-                  <div className={`window-header-sub-title ${styles["chat-body-main-title"]}`}>
-                    {Locale.Chat.SubTitle(session.messages.length)}
-                  </div>
-                </div>
-              </div>
-            }
-            {/* 获取应用列表头部展示在页面最上面 */}
-            {
-              false &&
-              <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
-                <Select
-                  style={{ width: '100%', height: 38, marginRight: 10 }}
-                  value={selectedFruit}
-                  onChange={(value: "ONLINE" | "LOCAL") => {
-                    chatStore.clearSessions();
-                    chatStore.updateCurrentSession((values) => {
-                      values.appId = globalStore.selectedAppId;
-                    });
-                    navigate({ pathname: '/newChat' });
-                    setSelectedFruit(value);
-                    chatStore.setChatMode(value);
-                  }}
-                >
-                  {fruits.map(fruit => (
-                    <Select.Option key={fruit.id} value={fruit.id}>
-                      {fruit.name}
-                    </Select.Option>
-                  ))}
-                </Select>
-                {
-                  appList.length > 0 ?
-                    <Select
-                      style={{ width: '100%', height: 38, marginRight: 5 }}
-                      placeholder='请选择'
-                      options={appList}
-                      value={appValue}
-                      onChange={(value) => {
-                        setAppValue(value);
-                        globalStore.setSelectedAppId(value);
-                        chatStore.clearSessions();
-                        chatStore.updateCurrentSession((values) => {
-                          values.appId = value;
-                        });
-                        useChatStore.setState({
-                          message: {
-                            content: '',
-                            role: 'assistant',
-                          }
-                        });
-                        setSendStatus(false);
-                      }}
-                    />
-                    :
-                    null
-                }
-              </div>
-            }
-          </div>
-          <div className="window-actions">
-            <div className="window-action-button" onClick={() => {
-              localStorage.clear();
-              window.location.reload();
-            }}>
-              <IconButton text='新聊天' icon={<FormOutlined />} />
-
-            </div>
-            {/* {showMaxIcon && (
-            <div className="window-action-button">
-              <IconButton
-                icon={config.tightBorder ? <MinIcon /> : <MaxIcon />}
-                bordered
-                title={Locale.Chat.Actions.FullScreen}
-                aria={Locale.Chat.Actions.FullScreen}
-                onClick={() => {
-                  config.update(
-                    (config) => (config.tightBorder = !config.tightBorder),
-                  );
-                }}
-              />
-            </div>
-          )} */}
-          </div>
-          {/* <PromptToast
-          showToast={!hitBottom}
-          showModal={showPromptModal}
-          setShowModal={setShowPromptModal}
-        /> */}
-        </div>
-      }
+      {/*{*/}
+      {/*  <div className="window-header" data-tauri-drag-region>*/}
+      {/*    <div style={{ display: 'flex', alignItems: 'center' }}*/}
+      {/*      className={`window-header-title ${styles["chat-body-title"]}`}>*/}
+      {/*      {*/}
+      {/*        <div style={{ display: 'flex', alignItems: 'center' }}*/}
+      {/*          className={`window-header-title ${styles["chat-body-title"]}`}>*/}
+      {/*          <div>*/}
+      {/*            <img style={{ marginTop: '10%', marginRight: '10px', height: 42 }} src={faviconSrc.src} />*/}
+      {/*            /!* <Favicon className="window-header-icon" /> *!/*/}
+      {/*          </div>*/}
+      {/*          <div>*/}
+      {/*            <div*/}
+      {/*              className={`window-header-main-title ${styles["chat-body-main-title"]}`}*/}
+      {/*            // onClickCapture={() => setIsEditingMessage(true)}*/}
+      {/*            >*/}
+      {/*              建科·小智*/}
+      {/*            </div>*/}
+      {/*            <div className={`window-header-sub-title ${styles["chat-body-main-title"]}`}>*/}
+      {/*              {Locale.Chat.SubTitle(session.messages.length)}*/}
+      {/*            </div>*/}
+      {/*          </div>*/}
+      {/*        </div>*/}
+      {/*      }*/}
+      {/*      /!* 获取应用列表头部展示在页面最上面 *!/*/}
+      {/*      {*/}
+      {/*        false &&*/}
+      {/*        <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>*/}
+      {/*          <Select*/}
+      {/*            style={{ width: '100%', height: 38, marginRight: 10 }}*/}
+      {/*            value={selectedFruit}*/}
+      {/*            onChange={(value: "ONLINE" | "LOCAL") => {*/}
+      {/*              chatStore.clearSessions();*/}
+      {/*              chatStore.updateCurrentSession((values) => {*/}
+      {/*                values.appId = globalStore.selectedAppId;*/}
+      {/*              });*/}
+      {/*              navigate({ pathname: '/newChat' });*/}
+      {/*              setSelectedFruit(value);*/}
+      {/*              chatStore.setChatMode(value);*/}
+      {/*            }}*/}
+      {/*          >*/}
+      {/*            {fruits.map(fruit => (*/}
+      {/*              <Select.Option key={fruit.id} value={fruit.id}>*/}
+      {/*                {fruit.name}*/}
+      {/*              </Select.Option>*/}
+      {/*            ))}*/}
+      {/*          </Select>*/}
+      {/*          {*/}
+      {/*            appList.length > 0 ?*/}
+      {/*              <Select*/}
+      {/*                style={{ width: '100%', height: 38, marginRight: 5 }}*/}
+      {/*                placeholder='请选择'*/}
+      {/*                options={appList}*/}
+      {/*                value={appValue}*/}
+      {/*                onChange={(value) => {*/}
+      {/*                  setAppValue(value);*/}
+      {/*                  globalStore.setSelectedAppId(value);*/}
+      {/*                  chatStore.clearSessions();*/}
+      {/*                  chatStore.updateCurrentSession((values) => {*/}
+      {/*                    values.appId = value;*/}
+      {/*                  });*/}
+      {/*                  useChatStore.setState({*/}
+      {/*                    message: {*/}
+      {/*                      content: '',*/}
+      {/*                      role: 'assistant',*/}
+      {/*                    }*/}
+      {/*                  });*/}
+      {/*                  setSendStatus(false);*/}
+      {/*                }}*/}
+      {/*              />*/}
+      {/*              :*/}
+      {/*              null*/}
+      {/*          }*/}
+      {/*        </div>*/}
+      {/*      }*/}
+      {/*    </div>*/}
+      {/*    <div className="window-actions">*/}
+      {/*      <div className="window-action-button" onClick={() => {*/}
+      {/*        localStorage.clear();*/}
+      {/*        window.location.reload();*/}
+      {/*      }}>*/}
+      {/*        <IconButton text='新聊天' icon={<FormOutlined />} />*/}
+      
+      {/*      </div>*/}
+      {/*      /!* {showMaxIcon && (*/}
+      {/*      <div className="window-action-button">*/}
+      {/*        <IconButton*/}
+      {/*          icon={config.tightBorder ? <MinIcon /> : <MaxIcon />}*/}
+      {/*          bordered*/}
+      {/*          title={Locale.Chat.Actions.FullScreen}*/}
+      {/*          aria={Locale.Chat.Actions.FullScreen}*/}
+      {/*          onClick={() => {*/}
+      {/*            config.update(*/}
+      {/*              (config) => (config.tightBorder = !config.tightBorder),*/}
+      {/*            );*/}
+      {/*          }}*/}
+      {/*        />*/}
+      {/*      </div>*/}
+      {/*    )} *!/*/}
+      {/*    </div>*/}
+      {/*    /!* <PromptToast*/}
+      {/*    showToast={!hitBottom}*/}
+      {/*    showModal={showPromptModal}*/}
+      {/*    setShowModal={setShowPromptModal}*/}
+      {/*  /> *!/*/}
+      {/*  </div>*/}
+      {/*}*/}
       <div
         className={styles["chat-body"]}
         ref={scrollRef}

BIN
public/chat-bg.jpg