diff options
-rw-r--r-- | server/migrations/2019-06-01-222649_remove_admin/down.sql | 1 | ||||
-rw-r--r-- | server/migrations/2019-06-01-222649_remove_admin/up.sql | 1 | ||||
-rw-r--r-- | ui/src/components/main.tsx | 1 | ||||
-rw-r--r-- | ui/src/components/sidebar.tsx | 4 |
4 files changed, 5 insertions, 2 deletions
diff --git a/server/migrations/2019-06-01-222649_remove_admin/down.sql b/server/migrations/2019-06-01-222649_remove_admin/down.sql new file mode 100644 index 00000000..6178857f --- /dev/null +++ b/server/migrations/2019-06-01-222649_remove_admin/down.sql @@ -0,0 +1 @@ +insert into user_ (name, fedi_name, password_encrypted) values ('admin', 'TBD', 'TBD'); diff --git a/server/migrations/2019-06-01-222649_remove_admin/up.sql b/server/migrations/2019-06-01-222649_remove_admin/up.sql new file mode 100644 index 00000000..7cec8870 --- /dev/null +++ b/server/migrations/2019-06-01-222649_remove_admin/up.sql @@ -0,0 +1 @@ +delete from user_ where name like 'admin'; diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index ac43b1d9..153c9f72 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -71,6 +71,7 @@ export class Main extends Component<any, MainState> { super(props, context); this.state = this.emptyState; + this.handleEditCancel = this.handleEditCancel.bind(this); this.subscription = WebSocketService.Instance.subject .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10)))) diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index 6532bc05..d36d962c 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -115,8 +115,8 @@ export class Sidebar extends Component<SidebarProps, SidebarState> { <li class="list-inline-item"><Link class="text-info" to={`/u/${mod.user_name}`}>{mod.user_name}</Link></li> )} </ul> - <Link class="btn btn-sm btn-secondary btn-block mb-3" - to={`/create_post/c/${community.name}`}>Create a Post</Link> + <Link class={`btn btn-sm btn-secondary btn-block mb-3 ${(community.deleted || community.removed) && 'no-click'}`} + to={`/create_post/c/${community.name}`}>Create a Post</Link> <div> {community.subscribed ? <button class="btn btn-sm btn-secondary btn-block mb-3" onClick={linkEvent(community.id, this.handleUnsubscribe)}>Unsubscribe</button> |