mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Add Electron title bar
This commit is contained in:
+1
-112
@@ -7,119 +7,8 @@
|
|||||||
<link rel="icon" href="./src/resources/images/logo.png" />
|
<link rel="icon" href="./src/resources/images/logo.png" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- <div id="electron-title-bar">
|
<!--
|
||||||
<div class="macos-padding"></div>
|
|
||||||
<div id="window-title"></div>
|
|
||||||
<div class="window-controls">
|
|
||||||
<mdui-button-icon icon="remove" id="window-minimize"></mdui-button-icon>
|
|
||||||
<mdui-button-icon icon="stack--outlined" id="window-restore" class="hidden"></mdui-button-icon>
|
|
||||||
<mdui-button-icon icon="ad--outlined" id="window-maximize"></mdui-button-icon>
|
|
||||||
<mdui-button-icon icon="close" id="window-close"></mdui-button-icon>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="main-wrapper">
|
<div id="main-wrapper">
|
||||||
<div id="login-form" class="auth-container">
|
|
||||||
<div class="auth-card fade-in">
|
|
||||||
<div class="auth-header">
|
|
||||||
<h2>
|
|
||||||
<span class="material-symbols filled large">login</span>
|
|
||||||
Добро пожаловать!
|
|
||||||
</h2>
|
|
||||||
<p>Войдите в свой аккаунт</p>
|
|
||||||
</div>
|
|
||||||
<div class="auth-body">
|
|
||||||
<div id="login-alerts"></div>
|
|
||||||
|
|
||||||
<form id="login-form-element">
|
|
||||||
<mdui-text-field
|
|
||||||
label="Имя пользователя"
|
|
||||||
id="login-username"
|
|
||||||
name="username"
|
|
||||||
variant="outlined"
|
|
||||||
icon="person--filled"
|
|
||||||
autocomplete="username"
|
|
||||||
required>
|
|
||||||
</mdui-text-field>
|
|
||||||
<mdui-text-field
|
|
||||||
label="Пароль"
|
|
||||||
id="login-password"
|
|
||||||
name="password"
|
|
||||||
variant="outlined"
|
|
||||||
type="password"
|
|
||||||
toggle-password
|
|
||||||
icon="password--filled"
|
|
||||||
autocomplete="current-password"
|
|
||||||
required>
|
|
||||||
</mdui-text-field>
|
|
||||||
|
|
||||||
<mdui-button type="submit">Войти</mdui-button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<p>Ещё нет аккаунта? <a href="#" id="register-link" class="link">Зарегистрируйтесь</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="register-form" class="auth-container" style="display: none;">
|
|
||||||
<div class="auth-card fade-in">
|
|
||||||
<div class="auth-header">
|
|
||||||
<h2>
|
|
||||||
<span class="material-symbols filled large">person_add</span>
|
|
||||||
Регистрация
|
|
||||||
</h2>
|
|
||||||
<p>Создайте новый аккаунт</p>
|
|
||||||
</div>
|
|
||||||
<div class="auth-body">
|
|
||||||
<div id="register-alerts"></div>
|
|
||||||
|
|
||||||
<form id="register-form-element">
|
|
||||||
<mdui-text-field
|
|
||||||
label="Имя пользователя"
|
|
||||||
id="register-username"
|
|
||||||
name="username"
|
|
||||||
variant="outlined"
|
|
||||||
icon="person--filled"
|
|
||||||
autocomplete="username"
|
|
||||||
maxlength="20"
|
|
||||||
counter
|
|
||||||
required>
|
|
||||||
</mdui-text-field>
|
|
||||||
<mdui-text-field
|
|
||||||
label="Пароль"
|
|
||||||
id="register-password"
|
|
||||||
name="password"
|
|
||||||
variant="outlined"
|
|
||||||
type="password"
|
|
||||||
toggle-password
|
|
||||||
icon="password--filled"
|
|
||||||
autocomplete="new-password"
|
|
||||||
required>
|
|
||||||
</mdui-text-field>
|
|
||||||
<mdui-text-field
|
|
||||||
label="Подтвердите пароль"
|
|
||||||
id="register-confirm-password"
|
|
||||||
name="confirm_password"
|
|
||||||
variant="outlined"
|
|
||||||
type="password"
|
|
||||||
toggle-password
|
|
||||||
icon="password--filled"
|
|
||||||
autocomplete="new-password"
|
|
||||||
required>
|
|
||||||
</mdui-text-field>
|
|
||||||
|
|
||||||
<mdui-button type="submit">Зарегистрироваться</mdui-button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<p>
|
|
||||||
Уже есть аккаунт?
|
|
||||||
<a href="#" id="login-link" class="link">Войдите</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="chat-interface" style="display: none;">
|
<div id="chat-interface" style="display: none;">
|
||||||
<div class="all-container">
|
<div class="all-container">
|
||||||
<div class="chat-list" id="chat-list">
|
<div class="chat-list" id="chat-list">
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { ElectronTitleBar } from "./components/Electron";
|
||||||
import ChatScreen from "./screen/ChatScreen";
|
import ChatScreen from "./screen/ChatScreen";
|
||||||
import LoginScreen from "./screen/LoginScreen";
|
import LoginScreen from "./screen/LoginScreen";
|
||||||
import RegisterScreen from "./screen/RegisterScreen";
|
import RegisterScreen from "./screen/RegisterScreen";
|
||||||
@@ -25,6 +26,7 @@ export default function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<ElectronTitleBar />
|
||||||
<div id="main-wrapper">
|
<div id="main-wrapper">
|
||||||
{page}
|
{page}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { PRODUCT_NAME } from "../../core/config";
|
||||||
|
|
||||||
|
export function ElectronTitleBar() {
|
||||||
|
if (window.electronInterface !== undefined) {
|
||||||
|
return (
|
||||||
|
<div id="electron-title-bar">
|
||||||
|
{window.electronInterface.platform == "darwin" ? <div className="macos-padding"></div> : undefined}
|
||||||
|
<div id="window-title">{PRODUCT_NAME}</div>
|
||||||
|
{/* <div className="window-controls">
|
||||||
|
<mdui-button-icon icon="remove" id="window-minimize"></mdui-button-icon>
|
||||||
|
<mdui-button-icon icon="stack--outlined" id="window-restore" className="hidden"></mdui-button-icon>
|
||||||
|
<mdui-button-icon icon="ad--outlined" id="window-maximize"></mdui-button-icon>
|
||||||
|
<mdui-button-icon icon="close" id="window-close"></mdui-button-icon>
|
||||||
|
</div> */}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user