Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

refactor: reorganize ui components (#298)

Guilherme Oenning5440f696b573
diff --git a/package-lock.json b/package-lock.json
index 3a38f503e..be2b98ee5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6126,9 +6126,9 @@
}
},
"semantic-ui-css": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/semantic-ui-css/-/semantic-ui-css-2.3.0.tgz",
- "integrity": "sha512-f76LAKVyIJGBPJlEP3q2NHrnJVMoiBUw5gLyeWhsXyboK7gKlzAbdK1ytr8/jV++GfmpyC3hFrMCdSNBfFF+ag==",
+ "version": "2.2.14",
+ "resolved": "https://registry.npmjs.org/semantic-ui-css/-/semantic-ui-css-2.2.14.tgz",
+ "integrity": "sha512-20r7hdZaLx8Urtcs2znUpaaq52SmN+yv2exbQ7XMwbQVg2kTG1q3RKT9xU0P58pWc3PIxPKpia32QVCUboI5Mw==",
"requires": {
"jquery": "3.3.1"
}
diff --git a/package.json b/package.json
index e5151b737..0441e0a5f 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-textarea-autosize": "^5.2.1",
- "semantic-ui-css": "^2.3.0"
+ "semantic-ui-css": "2.2.14"
},
"devDependencies": {
"reflect-metadata": "^0.1.12",
diff --git a/public/assets/styles/main.scss b/public/assets/styles/main.scss
index 767ed4fa5..b27627448 100644
--- a/public/assets/styles/main.scss
+++ b/public/assets/styles/main.scss
@@ -24,6 +24,12 @@ body {
background-color: $bg-color;
}
+body, h1, h2, h3, h4, h5, .ui, input {
+ font-family: 'Ubuntu', sans-serif !important;
+ text-rendering: optimizeLegibility;
+ -webkit-font-smoothing: antialiased;
+}
+
#environment-info {
padding: 2px;
border-radius: 0px;
diff --git a/public/index.tsx b/public/index.tsx
index 384e04545..d0001c5e3 100644
--- a/public/index.tsx
+++ b/public/index.tsx
@@ -55,14 +55,14 @@ document.addEventListener('DOMContentLoaded', () => {
if (root) {
const config = resolveRootComponent(location.pathname);
ReactDOM.render(
- <div>
+ <>
{!w.props.user && React.createElement(SignInModal, w.props)}
<div id={config.id}>
{config.showHeader && React.createElement(Header, w.props)}
{React.createElement(config.component, w.props)}
{React.createElement(Footer, w.props)}
</div>
- </div>,
+ </>,
root
);
}
diff --git a/public/pages/admin/AdminHomePage.tsx b/public/pages/AdminHome/AdminHome.page.tsx
similarity index 100%
rename from public/pages/admin/AdminHomePage.tsx
rename to public/pages/AdminHome/AdminHome.page.tsx
diff --git a/public/pages/AdminHome/index.ts b/public/pages/AdminHome/index.ts
new file mode 100644
index 000000000..145a6b5a8
--- /dev/null
+++ b/public/pages/AdminHome/index.ts
@@ -0,0 +1 @@
+export * from './AdminHome.page';
diff --git a/public/pages/site/CompleteSignInProfilePage.tsx b/public/pages/CompleteSignInProfile/CompleteSignInProfile.page.tsx
similarity index 97%
rename from public/pages/site/CompleteSignInProfilePage.tsx
rename to public/pages/CompleteSignInProfile/CompleteSignInProfile.page.tsx
index a7dc5580b..c9582d541 100644
--- a/public/pages/site/CompleteSignInProfilePage.tsx
+++ b/public/pages/CompleteSignInProfile/CompleteSignInProfile.page.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
-import { HomePage, HomePageProps } from './HomePage';
+import { HomePage, HomePageProps } from '../';
import { Form, Button } from '@fider/components/common';
import { page, actions } from '@fider/services';
diff --git a/public/pages/CompleteSignInProfile/index.ts b/public/pages/CompleteSignInProfile/index.ts
new file mode 100644
index 000000000..ff76f853d
--- /dev/null
+++ b/public/pages/CompleteSignInProfile/index.ts
@@ -0,0 +1 @@
+export * from './CompleteSignInProfile.page';
diff --git a/public/pages/site/HomePage/HomePage.scss b/public/pages/Home/Home.page.scss
similarity index 98%
rename from public/pages/site/HomePage/HomePage.scss
rename to public/pages/Home/Home.page.scss
index 770cefbe1..f8d576bee 100644
--- a/public/pages/site/HomePage/HomePage.scss
+++ b/public/pages/Home/Home.page.scss
@@ -1,6 +1,6 @@
@import '~@fider/assets/styles/variables.scss';
-#fdr-home-page {
+#p-home {
.welcome-message {
margin-bottom: 20px;
diff --git a/public/pages/site/HomePage/HomePage.tsx b/public/pages/Home/Home.page.tsx
similarity index 94%
rename from public/pages/site/HomePage/HomePage.tsx
rename to public/pages/Home/Home.page.tsx
index 5f2e2f50f..666f09218 100644
--- a/public/pages/site/HomePage/HomePage.tsx
+++ b/public/pages/Home/Home.page.tsx
@@ -1,11 +1,11 @@
+import './Home.page.scss';
+
import * as React from 'react';
import { Idea, Tag, IdeaStatus, CurrentUser, Tenant } from '@fider/models';
import { MultiLineText } from '@fider/components';
-import { IdeaInput, ListIdeas, IdeasView } from './';
+import { IdeaInput, ListIdeas, IdeasContainer } from './';
import { page, actions } from '@fider/services';
-import './HomePage.scss';
-
export interface HomePageProps {
user?: CurrentUser;
tenant: Tenant;
@@ -56,7 +56,7 @@ export class HomePage extends React.Component<HomePageProps, HomePageState> {
{
Object.keys(this.props.countPerStatus).length === 0
? <Lonely />
- : <IdeasView
+ : <IdeasContainer
user={this.props.user}
ideas={this.props.ideas}
tags={this.props.tags}
diff --git a/public/pages/site/HomePage/IdeaFilter.tsx b/public/pages/Home/components/IdeaFilter.tsx
similarity index 98%
rename from public/pages/site/HomePage/IdeaFilter.tsx
rename to public/pages/Home/components/IdeaFilter.tsx
index a865b3953..79eac55b9 100644
--- a/public/pages/site/HomePage/IdeaFilter.tsx
+++ b/public/pages/Home/components/IdeaFilter.tsx
@@ -49,7 +49,7 @@ export class IdeaFilter extends React.Component<IdeaFilterProps, {}> {
));
return (
- <h4 className="ui header">
+ <>
<div className="content">
Showing {' '}
<div className="ideas-filter ui inline dropdown" ref={(e) => this.element = e!}>
@@ -65,7 +65,7 @@ export class IdeaFilter extends React.Component<IdeaFilterProps, {}> {
</div>
</div>
</div>
- </h4>
+ </>
);
}
}
diff --git a/public/pages/site/HomePage/IdeaInput.tsx b/public/pages/Home/components/IdeaInput.tsx
similarity index 100%
rename from public/pages/site/HomePage/IdeaInput.tsx
rename to public/pages/Home/components/IdeaInput.tsx
diff --git a/public/pages/site/HomePage/IdeasView.tsx b/public/pages/Home/components/IdeasContainer.tsx
similarity index 90%
rename from public/pages/site/HomePage/IdeasView.tsx
rename to public/pages/Home/components/IdeasContainer.tsx
index d79fbad5b..6a856459e 100644
--- a/public/pages/site/HomePage/IdeasView.tsx
+++ b/public/pages/Home/components/IdeasContainer.tsx
@@ -1,10 +1,12 @@
import * as React from 'react';
+
+import { IdeaInput, ListIdeas, TagsFilter, IdeaFilter } from '../';
+
import { Idea, Tag, IdeaStatus, CurrentUser } from '@fider/models';
import { Loader, MultiLineText } from '@fider/components';
-import { IdeaInput, ListIdeas, TagsFilter, IdeaFilter } from './';
import { page, actions } from '@fider/services';
-interface IdeasViewProps {
+interface IdeasContainerProps {
user?: CurrentUser;
ideas: Idea[];
tags: Tag[];
@@ -12,7 +14,7 @@ interface IdeasViewProps {
countPerStatus: { [key: string]: number };
}
-interface IdeasViewState {
+interface IdeasContainerState {
loading: boolean;
ideas: Idea[];
filter: string;
@@ -20,10 +22,10 @@ interface IdeasViewState {
query: string;
}
-export class IdeasView extends React.Component<IdeasViewProps, IdeasViewState> {
+export class IdeasContainer extends React.Component<IdeasContainerProps, IdeasContainerState> {
private timer: any;
- constructor(props: IdeasViewProps) {
+ constructor(props: IdeasContainerProps) {
super(props);
const query = page.getQueryString('q');
const tags = page.getQueryStringArray('t');
@@ -38,7 +40,7 @@ export class IdeasView extends React.Component<IdeasViewProps, IdeasViewState> {
};
}
- public componentWillReceiveProps(nextProps: IdeasViewProps) {
+ public componentWillReceiveProps(nextProps: IdeasContainerProps) {
if (nextProps.newIdeaTitle) {
this.searchIdeas(nextProps.newIdeaTitle, '', [], 200);
} else if (this.state.query || this.state.filter || this.state.tags.length > 0) {
@@ -48,7 +50,7 @@ export class IdeasView extends React.Component<IdeasViewProps, IdeasViewState> {
}
}
- private changeFilterCriteria<K extends keyof IdeasViewState>(obj: Pick<IdeasViewState, K>, delay: number = 0): void {
+ private changeFilterCriteria<K extends keyof IdeasContainerState>(obj: Pick<IdeasContainerState, K>, delay: number = 0): void {
this.setState(obj, () => {
const query = this.state.query.trim().toLowerCase();
page.replaceState(page.toQueryString({
diff --git a/public/pages/site/HomePage/ListIdeas.tsx b/public/pages/Home/components/ListIdeas.tsx
similarity index 100%
rename from public/pages/site/HomePage/ListIdeas.tsx
rename to public/pages/Home/components/ListIdeas.tsx
diff --git a/public/pages/site/HomePage/TagsFilter.tsx b/public/pages/Home/components/TagsFilter.tsx
similarity index 100%
rename from public/pages/site/HomePage/TagsFilter.tsx
rename to public/pages/Home/components/TagsFilter.tsx
diff --git a/public/pages/Home/index.ts b/public/pages/Home/index.ts
new file mode 100644
index 000000000..10df34892
--- /dev/null
+++ b/public/pages/Home/index.ts
@@ -0,0 +1,6 @@
+export * from './Home.page';
+export * from './components/TagsFilter';
+export * from './components/IdeaFilter';
+export * from './components/IdeaInput';
+export * from './components/ListIdeas';
+export * from './components/IdeasContainer';
diff --git a/public/pages/admin/MembersPage.tsx b/public/pages/ManageMembers/ManageMembers.page.tsx
similarity index 96%
rename from public/pages/admin/MembersPage.tsx
rename to public/pages/ManageMembers/ManageMembers.page.tsx
index 2d1c67666..571d08075 100644
--- a/public/pages/admin/MembersPage.tsx
+++ b/public/pages/ManageMembers/ManageMembers.page.tsx
@@ -3,7 +3,7 @@ import { Button, Gravatar, UserName } from '@fider/components/common';
import { User, CurrentUser, UserRole } from '@fider/models';
import { actions } from '@fider/services';
-interface MembersPageState {
+interface ManageMembersPageState {
administrators: User[];
collaborators: User[];
visitors: User[];
@@ -13,14 +13,14 @@ interface MembersPageState {
newCollaboratorFilter: string;
}
-interface MembersPageProps {
+interface ManageMembersPageProps {
user: CurrentUser;
users: User[];
}
-export class MembersPage extends React.Component<MembersPageProps, MembersPageState> {
+export class ManageMembersPage extends React.Component<ManageMembersPageProps, ManageMembersPageState> {
- constructor(props: MembersPageProps) {
+ constructor(props: ManageMembersPageProps) {
super(props);
this.state = this.groupUsers();
}
@@ -33,7 +33,7 @@ export class MembersPage extends React.Component<MembersPageProps, MembersPageSt
}
}
- private groupUsers(): MembersPageState {
+ private groupUsers(): ManageMembersPageState {
const usersByRole = this.props.users.reduce<{ [key: number]: User[] }>((groups, x) => {
groups[x.role] = [ x ].concat(groups[x.role] || []);
return groups;
diff --git a/public/pages/ManageMembers/index.ts b/public/pages/ManageMembers/index.ts
new file mode 100644
index 000000000..9ec65e569
--- /dev/null
+++ b/public/pages/ManageMembers/index.ts
@@ -0,0 +1 @@
+export * from './ManageMembers.page';
diff --git a/public/pages/admin/ManageTagsPage/ManageTagsPage.scss b/public/pages/ManageTags/ManageTags.page.scss
similarity index 88%
rename from public/pages/admin/ManageTagsPage/ManageTagsPage.scss
rename to public/pages/ManageTags/ManageTags.page.scss
index 227c9e90b..60b835d1c 100644
--- a/public/pages/admin/ManageTagsPage/ManageTagsPage.scss
+++ b/public/pages/ManageTags/ManageTags.page.scss
@@ -1,4 +1,4 @@
-#fdr-admin-tags-page {
+#p-manage-tags {
.ui.list {
.item {
.content {
diff --git a/public/pages/admin/ManageTagsPage/ManageTagsPage.tsx b/public/pages/ManageTags/ManageTags.page.tsx
similarity index 99%
rename from public/pages/admin/ManageTagsPage/ManageTagsPage.tsx
rename to public/pages/ManageTags/ManageTags.page.tsx
index 1e75e70a3..197dfed34 100644
--- a/public/pages/admin/ManageTagsPage/ManageTagsPage.tsx
+++ b/public/pages/ManageTags/ManageTags.page.tsx
@@ -18,8 +18,6 @@ interface ManageTagsPageState {
editing?: number;
}
-import './ManageTagsPage.scss';
-
export class ManageTagsPage extends React.Component<ManageTagsPageProps, ManageTagsPageState> {
constructor(props: ManageTagsPageProps) {
diff --git a/public/pages/admin/ManageTagsPage/TagForm.scss b/public/pages/ManageTags/components/TagForm.scss
similarity index 100%
rename from public/pages/admin/ManageTagsPage/TagForm.scss
rename to public/pages/ManageTags/components/TagForm.scss
diff --git a/public/pages/admin/ManageTagsPage/TagForm.tsx b/public/pages/ManageTags/components/TagForm.tsx
similarity index 100%
rename from public/pages/admin/ManageTagsPage/TagForm.tsx
rename to public/pages/ManageTags/components/TagForm.tsx
index 7eff0b576..3376e2c61 100644
--- a/public/pages/admin/ManageTagsPage/TagForm.tsx
+++ b/public/pages/ManageTags/components/TagForm.tsx
@@ -1,3 +1,5 @@
+import './TagForm.scss';
+
import * as React from 'react';
import { Button, ButtonClickEvent, DisplayError } from '@fider/components/common';
import { ShowTag } from '@fider/components/ShowTag';
@@ -19,8 +21,6 @@ export interface TagFormState {
error?: Failure;
}
-import './TagForm.scss';
-
export class TagForm extends React.Component<TagFormProps, TagFormState> {
constructor(props: TagFormProps) {
super(props);
diff --git a/public/pages/ManageTags/index.ts b/public/pages/ManageTags/index.ts
new file mode 100644
index 000000000..e65db27b6
--- /dev/null
+++ b/public/pages/ManageTags/index.ts
@@ -0,0 +1,2 @@
+export * from './ManageTags.page';
+export * from './components/TagForm';
diff --git a/public/pages/site/UserNotificationsPage/UserNotificationsPage.scss b/public/pages/MyNotifications/MyNotifications.page.scss
similarity index 93%
rename from public/pages/site/UserNotificationsPage/UserNotificationsPage.scss
rename to public/pages/MyNotifications/MyNotifications.page.scss
index 239cd8466..45dd4ba60 100644
--- a/public/pages/site/UserNotificationsPage/UserNotificationsPage.scss
+++ b/public/pages/MyNotifications/MyNotifications.page.scss
@@ -1,6 +1,6 @@
@import '~@fider/assets/styles/variables.scss';
-#fdr-user-notifications {
+#p-my-notifications {
.mark-as-read {
float: right;
color: $link-color;
diff --git a/public/pages/site/UserNotificationsPage/UserNotificationsPage.tsx b/public/pages/MyNotifications/MyNotifications.page.tsx
similarity index 89%
rename from public/pages/site/UserNotificationsPage/UserNotificationsPage.tsx
rename to public/pages/MyNotifications/MyNotifications.page.tsx
index 3d4a3049a..27ddd7bbb 100644
--- a/public/pages/site/UserNotificationsPage/UserNotificationsPage.tsx
+++ b/public/pages/MyNotifications/MyNotifications.page.tsx
@@ -1,23 +1,23 @@
+import './MyNotifications.page.scss';
+
import * as React from 'react';
import { CurrentUser, Notification } from '@fider/models';
import { MultiLineText, Moment } from '@fider/components';
import { page, actions } from '@fider/services';
-import './UserNotificationsPage.scss';
-
-interface UserNotificationsPageProps {
+interface MyNotificationsPageProps {
notifications: Notification[];
}
-interface UserNotificationsPageState {
+interface MyNotificationsPageState {
unread: Notification[];
recent: Notification[];
}
-export class UserNotificationsPage extends React.Component<UserNotificationsPageProps, UserNotificationsPageState> {
+export class MyNotificationsPage extends React.Component<MyNotificationsPageProps, MyNotificationsPageState> {
- constructor(props: UserNotificationsPageProps) {
+ constructor(props: MyNotificationsPageProps) {
super(props);
const [ unread, recent ] = (this.props.notifications || []).reduce((result, item) => {
diff --git a/public/pages/MyNotifications/index.ts b/public/pages/MyNotifications/index.ts
new file mode 100644
index 000000000..ad0397606
--- /dev/null
+++ b/public/pages/MyNotifications/index.ts
@@ -0,0 +1 @@
+export * from './MyNotifications.page';
diff --git a/public/pages/site/UserSettingsPage/UserSettingsPage.scss b/public/pages/MySettings/MySettings.page.scss
similarity index 92%
rename from public/pages/site/UserSettingsPage/UserSettingsPage.scss
rename to public/pages/MySettings/MySettings.page.scss
index 7b95d2584..0910d7e04 100644
--- a/public/pages/site/UserSettingsPage/UserSettingsPage.scss
+++ b/public/pages/MySettings/MySettings.page.scss
@@ -1,4 +1,4 @@
-#fdr-user-settings {
+#p-my-settings {
#confirmation-modal {
text-align: center;
}
diff --git a/public/pages/site/UserSettingsPage/UserSettingsPage.tsx b/public/pages/MySettings/MySettings.page.tsx
similarity index 95%
rename from public/pages/site/UserSettingsPage/UserSettingsPage.tsx
rename to public/pages/MySettings/MySettings.page.tsx
index 04c25aad9..3865a7ee8 100644
--- a/public/pages/site/UserSettingsPage/UserSettingsPage.tsx
+++ b/public/pages/MySettings/MySettings.page.tsx
@@ -1,3 +1,5 @@
+import './MySettings.page.scss';
+
import * as React from 'react';
import { Form, DisplayError, Button, Gravatar } from '@fider/components/common';
@@ -6,9 +8,7 @@ import { NotificationSettings } from './';
import { CurrentUser, UserSettings } from '@fider/models';
import { Failure, actions } from '@fider/services';
-import './UserSettingsPage.scss';
-
-interface UserSettingsPageState {
+interface MySettingsPageState {
name: string;
newEmail: string;
changingEmail: boolean;
@@ -16,14 +16,14 @@ interface UserSettingsPageState {
settings: UserSettings;
}
-interface UserSettingsPageProps {
+interface MySettingsPageProps {
user: CurrentUser;
settings: UserSettings;
}
-export class UserSettingsPage extends React.Component<UserSettingsPageProps, UserSettingsPageState> {
+export class MySettingsPage extends React.Component<MySettingsPageProps, MySettingsPageState> {
- constructor(props: UserSettingsPageProps) {
+ constructor(props: MySettingsPageProps) {
super(props);
this.state = {
changingEmail: false,
diff --git a/public/pages/site/UserSettingsPage/NotificationSettings.tsx b/public/pages/MySettings/components/NotificationSettings.tsx
similarity index 100%
rename from public/pages/site/UserSettingsPage/NotificationSettings.tsx
rename to public/pages/MySettings/components/NotificationSettings.tsx
diff --git a/public/pages/MySettings/index.ts b/public/pages/MySettings/index.ts
new file mode 100644
index 000000000..6b10fa593
--- /dev/null
+++ b/public/pages/MySettings/index.ts
@@ -0,0 +1,2 @@
+export * from './MySettings.page';
+export * from './components/NotificationSettings';
diff --git a/public/pages/site/ShowIdeaPage/ShowIdeaPage.scss b/public/pages/ShowIdea/ShowIdea.page.scss
similarity index 98%
rename from public/pages/site/ShowIdeaPage/ShowIdeaPage.scss
rename to public/pages/ShowIdea/ShowIdea.page.scss
index 383af5dc1..bc7194c3c 100644
--- a/public/pages/site/ShowIdeaPage/ShowIdeaPage.scss
+++ b/public/pages/ShowIdea/ShowIdea.page.scss
@@ -1,6 +1,6 @@
@import '~@fider/assets/styles/variables.scss';
-#fdr-show-idea-page {
+#p-show-idea {
.idea-header {
width: 100%;
h1 {
diff --git a/public/pages/site/ShowIdeaPage/ShowIdeaPage.tsx b/public/pages/ShowIdea/ShowIdea.page.tsx
similarity index 99%
rename from public/pages/site/ShowIdeaPage/ShowIdeaPage.tsx
rename to public/pages/ShowIdea/ShowIdea.page.tsx
index 1ac52b93b..81d5a781b 100644
--- a/public/pages/site/ShowIdeaPage/ShowIdeaPage.tsx
+++ b/public/pages/ShowIdea/ShowIdea.page.tsx
@@ -1,3 +1,5 @@
+import './ShowIdea.page.scss';
+
import * as React from 'react';
import { CurrentUser, Comment, Idea, Tag } from '@fider/models';
@@ -6,8 +8,6 @@ import { page, actions, Failure } from '@fider/services';
import { TagsPanel, CommentInput, CommentList, ResponseForm, NotificationsPanel } from './';
import { SupportCounter, ShowIdeaResponse, DisplayError, Button, Textarea, UserName, Gravatar, Moment, MultiLineText } from '@fider/components';
-import './ShowIdeaPage.scss';
-
interface ShowIdeaPageProps {
user?: CurrentUser;
idea: Idea;
diff --git a/public/pages/site/ShowIdeaPage/CommentInput.tsx b/public/pages/ShowIdea/components/CommentInput.tsx
similarity index 100%
rename from public/pages/site/ShowIdeaPage/CommentInput.tsx
rename to public/pages/ShowIdea/components/CommentInput.tsx
diff --git a/public/pages/site/ShowIdeaPage/CommentList.tsx b/public/pages/ShowIdea/components/CommentList.tsx
similarity index 100%
rename from public/pages/site/ShowIdeaPage/CommentList.tsx
rename to public/pages/ShowIdea/components/CommentList.tsx
diff --git a/public/pages/site/ShowIdeaPage/IdeaSearch.tsx b/public/pages/ShowIdea/components/IdeaSearch.tsx
similarity index 100%
rename from public/pages/site/ShowIdeaPage/IdeaSearch.tsx
rename to public/pages/ShowIdea/components/IdeaSearch.tsx
diff --git a/public/pages/site/ShowIdeaPage/NotificationsPanel.tsx b/public/pages/ShowIdea/components/NotificationsPanel.tsx
similarity index 100%
rename from public/pages/site/ShowIdeaPage/NotificationsPanel.tsx
rename to public/pages/ShowIdea/components/NotificationsPanel.tsx
diff --git a/public/pages/site/ShowIdeaPage/ResponseForm.tsx b/public/pages/ShowIdea/components/ResponseForm.tsx
similarity index 97%
rename from public/pages/site/ShowIdeaPage/ResponseForm.tsx
rename to public/pages/ShowIdea/components/ResponseForm.tsx
index a790cd093..c23d823d2 100644
--- a/public/pages/site/ShowIdeaPage/ResponseForm.tsx
+++ b/public/pages/ShowIdea/components/ResponseForm.tsx
@@ -1,8 +1,8 @@
import * as React from 'react';
-import { User, Comment, Idea, IdeaStatus } from '@fider/models';
import { Button, DisplayError, Textarea } from '@fider/components/common';
-import { IdeaSearch } from './';
+import { Comment, Idea, IdeaStatus, User } from '@fider/models';
+import { IdeaSearch } from '../';
import { actions, Failure } from '@fider/services';
diff --git a/public/pages/site/ShowIdeaPage/TagsPanel.tsx b/public/pages/ShowIdea/components/TagsPanel.tsx
similarity index 100%
rename from public/pages/site/ShowIdeaPage/TagsPanel.tsx
rename to public/pages/ShowIdea/components/TagsPanel.tsx
diff --git a/public/pages/ShowIdea/index.ts b/public/pages/ShowIdea/index.ts
new file mode 100644
index 000000000..8ad113a49
--- /dev/null
+++ b/public/pages/ShowIdea/index.ts
@@ -0,0 +1,7 @@
+export * from './ShowIdea.page';
+export * from './components/CommentInput';
+export * from './components/ResponseForm';
+export * from './components/CommentList';
+export * from './components/IdeaSearch';
+export * from './components/TagsPanel';
+export * from './components/NotificationsPanel';
diff --git a/public/pages/signup/SignUpPage.scss b/public/pages/SignUp/SignUp.page.scss
similarity index 90%
rename from public/pages/signup/SignUpPage.scss
rename to public/pages/SignUp/SignUp.page.scss
index 6c9873adf..0601634e2 100644
--- a/public/pages/signup/SignUpPage.scss
+++ b/public/pages/SignUp/SignUp.page.scss
@@ -1,4 +1,4 @@
-#fdr-signup-page {
+#p-signup {
.page {
margin-top: 50px;
max-width: 500px !important;
diff --git a/public/pages/signup/SignUpPage.tsx b/public/pages/SignUp/SignUp.page.tsx
similarity index 99%
rename from public/pages/signup/SignUpPage.tsx
rename to public/pages/SignUp/SignUp.page.tsx
index 157152b93..478f630f6 100644
--- a/public/pages/signup/SignUpPage.tsx
+++ b/public/pages/SignUp/SignUp.page.tsx
@@ -1,12 +1,11 @@
-import * as React from 'react';
-
-const logo = require('@fider/assets/images/logo-small.png');
+import './SignUp.page.scss';
+import * as React from 'react';
import { SignInControl, Button, DisplayError } from '@fider/components/common';
import { AuthSettings, SystemSettings } from '@fider/models';
import { jwt, page, actions, Failure } from '@fider/services';
-import './SignUpPage.scss';
+const logo = require('@fider/assets/images/logo-small.png');
interface OAuthUser {
token: string;
diff --git a/public/pages/SignUp/index.ts b/public/pages/SignUp/index.ts
new file mode 100644
index 000000000..dd5e3bcdd
--- /dev/null
+++ b/public/pages/SignUp/index.ts
@@ -0,0 +1 @@
+export * from './SignUp.page';
diff --git a/public/pages/admin/ManageTagsPage/index.ts b/public/pages/admin/ManageTagsPage/index.ts
deleted file mode 100644
index 92d60b6e2..000000000
--- a/public/pages/admin/ManageTagsPage/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './ManageTagsPage';
-export * from './TagForm';
diff --git a/public/pages/index.ts b/public/pages/index.ts
new file mode 100644
index 000000000..fc1025716
--- /dev/null
+++ b/public/pages/index.ts
@@ -0,0 +1,9 @@
+export * from './Home';
+export * from './AdminHome';
+export * from './SignUp';
+export * from './ManageMembers';
+export * from './ManageTags';
+export * from './CompleteSignInProfile';
+export * from './MySettings';
+export * from './MyNotifications';
+export * from './ShowIdea';
diff --git a/public/pages/site/HomePage/index.ts b/public/pages/site/HomePage/index.ts
deleted file mode 100644
index df39a3042..000000000
--- a/public/pages/site/HomePage/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export * from './HomePage';
-export * from './TagsFilter';
-export * from './IdeaFilter';
-export * from './HomePage';
-export * from './IdeaInput';
-export * from './ListIdeas';
-export * from './IdeasView';
diff --git a/public/pages/site/ShowIdeaPage/index.ts b/public/pages/site/ShowIdeaPage/index.ts
deleted file mode 100644
index ad478cced..000000000
--- a/public/pages/site/ShowIdeaPage/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export * from './ShowIdeaPage';
-export * from './CommentInput';
-export * from './ResponseForm';
-export * from './CommentList';
-export * from './IdeaSearch';
-export * from './TagsPanel';
-export * from './NotificationsPanel';
diff --git a/public/pages/site/UserNotificationsPage/index.ts b/public/pages/site/UserNotificationsPage/index.ts
deleted file mode 100644
index 4a590d088..000000000
--- a/public/pages/site/UserNotificationsPage/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './UserNotificationsPage';
diff --git a/public/pages/site/UserSettingsPage/index.ts b/public/pages/site/UserSettingsPage/index.ts
deleted file mode 100644
index 68fb81a7c..000000000
--- a/public/pages/site/UserSettingsPage/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './UserSettingsPage';
-export * from './NotificationSettings';
diff --git a/public/router.tsx b/public/router.tsx
index 5af23e2e9..fb784664e 100644
--- a/public/router.tsx
+++ b/public/router.tsx
@@ -1,14 +1,16 @@
import * as React from 'react';
-import { AdminHomePage } from '@fider/pages/admin/AdminHomePage';
-import { MembersPage } from '@fider/pages/admin/MembersPage';
-import { ManageTagsPage } from '@fider/pages/admin/ManageTagsPage';
-import { HomePage } from '@fider/pages/site/HomePage';
-import { ShowIdeaPage } from '@fider/pages/site/ShowIdeaPage';
-import { UserSettingsPage } from '@fider/pages/site/UserSettingsPage';
-import { UserNotificationsPage } from '@fider/pages/site/UserNotificationsPage';
-import { CompleteSignInProfilePage } from '@fider/pages/site/CompleteSignInProfilePage';
-import { SignUpPage } from '@fider/pages/signup/SignUpPage';
+import {
+ HomePage,
+ SignUpPage,
+ ManageMembersPage,
+ CompleteSignInProfilePage,
+ AdminHomePage,
+ ManageTagsPage,
+ ShowIdeaPage,
+ MySettingsPage,
+ MyNotificationsPage,
+} from '@fider/pages';
interface PageConfiguration {
id: string;
@@ -27,15 +29,15 @@ const route = (path: string, component: any, id: string, showHeader: boolean): P
};
const pathRegex = [
- route('', HomePage, 'fdr-home-page', true),
- route('/ideas/:number*', ShowIdeaPage, 'fdr-show-idea-page', true),
- route('/admin/members', MembersPage, 'fdr-admin-members-page', true),
- route('/admin/tags', ManageTagsPage, 'fdr-admin-tags-page', true),
- route('/admin', AdminHomePage, 'fdr-admin-page', true),
- route('/signup', SignUpPage, 'fdr-signup-page', false),
- route('/signin/verify', CompleteSignInProfilePage, 'fdr-complete-signin-profile', true),
- route('/notifications', UserNotificationsPage, 'fdr-user-notifications', true),
- route('/settings', UserSettingsPage, 'fdr-user-settings', true),
+ route('', HomePage, 'p-home', true),
+ route('/ideas/:number*', ShowIdeaPage, 'p-show-idea', true),
+ route('/admin/members', ManageMembersPage, 'p-manage-members', true),
+ route('/admin/tags', ManageTagsPage, 'p-manage-tags', true),
+ route('/admin', AdminHomePage, 'p-admin-home', true),
+ route('/signup', SignUpPage, 'p-signup', false),
+ route('/signin/verify', CompleteSignInProfilePage, 'p-complete-signin-profile', true),
+ route('/notifications', MyNotificationsPage, 'p-my-notifications', true),
+ route('/settings', MySettingsPage, 'p-my-settings', true),
];
export const resolveRootComponent = (path: string): PageConfiguration => {
diff --git a/views/base.html b/views/base.html
index 9f6d36c26..dbe58af58 100644
--- a/views/base.html
+++ b/views/base.html
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="stylesheet" href="/assets/css/{{ .__StyleBundle }}" />
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,700&amp;subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext">
<title>{{ template "title" .}}</title>
<meta property="og:title" content="{{template "title" .}}" />
<meta property="og:description" content="We'd love to hear what you're thinking about. What can we do better? This is the place for you to vote, discuss and share ideas." />