diff --git a/frontend/src/activities/MainActivity.js b/frontend/src/activities/MainActivity.jsx similarity index 100% rename from frontend/src/activities/MainActivity.js rename to frontend/src/activities/MainActivity.jsx diff --git a/frontend/src/components/Card.js b/frontend/src/components/Card.jsx similarity index 100% rename from frontend/src/components/Card.js rename to frontend/src/components/Card.jsx diff --git a/frontend/src/components/FullScreenDialog.js b/frontend/src/components/FullScreenDialog.jsx similarity index 87% rename from frontend/src/components/FullScreenDialog.js rename to frontend/src/components/FullScreenDialog.jsx index 6fd421f..ee4d5e1 100644 --- a/frontend/src/components/FullScreenDialog.js +++ b/frontend/src/components/FullScreenDialog.jsx @@ -8,12 +8,12 @@ import './FullScreenDialog.css' import React from "react"; const floatingActionButton = ( - + add ) -export default function ({ +export default function FullScreenDialog({ setEditPoll, classList, children, diff --git a/frontend/src/components/NavigationBar.js b/frontend/src/components/NavigationBar.jsx similarity index 100% rename from frontend/src/components/NavigationBar.js rename to frontend/src/components/NavigationBar.jsx diff --git a/frontend/src/components/PollListItem.js b/frontend/src/components/PollListItem.jsx similarity index 100% rename from frontend/src/components/PollListItem.js rename to frontend/src/components/PollListItem.jsx diff --git a/frontend/src/components/Scaffold.css b/frontend/src/components/Scaffold.css index 7d8e321..fe11b91 100644 --- a/frontend/src/components/Scaffold.css +++ b/frontend/src/components/Scaffold.css @@ -13,6 +13,7 @@ .scaffold > .content { flex-grow: 1; flex-shrink: 1; + padding-bottom: 8rem !important; overflow-y: auto; } diff --git a/frontend/src/components/Scaffold.js b/frontend/src/components/Scaffold.jsx similarity index 100% rename from frontend/src/components/Scaffold.js rename to frontend/src/components/Scaffold.jsx diff --git a/frontend/src/components/Snackbar.js b/frontend/src/components/Snackbar.jsx similarity index 100% rename from frontend/src/components/Snackbar.js rename to frontend/src/components/Snackbar.jsx diff --git a/frontend/src/components/TopAppBar.js b/frontend/src/components/TopAppBar.jsx similarity index 100% rename from frontend/src/components/TopAppBar.js rename to frontend/src/components/TopAppBar.jsx diff --git a/frontend/src/index.js b/frontend/src/index.jsx similarity index 100% rename from frontend/src/index.js rename to frontend/src/index.jsx diff --git a/frontend/src/screens/ChatsScreen.js b/frontend/src/screens/ChatsScreen.jsx similarity index 100% rename from frontend/src/screens/ChatsScreen.js rename to frontend/src/screens/ChatsScreen.jsx diff --git a/frontend/src/screens/DashboardScreen.js b/frontend/src/screens/DashboardScreen.jsx similarity index 100% rename from frontend/src/screens/DashboardScreen.js rename to frontend/src/screens/DashboardScreen.jsx diff --git a/frontend/src/screens/PollsScreen.css b/frontend/src/screens/PollsScreen.css index 1ae8537..a2b4f33 100644 --- a/frontend/src/screens/PollsScreen.css +++ b/frontend/src/screens/PollsScreen.css @@ -1,39 +1,40 @@ -label, -.messages-title, -.title { +.poll-edit .content label, +.poll-edit .content .messages-title, +.poll-edit .content .title { color: var(--md-sys-color-on-surface); } -label { +.poll-edit .content label { display: flex; align-items: center; + margin: 0; } -.messages-title { +.poll-edit .content .messages-title { margin: 1rem 0; } -.title:not(:first-child) { +.poll-edit .content .title:not(:first-child) { margin-top: 1rem; } -.poll-options { +.poll-edit .content .poll-options { display: flex; flex-direction: column; } -.poll-options > .poll-option { +.poll-edit .content .poll-options > .poll-option { flex-shrink: 0; display: flex; align-items: center; } -.poll-options > .poll-option > .option-text { +.poll-edit .content .poll-options > .poll-option > .option-text { flex-grow: 1; flex-shrink: 1; } -.poll-options > .poll-option > .option-action { +.poll-edit .content .poll-options > .poll-option > .option-action { flex-shrink: 0; margin-left: 1rem; } diff --git a/frontend/src/screens/PollsScreen.js b/frontend/src/screens/PollsScreen.jsx similarity index 64% rename from frontend/src/screens/PollsScreen.js rename to frontend/src/screens/PollsScreen.jsx index ca2379c..d9bed5b 100644 --- a/frontend/src/screens/PollsScreen.js +++ b/frontend/src/screens/PollsScreen.jsx @@ -4,7 +4,7 @@ import '@material/web/fab/fab' import '@material/web/icon/icon' import '@material/web/select/outlined-select' import '@material/web/select/select-option' -import '@material/web/iconbutton/filled-icon-button' +import '@material/web/iconbutton/icon-button' import '@material/web/checkbox/checkbox' import PollListItem from '../components/PollListItem' @@ -18,7 +18,7 @@ const PollContext = React.createContext({ fetchPolls: () => {}, }) -const apiUrl = new URL(location) +const apiUrl = new URL(window.location) apiUrl.pathname = '/api/polls' export default function PollsScreen() { @@ -58,12 +58,13 @@ export default function PollsScreen() { + classList={`poll-edit ${editPoll ? 'open' : 'close'}`} + setEditPoll={setEditPoll}> title @@ -108,7 +109,43 @@ export default function PollsScreen() { -
Сообщение 1
+
Общее
+ + + title + + + + title + + + + title + + +
+ + + +
@@ -140,6 +177,8 @@ export default function PollsScreen() { +
Опрос
+ contact_support -
Варианты ответа
+
Варианты ответа
@@ -156,31 +195,27 @@ export default function PollsScreen() { class="option-text" label="Добавить ответ" value="" - required="required" /> - - arrow_forward - + required="required"/> + + adjust +
-
Настройки
- +
+ - - - + +
diff --git a/frontend/src/screens/UsersScreen.js b/frontend/src/screens/UsersScreen.jsx similarity index 100% rename from frontend/src/screens/UsersScreen.js rename to frontend/src/screens/UsersScreen.jsx