This commit is contained in:
2020-04-16 19:26:19 +00:00
parent 52ea7c5480
commit f69ae85a0c
3 changed files with 37 additions and 5 deletions

View File

@@ -224,6 +224,7 @@ RESEARCH
todo: BUG Something fucked with history? When I click on a widget's history button in admin user history view it shows two created record with differing timestamps todo: BUG Something fucked with history? When I click on a widget's history button in admin user history view it shows two created record with differing timestamps
- note, it doesn't seem to do it on the most recent widgets, but only on the first few created for some reason?! - note, it doesn't seem to do it on the most recent widgets, but only on the first few created for some reason?!
todo: QUOTE icon being used is fa-edit, but, that is much more useful in the UI for edit buttons on things, so change quote icon to something else
todo: ATTACHMENTS todo: ATTACHMENTS
- ability to rename file on upload https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3546 - ability to rename file on upload https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3546

View File

@@ -3,7 +3,16 @@
<span class="v-label v-label--active theme--light"> <span class="v-label v-label--active theme--light">
Wiki Wiki
</span> </span>
<div>
<v-btn x-large icon @click="wikiVisible = !wikiVisible">
<v-icon>{{ visibleIcon() }}</v-icon>
</v-btn>
</div>
<v-btn x-large icon v-if="canEdit" text @click="toggleEditMode()">
<v-icon>fa-edit</v-icon></v-btn
>
<v-sheet <v-sheet
v-if="wikiVisible && !designerVisible"
elevation="2" elevation="2"
v-html="compiledOutput()" v-html="compiledOutput()"
class="aywiki pa-2 pa-sm-6 mt-2" class="aywiki pa-2 pa-sm-6 mt-2"
@@ -15,11 +24,21 @@
import marked from "marked"; import marked from "marked";
import DOMPurify from "dompurify"; import DOMPurify from "dompurify";
export default { export default {
data: () => ({}), data() {
return {
wikiVisible: false,
designerVisible: false
};
},
props: { props: {
value: String value: String,
canEdit: Boolean
}, },
methods: { methods: {
toggleEditMode() {},
visibleIcon() {
return this.wikiVisible ? "fa-eye-slash" : "fa-eye";
},
compiledOutput() { compiledOutput() {
return DOMPurify.sanitize(marked(this.value)); return DOMPurify.sanitize(marked(this.value));
} }
@@ -29,13 +48,21 @@ export default {
/** /**
todo: todo:
figure out why parts are fucked (blockquote)
remove extra spacing on sides in xs mode (gutters maybe on column or row?)
Show/hide/edit control Show/hide/edit control
eyeball icon like password reveal eyeball icon like password reveal
if can't edit and no content then don't show at all
- does it need to have a column wrapper then and remove it from the parent form?
baseurl setting for local images: baseurl setting for local images:
https://marked.js.org/#/USING_ADVANCED.md#options https://marked.js.org/#/USING_ADVANCED.md#options
Clean up the example markdown, go through and use mine and sprinkle in the marked sample stuff where it differs
*/ */
</script> </script>

View File

@@ -205,7 +205,11 @@
></gz-custom-fields> ></gz-custom-fields>
</v-col> </v-col>
<v-col cols="12"> <v-col cols="12">
<gz-wiki v-model="obj.wikiContent" :parentVM="this"></gz-wiki <gz-wiki
v-model="obj.wikiContent"
:canEdit="true"
:parentVM="this"
></gz-wiki
></v-col> ></v-col>
</v-row> </v-row>
</v-form> </v-form>