Skip to content

Commit a049753

Browse files
committed
fix: css in settings
1 parent 03ce8c8 commit a049753

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

changelog.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# UnderScript Changelog
22

33
## Version 0.50.5 (2022-06-)
4-
1. Fix undefined dust
4+
1. Fix `undefined dust`
55
1. Spectate*
6-
1. Fix special map bg music
6+
1. Fix persist bgm breaking skin themes
7+
1. Allow music played by underscript to be cancelable
8+
1. Fixed minigame playing when disabled
9+
1. Possibly fixed friends list errors
10+
1. `:loaded` event can't be delayed1
11+
1. Fixed a few issues with settings display
712

813
## Version 0.50.4 (2022-04-06)
914
1. Fixed "ignore user" setting

src/utils/settings/index.js

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ style.add(
1818
'.flex-start > input { margin-right: 4px; }',
1919
'.mono .modal-body { font-family: monospace; max-height: 500px; overflow-y: auto; }',
2020
'.underscript-dialog .bootstrap-dialog-message { display: flex; }',
21+
'.underscript-dialog fieldset { padding: .35em .625em .75em; margin: 0 2px; border: 1px solid silver; }',
22+
'.underscript-dialog legend { padding: 0; border: 0; width: auto; margin: 0; font-family: DTM-Mono; color: white; }',
23+
'.underscript-dialog label.disabled { color: #666; cursor: not-allowed; }',
2124
// '.underscript-dialog .modal-content { background: #000 url(../images/backgrounds/2.png) -380px -135px; }',
2225
// '.underscript-dialog .modal-content .modal-header, .underscript-dialog .modal-body { background-color: transparent; }',
2326
'.underscript-dialog .modal-footer button.btn { margin-bottom: 5px; }',
@@ -38,7 +41,7 @@ let dialog = null;
3841
/**
3942
* @returns {tabManager}
4043
*/
41-
function getScreen() {
44+
export function getScreen() {
4245
if (getScreen.screen) {
4346
return getScreen.screen;
4447
}
@@ -111,10 +114,7 @@ function createSetting(setting = {
111114
const disabled = (typeof setting.disabled === 'function' ? setting.disabled() : setting.disabled) === true;
112115
if (disabled) {
113116
el.prop('disabled', true);
114-
label.css({
115-
color: '#666',
116-
cursor: 'not-allowed',
117-
});
117+
label.addClass('disabled');
118118
}
119119
const labelPlacement = type.labelFirst();
120120
if (labelPlacement) {
@@ -151,21 +151,10 @@ function getMessage(page) {
151151
const pageSettings = configs.get(page).settings;
152152
const categories = {};
153153
function createCategory(name) {
154-
const set = $('<fieldset>').css({
155-
padding: '.35em .625em .75em',
156-
margin: '0 2px',
157-
border: '1px solid silver',
158-
});
154+
const set = $('<fieldset>');
159155
categories[name] = set;
160156
if (name !== 'N/A') {
161-
set.append($('<legend>').css({
162-
padding: 0,
163-
border: 0,
164-
width: 'auto',
165-
margin: 0,
166-
'font-family': 'DTM-Mono',
167-
color: 'white',
168-
}).html(name));
157+
set.append($('<legend>').html(name));
169158
}
170159
container.append(set);
171160
return set;
@@ -368,7 +357,7 @@ function removeSetting(setting, el) {
368357

369358
export function exportSettings() {
370359
const localSet = {};
371-
const extras = ['underscript.notice.', 'underscript.plugin.'];
360+
const extras = ['underscript.notice.'];
372361
const skip = [];
373362
let used = false;
374363
each(settingReg, (setting) => {

0 commit comments

Comments
 (0)