Skip to content

Commit

Permalink
fix: Resolve linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Mendiola <[email protected]>
  • Loading branch information
MissAllSunday committed Aug 25, 2021
1 parent 2c01d7a commit d45a242
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 158 deletions.
24 changes: 8 additions & 16 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"buildWall": "vue-cli-service build --target lib --name BreezeWall src/Wall.vue ",
"lint": "vue-cli-service lint"
},
"dependencies": {
Expand Down
257 changes: 128 additions & 129 deletions front/src/Wall.vue
Original file line number Diff line number Diff line change
@@ -1,56 +1,55 @@
<template>
<div class="breeze_summary floatleft">
<div class="roundframe flow_auto">
<div class="breeze_avatar">
<div class="breeze_summary floatleft">
<div class="roundframe flow_auto">
<div class="breeze_avatar">
<!-- style="background-image: url('urlstring')"-->

</div>
<h3 class="breeze_name">
memberOnline
member name color
</h3>
<p class="breeze_title">
primary/post group
</p>
<p class="breeze_title">
group icons
</p>
<p class="breeze_description">
blurb
</p>
<p class="breeze_mood">
<SetMood
:current-mood-id="currentMoodId"
:user-id="wallData.ownerId"
:mood-txt="txtMood"
:is-current-user-owner="isCurrentUserOwner"
:use-mood="useMood"
></SetMood>
</p>
</div>
</div>
</div>
<h3 class="breeze_name">
memberOnline
member name color
</h3>
<p class="breeze_title">
primary/post group
</p>
<p class="breeze_title">
group icons
</p>
<p class="breeze_description">
blurb
</p>
<p class="breeze_mood">
<SetMood
:current-mood-id="currentMoodId"
:user-id="wallData.ownerId"
:mood-txt="txtMood"
:is-current-user-owner="isCurrentUserOwner"
:use-mood="useMood"
></SetMood>
</p>
</div>
</div>

<div class="breeze_wall floatright">
<Tabs>
<Tab :name="tabs_wall" :selected="true">
<Editor
editor_id="\'breeze_status\'"
@get-content="postStatus($event)">
</Editor>
<ul class="status">
<Status
v-if="errored !== null"
v-for="status_item in status"
v-bind:item="status_item"
v-bind:key="status_item.status_id"
:users="users"
@remove-status="onRemoveStatus($event)"
@set-new-users="onSetNewUsers($event)">
</Status>
</ul>
</Tab>
</Tabs>
</div>
<div class="breeze_wall floatright">
<Tabs>
<Tab :name="tabs_wall" :selected="true">
<Editor
editor_id="\'breeze_status\'"
@get-content="postStatus($event)">
</Editor>
<ul class="status" v-if="errored !== null">
<Status
v-for="status_item in status"
v-bind:item="status_item"
v-bind:key="status_item.status_id"
:users="users"
@remove-status="onRemoveStatus($event)"
@set-new-users="onSetNewUsers($event)">
</Status>
</ul>
</Tab>
</Tabs>
</div>
</template>

<script>
Expand All @@ -64,95 +63,95 @@ import Tab from "@/components/Tab";
export default {
name: 'Wall',
components: {
Tab,
Tabs,
Status,
Editor,
Tab,
Tabs,
Status,
Editor,
SetMood
},
mixins: [utils],
data() {
return {
txt: window.breezeTxtGeneral,
txtMood: window.breezeTxtMood,
status: null,
errored: false,
notice: null,
users: {},
wallData: {
ownerId: window.breezeUsers.wallOwner || 0,
posterId: window.breezeUsers.wallPoster || 0,
},
currentMoodId: window.breezeProfileOwnerSettings.moodId || 0,
isCurrentUserOwner: window.breezeIsCurrentUserOwner,
useMood: window.breezeUseMood,
}
},
created: function () {
this.fetchStatus()
},
methods: {
postStatus: function (editorContent) {
let selfVue = this
mixins: [utils],
data() {
return {
txt: window.breezeTxtGeneral,
txtMood: window.breezeTxtMood,
status: null,
errored: false,
notice: null,
users: {},
wallData: {
ownerId: window.breezeUsers.wallOwner || 0,
posterId: window.breezeUsers.wallPoster || 0,
},
currentMoodId: window.breezeProfileOwnerSettings.moodId || 0,
isCurrentUserOwner: window.breezeIsCurrentUserOwner,
useMood: window.breezeUseMood,
}
},
created: function () {
this.fetchStatus()
},
methods: {
postStatus: function (editorContent) {
let selfVue = this
this.api.post(this.sprintFormat(this.baseUrl,
[this.actions.status ,this.subActions.status.post]),
{
wallId: selfVue.wallData.ownerId,
userId: selfVue.wallData.posterId,
body: editorContent,
}
).then(function(response) {
selfVue.setNotice(response.data);
this.api.post(this.sprintFormat(this.baseUrl,
[this.actions.status ,this.subActions.status.post]),
{
wallId: selfVue.wallData.ownerId,
userId: selfVue.wallData.posterId,
body: editorContent,
}
).then(function(response) {
selfVue.setNotice(response.data);
if (response.data.content) {
selfVue.setUserData(response.data.content.users)
selfVue.setStatus(response.data.content.status);
}
if (response.data.content) {
selfVue.setUserData(response.data.content.users)
selfVue.setStatus(response.data.content.status);
}
}).catch(function(error) {
selfVue.setNotice = {
'message': error.message,
};
});
},
setStatus: function (newStatus) {
let selfVue = this
}).catch(function(error) {
selfVue.setNotice = {
'message': error.message,
};
});
},
setStatus: function (newStatus) {
let selfVue = this
selfVue.status = Object.assign({}, selfVue.status, selfVue.parseItem(newStatus));
},
fetchStatus: function () {
let selfVue = this
selfVue.status = Object.assign({}, selfVue.status, selfVue.parseItem(newStatus));
},
fetchStatus: function () {
let selfVue = this
selfVue.api.post(this.sprintFormat(this.baseUrl,
[this.actions.status ,this.subActions.status.byProfile]),
{wallId: selfVue.wallData.ownerId}
).then(function(response) {
if (response.data.type) {
selfVue.setNotice(response.data);
selfVue.errored = true;
selfVue.api.post(this.sprintFormat(this.baseUrl,
[this.actions.status ,this.subActions.status.byProfile]),
{wallId: selfVue.wallData.ownerId}
).then(function(response) {
if (response.data.type) {
selfVue.setNotice(response.data);
selfVue.errored = true;
return;
}
return;
}
selfVue.status = selfVue.parseItem(response.data.status)
selfVue.setUserData(response.data.users)
}).catch(function(error) {
selfVue.errored = true
selfVue.setNotice = {
'message': error.message,
};
}).then(function () {
selfVue.clearLoading()
})
},
onRemoveStatus: function (statusId) {
this.$delete(this.status, statusId);
},
onSetNewUsers: function (newUsers){
this.setUserData(newUsers)
},
}
selfVue.status = selfVue.parseItem(response.data.status)
selfVue.setUserData(response.data.users)
}).catch(function(error) {
selfVue.errored = true
selfVue.setNotice = {
'message': error.message,
};
}).then(function () {
selfVue.clearLoading()
})
},
onRemoveStatus: function (statusId) {
this.$delete(this.status, statusId);
},
onSetNewUsers: function (newUsers){
this.setUserData(newUsers)
},
}
}
</script>

Expand Down
9 changes: 4 additions & 5 deletions front/src/components/Editor.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<Modal v-if ="previewBody !== null" @close="clearPreview()" @click.stop>
<div slot="header">
<slot name="header">
{{ this.$root.txt.previewing }}
</div>
<div slot="body">
</slot>
<slot name="body">
<div class="sun-editor-editable" v-html="previewBody"></div>
</div>
</slot>
</Modal>
<textarea :id="editor_id"></textarea>
<div class="post_button_container floatright">
Expand All @@ -23,7 +23,6 @@
import Modal from "@/components/Modal";
import 'suneditor/dist/css/suneditor.min.css'
import suneditor from 'suneditor'
import plugins from 'suneditor/src/plugins'
import utils from "@/utils";
export default {
Expand Down
Loading

0 comments on commit d45a242

Please sign in to comment.