Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added button for docs to editor #502

Merged
merged 4 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions caster-editor/src/assets/scss/_elementplus.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* ============ Element Plus ============ */
* {
--el-color-primary: #{$green-light} !important;
--el-color-white: #{$white} !important;
--el-radio-button-checked-bg-color: #{$grey} !important;
--el-radio-button-checked-text-color: #{$black} !important;
Expand All @@ -13,10 +12,26 @@

--el-button-text-color: #{$black} !important;
--el-button-hover-text-color: #{$black} !important;
}

.el-button--primary {
--el-color-primary: #{$green-light} !important;
--el-button-hover-border-color: #{$green-light} !important;
--el-button-hover-bg-color: #{$green-light} !important;
}

.el-button--danger {
--el-color-danger: #{$alertRed} !important;
--el-button-hover-border-color: #{$alertRed} !important;
--el-button-hover-bg-color: #{$alertRed} !important;
}

.el-button--info {
--el-button-hover-bg-color: #{$grey-medium} !important;
--el-button-hover-border-color: #{$grey-medium} !important;
--el-button-hover-bg-color: #{$grey-medium} !important;
}

.el-radio-group {
.el-radio-button {
text-align: left;
Expand Down Expand Up @@ -47,26 +62,26 @@
.el-dialog {
border: 2px solid black;
width: calc(100% - 2 * $mobilePadding);
max-width: 600px;
max-width: 500px;
border-radius: $borderRadius;
}

.el-dialog__header {
margin: 0;
padding: 35px 35px 10px 35px;
padding: 30px 20px 15px 20px;
}

.el-dialog--center,
.el-dialog__body {
padding: 15px 35px 10px 35px;
padding: 0px 20px 0px 20px;
width: 100%;
text-align: center;
word-break: break-word;
}

.el-dialog__footer {
margin-bottom: 15px;
padding: 0px 35px 15px 35px;
padding: 30px 20px 15px 20px;
}

label {
Expand Down
2 changes: 1 addition & 1 deletion caster-editor/src/components/DialogExitGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"
>Cancel</ElButton>
<ElButton
color="#FF0000"
type="danger"
@click="exitGraph()"
> Exit </ElButton>
</span>
Expand Down
14 changes: 11 additions & 3 deletions caster-editor/src/components/DialogExitNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
<template #footer>
<span class="dialog-footer">
<ElButton
primary
type="info"
@click="emit('cancel')"
> Cancel </ElButton>
<ElButton @click="emit('noSave')"> Discard changes </ElButton>
<ElButton @click="emit('save')"> Save </ElButton>
<ElButton
type="danger"
@click="emit('noSave')"
>
Discard changes
</ElButton>
<ElButton
type="primary"
@click="emit('save')"
> Save </ElButton>
</span>
</template>
</ElDialog>
Expand Down
12 changes: 12 additions & 0 deletions caster-editor/src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
</span>
</div>
<div class="menu-items right">
<button
class="unstyled"
@click="goToDocs()"
>
Docs
</button>
<button
class="unstyled"
@click="showExitGraphDialog = true"
Expand Down Expand Up @@ -57,6 +63,10 @@ defineProps<{
const { tab } = storeToRefs(useInterfaceStore());

const showExitGraphDialog: Ref<boolean> = ref(false);

const goToDocs = () => {
window.open("https://docs.gencaster.org/", "_blank");
};
</script>

<style lang="scss" scoped>
Expand Down Expand Up @@ -110,11 +120,13 @@ const showExitGraphDialog: Ref<boolean> = ref(false);
height: 30px;
display: flex;
align-items: center;

.state {
display: flex;
justify-content: center;
align-items: center;
}

.state-indicator {
width: 11px;
height: 11px;
Expand Down
Loading