Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieFox authored and GrassBlock1 committed Jun 14, 2024
1 parent 26b3287 commit 8da6a27
Show file tree
Hide file tree
Showing 30 changed files with 63 additions and 52 deletions.
20 changes: 10 additions & 10 deletions src/component/bookmarkForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ export const BookmarkForm = function({
form.wrap({
children: [
node('div|class:bookmark-form-description', [
node(`h2:${message.get('bookmarkFormSectionVisualHeading')}`),
node(`p:${message.get('bookmarkFormSectionVisualDescription')}`)
node(`h2:${message.get('bookmarkFormSectionVisualHeading') || 'Content'}`),
node(`p:${message.get('bookmarkFormSectionVisualDescription') || 'Text'}`)
])
]
}),
Expand Down Expand Up @@ -801,8 +801,8 @@ export const BookmarkForm = function({
form.wrap({
children: [
node('div|class:bookmark-form-description', [
node(`h2:${message.get('bookmarkFormSectionAddressHeading')}`),
complexNode({ tag: 'p', text: message.get('bookmarkFormSectionAddressDescription'), complexText: true })
node(`h2:${message.get('bookmarkFormSectionAddressHeading') || 'Content'}`),
complexNode({ tag: 'p', text: message.get('bookmarkFormSectionAddressDescription') || 'Text', complexText: true })
])
]
}),
Expand All @@ -825,8 +825,8 @@ export const BookmarkForm = function({
form.wrap({
children: [
node('div|class:bookmark-form-description', [
node(`h2:${message.get('bookmarkFormSectionPositionHeading')}`),
node(`p:${message.get('bookmarkFormSectionPositionDescription')}`)
node(`h2:${message.get('bookmarkFormSectionPositionHeading') || 'Content'}`),
node(`p:${message.get('bookmarkFormSectionPositionDescription') || 'Text'}`)
])
]
}),
Expand Down Expand Up @@ -870,8 +870,8 @@ export const BookmarkForm = function({
form.wrap({
children: [
node('div|class:bookmark-form-description', [
node(`h2:${message.get('bookmarkFormSectionLayoutHeading')}`),
node(`p:${message.get('bookmarkFormSectionLayoutDescription')}`)
node(`h2:${message.get('bookmarkFormSectionLayoutHeading') || 'Content'}`),
node(`p:${message.get('bookmarkFormSectionLayoutDescription') || 'Text'}`)
])
]
}),
Expand Down Expand Up @@ -917,8 +917,8 @@ export const BookmarkForm = function({
form.wrap({
children: [
node('div|class:bookmark-form-description', [
node(`h2:${message.get('bookmarkFormSectionThemeHeading')}`),
node(`p:${message.get('bookmarkFormSectionThemeDescription')}`)
node(`h2:${message.get('bookmarkFormSectionThemeHeading') || 'Content'}`),
node(`p:${message.get('bookmarkFormSectionThemeDescription') || 'Text'}`)
])
]
}),
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Control_checkbox = function ({
object = {},
id = 'name',
path = false,
labelText = 'name',
labelText = 'Label',
description = false,
action = false,
//FIXME deprecated properties
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/color/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Control_color = function ({
object = {},
path = false,
id = 'name',
labelText = 'Name',
labelText = 'Label',
srOnly = false,
//FIXME deprecated property
value = '#000000', //eslint-disable-line
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/colorMixer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Control_colorMixer = function ({
defaultValue = false,
minMaxObject = false,
id = 'name',
labelText = 'name',
labelText = 'Label',
srOnly = false,
randomColor = false,
action = false
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/helperText/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Control_helperText = function ({
text.forEach((item) => {
this.para.push(form.helper({
tag: 'p',
text: item,
text: item || 'Text',
complexText: complexText
}));
});
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/inputButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Control_inputButton = function ({
inputButtonClassList = [],
type = false,
inputHide = false,
labelText = 'Name',
labelText = 'Label',
srOnly = false,
inputButtonStyle = [],
action = false
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/label/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as form from '../../form';

export const Control_label = function({
text = 'label',
text = 'Label',
description = false,
srOnly = false,
icon = false,
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/radio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Control_radio = function ({
radioGroup = [],
object = {},
label = false,
groupName = 'group',
groupName = 'Group',
path = false,
action = false,
inputButton = false,
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/radioGrid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { set } from '../../../utility/set';

export const Control_radioGrid = function ({
radioGroup = [],
label = false,
label = 'Label',
object = {},
groupName = 'group',
path = false,
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Control_select = function({
object = {},
id = 'name',
path = false,
labelText = 'name',
labelText = 'Label',
srOnly = false,
description = false,
action = false
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/slider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Control_slider = function({
object = {},
path = false,
id = 'name',
labelText = 'Name',
labelText = 'Label',
value = 0,
defaultValue = false,
min = 0,
Expand Down
6 changes: 3 additions & 3 deletions src/component/control/sliderDouble/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import { set } from '../../../utility/set';

export const Control_sliderDouble = function ({
object = {},
labelText = 'Name',
labelText = 'Label',
style = false,
left = {
path: false,
id: 'name',
labelText: 'Name',
labelText: 'Label',
hue: false,
value: 0,
defaultValue: false,
Expand All @@ -34,7 +34,7 @@ export const Control_sliderDouble = function ({
right = {
path: false,
id: 'name',
labelText: 'Name',
labelText: 'Label',
hue: false,
value: 0,
defaultValue: false,
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/sliderSlim/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Control_sliderSlim = function({
object = {},
path = false,
id = 'name',
labelText = 'Name',
labelText = 'Label',
hue = false,
value = 0,
defaultValue = false,
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Control_text = function ({
max = false,
placeholder = false,
classList = [],
labelText = 'Name',
labelText = 'Label',
srOnly = false,
action = false
} = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/textReset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Control_textReset = function({
max = false,
placeholder = false,
classList = [],
labelText = 'Name',
labelText = 'Label',
srOnly = false,
action = false
} = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/component/control/textarea/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Control_textarea = function ({
max = false,
placeholder = false,
classList = [],
labelText = 'Name',
labelText = 'Label',
srOnly = false,
action = false
} = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/component/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ data.feedback = {};

data.feedback.empty = {
render: (feedback) => {
feedback.appendChild(node(`p:${message.get('dataFeedbackEmpty')}|class:muted small`));
feedback.appendChild(node(`p:${message.get('dataFeedbackEmpty') || 'Text'}|class:muted small`));
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/component/dropFile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { node } from '../../utility/node';
import './index.css';

export const DropFile = function ({
heading = 'Drop file here',
heading = 'Text',
dropAaction = false,
enterAction = false,
leaveAction = false,
Expand Down
2 changes: 1 addition & 1 deletion src/component/form/feedback/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { complexNode } from '../../../utility/complexNode';
import './index.css';

export const feedback = ({
text = false
text = 'Text'
} = {}) => {

const feedback = node('div|class:form-feedback');
Expand Down
2 changes: 1 addition & 1 deletion src/component/form/helper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { node } from '../../../utility/node';
import './index.css';

export const helper = function ({
text = 'text',
text = 'Text',
complexText = false,
classList = []
} = {}) {
Expand Down
6 changes: 3 additions & 3 deletions src/component/form/label/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import './index.css';

export const label = ({
forInput = false,
text = 'label',
text = 'Label',
description = false,
srOnly = false,
icon = false,
Expand Down Expand Up @@ -42,12 +42,12 @@ export const label = ({
if (Array.isArray(description)) {

description.forEach((item) => {
labelBlock.appendChild(node('span:' + item + '|class:label-block-item small muted'));
labelBlock.appendChild(node('span:' + (item || 'Description') + '|class:label-block-item small muted'));
});

} else if (typeof description === 'string') {

labelBlock.appendChild(node('span:' + description + '|class:label-block-item small muted'));
labelBlock.appendChild(node('span:' + (description || 'Description') + '|class:label-block-item small muted'));

}
}
Expand Down
12 changes: 6 additions & 6 deletions src/component/groupForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ export const GroupForm = function({
form.wrap({
children: [
node('div|class:group-form-description', [
node(`h2:${message.get('groupFormSectionNameHeading')}`),
node(`p:${message.get('groupFormSectionNameDescription')}`)
node(`h2:${message.get('groupFormSectionNameHeading') || 'Content'}`),
node(`p:${message.get('groupFormSectionNameDescription') || 'Text'}`)
])
]
}),
Expand Down Expand Up @@ -179,8 +179,8 @@ export const GroupForm = function({
form.wrap({
children: [
node('div|class:group-form-description', [
node(`h2:${message.get('groupFormSectionToolbarHeading')}`),
node(`p:${message.get('groupFormSectionToolbarDescription')}`)
node(`h2:${message.get('groupFormSectionToolbarHeading') || 'Content'}`),
node(`p:${message.get('groupFormSectionToolbarDescription') || 'Text'}`)
])
]
}),
Expand Down Expand Up @@ -208,8 +208,8 @@ export const GroupForm = function({
form.wrap({
children: [
node('div|class:group-form-description', [
node(`h2:${message.get('groupFormSectionOrderingHeading')}`),
node(`p:${message.get('groupFormSectionOrderingDescription')}`)
node(`h2:${message.get('groupFormSectionOrderingHeading') || 'Content'}`),
node(`p:${message.get('groupFormSectionOrderingDescription') || 'Text'}`)
])
]
}),
Expand Down
4 changes: 4 additions & 0 deletions src/component/link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export const Link = function ({
this.element.link.classList.add('button-ring');
break;

case 'small':
this.element.link.classList.add('button-small');
break;

}
});

Expand Down
4 changes: 2 additions & 2 deletions src/component/menuContent/appSetting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const appSetting = {};

appSetting.app = (parent) => {

appSetting.app.para1 = node(`p:${message.get('menuContentAppPara1')}`);
appSetting.app.para1 = node(`p:${message.get('menuContentAppPara1') || 'Text'}`);

appSetting.app.link1 = new Link({
text: message.get('menuContentAppLink1'),
href: `https://www.reddit.com/r/${APP_NAME}`,
openNew: true
});

appSetting.app.para2 = node(`p:${message.get('menuContentAppPara2')}`);
appSetting.app.para2 = node(`p:${message.get('menuContentAppPara2') || 'Text'}`);

appSetting.app.link2 = new Link({
text: message.get('menuContentAppLink2'),
Expand Down
2 changes: 1 addition & 1 deletion src/component/menuContent/dataSetting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ dataSetting.clear = (parent) => {
dataSetting.control.clear.alert = new Alert({
iconName: 'warning',
children: [
node(`p:${message.get('menuContentDataClearAlertPara')}|class:small`),
node(`p:${message.get('menuContentDataClearAlertPara') || 'Text'}|class:small`),
node('p|class:small', dataSetting.control.clear.link.link())
]
});
Expand Down
2 changes: 1 addition & 1 deletion src/component/menuContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const MenuContent = function({
},
header: (name) => {
return node('div|class:menu-item-header', [
node('h1:' + name + '|class:menu-item-header-text')
node('h1:' + (name || 'Content') + '|class:menu-item-header-text')
]);
},
form: ({ indent = false } = {}) => {
Expand Down
2 changes: 1 addition & 1 deletion src/component/menuContent/supportSetting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ supportSetting.support = (parent) => {

supportSetting.support.para = node('p');

supportSetting.support.para.innerHTML = message.get('menuContentSupportPara');
supportSetting.support.para.innerHTML = message.get('menuContentSupportPara') || 'Text';

supportSetting.support.linkIssue = new Link({
text: message.get('menuContentSupportLink1'),
Expand Down
13 changes: 10 additions & 3 deletions src/component/menuNav/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { message } from '../message';

import { Button } from '../button';
import { Link } from '../link';

import { node } from '../../utility/node';
import { uppercaseFirstLetter } from '../../utility/uppercaseFirstLetter';
Expand Down Expand Up @@ -153,11 +154,17 @@ export const MenuNav = function({

item.sub.forEach((item) => {

const subLevelLink = node('a:' + message.get(`menuNav${uppercaseFirstLetter(navTop)}SubNav${uppercaseFirstLetter(item)}`) + '|href:#menu-content-item-' + this.makeId(item) + ',class:menu-nav-sub button button-link button-small,tabindex:1');
const subLevelLink = new Link({
text: message.get(`menuNav${uppercaseFirstLetter(navTop)}SubNav${uppercaseFirstLetter(item)}`),
href: '#menu-content-item-' + this.makeId(item),
linkButton: true,
style: ['link', 'small'],
classList: ['menu-nav-sub']
});

subNav.appendChild(subLevelLink);
subNav.appendChild(subLevelLink.link());

navItem.subLevelItem.push(subLevelLink);
navItem.subLevelItem.push(subLevelLink.link());

});

Expand Down
2 changes: 1 addition & 1 deletion src/component/message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ message.get = (stringId) => {

}

if (string.indexOf('{appName}') > -1) {
if (string && string.indexOf('{appName}') > -1) {

string = string.replaceAll('{appName}', APP_NAME);

Expand Down
Loading

0 comments on commit 8da6a27

Please sign in to comment.