Skip to content

Commit

Permalink
Merge pull request #543 from writer/dev
Browse files Browse the repository at this point in the history
chore: Merge for release
  • Loading branch information
ramedina86 authored Aug 27, 2024
2 parents d7b3968 + 9d3783d commit 1515ffd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "writer"
version = "0.7.1"
version = "0.7.2"
description = "An open-source, Python framework for building feature-rich apps that are fully integrated with the Writer platform."
authors = ["Writer, Inc."]
readme = "README.md"
Expand Down
6 changes: 5 additions & 1 deletion src/ui/src/builder/BuilderFieldsText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
>
<BuilderTemplateInput
class="content"
:input-id="inputId"
:value="component.content[fieldKey]"
:placeholder="templateField?.default"
:options="options"
Expand All @@ -19,6 +20,7 @@
multiline
variant="text"
class="content"
:input-id="inputId"
:value="component.content[fieldKey]"
:placeholder="templateField?.default"
@input="handleInput"
Expand Down Expand Up @@ -50,14 +52,16 @@ const templateField = computed(() => {
return definition.fields[fieldKey.value];
});
const inputId = computed(() => `${props.componentId}-${props.fieldKey}`);
const options = computed(() => {
const field = templateField.value;
if (field.options) {
return typeof field.options === "function"
? field.options(wf, componentId.value)
: field.options;
}
return [];
return {};
});
const handleInput = (ev: Event) => {
Expand Down
9 changes: 8 additions & 1 deletion src/ui/src/core_components/content/CoreAnnotatedText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
</template>

<script lang="ts">
import { cssClasses, primaryTextColor } from "../../renderer/sharedStyleFields";
import {
buttonColor,
buttonTextColor,
cssClasses,
primaryTextColor,
} from "../../renderer/sharedStyleFields";
import BaseControlBar from "../base/BaseControlBar.vue";
export default {
writer: {
Expand Down Expand Up @@ -76,6 +81,8 @@ export default {
default: "no",
category: FieldCategory.Style,
},
buttonColor,
buttonTextColor,
primaryTextColor,
cssClasses,
},
Expand Down
4 changes: 4 additions & 0 deletions src/writer/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def register(self,
callback: Optional[Callable[[Request, str, dict], None]] = None,
unauthorized_action: Optional[Callable[[Request, Unauthorized], Response]] = None):

self.unauthorized_action = unauthorized_action
self.callback_func = callback

@asgi_app.middleware("http")
async def basicauth_middleware(request: Request, call_next):
import base64
Expand Down Expand Up @@ -205,6 +208,7 @@ def register(self,
token_endpoint=self.url_oauthtoken,
)

self.unauthorized_action = unauthorized_action
self.callback_func = callback

@asgi_app.middleware("http")
Expand Down

0 comments on commit 1515ffd

Please sign in to comment.