Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Desktop Client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SeeBeyond
Desktop Client
Commits
032bba22
Commit
032bba22
authored
Jun 17, 2020
by
SpinShare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added title bar
parent
5803a765
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
2 deletions
+124
-2
src/App.vue
src/App.vue
+10
-2
src/components/WindowTitleBar.vue
src/components/WindowTitleBar.vue
+114
-0
No files found.
src/App.vue
View file @
032bba22
<
template
>
<
template
>
<div
id=
"app"
tabindex=
"-1"
v-on:keydown.esc=
"closeOverlays()"
>
<div
id=
"app"
tabindex=
"-1"
v-on:keydown.esc=
"closeOverlays()"
>
<WindowTitleBar
/>
<main>
<main>
<Navigation
v-bind:downloadQueueCount=
"downloadQueue.length"
v-bind:downloadOverlayShown=
"showDownloadOverlay"
/>
<Navigation
v-bind:downloadQueueCount=
"downloadQueue.length"
v-bind:downloadOverlayShown=
"showDownloadOverlay"
/>
<router-view
/>
<router-view
/>
...
@@ -29,6 +31,7 @@
...
@@ -29,6 +31,7 @@
import
SSAPI
from
'
@/modules/module.api.js
'
;
import
SSAPI
from
'
@/modules/module.api.js
'
;
import
SRXD
from
'
@/modules/module.srxd.js
'
;
import
SRXD
from
'
@/modules/module.srxd.js
'
;
import
WindowTitleBar
from
'
@/components/WindowTitleBar.vue
'
;
import
Navigation
from
'
@/components/Navigation/Navigation.vue
'
;
import
Navigation
from
'
@/components/Navigation/Navigation.vue
'
;
import
ContextMenu
from
'
@/components/ContextMenu/ContextMenu.vue
'
;
import
ContextMenu
from
'
@/components/ContextMenu/ContextMenu.vue
'
;
import
UpdateOverlay
from
'
@/components/Overlays/UpdateOverlay.vue
'
;
import
UpdateOverlay
from
'
@/components/Overlays/UpdateOverlay.vue
'
;
...
@@ -37,6 +40,7 @@
...
@@ -37,6 +40,7 @@
export
default
{
export
default
{
name
:
'
App
'
,
name
:
'
App
'
,
components
:
{
components
:
{
WindowTitleBar
,
Navigation
,
Navigation
,
ContextMenu
,
ContextMenu
,
UpdateOverlay
,
UpdateOverlay
,
...
@@ -209,7 +213,7 @@
...
@@ -209,7 +213,7 @@
margin: 0;
margin: 0;
background: #212629;
background: #212629;
color: #fff;
color: #fff;
overflow
-x
: hidden;
overflow: hidden;
font-family: 'Open Sans', sans-serif;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
font-size: 14px;
}
}
...
@@ -227,7 +231,11 @@
...
@@ -227,7 +231,11 @@
main {
main {
display: grid;
display: grid;
margin-left: 60px;
margin-left: 60px;
min-height: 100vh;
position: absolute;
top: 30px;
bottom: 0px;
left: 0px;
right: 0px;
overflow-y: scroll;
overflow-y: scroll;
}
}
button, .button {
button, .button {
...
...
src/components/WindowTitleBar.vue
0 → 100644
View file @
032bba22
<
template
>
<div
class=
"window-title-bar"
>
<div
class=
"title"
>
<div
class=
"back"
v-on:click=
"NavigateBack()"
><i
class=
"mdi mdi-arrow-left"
></i></div>
<div
class=
"text"
>
SpinShare
</div>
</div>
<div
class=
"actions-windows"
v-if=
"platform != 'darwin'"
>
<div
class=
"action"
v-on:click=
"WindowMinimize()"
><i
class=
"mdi mdi-window-minimize"
></i></div>
<div
class=
"action"
v-on:click=
"WindowMaximize()"
v-if=
"!isMaximized"
><i
class=
"mdi mdi-window-maximize"
></i></div>
<div
class=
"action"
v-on:click=
"WindowMaximize()"
v-if=
"isMaximized"
><i
class=
"mdi mdi-window-restore"
></i></div>
<div
class=
"action action-close"
v-on:click=
"WindowClose()"
><i
class=
"mdi mdi-window-close"
></i></div>
</div>
</div>
</
template
>
<
script
>
import
{
remote
}
from
'
electron
'
;
export
default
{
name
:
'
WindowTitleBar
'
,
data
:
function
()
{
return
{
platform
:
"
win32
"
,
isMaximized
:
false
}
},
mounted
:
function
()
{
this
.
$data
.
system
=
process
.
platform
;
this
.
$data
.
isMaximized
=
remote
.
BrowserWindow
.
getFocusedWindow
().
isMaximized
();
},
methods
:
{
NavigateBack
:
function
()
{
this
.
$router
.
back
();
},
WindowMinimize
:
function
()
{
remote
.
BrowserWindow
.
getFocusedWindow
().
minimize
();
},
WindowMaximize
:
function
()
{
if
(
remote
.
BrowserWindow
.
getFocusedWindow
().
isMaximized
())
{
remote
.
BrowserWindow
.
getFocusedWindow
().
unmaximize
();
}
else
{
remote
.
BrowserWindow
.
getFocusedWindow
().
maximize
();
}
this
.
$data
.
isMaximized
=
remote
.
BrowserWindow
.
getFocusedWindow
().
isMaximized
();
},
WindowClose
:
function
()
{
remote
.
BrowserWindow
.
getFocusedWindow
().
close
();
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.window-title-bar {
position: fixed;
display: grid;
grid-template-columns: 1fr auto;
top: 0px;
left: 0px;
right: 0px;
z-index: 1000;
font-size: 12px;
height: 30px;
overflow: hidden;
background: #000;
color: #fff;
-webkit-app-region: drag;
& .title {
display: grid;
grid-template-columns: auto 1fr;
grid-gap: 8px;
align-items: center;
& .back {
display: flex;
justify-content: center;
align-items: center;
height: 30px;
font-size: 16px;
padding: 0px 15px;
-webkit-app-region: no-drag;
&:hover {
cursor: pointer;
background: rgba(255,255,255,0.2);
}
}
}
& .actions-windows {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
& .action {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
padding: 0px 15px;
-webkit-app-region: no-drag;
&:hover {
background: rgba(255,255,255,0.2);
}
&.action-close:hover {
background: rgb(204, 28, 28);
}
}
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment