summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client/src/views/Home.vue5
-rw-r--r--client/src/views/NewSmile.vue30
2 files changed, 32 insertions, 3 deletions
diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue
index 06ca2a3..c16d336 100644
--- a/client/src/views/Home.vue
+++ b/client/src/views/Home.vue
@@ -1,6 +1,6 @@
 <template>
 <div class="home">
-  <p id="subtitle">Vela is a place to share smiles.</p>
+  <p id="subtitle">Vela is a place to share smiles :)</p>
 
   <div class="card">
     <div class="grid">
@@ -17,7 +17,8 @@
           viewed once.
         </p>
       </div>
-      <div class="col-12 md:col-4 lg:col-6 flex align-items-center justify-content-center">
+      <div class="col-12 md:col-4 lg:col-6 flex align-items-center
+                  justify-content-center">
         <router-link to="/new">
           <Button label="New Smile" icon="pi pi-user-plus" iconPos="left" />
         </router-link>
diff --git a/client/src/views/NewSmile.vue b/client/src/views/NewSmile.vue
index 6927007..4a5e700 100644
--- a/client/src/views/NewSmile.vue
+++ b/client/src/views/NewSmile.vue
@@ -1,5 +1,33 @@
 <template>
 <div class="new-smile">
-  <h1>New Smile</h1>
+  <p id="subtitle">Create a new Smile :)</p>
+
+  <div class="card">
+    <div class="grid">
+      <div class="col-12 md:col-6">
+        <p>
+          Filling this form will create a new "Smile Collection" for
+          you, you can add your smiles to the collection using
+          the <strong>private</strong> and your friends can view them
+          using the <strong>public</strong> link.
+        </p>
+      </div>
+      <div class="col-12 md:col-6 flex align-items-center justify-content-center">
+        <div class="p-inputgroup">
+          <Button icon="pi pi-user-plus" />
+          <InputText placeholder="Name" />
+          <Button label="Create" class="p-button-success" />
+        </div>
+      </div>
+    </div>
+  </div>
 </div>
 </template>
+
+<style scoped>
+#subtitle {
+    font-size: 1.5rem;
+    text-align: center;
+    margin: 2rem 0;
+}
+</style>
4dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
package msg

import (
	"errors"
	"time"

	"github.com/gdamore/tcell"

	"git.sr.ht/~sircmpwn/aerc/widgets"
	"git.sr.ht/~sircmpwn/aerc/worker/types"
)

type Delete struct{}

func init() {
	register(Delete{})
}

func (_ Delete) Aliases() []string {
	return []string{"delete", "delete-message"}
}

func (_ Delete) Complete(aerc *widgets.Aerc, args []string) []string {
	return nil
}

func (_ Delete) Execute(aerc *widgets.Aerc, args []string) error {
	if len(args) != 1 {
		return errors.New("Usage: :delete")
	}

	widget := aerc.SelectedTab().(widgets.ProvidesMessage)
	acct := widget.SelectedAccount()
	if acct == nil {
		return errors.New("No account selected")
	}
	store := widget.Store()
	if len(store.Uids) == 0 {
		return errors.New("No message selected")
	}
	msg := widget.SelectedMessage()
	_, isMsgView := widget.(*widgets.MessageViewer)
	if isMsgView {
		aerc.RemoveTab(widget)
	}
	store.Next()
	acct.Messages().Scroll()
	store.Delete([]uint32{msg.Uid}, func(msg types.WorkerMessage) {
		switch msg := msg.(type) {
		case *types.Done:
			aerc.PushStatus("Messages deleted.", 10*time.Second)
		case *types.Error:
			aerc.PushStatus(" "+msg.Error.Error(), 10*time.Second).
				Color(tcell.ColorDefault, tcell.ColorRed)
		}
	})
	return nil
}