Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend2
Commits
afd15c60
Commit
afd15c60
authored
Mar 29, 2021
by
Lukas Böhm
🎱
Browse files
move some sharing options into expanded section
parent
c89216a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
api/database.go
View file @
afd15c60
...
...
@@ -17,7 +17,7 @@ type Share struct {
ID
uuid
.
UUID
`json:"id" gorm:"primary_key"`
Name
string
`json:"name,omitempty"`
Expires
*
time
.
Time
`json:"expires,omitempty"`
DownloadLimit
u
int
`json:"download_limit,omitempty"`
DownloadLimit
int
`json:"download_limit,omitempty"`
IsPublic
bool
`json:"is_public" gorm:"not null; default:false; index"`
Password
string
`json:"-"`
Emails
[]
string
`json:"emails,omitempty" gorm:"-"`
...
...
web-flask/templates/Base.html
View file @
afd15c60
...
...
@@ -2,17 +2,17 @@
<html
lang=
"de"
>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
"ChiefSend"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
"ChiefSend"
>
<meta
name=
"theme-color"
content=
"#0b5ed7"
>
<link
rel=
"icon"
href=
"{{ url_for('static', filename='img/favicon.ico') }}"
>
<link
rel=
"icon"
href=
"{{ url_for('static', filename='img/favicon.ico') }}"
>
{% block preview %}
<meta
property=
"og:type"
content=
"website"
>
<meta
property=
"og:url"
content=
"https://send.chief.zone"
>
<meta
property=
"og:title"
content=
"ChiefSend"
>
<meta
property=
"og:description"
content=
"Verschicke Dateien"
>
<meta
property=
"og:type"
content=
"website"
>
<meta
property=
"og:url"
content=
"https://send.chief.zone"
>
<meta
property=
"og:title"
content=
"ChiefSend"
>
<meta
property=
"og:description"
content=
"Verschicke Dateien"
>
{% endblock preview %}
<title>
{% block title %} ChiefSend {% endblock title %}
</title>
...
...
@@ -32,6 +32,9 @@
<!-- page contents in here -->
{% block page %}
{% endblock page %}
<script
src=
"https://unpkg.com/dayjs@1.8.21/dayjs.min.js"
></script>
<script>
dayjs
().
format
()
</script>
</body>
</html>
\ No newline at end of file
web-flask/templates/Upload.html
View file @
afd15c60
...
...
@@ -44,27 +44,44 @@
</select>
</div>
<div
class=
"row form-group"
>
<p
class=
"custom-control custom-switch col"
>
<input
class=
"custom-control-input"
id=
"is_public"
name=
"is_public"
type=
"checkbox"
value=
"y"
>
<label
class=
"custom-control-label"
for=
"is_public"
>
Öffentlich
</label>
</p>
<div
class=
"col"
>
<input
autocomplete=
"off"
class=
"form-control"
id=
"password"
name=
"password"
placeholder=
"Passwort ..."
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"progress form-group d-none"
>
<div
class=
"progress-bar"
role=
"progressbar"
aria-valuemin=
"0"
aria-valuemax=
"100"
></div>
</div>
<div
class=
"form-group"
>
<input
class=
"btn btn-lg btn-block btn-primary"
id=
"submit"
name=
"submit"
type=
"button"
value=
"Hochladen"
onclick=
"openShare()"
>
</div>
<div
class=
"collapse"
id=
"collapseExample"
>
<div
class=
"row form-group"
>
<p
class=
"custom-control custom-switch col"
>
<input
class=
"custom-control-input"
id=
"is_public"
name=
"is_public"
type=
"checkbox"
value=
"y"
>
<label
class=
"custom-control-label"
for=
"is_public"
>
Öffentlich
</label>
</p>
<div
class=
"col"
>
<input
autocomplete=
"off"
class=
"form-control"
id=
"password"
name=
"password"
placeholder=
"Passwort ..."
type=
"text"
value=
""
>
</div>
</div>
<div
class=
"progress form-group d-none"
>
<div
class=
"progress-bar"
role=
"progressbar"
aria-valuemin=
"0"
aria-valuemax=
"100"
></div>
</div>
<div
class=
"form-group"
>
<label
for=
"email"
>
Empfänger-Mail
</label>
<input
type=
"email"
id=
"email"
class=
"form-control"
>
</div>
</div>
</div>
<a
class=
"card-footer"
data-toggle=
"collapse"
href=
"#collapseExample"
role=
"button"
aria-expanded=
"false"
aria-controls=
"collapseExample"
>
weitere Einstellungen
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-chevron-expand"
viewBox=
"0 0 16 16"
>
<path
fill-rule=
"evenodd"
d=
"M3.646 9.146a.5.5 0 0 1 .708 0L8 12.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708zm0-2.292a.5.5 0 0 0 .708 0L8 3.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708z"
></path>
</svg>
</a>
</div>
<style>
...
...
@@ -75,7 +92,6 @@
text-overflow
:
ellipsis
;
}
</style>
<script
src=
"{{ url_for('static', filename='js/jq-ajax-progress.min.js') }}"
></script>
<script>
// To show filenames in the file selector.
...
...
@@ -102,7 +118,11 @@
"
headers
"
:
{
"
Content-Type
"
:
"
application/json
"
},
"
data
"
:
JSON
.
stringify
({}),
"
data
"
:
JSON
.
stringify
({
// TODO
"
name
"
:
$
(
"
#name
"
).
val
(),
"
download_limit
"
:
$
(
"
#download_limit
"
).
val
(),
"
is_public
"
:
$
(
"
#is_public
"
).
val
()
}),
}).
done
((
response
)
=>
{
share
=
response
;
console
.
log
(
share
);
...
...
@@ -128,9 +148,6 @@
success
:
function
(
response
)
{
console
.
log
(
response
);
},
//progress: function (e) {
// console.log(e);
//},
uploadProgress
:
function
(
e
)
{
if
(
e
.
lengthComputable
)
{
let
completedPercentage
=
Math
.
round
((
e
.
loaded
*
100
)
/
e
.
total
);
...
...
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