home
@@ -30,16 +25,23 @@
diff --git a/frontend/src/components/header/Action.vue b/frontend/src/components/header/Action.vue
new file mode 100644
index 00000000..5c4bc8fe
--- /dev/null
+++ b/frontend/src/components/header/Action.vue
@@ -0,0 +1,17 @@
+
+
+ {{ icon }}
+ {{ label }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/header/HeaderBar.vue b/frontend/src/components/header/HeaderBar.vue
new file mode 100644
index 00000000..ef4edc4c
--- /dev/null
+++ b/frontend/src/components/header/HeaderBar.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/css/header.css b/frontend/src/css/header.css
index fcebc9fb..3a623424 100644
--- a/frontend/src/css/header.css
+++ b/frontend/src/css/header.css
@@ -6,9 +6,25 @@ header {
position: fixed;
top: 0;
left: 0;
+ height: 4em;
width: 100%;
padding: 0;
display: flex;
+ padding: 0.5em 0.5em 0.5em 1em;
+ align-items: center;
+}
+
+header > * {
+ flex: 0 0 auto;
+}
+
+header title {
+ display: block;
+ flex: 1 1 auto;
+ padding: 0 1em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ font-size: 1.2em;
}
header .overlay {
@@ -30,17 +46,6 @@ header img {
height: 2.5em;
}
-header>div:first-child>.action {
- display: none;
-}
-
-header>div {
- display: flex;
- width: 100%;
- padding: 0.5em 0.5em 0.5em 1em;
- align-items: center;
-}
-
header .action span {
display: none;
}
@@ -50,19 +55,8 @@ header>div div {
position: relative;
}
-header>div:last-child div {
- display: flex;
-}
-
-header>div:first-child {
- height: 4em;
-}
-
-header>div:last-child {
- justify-content: flex-end;
-}
-
-header .search-button {
+header .search-button,
+header .menu-button {
display: none;
}
diff --git a/frontend/src/css/mobile.css b/frontend/src/css/mobile.css
index 556ca033..6417080f 100644
--- a/frontend/src/css/mobile.css
+++ b/frontend/src/css/mobile.css
@@ -70,6 +70,7 @@
box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 3px, rgba(0, 0, 0, 0.12) 0px 1px 2px;
width: 95%;
max-width: 20em;
+ z-index: 1;
}
#file-selection .action {
border-radius: 50%;
@@ -81,6 +82,9 @@
color: #6f6f6f;
margin-right: auto;
}
+ #file-selection .action span {
+ display: none;
+ }
nav {
top: 0;
z-index: 99999;
@@ -95,7 +99,7 @@
left: 0;
}
header .search-button,
- header>div:first-child>.action {
+ header .menu-button {
display: inherit;
}
header img {
diff --git a/frontend/src/css/styles.css b/frontend/src/css/styles.css
index b8afd786..21fc27f9 100644
--- a/frontend/src/css/styles.css
+++ b/frontend/src/css/styles.css
@@ -117,25 +117,8 @@
overflow: hidden;
}
-#previewer .bar {
- width: 100%;
- display: flex;
- padding: 0.5em;
- height: 3.7em;
-}
-
-#previewer .bar > * {
- flex: 0 0 auto;
-}
-
-#previewer .bar .title {
- display: block;
- flex: 1 1 auto;
- padding: 0 1em;
- line-height: 2.3em;
- overflow: hidden;
- text-overflow: ellipsis;
- font-size: 1.2em;
+#previewer header {
+ background: none;
color: #fff;
}
@@ -152,8 +135,9 @@
}
#previewer .preview {
+ margin-top: 4em;
text-align: center;
- height: calc(100vh - 3.7em);
+ height: calc(100vh - 4em);
}
#previewer .preview pre {
@@ -218,6 +202,7 @@
#editor-container {
background-color: #fafafa;
position: fixed;
+ margin-top: 4em;
top: 0;
left: 0;
width: 100%;
@@ -225,32 +210,13 @@
overflow: hidden;
}
-#editor-container .bar {
- width: 100%;
- text-align: right;
- display: flex;
- padding: 0.5em;
- height: 3.7em;
- background-color: #fff;
- border-bottom: 1px solid rgba(0, 0, 0, 0.075);
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
-}
-
-#editor-container .title {
- margin-right: auto;
- padding: 0 1em;
- line-height: 2.7em;
- overflow: hidden;
- word-break: break-word;
-}
-
#previewer .loading {
height: 100%;
width: 100%;
}
#editor-container #editor {
- height: calc(100vh - 8.2em);
+ height: calc(100vh - 8.4em);
}
#editor-container #breadcrumbs {
diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js
index 07b9b124..367a73e1 100644
--- a/frontend/src/router/index.js
+++ b/frontend/src/router/index.js
@@ -10,9 +10,7 @@ import Settings from '@/views/Settings'
import GlobalSettings from '@/views/settings/Global'
import ProfileSettings from '@/views/settings/Profile'
import Shares from '@/views/settings/Shares'
-import Error403 from '@/views/errors/403'
-import Error404 from '@/views/errors/404'
-import Error500 from '@/views/errors/500'
+import Errors from '@/views/Errors'
import store from '@/store'
import { baseURL } from '@/utils/constants'
@@ -102,17 +100,29 @@ const router = new Router({
{
path: '/403',
name: 'Forbidden',
- component: Error403
+ component: Errors,
+ props: {
+ errorCode: 403,
+ showHeader: true
+ }
},
{
path: '/404',
name: 'Not Found',
- component: Error404
+ component: Errors,
+ props: {
+ errorCode: 404,
+ showHeader: true
+ }
},
{
path: '/500',
name: 'Internal Server Error',
- component: Error500
+ component: Errors,
+ props: {
+ errorCode: 500,
+ showHeader: true
+ }
},
{
path: '/files',
diff --git a/frontend/src/views/Errors.vue b/frontend/src/views/Errors.vue
new file mode 100644
index 00000000..8926f9e5
--- /dev/null
+++ b/frontend/src/views/Errors.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+ {{ icon }}
+ {{ message }}
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue
index ee2e8d8f..ca16bff0 100644
--- a/frontend/src/views/Files.vue
+++ b/frontend/src/views/Files.vue
@@ -1,5 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ selectedCount }} selected
+
+
+
+
+
+
+
home
@@ -11,11 +42,7 @@
-
-
-
-
-
+
@@ -28,13 +55,27 @@
diff --git a/frontend/src/views/Share.vue b/frontend/src/views/Share.vue
index 329c51ec..fdb9d7f7 100644
--- a/frontend/src/views/Share.vue
+++ b/frontend/src/views/Share.vue
@@ -1,98 +1,107 @@
-
-
-
- home
-
+
+
+
-
- keyboard_arrow_right
- {{ link.name }}
-
-
-
-
-
-
- {{ icon }}
-
-
- {{ $t('prompts.displayName') }} {{ req.name }}
-
-
- {{ $t('prompts.lastModified') }}: {{ humanTime }}
-
-
- {{ $t('prompts.size') }}: {{ humanSize }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ home
+
+
+
+ keyboard_arrow_right
+ {{ link.name }}
+
-
-
-
-
-
-
-
-
-
+ {{ req.items.length - showLimit }}
+
+
+
+
+ {{ icon }}
+
+
+ {{ $t('prompts.displayName') }} {{ req.name }}
+
+
+ {{ $t('prompts.lastModified') }}: {{ humanTime }}
+
+
+ {{ $t('prompts.size') }}: {{ humanSize }}
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+ {{ req.items.length - showLimit }}
+
+
-
-
{{ $t('files.multipleSelectionEnabled') }}
-
-
clear
+
+
{{ $t('files.multipleSelectionEnabled') }}
+
+ clear
+
-
-
-
- sentiment_dissatisfied
- {{ $t('files.lonely') }}
-
+
+
+ sentiment_dissatisfied
+ {{ $t('files.lonely') }}
+
+
-
-
-
-
-
-
-
{{ $t('login.wrongCredentials') }}
-
-
{{ $t('login.password') }}
-
+
+
+
+
{{ $t('login.wrongCredentials') }}
+
+
{{ $t('login.password') }}
+
-
-
-
-
-
{{ $t('buttons.submit') }}
+
+
+
+
+ {{ $t('buttons.submit') }}
+
+
-
@@ -102,20 +111,23 @@ import { share as api } from '@/api'
import { baseURL } from '@/utils/constants'
import filesize from 'filesize'
import moment from 'moment'
+
+import HeaderBar from '@/components/header/HeaderBar'
+import Action from '@/components/header/Action'
+import DownloadButton from '@/components/buttons/Download'
+import Errors from '@/views/Errors'
import QrcodeVue from 'qrcode.vue'
import Item from "@/components/files/ListingItem"
-import Forbidden from './errors/403'
-import NotFound from './errors/404'
-import InternalError from './errors/500'
export default {
name: 'share',
components: {
+ HeaderBar,
+ Action,
+ DownloadButton,
Item,
- Forbidden,
- NotFound,
- InternalError,
- QrcodeVue
+ QrcodeVue,
+ Errors
},
data: () => ({
error: null,
@@ -140,7 +152,7 @@ export default {
},
computed: {
...mapState(['hash', 'req', 'loading', 'multiple']),
- ...mapGetters(['selectedCount']),
+ ...mapGetters(['selectedCount', 'selectedCount']),
icon: function () {
if (this.req.isDir) return 'folder'
if (this.req.type === 'image') return 'insert_photo'
@@ -198,6 +210,9 @@ export default {
}
return breadcrumbs
+ },
+ errorCode() {
+ return (this.error.message === '404' || this.error.message === '403') ? parseInt(this.error.message) : 500
}
},
methods: {
diff --git a/frontend/src/views/errors/403.vue b/frontend/src/views/errors/403.vue
deleted file mode 100644
index 47c6c897..00000000
--- a/frontend/src/views/errors/403.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- error
- {{ $t('errors.forbidden') }}
-
-
-
-
-
-
diff --git a/frontend/src/views/errors/404.vue b/frontend/src/views/errors/404.vue
deleted file mode 100644
index 61dbe144..00000000
--- a/frontend/src/views/errors/404.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- gps_off
- {{ $t('errors.notFound') }}
-
-
-
-
-
-
diff --git a/frontend/src/views/errors/500.vue b/frontend/src/views/errors/500.vue
deleted file mode 100644
index 0bd86786..00000000
--- a/frontend/src/views/errors/500.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- error_outline
- {{ $t('errors.internal') }}
-
-
-
-
-
-