mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Clean up camelCase and snake_case in frontend code
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<template>
|
||||
<div class="widget-layout">
|
||||
<component :is="LayoutGroupType(layoutRow)" :widgetData="layoutRow" :layoutTarget="layout.layout_target" v-for="(layoutRow, index) in layout.layout" :key="index" />
|
||||
<component :is="LayoutGroupType(layoutRow)" :widgetData="layoutRow" :layoutTarget="layout.layoutTarget" v-for="(layoutRow, index) in layout.layout" :key="index" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
updateLayout(widgetId: bigint, value: unknown) {
|
||||
this.editor.instance.update_layout(this.layoutTarget, widgetId, value);
|
||||
this.editor.instance.updateLayout(this.layoutTarget, widgetId, value);
|
||||
},
|
||||
withoutValue(props: Record<string, unknown>): Record<string, unknown> {
|
||||
const { value: _, ...rest } = props;
|
||||
|
||||
@@ -94,7 +94,7 @@ const WidgetSection = defineComponent({
|
||||
}),
|
||||
methods: {
|
||||
updateLayout(widgetId: bigint, value: unknown) {
|
||||
this.editor.instance.update_layout(this.layoutTarget, widgetId, value);
|
||||
this.editor.instance.updateLayout(this.layoutTarget, widgetId, value);
|
||||
},
|
||||
layoutGroupType(layoutGroup: LayoutGroup): unknown {
|
||||
if (isWidgetRow(layoutGroup)) return WidgetRow;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
:direction="'Bottom'"
|
||||
:minWidth="240"
|
||||
:drawIcon="true"
|
||||
:defaultAction="() => editor.instance.request_coming_soon_dialog()"
|
||||
:defaultAction="() => editor.instance.requestComingSoonDialog()"
|
||||
:ref="(ref: typeof MenuList) => ref && (entry.ref = ref)"
|
||||
/>
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@ export default defineComponent({
|
||||
group.map((entry) => ({
|
||||
...entry,
|
||||
children: entry.children ? menuEntryToFrontendMenuEntry(entry.children) : undefined,
|
||||
action: (): void => this.editor.instance.update_layout(updateMenuBarLayout.layout_target, entry.action.widgetId, undefined),
|
||||
action: (): void => this.editor.instance.updateLayout(updateMenuBarLayout.layoutTarget, entry.action.widgetId, undefined),
|
||||
shortcutRequiresLock: entry.shortcut ? shortcutRequiresLock(entry.shortcut.keys) : undefined,
|
||||
}))
|
||||
);
|
||||
|
||||
@@ -105,11 +105,11 @@ export default defineComponent({
|
||||
},
|
||||
primaryColorChanged(color: RGBA) {
|
||||
const newColor = rgbaToDecimalRgba(color);
|
||||
this.editor.instance.update_primary_color(newColor.r, newColor.g, newColor.b, newColor.a);
|
||||
this.editor.instance.updatePrimaryColor(newColor.r, newColor.g, newColor.b, newColor.a);
|
||||
},
|
||||
secondaryColorChanged(color: RGBA) {
|
||||
const newColor = rgbaToDecimalRgba(color);
|
||||
this.editor.instance.update_secondary_color(newColor.r, newColor.g, newColor.b, newColor.a);
|
||||
this.editor.instance.updateSecondaryColor(newColor.r, newColor.g, newColor.b, newColor.a);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user