From 58b700788cf201673fee1fd97086aca1fc2d4486 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 27 Mar 2018 00:02:55 -0700 Subject: [PATCH] add floating compose button --- bin/svgs.js | 3 +- routes/_components/compose/ComposeBox.html | 110 +++++++++++++----- routes/_components/compose/ComposeButton.html | 57 ++++++--- routes/_components/dialog/ComposeDialog.html | 22 ++++ routes/_components/dialog/ModalDialog.html | 5 +- routes/_components/dialog/dialogs.js | 1 + .../_components/dialog/showComposeDialog.js | 11 ++ scss/themes/_base.scss | 2 + templates/2xx.html | 5 +- tests/spec/108-compose-dialog.js | 27 +++++ tests/utils.js | 1 + 11 files changed, 195 insertions(+), 49 deletions(-) create mode 100644 routes/_components/dialog/ComposeDialog.html create mode 100644 routes/_components/dialog/showComposeDialog.js create mode 100644 tests/spec/108-compose-dialog.js diff --git a/bin/svgs.js b/bin/svgs.js index e4bd6a70..ec5e841e 100644 --- a/bin/svgs.js +++ b/bin/svgs.js @@ -31,5 +31,6 @@ module.exports = [ {id: 'fa-exclamation-triangle', src: 'node_modules/font-awesome-svg-png/white/svg/exclamation-triangle.svg', title: 'Content warning'}, {id: 'fa-check', src: 'node_modules/font-awesome-svg-png/white/svg/check.svg', title: 'Check'}, {id: 'fa-trash', src: 'node_modules/font-awesome-svg-png/white/svg/trash-o.svg', title: 'Delete'}, - {id: 'fa-hourglass', src: 'node_modules/font-awesome-svg-png/white/svg/hourglass.svg', title: 'Follow requested'} + {id: 'fa-hourglass', src: 'node_modules/font-awesome-svg-png/white/svg/hourglass.svg', title: 'Follow requested'}, + {id: 'fa-pencil', src: 'node_modules/font-awesome-svg-png/white/svg/pencil.svg', title: 'Compose'} ] diff --git a/routes/_components/compose/ComposeBox.html b/routes/_components/compose/ComposeBox.html index d02d107d..50158339 100644 --- a/routes/_components/compose/ComposeBox.html +++ b/routes/_components/compose/ComposeBox.html @@ -1,4 +1,4 @@ -
+
{{#if contentWarningShown}}
-
+
+
+ +
+
\ No newline at end of file diff --git a/routes/_components/dialog/ModalDialog.html b/routes/_components/dialog/ModalDialog.html index aa8d2f1a..0c6faaf7 100644 --- a/routes/_components/dialog/ModalDialog.html +++ b/routes/_components/dialog/ModalDialog.html @@ -4,7 +4,7 @@ >