Skip to content

Commit

Permalink
[IMPROVE] Unused styles (RocketChat#17554)
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan authored May 15, 2020
1 parent 84ccdd0 commit 811688e
Show file tree
Hide file tree
Showing 60 changed files with 1,076 additions and 2,850 deletions.
3 changes: 1 addition & 2 deletions .postcssrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"autoprefixer": {}
},
"excludedPackages": [
"deepwell:bootstrap-datepicker2",
"smoral:sweetalert"
"deepwell:bootstrap-datepicker2"
]
}
2 changes: 1 addition & 1 deletion .storybook/mocks/decorators.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const rocketChatDecorator = (fn) => {
}
`}</style>
<div dangerouslySetInnerHTML={{ __html: icons }} />
<div className='global-font-family color-primary-font-color'>
<div className='color-primary-font-color'>
{fn()}
</div>
</MeteorProviderMock>;
Expand Down
10 changes: 5 additions & 5 deletions app/apps/client/admin/appManage.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ <h2> {{_ "Settings"}} </h2>
</div>
{{> CodeMirror name=id options=getEditorOptions code=value }}
<div class="buttons">
<button class="button primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="button primary button-restore">{{_ "Exit_Full_Screen"}}</button>
<button class="rc-button rc-button--primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="rc-button rc-button--primary button-restore">{{_ "Exit_Full_Screen"}}</button>
</div>
</div>
{{/if}}
Expand Down Expand Up @@ -463,7 +463,7 @@ <h2> {{_ "Settings"}} </h2>
{{#if hasChanges section}}
<span style="line-height: 40px" class="secondary-font-color">{{_ "Save_to_enable_this_action"}}</span>
{{else}}
<button type="button" class="button primary action" data-setting="{{id}}" data-action="{{value}}">{{_ actionText}}</button>
<button type="button" class="rc-button rc-button--primary action" data-setting="{{id}}" data-action="{{value}}">{{_ actionText}}</button>
{{/if}}
{{/if}}

Expand All @@ -472,14 +472,14 @@ <h2> {{_ "Settings"}} </h2>
<div class="settings-file-preview">
<div class="preview" style="background-image:url({{value.url}}?_dc={{random}});"></div>
<div class="action">
<button type="button" class="button danger delete-asset"><i class="icon-trash secondary-font-color"></i>{{_ 'Delete'}}</button>
<button type="button" class="rc-button rc-button--danger delete-asset"><i class="icon-trash secondary-font-color"></i>{{_ 'Delete'}}</button>
</div>
</div>
{{else}}
<div class="settings-file-preview">
<div class="preview no-file background-transparent-light secondary-font-color"><i class="icon-upload secondary-font-color"></i></div>
<div class="action">
<div class="button primary">{{_ 'Select_file'}}
<div class="rc-button rc-button--primary">{{_ 'Select_file'}}
<input type="file" accept="{{assetAccept fileConstraints}}" />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/autotranslate/client/views/autoTranslateFlexTab.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ <h2>{{_ "Auto_Translate"}}</h2>
<div class="alert">
{{_ "AutoTranslate_Change_Language_Description"}}
</div>
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary save">{{_ "Save"}}</button>
<button type="button" class="rc-button rc-button--cancel">{{_ "Cancel"}}</button>
<button type="button" class="rc-button rc-button--primary save">{{_ "Save"}}</button>
{{else}}
<span class="current-setting">{{languageName autoTranslateLanguage}} <i class="icon-pencil" data-edit="autoTranslateLanguage"></i></span>
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion app/chatpal-search/client/template/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</div>
</fieldset>
<div class="submit">
<button class="button primary send"><span>{{_ "Chatpal_create_key"}}</span></button>
<button class="rc-button rc-button--primary send"><span>{{_ "Chatpal_create_key"}}</span></button>
</div>
</div>
</form>
Expand Down
4 changes: 2 additions & 2 deletions app/integrations/client/views/integrationsIncoming.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
</div>
{{> CodeMirror name="script" options=editorOptions code=data.script }}
<div class="buttons">
<button class="button primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="button primary button-restore">{{_ "Exit_Full_Screen"}}</button>
<button class="rc-button rc-button--primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="rc-button rc-button--primary button-restore">{{_ "Exit_Full_Screen"}}</button>
</div>
</div>
{{#if data.hasScriptError }}
Expand Down
8 changes: 4 additions & 4 deletions app/integrations/client/views/integrationsOutgoing.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="section-title">
<div class="section-title-text">{{_ "Webhook Details"}}</div>
<div class="section-title-right">
<button class="button primary collapse"><span>{{_ "Collapse"}}</span></button>
<button class="rc-button rc-button--primary collapse"><span>{{_ "Collapse"}}</span></button>
</div>
</div>
<div class="section-content">
Expand Down Expand Up @@ -148,8 +148,8 @@
</div>
{{> CodeMirror name="script" options=editorOptions code=data.script }}
<div class="buttons">
<button class="button primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="button primary button-restore">{{_ "Exit_Full_Screen"}}</button>
<button class="rc-button rc-button--primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="rc-button rc-button--primary button-restore">{{_ "Exit_Full_Screen"}}</button>
</div>
</div>
{{#if data.hasScriptError }}
Expand Down Expand Up @@ -181,7 +181,7 @@
<div class="section-title">
<div class="section-title-text">{{_ "Integration_Advanced_Settings"}}</div>
<div class="section-title-right">
<button class="button primary expand"><span>{{_ "Expand"}}</span></button>
<button class="rc-button rc-button--primary expand"><span>{{_ "Expand"}}</span></button>
</div>
</div>
<div class="section-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
{{formatDate history._createdAt}}
</div>
<div class="section-title-right">
<button class="button replay" data-history-id="{{ history._id }}">Replay</button>
<button class="button primary expand">
<button class="rc-button rc-button--secondary replay" data-history-id="{{ history._id }}">Replay</button>
<button class="rc-button rc-button--primary expand">
<span>{{_ "Expand"}}</span>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<fieldset class="rc-form-legend">
<div class="rc-form-group">
{{#if enabled}}
<button class="button reload">{{_ "Reload_Pages"}}</button>
<button class="button danger disable">{{_ "Disable"}}</button>
<button class="rc-button rc-button--secondary reload">{{_ "Reload_Pages"}}</button>
<button class="rc-button rc-button--danger disable">{{_ "Disable"}}</button>
{{else}}
<button class="button primary enable" {{enableButtonDisabled}}>{{_ "Enable"}}</button>
<button class="rc-button rc-button--primary enable" {{enableButtonDisabled}}>{{_ "Enable"}}</button>
{{#unless hasToken}}
<div class="rc-input__wrapper">
<p>{{_ "You_have_to_set_an_API_token_first_in_order_to_use_the_integration"}}</p>
Expand Down
2 changes: 1 addition & 1 deletion app/livechat/client/views/app/livechatAgents.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<tr class="rc-table-tr user-info row-link" data-id="{{_id}}">
<td>
<div class="rc-table-wrapper">
<div class="rc-table-avatar user-image status-{{status}}">{{> avatar username=username}}</div>
<div class="rc-table-avatar">{{> avatar username=username}}</div>
<div class="rc-table-info">
<span class="rc-table-title">
{{name}}
Expand Down
2 changes: 1 addition & 1 deletion app/livechat/client/views/app/livechatManagers.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<tr class="rc-table-tr user-info row-link" data-id="{{_id}}">
<td>
<div class="rc-table-wrapper">
<div class="rc-table-avatar user-image status-{{status}}">{{> avatar username=username}}</div>
<div class="rc-table-avatar">{{> avatar username=username}}</div>
<div class="rc-table-info">
<span class="rc-table-title">
{{name}}
Expand Down
2 changes: 1 addition & 1 deletion app/livechat/client/views/app/livechatQueue.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<tr class="rc-table-tr manage row-link" data-name="{{user.username}}">
<td>
<div class="rc-table-wrapper">
<div class="rc-table-avatar user-image status-{{status}}">{{> avatar username=user.username}}</div>
<div class="rc-table-avatar">{{> avatar username=user.username}}</div>
<div class="rc-table-info">
<span class="rc-table-title">{{user.username}}</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/livechat/client/views/app/tabbar/visitorInfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ <h3>{{_ "Conversation"}}</h3>
<button class='button button-block close-livechat'><span><i class='icon-download'></i> {{_ "Close"}}</span></button>
{{/if}}
{{#if canForwardGuest}}
<button class="button button-block forward-livechat"><span><i class="icon-forward"></i> {{_ "Forward"}}</span></button>
<button class="rc-button rc-button--secondary button-block forward-livechat"><span><i class="icon-forward"></i> {{_ "Forward"}}</span></button>
{{/if}}
{{#if canReturnQueue}}
<button class="button button-block return-inquiry"><span><i class="icon-ccw"></i> {{_ "Return"}}</span></button>
<button class="rc-button rc-button--secondary button-block return-inquiry"><span><i class="icon-ccw"></i> {{_ "Return"}}</span></button>
{{/if}}
{{/if}}
</nav>
Expand Down
4 changes: 2 additions & 2 deletions app/models/server/models/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class Settings extends Base {
filter._id = { $in: ids };
}

return this.find(filter, { fields: { _id: 1, value: 1 } });
return this.find(filter, { fields: { _id: 1, value: 1, editor: 1 } });
}

findNotHiddenPublicUpdatedAfter(updatedAt) {
Expand All @@ -70,7 +70,7 @@ export class Settings extends Base {
},
};

return this.find(filter, { fields: { _id: 1, value: 1 } });
return this.find(filter, { fields: { _id: 1, value: 1, editor: 1 } });
}

findNotHiddenPrivate() {
Expand Down
4 changes: 2 additions & 2 deletions app/oauth2-server-config/client/admin/views/oauthApp.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
</div>
<div class="submit">
{{#if data.clientId}}
<button class="button danger delete"><i class="icon-trash"></i><span>{{_ "Delete"}}</span></button>
<button class="rc-button rc-button--danger delete"><i class="icon-trash"></i><span>{{_ "Delete"}}</span></button>
{{/if}}
<button class="button primary save"><i class="icon-send"></i><span>{{_ "Save_changes"}}</span></button>
<button class="rc-button rc-button--primary save"><i class="icon-send"></i><span>{{_ "Save_changes"}}</span></button>
</div>
</div>
{{else}}
Expand Down
6 changes: 3 additions & 3 deletions app/oauth2-server-config/client/oauth/oauth2-client.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ <h1>{{currentUser.username}}</h1>
<input type="hidden" name="redirect_uri" value="{{redirect_uri}}">
<input type="hidden" name="response_type" value="code">
<div class="buttons-group">
<button id="logout-oauth" class="button danger logout">{{_ "Logout"}}</button>
<button id="cancel-oauth" type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="submit" class="button primary save">{{_ "Authorize"}}</button>
<button id="logout-oauth" class="rc-button rc-button--danger logout">{{_ "Logout"}}</button>
<button id="cancel-oauth" type="button" class="rc-button rc-button--cancel">{{_ "Cancel"}}</button>
<button type="submit" class="rc-button rc-button--primary save">{{_ "Authorize"}}</button>
</div>
</form>
{{#unless Template.subscriptionsReady}}
Expand Down
4 changes: 0 additions & 4 deletions app/otr/client/rocketchat.otr.room.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ OTR.Room = class {
if (this.established.get()) {
if ($room.length && $title.length && !$('.otr-icon', $title).length) {
$title.prepend('<i class=\'otr-icon icon-key\'></i>');
$('.input-message-container').addClass('otr');
$('.inner-right-toolbar').prepend('<i class=\'otr-icon icon-key\'></i>');
}
} else if ($title.length) {
$('.otr-icon', $title).remove();
$('.input-message-container').removeClass('otr');
$('.inner-right-toolbar .otr-icon').remove();
}
});

Expand Down
18 changes: 0 additions & 18 deletions app/otr/client/stylesheets/otr.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,3 @@
}
}
}

.input-message-container.otr {
& .input-message {
padding-right: 48px;
}

& .inner-right-toolbar {
& .otr-icon {
display: inline-block;

margin-top: 2px;

vertical-align: top;

color: green;
}
}
}
6 changes: 3 additions & 3 deletions app/otr/client/views/otrFlexTab.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ <h2>{{_ "Off_the_record_conversation"}}</h2>
{{#if userIsOnline}}
{{#if established}}
<div class="buttons-group">
<button class="button refresh"><span>{{_ "Refresh_keys"}}</span></button>
<button class="rc-button rc-button--secondary refresh"><span>{{_ "Refresh_keys"}}</span></button>
</div>
<div class="buttons-group">
<button class="button end"><span>{{_ "End_OTR"}}</span></button>
<button class="rc-button rc-button--secondary end"><span>{{_ "End_OTR"}}</span></button>
</div>
{{else}} {{#if establishing}}
{{_ "Please_wait_while_OTR_is_being_established"}}
{{else}}
<button class="button start"><span>{{_ "Start_OTR"}}</span></button>
<button class="rc-button rc-button--secondary start"><span>{{_ "Start_OTR"}}</span></button>
{{/if}} {{/if}}
{{else}}
<h2>{{_ "OTR_is_only_available_when_both_users_are_online"}}</h2>
Expand Down
1 change: 1 addition & 0 deletions app/theme/client/imports/general/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ body {

background-color: var(--rc-color-primary);

font-family: var(--body-font-family);
font-size: var(--text-small-size);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
Loading

0 comments on commit 811688e

Please sign in to comment.