add connection to home page
This commit is contained in:
Vendored
+7
-11
@@ -5,27 +5,23 @@
|
|||||||
gap: var(--large-gap);
|
gap: var(--large-gap);
|
||||||
scroll-snap-type: x mandatory;
|
scroll-snap-type: x mandatory;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-x: scroll;
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
#home-page > div > div {
|
#home-page > div > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
gap: var(--gap-between-tiles);
|
gap: var(--gap-between-tiles);
|
||||||
|
padding: var(--content-padding);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
scroll-snap-align: center;
|
|
||||||
}
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
#home-page > div {
|
|
||||||
padding-left: 0px;
|
|
||||||
padding-right: 0px;
|
|
||||||
padding-bottom: 0px;
|
|
||||||
}
|
|
||||||
#home-page > div > div {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
padding: var(--content-padding);
|
scroll-snap-align: center;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
#home-page #overview-section {
|
#home-page #overview-section {
|
||||||
|
|||||||
Vendored
+57
-4
@@ -268,12 +268,44 @@
|
|||||||
general: {
|
general: {
|
||||||
closeButton: "close"
|
closeButton: "close"
|
||||||
},
|
},
|
||||||
|
regional: {
|
||||||
|
weekdays: {
|
||||||
|
full: [
|
||||||
|
"Sunday",
|
||||||
|
"Monday",
|
||||||
|
"Tuesday",
|
||||||
|
"Wednesday",
|
||||||
|
"Thursday",
|
||||||
|
"Friday",
|
||||||
|
"Saturday"
|
||||||
|
],
|
||||||
|
abbreviated: [
|
||||||
|
"Sun",
|
||||||
|
"Mon",
|
||||||
|
"Tue",
|
||||||
|
"Wed",
|
||||||
|
"Thu",
|
||||||
|
"Fri",
|
||||||
|
"Sat"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
homePage: {
|
homePage: {
|
||||||
appName: "Comms",
|
appName: "Comms",
|
||||||
///
|
///
|
||||||
overviewHeadline: "Overview",
|
overviewHeadline: "Overview",
|
||||||
statusHeadline: "Status",
|
serverAddress: "Server address",
|
||||||
settingsButton: "Settings",
|
connectAudioLabel: "connect to server",
|
||||||
|
disconnectAudioLabel: "disconnect from server",
|
||||||
|
manageConnectionsAudioLabel: "manage connections",
|
||||||
|
mailboxHeadline: "Server Mailbox",
|
||||||
|
mailboxDisabled: "Mailbox disabled. You will miss out on messages sent while you're away",
|
||||||
|
mailboxEnabled: "Mailbox enabled. If you disconnect, the server will keep your messages temporarily",
|
||||||
|
outboxHeadline: "Outbox",
|
||||||
|
outboxAllItemsSent: "All items sent",
|
||||||
|
yourNameLabel: "Your name",
|
||||||
|
setNameButton: "Set",
|
||||||
|
firstDayOfWeekLabel: "First day of week",
|
||||||
scrollToChatButton: "Chats",
|
scrollToChatButton: "Chats",
|
||||||
///
|
///
|
||||||
backToOverviewAudioLabel: "go back to overview",
|
backToOverviewAudioLabel: "go back to overview",
|
||||||
@@ -295,7 +327,28 @@
|
|||||||
|
|
||||||
// src/View/homePage.tsx
|
// src/View/homePage.tsx
|
||||||
function HomePage() {
|
function HomePage() {
|
||||||
const overviewSection = /* @__PURE__ */ createElement("div", { id: "overview-section" }, /* @__PURE__ */ createElement("h2", null, translations.homePage.overviewHeadline), /* @__PURE__ */ createElement("div", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "cell_tower"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("b", null, translations.homePage.statusHeadline))), /* @__PURE__ */ createElement("button", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "settings"), /* @__PURE__ */ createElement("div", null, translations.homePage.settingsButton)), /* @__PURE__ */ createElement("div", { class: "mobile-only" }, /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-row justify-end" }, /* @__PURE__ */ createElement("button", { class: "ghost width-50", "on:click": scrollToChat }, translations.homePage.scrollToChatButton, /* @__PURE__ */ createElement("span", { class: "icon" }, "arrow_forward")))));
|
const overviewSection = /* @__PURE__ */ createElement("div", { id: "overview-section" }, /* @__PURE__ */ createElement("h2", null, translations.homePage.overviewHeadline), /* @__PURE__ */ createElement("label", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "cell_tower"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translations.homePage.serverAddress), /* @__PURE__ */ createElement("input", null))), /* @__PURE__ */ createElement("div", { class: "flex-row" }, /* @__PURE__ */ createElement(
|
||||||
|
"button",
|
||||||
|
{
|
||||||
|
class: "danger flex justify-center",
|
||||||
|
"aria-label": translations.homePage.disconnectAudioLabel
|
||||||
|
},
|
||||||
|
/* @__PURE__ */ createElement("span", { class: "icon" }, "link_off")
|
||||||
|
), /* @__PURE__ */ createElement(
|
||||||
|
"button",
|
||||||
|
{
|
||||||
|
class: "flex justify-center",
|
||||||
|
"aria-label": translations.homePage.manageConnectionsAudioLabel
|
||||||
|
},
|
||||||
|
/* @__PURE__ */ createElement("span", { class: "icon" }, "build")
|
||||||
|
), /* @__PURE__ */ createElement(
|
||||||
|
"button",
|
||||||
|
{
|
||||||
|
class: "primary flex justify-center",
|
||||||
|
"aria-label": translations.homePage.connectAudioLabel
|
||||||
|
},
|
||||||
|
/* @__PURE__ */ createElement("span", { class: "icon" }, "link")
|
||||||
|
)), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "inbox"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("b", null, translations.homePage.mailboxHeadline), /* @__PURE__ */ createElement("span", { class: "error" }, translations.homePage.mailboxDisabled))), /* @__PURE__ */ createElement("div", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "outbox"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("b", null, translations.homePage.outboxHeadline), /* @__PURE__ */ createElement("span", { class: "success" }, translations.homePage.outboxAllItemsSent))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("label", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "account_circle"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translations.homePage.yourNameLabel), /* @__PURE__ */ createElement("input", null))), /* @__PURE__ */ createElement("div", { class: "flex-row justify-end" }, /* @__PURE__ */ createElement("button", { class: "width-50" }, translations.homePage.setNameButton, /* @__PURE__ */ createElement("span", { class: "icon" }, "check"))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("label", { class: "tile flex-no" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "calendar_month"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translations.homePage.firstDayOfWeekLabel), /* @__PURE__ */ createElement("select", null))), /* @__PURE__ */ createElement("div", { class: "mobile-only" }, /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-row justify-end" }, /* @__PURE__ */ createElement("button", { class: "ghost width-50", "on:click": scrollToChat }, translations.homePage.scrollToChatButton, /* @__PURE__ */ createElement("span", { class: "icon" }, "arrow_forward")))));
|
||||||
const chatSection = /* @__PURE__ */ createElement("div", { id: "chat-section" }, /* @__PURE__ */ createElement("h2", null, translations.homePage.chatsHeadline), /* @__PURE__ */ createElement("div", { class: "flex-row width-input" }, /* @__PURE__ */ createElement(
|
const chatSection = /* @__PURE__ */ createElement("div", { id: "chat-section" }, /* @__PURE__ */ createElement("h2", null, translations.homePage.chatsHeadline), /* @__PURE__ */ createElement("div", { class: "flex-row width-input" }, /* @__PURE__ */ createElement(
|
||||||
"input",
|
"input",
|
||||||
{
|
{
|
||||||
@@ -390,7 +443,7 @@
|
|||||||
// connection
|
// connection
|
||||||
socketAddress: `${DATA_VERSION}/connection/socket-address`,
|
socketAddress: `${DATA_VERSION}/connection/socket-address`,
|
||||||
// settings
|
// settings
|
||||||
userName: `${DATA_VERSION}/settings/user-name`,
|
username: `${DATA_VERSION}/settings/user-name`,
|
||||||
firstDayOfWeek: `${DATA_VERSION}/settings/first-day-of-week`,
|
firstDayOfWeek: `${DATA_VERSION}/settings/first-day-of-week`,
|
||||||
// history
|
// history
|
||||||
previousAddresses: `${DATA_VERSION}/history/previous-addresses`,
|
previousAddresses: `${DATA_VERSION}/history/previous-addresses`,
|
||||||
|
|||||||
Vendored
+3
-1
@@ -863,7 +863,9 @@ code {
|
|||||||
.secondary,
|
.secondary,
|
||||||
.secondary *,
|
.secondary *,
|
||||||
.helper-text,
|
.helper-text,
|
||||||
.error-text,
|
.error,
|
||||||
|
.warning,
|
||||||
|
.success,
|
||||||
label.tile > div > span:not(.icon) {
|
label.tile > div > span:not(.icon) {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-14
@@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
scroll-snap-type: x mandatory;
|
scroll-snap-type: x mandatory;
|
||||||
scroll-behavior: smooth;
|
scroll-behavior: smooth;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-x: scroll;
|
||||||
|
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#home-page > div > div {
|
#home-page > div > div {
|
||||||
@@ -14,26 +20,14 @@
|
|||||||
justify-content: start;
|
justify-content: start;
|
||||||
|
|
||||||
gap: var(--gap-between-tiles);
|
gap: var(--gap-between-tiles);
|
||||||
|
padding: var(--content-padding);
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
|
|
||||||
scroll-snap-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
#home-page > div {
|
|
||||||
padding-left: 0px;
|
|
||||||
padding-right: 0px;
|
|
||||||
padding-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#home-page > div > div {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
|
|
||||||
padding: var(--content-padding)
|
scroll-snap-align: center;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
|
|||||||
+72
-6
@@ -10,16 +10,82 @@ export function HomePage() {
|
|||||||
<div id="overview-section">
|
<div id="overview-section">
|
||||||
<h2>{translations.homePage.overviewHeadline}</h2>
|
<h2>{translations.homePage.overviewHeadline}</h2>
|
||||||
|
|
||||||
<div class="tile flex-no">
|
<label class="tile flex-no">
|
||||||
<span class="icon">cell_tower</span>
|
<span class="icon">cell_tower</span>
|
||||||
<div>
|
<div>
|
||||||
<b>{translations.homePage.statusHeadline}</b>
|
<span>{translations.homePage.serverAddress}</span>
|
||||||
|
<input></input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</label>
|
||||||
<button class="tile flex-no">
|
|
||||||
<span class="icon">settings</span>
|
<div class="flex-row">
|
||||||
<div>{translations.homePage.settingsButton}</div>
|
<button
|
||||||
|
class="danger flex justify-center"
|
||||||
|
aria-label={translations.homePage.disconnectAudioLabel}
|
||||||
|
>
|
||||||
|
<span class="icon">link_off</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="flex justify-center"
|
||||||
|
aria-label={translations.homePage.manageConnectionsAudioLabel}
|
||||||
|
>
|
||||||
|
<span class="icon">build</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="primary flex justify-center"
|
||||||
|
aria-label={translations.homePage.connectAudioLabel}
|
||||||
|
>
|
||||||
|
<span class="icon">link</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr></hr>
|
||||||
|
|
||||||
|
<div class="tile flex-no">
|
||||||
|
<span class="icon">inbox</span>
|
||||||
|
<div>
|
||||||
|
<b>{translations.homePage.mailboxHeadline}</b>
|
||||||
|
<span class="error">
|
||||||
|
{translations.homePage.mailboxDisabled}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tile flex-no">
|
||||||
|
<span class="icon">outbox</span>
|
||||||
|
<div>
|
||||||
|
<b>{translations.homePage.outboxHeadline}</b>
|
||||||
|
<span class="success">
|
||||||
|
{translations.homePage.outboxAllItemsSent}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr></hr>
|
||||||
|
|
||||||
|
<label class="tile flex-no">
|
||||||
|
<span class="icon">account_circle</span>
|
||||||
|
<div>
|
||||||
|
<span>{translations.homePage.yourNameLabel}</span>
|
||||||
|
<input></input>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
<div class="flex-row justify-end">
|
||||||
|
<button class="width-50">
|
||||||
|
{translations.homePage.setNameButton}
|
||||||
|
<span class="icon">check</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr></hr>
|
||||||
|
|
||||||
|
<label class="tile flex-no">
|
||||||
|
<span class="icon">calendar_month</span>
|
||||||
|
<div>
|
||||||
|
<span>{translations.homePage.firstDayOfWeekLabel}</span>
|
||||||
|
<select></select>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
<div class="mobile-only">
|
<div class="mobile-only">
|
||||||
<hr></hr>
|
<hr></hr>
|
||||||
|
|||||||
@@ -3,6 +3,29 @@ const englishTranslations = {
|
|||||||
closeButton: "close",
|
closeButton: "close",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
regional: {
|
||||||
|
weekdays: {
|
||||||
|
full: [
|
||||||
|
"Sunday",
|
||||||
|
"Monday",
|
||||||
|
"Tuesday",
|
||||||
|
"Wednesday",
|
||||||
|
"Thursday",
|
||||||
|
"Friday",
|
||||||
|
"Saturday",
|
||||||
|
],
|
||||||
|
abbreviated: [
|
||||||
|
"Sun",
|
||||||
|
"Mon",
|
||||||
|
"Tue",
|
||||||
|
"Wed",
|
||||||
|
"Thu",
|
||||||
|
"Fri",
|
||||||
|
"Sat",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
homePage: {
|
homePage: {
|
||||||
appName: "Comms",
|
appName: "Comms",
|
||||||
|
|
||||||
@@ -10,8 +33,22 @@ const englishTranslations = {
|
|||||||
|
|
||||||
overviewHeadline: "Overview",
|
overviewHeadline: "Overview",
|
||||||
|
|
||||||
statusHeadline: "Status",
|
serverAddress: "Server address",
|
||||||
settingsButton: "Settings",
|
connectAudioLabel: "connect to server",
|
||||||
|
disconnectAudioLabel: "disconnect from server",
|
||||||
|
manageConnectionsAudioLabel: "manage connections",
|
||||||
|
|
||||||
|
mailboxHeadline: "Server Mailbox",
|
||||||
|
mailboxDisabled: "Mailbox disabled. You will miss out on messages sent while you're away",
|
||||||
|
mailboxEnabled: "Mailbox enabled. If you disconnect, the server will keep your messages temporarily",
|
||||||
|
|
||||||
|
outboxHeadline: "Outbox",
|
||||||
|
outboxAllItemsSent: "All items sent",
|
||||||
|
|
||||||
|
yourNameLabel: "Your name",
|
||||||
|
setNameButton: "Set",
|
||||||
|
|
||||||
|
firstDayOfWeekLabel: "First day of week",
|
||||||
|
|
||||||
scrollToChatButton: "Chats",
|
scrollToChatButton: "Chats",
|
||||||
|
|
||||||
@@ -29,9 +66,7 @@ const englishTranslations = {
|
|||||||
settingsHeadline: "Settings",
|
settingsHeadline: "Settings",
|
||||||
|
|
||||||
///
|
///
|
||||||
|
},
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const allTranslations: { [language: string]: typeof englishTranslations } = {
|
const allTranslations: { [language: string]: typeof englishTranslations } = {
|
||||||
|
|||||||
Reference in New Issue
Block a user