Skip to content

Commit 214c54c

Browse files
committed
remove twitter publish ui
1 parent 68a220b commit 214c54c

File tree

3 files changed

+16
-37
lines changed

3 files changed

+16
-37
lines changed

web/frontend/js/ui/AddRecordDialog.tsx

+3-18
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import LoginDialog from './LoginDialog';
88
import { StatusInput } from './StatusInput';
99
import ModalStyles from './Modal.less';
1010
import Styles from './AddRecordDialog.less';
11-
import { getLastPublishTwitter, setLastPublishTwitter } from '../Prefs';
11+
import { setLastPublishTwitter } from '../Prefs';
1212
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
13-
import { faTimesCircle, faWarning } from '@fortawesome/free-solid-svg-icons';
13+
import { faTimesCircle } from '@fortawesome/free-solid-svg-icons';
1414
import { Rating } from './Rating';
1515
import { CreateRecordInput, StatusType } from '../__generated__/globalTypes';
1616
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
@@ -63,8 +63,6 @@ type AddRecordState = {
6363
currentUser: AddRecordDialogQuery['currentUser'];
6464
};
6565

66-
const PUBLISH_TWITTER_DISABLED_MESSAGE = "트위터 API 유료화로 공유 기능 제공을 중단합니다.";
67-
6866
class AddRecord<T> extends React.Component<AddRecordProps<T>, AddRecordState> {
6967
private _titleEl: HTMLInputElement | null = null;
7068

@@ -153,21 +151,8 @@ class AddRecord<T> extends React.Component<AddRecordProps<T>, AddRecordState> {
153151
/>
154152
</div>
155153
</form>
156-
<div className={Styles.shareOptions}>
157-
<label
158-
title={PUBLISH_TWITTER_DISABLED_MESSAGE}
159-
onClick={e => alert(PUBLISH_TWITTER_DISABLED_MESSAGE)}
160-
>
161-
<input
162-
type="checkbox"
163-
disabled
164-
/>
165-
{' 트위터에 공유'}
166-
<FontAwesomeIcon icon={faWarning} />
167-
</label>
168-
</div>
169154
<button
170-
className={ModalStyles.confirmButton}
155+
className={ModalStyles.fullConfirmButton}
171156
disabled={this.state.isRequesting}
172157
onClick={this._onSubmit}
173158
>

web/frontend/js/ui/Modal.less

+13-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
margin: 0;
8686
}
8787

88-
:local(.button) {
89-
float: right;
88+
:local(.baseButton) {
9089
display: block;
9190
border: none;
9291
border-radius: 5px;
@@ -96,13 +95,18 @@
9695
font-size: 14px;
9796
font-weight: bold;
9897
cursor: pointer;
99-
margin-left: 10px;
10098

10199
&:disabled {
102100
background: #999;
103101
}
104102
}
105103

104+
:local(.button) {
105+
composes: baseButton;
106+
float: right;
107+
margin-left: 10px;
108+
}
109+
106110
:local(.dangerConfirmButton) {
107111
composes: button;
108112
background: @color-danger;
@@ -113,6 +117,12 @@
113117
background: @color-main;
114118
}
115119

120+
:local(.fullConfirmButton) {
121+
composes: baseButton;
122+
background: @color-main;
123+
width: 100%;
124+
}
125+
116126
:local(.cancelButton) {
117127
composes: button;
118128
color: @color-text-dark;

web/frontend/js/ui/PostComposer.tsx

-16
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import * as React from 'react';
22
import * as util from '../util';
33
import { StatusInput } from './StatusInput';
44
import Styles from './PostComposer.less';
5-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
6-
import { faWarning } from '@fortawesome/free-solid-svg-icons';
75
import { PostComposer_RecordFragment } from './__generated__/PostComposer.graphql';
86
import { StatusType } from '../__generated__/globalTypes';
97

@@ -21,8 +19,6 @@ export type PostComposerResult = {
2119
publishTwitter: boolean;
2220
};
2321

24-
const PUBLISH_TWITTER_DISABLED_MESSAGE = "트위터 API 유료화로 공유 기능 제공을 중단합니다.";
25-
2622
export class PostComposer extends React.Component<PostComposerProps> {
2723
private _submitting: boolean;
2824

@@ -80,18 +76,6 @@ export class PostComposer extends React.Component<PostComposerProps> {
8076
/>
8177
{' 내용 누설 포함'}
8278
</label>
83-
<label
84-
className={Styles.disabledLabel}
85-
title={PUBLISH_TWITTER_DISABLED_MESSAGE}
86-
onClick={e => alert(PUBLISH_TWITTER_DISABLED_MESSAGE)}
87-
>
88-
<input
89-
type="checkbox"
90-
disabled
91-
/>
92-
{' 트위터에 공유'}
93-
<FontAwesomeIcon icon={faWarning} />
94-
</label>
9579
<button type="button" onClick={this._onSubmit}>
9680
기록 추가
9781
</button>

0 commit comments

Comments
 (0)