From 3e198526e66b88301882b14240f0d50b8819b520 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 18 Feb 2024 18:40:14 +0200 Subject: dynamically load .style.js files; move the files closer to related components --- src/components/attachment/attachment.style.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/components/attachment/attachment.style.js (limited to 'src/components/attachment/attachment.style.js') diff --git a/src/components/attachment/attachment.style.js b/src/components/attachment/attachment.style.js new file mode 100644 index 00000000..b76b3eb0 --- /dev/null +++ b/src/components/attachment/attachment.style.js @@ -0,0 +1,15 @@ +export default { + name: 'Attachment', + selector: '.Attachment', + validInnerComponents: [ + 'Border', + 'ButtonUnstyled' + ], + defaultRules: [ + { + directives: { + roundness: 3 + } + } + ] +} -- cgit v1.2.3-70-g09d2 From 6811191147c6e7eacdff580cdf291538e7df6e5e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 19 Feb 2024 00:10:10 +0200 Subject: i'm stupid --- src/components/attachment.style.js | 23 ----------------------- src/components/attachment/attachment.style.js | 8 ++++++++ src/services/theme_data/theme_data_3.service.js | 6 +++--- 3 files changed, 11 insertions(+), 26 deletions(-) delete mode 100644 src/components/attachment.style.js (limited to 'src/components/attachment/attachment.style.js') diff --git a/src/components/attachment.style.js b/src/components/attachment.style.js deleted file mode 100644 index b6c5da6e..00000000 --- a/src/components/attachment.style.js +++ /dev/null @@ -1,23 +0,0 @@ -export default { - name: 'Attachment', - selector: '.Attachment', - validInnerComponents: [ - 'Border', - 'ButtonUnstyled' - ], - defaultRules: [ - { - directives: { - roundness: 3 - } - }, - { - component: 'ButtonUnstyled', - parent: { component: 'Attachment' }, - directives: { - background: '#FFFFFF', - opacity: 0.9 - } - } - ] -} diff --git a/src/components/attachment/attachment.style.js b/src/components/attachment/attachment.style.js index b76b3eb0..74e355c4 100644 --- a/src/components/attachment/attachment.style.js +++ b/src/components/attachment/attachment.style.js @@ -10,6 +10,14 @@ export default { directives: { roundness: 3 } + }, + { + component: 'ButtonUnstyled', + parent: { component: 'Attachment' }, + directives: { + background: '#FFFFFF', + opacity: 0.5 + } } ] } diff --git a/src/services/theme_data/theme_data_3.service.js b/src/services/theme_data/theme_data_3.service.js index 84ff20b2..5d3f4e8b 100644 --- a/src/services/theme_data/theme_data_3.service.js +++ b/src/services/theme_data/theme_data_3.service.js @@ -169,6 +169,7 @@ export const init = (extraRuleset, palette) => { return rule }) + console.log(rulesetUnsorted) const ruleset = rulesetUnsorted .map((data, index) => ({ data, index })) @@ -187,6 +188,8 @@ export const init = (extraRuleset, palette) => { }) .map(({ data }) => data) + console.log(ruleset.filter(c => c.component === 'ButtonUnstyled')) + const virtualComponents = new Set(Object.values(components).filter(c => c.virtual).map(c => c.name)) const findColor = (color, dynamicVars) => { @@ -196,8 +199,6 @@ export const init = (extraRuleset, palette) => { const [variable, modifier] = color.split(/,/g).map(str => str.trim()) const variableSlot = variable.substring(2) if (variableSlot === 'stack') { - console.log(dynamicVars) - console.log(stacked) const { r, g, b } = dynamicVars.stacked targetColor = { r, g, b } } else if (variableSlot.startsWith('parent')) { @@ -660,7 +661,6 @@ export const init = (extraRuleset, palette) => { } default: if (k.startsWith('--')) { - console.log('LOL', k, rgba2css(findColor(v, computed[selector].dynamicVars))) return k + ': ' + rgba2css(findColor(v, computed[selector].dynamicVars)) } return '' -- cgit v1.2.3-70-g09d2 From d2f4ce442a7130f29aea72cfc558727e597dd1b4 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 21 Feb 2024 14:05:26 +0200 Subject: fix attachment inputs --- src/components/attachment/attachment.style.js | 3 ++- src/components/attachment/attachment.vue | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/components/attachment/attachment.style.js') diff --git a/src/components/attachment/attachment.style.js b/src/components/attachment/attachment.style.js index 74e355c4..5fb4701c 100644 --- a/src/components/attachment/attachment.style.js +++ b/src/components/attachment/attachment.style.js @@ -3,7 +3,8 @@ export default { selector: '.Attachment', validInnerComponents: [ 'Border', - 'ButtonUnstyled' + 'ButtonUnstyled', + 'Input' ], defaultRules: [ { diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 79f62806..39b1a409 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -38,7 +38,7 @@ v-if="edit" v-model="localDescription" type="text" - class="description-field" + class="input description-field" :placeholder="$t('post_status.media_description')" @keydown.enter.prevent="" > @@ -253,7 +253,7 @@ v-if="edit" v-model="localDescription" type="text" - class="description-field" + class="input description-field" :placeholder="$t('post_status.media_description')" @keydown.enter.prevent="" > -- cgit v1.2.3-70-g09d2