Skip to content

Commit

Permalink
New title bar #159
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Dec 11, 2021
1 parent ad87a45 commit 3119b7d
Show file tree
Hide file tree
Showing 15 changed files with 96 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
ecmaVersion: 12,
},
rules: {
indent: ["error", "tab", { SwitchCase: 1 }],
indent: ["off", "tab", { SwitchCase: 1 }],
quotes: ["error", "double"],
semi: ["error", "never"],
eqeqeq: ["off"],
Expand Down
2 changes: 1 addition & 1 deletion app/application/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</div>

<!-- content -->
<div class="bg-gray-700 w-3/5 mx-auto mt-20 mb-60 rounded-2xl relative text-center content">
<div class="bg-gray-700 w-3/5 mx-auto mt-20 mb-60 rounded-2xl relative text-center content p-1">
<h1 class="h1 mb-5">Authme</h1>
<div class="mx-auto rounded-2xl bg-gray-800 w-2/3" id="choose">
<h3 class="pt-3">Please choose your import file!</h3>
Expand Down
4 changes: 4 additions & 0 deletions app/application/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ const go = (data) => {
// set div in html
document.querySelector(".content").appendChild(element)

if (i == names.length - 1) {
element.style.paddingBottom = "8px"
}

// elements
const name = document.querySelector(`#name${counter}`)
const code = document.querySelector(`#code${counter}`)
Expand Down
2 changes: 1 addition & 1 deletion app/confirm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</div>

<!-- content -->
<div class="bg-gray-700 w-3/5 m-auto mt-60 mb-32 rounded-2xl relative text-center">
<div class="bg-gray-700 w-3/5 m-auto mt-60 mb-32 rounded-2xl relative text-center p-1">
<h1>Authme</h1>
<div class="mx-auto rounded-2xl mb-12 bg-gray-800 w-2/3" id="choose">
<h3 class="pt-3">Welcome back!</h3>
Expand Down
2 changes: 1 addition & 1 deletion app/edit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h4>You can edit or delete your existing codes and you can add more codes.</h4>
</div>

<!-- content -->
<div class="bg-gray-700 w-3/5 m-auto mt-20 mb-60 rounded-2xl relative text-center">
<div class="bg-gray-700 w-3/5 m-auto mt-20 mb-60 rounded-2xl relative text-center p-1">
<!-- rollback -->
<div class="mx-auto rounded-2xl hidden bg-gray-800 w-2/3 rollback mt-20">
<h2 id="rollbackText" class="pt-5">Rollback</h2>
Expand Down
2 changes: 1 addition & 1 deletion app/export/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h4>You can export the codes you saved.</h4>
</div>

<!-- content -->
<div class="bg-gray-700 w-3/5 m-auto mt-20 mb-60 rounded-2xl relative text-center">
<div class="bg-gray-700 w-3/5 m-auto mt-20 mb-60 rounded-2xl relative text-center p-1">
<!-- before export -->
<div class="before_export mx-auto rounded-2xl bg-gray-800 w-2/3 mt-20 mb-20">
<h2 class="pt-5">Export codes</h2>
Expand Down
2 changes: 1 addition & 1 deletion app/import/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h4>You can create your import file from QR codes and Google Authenticator QR co
</div>

<!-- content -->
<div class="bg-gray-700 w-3/5 m-auto mt-20 mb-60 rounded-2xl relative text-center">
<div class="bg-gray-700 w-3/5 m-auto mt-20 mb-60 rounded-2xl relative text-center p-1">
<div class="mx-auto rounded-2xl bg-gray-800 w-2/3 mb-20 mt-20" id="choose">
<h2 class="pt-5">Instructions</h2>
<h3>You can create your import file here. For more information please read the documentation.</h3>
Expand Down
2 changes: 1 addition & 1 deletion app/landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</div>

<!-- content -->
<div class="bg-gray-700 w-3/5 m-auto mt-40 mb-60 rounded-2xl relative text-center">
<div class="bg-gray-700 w-3/5 m-auto mt-40 mb-60 rounded-2xl relative text-center p-1">
<h1>Authme</h1>
<div class="mx-auto rounded-2xl bg-gray-800 w-2/3 mb-16" id="choose">
<h3 class="pt-3">Welcome to Authme!</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body>
<div class="h-screen flex">
<!-- sidebar -->
<div class="h-screen bg-gray-900 flex flex-col justify-between overflow-auto">
<div class="h-screen bg-gray-900 flex flex-col justify-between overflow-visible">
<div class="flex flex-col">
<div class="mb-1 mt-5 mr-4 ml-4">
<button id="setting " class="buttonm settings" onclick="menu(event, 'setting')">
Expand Down Expand Up @@ -59,7 +59,7 @@
Feedback
</button>
</div>
<div class="mb-5 mt-1 mr-4 ml-4">
<div class="mb-12 mt-1 mr-4 ml-4">
<button class="buttonm" onclick="about()">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
Expand Down
4 changes: 4 additions & 0 deletions app/settings/src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ body {
.tabcontent {
animation: fadeEffect 1s;
}

.custom-titlebar-container {
overflow: hidden !important;
}
1 change: 1 addition & 0 deletions lib/typedef.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @property {Object} settings.search_bar_filter - Filter search results
* @property {Boolean} settings.search_bar_filter.name - Filter for names
* @property {Boolean} settings.search_bar_filter.description - Filter for description
* @property {Number} settings.default_display - Default display
*
* @property {Object} experimental - Experimental
* @property {Null|Number} experimental.sort - Sort codes
Expand Down
72 changes: 66 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,31 @@ const exitFromTray = () => {
const createWindow = () => {
logger.log("Started creating windows")

// ? create windows
/**
* Window Controls Overlay
*/
let wco = false

if (platform === "windows") {
wco = true
}

/**
* Create windows
*/
window_landing = new BrowserWindow({
width: 1900,
height: 1000,
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand All @@ -358,6 +376,13 @@ const createWindow = () => {
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand All @@ -372,6 +397,13 @@ const createWindow = () => {
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand All @@ -386,6 +418,13 @@ const createWindow = () => {
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand All @@ -400,6 +439,13 @@ const createWindow = () => {
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand All @@ -414,6 +460,13 @@ const createWindow = () => {
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand All @@ -428,6 +481,13 @@ const createWindow = () => {
minWidth: 1000,
minHeight: 600,
show: false,
titleBarStyle: wco ? "hidden" : null,
titleBarOverlay: wco
? {
color: "black",
symbolColor: "white",
}
: null,
backgroundColor: "#0A0A0A",
webPreferences: {
preload: path.join(__dirname, "preload.js"),
Expand Down Expand Up @@ -1528,7 +1588,7 @@ const createTray = () => {
const createMenu = () => {
const template = [
{
label: "&File",
label: "File",
submenu: [
{
label: application_shown ? "Hide app" : "Show app",
Expand Down Expand Up @@ -1589,7 +1649,7 @@ const createMenu = () => {
],
},
{
label: "&View",
label: "View",
submenu: [
{
label: "Reset",
Expand All @@ -1615,7 +1675,7 @@ const createMenu = () => {
],
},
{
label: "&Tools",
label: "Tools",
submenu: [
{
label: "Edit codes",
Expand Down Expand Up @@ -1719,7 +1779,7 @@ const createMenu = () => {
],
},
{
label: "&Help",
label: "Help",
submenu: [
{
label: "Documentation",
Expand Down Expand Up @@ -1765,7 +1825,7 @@ const createMenu = () => {
],
},
{
label: "&About",
label: "About",
submenu: [
{
label: "Show licenses",
Expand Down
2 changes: 1 addition & 1 deletion src/global.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/partials/components/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
}

.buttonmselected {
background-color: rgb(30, 30, 30);
border-color: rgb(30, 30, 30);
background-color: rgb(30, 30, 30) !important;
border-color: rgb(30, 30, 30) !important;
}
9 changes: 9 additions & 0 deletions src/partials/layout/titlebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@ body > div.titlebar.cet-windows > div.menubar > div.menubar-menu-button.open > u
margin-top: 1px;
margin-bottom: 1px;
}

#inWwZYhAUIn1Em9I4xse {
font-family: Arial, Helvetica, sans-serif;
color: white !important;
}

#Dkn6ACv01kUS9jSTUukB {
display: none !important;
}

0 comments on commit 3119b7d

Please sign in to comment.