diff --git a/res/include/style/layout.css b/res/include/style/layout.css
index 21eeb8e..c3dec45 100644
--- a/res/include/style/layout.css
+++ b/res/include/style/layout.css
@@ -570,6 +570,18 @@ input[type="number"]:focus,
input[type="date"]:focus{
box-shadow: var(--highlight_border), inset 3px 3px 6px -3px var(--shadow_color);
}
+textarea:disabled,
+input[type="text"]:disabled,
+input[type="password"]:disabled,
+input[type="email"]:disabled,
+input[type="number"]:disabled,
+input[type="date"]:disabled{
+ background: var(--layer_1_color);
+ color: var(--input_color);
+ box-shadow: none;
+ transition: none;
+ cursor: not-allowed;
+}
input[type=file]{
visibility: hidden;
diff --git a/svelte/src/home_page/HomePage.svelte b/svelte/src/home_page/HomePage.svelte
index ee0aee2..1424304 100644
--- a/svelte/src/home_page/HomePage.svelte
+++ b/svelte/src/home_page/HomePage.svelte
@@ -169,6 +169,7 @@ const leave_confirmation = e => {
let navigator_share = !!(window.navigator && window.navigator.share)
let share_title = ""
let share_link = ""
+let input_album_name = ""
let btn_upload_text
let btn_copy_link
@@ -258,29 +259,12 @@ const share_navigator = () => {
window.navigator.share({ title: "Pixeldrain", text: share_title, url: share_link })
}
-let created_lists = []
-const make_list_button = () => {
- let count = upload_queue.reduce(
- (acc, curr) => curr.status === "finished" ? acc + 1 : acc,
- 0,
- )
-
- let title = prompt(
- "You are creating a list containing " + count + " files.\n"
- + "What do you want to call it?", "My New Album"
- )
- if (title === null) {
+const create_album = () => {
+ if (!input_album_name) {
return
}
- create_list(title, false).then(resp => {
- created_lists.push({
- title: title,
- id: resp.id,
- link: domain_url()+"/l/"+resp.id,
- thumbnail: "/api/list/"+resp.id+"/thumbnail",
- })
- created_lists = created_lists
- window.open('/l/' + resp.id, '_blank')
+ create_list(input_album_name, false).then(resp => {
+ window.location = '/l/' + resp.id
}).catch(err => {
alert("Failed to create list. Server says this:\n"+err)
})
@@ -466,6 +450,20 @@ const keydown = (e) => {
+ {#if upload_queue.length > 1}
+ You can create an album to group your files together into one link
+ Name:
+