Update to use single quotes uniformaly

This commit is contained in:
Sytone 2021-06-02 11:35:59 -07:00
parent f70932dd39
commit 5d36d9399d
8 changed files with 63 additions and 63 deletions

View File

@ -363,7 +363,7 @@ export default {
link: (href, title, text) => {
const isLocal = href.startsWith(`${location.protocol}//${location.hostname}`)
const html = linkRenderer.call(renderer, href, title, text)
return isLocal ? html : html.replace(/^<a /, `<a target="_blank" rel="noreferrer noopener nofollow" `)
return isLocal ? html : html.replace(/^<a /, '<a target="_blank" rel="noreferrer noopener nofollow" ')
},
},
highlight: function (code, language) {

View File

@ -202,11 +202,11 @@ export default {
this.searchLabel = 'username'
if (this.type === 'list') {
this.typeString = `list`
this.typeString = 'list'
this.stuffService = new UserListService()
this.stuffModel = new UserListModel({listId: this.id})
} else if (this.type === 'namespace') {
this.typeString = `namespace`
this.typeString = 'namespace'
this.stuffService = new UserNamespaceService()
this.stuffModel = new UserNamespaceModel({
namespaceId: this.id,
@ -220,11 +220,11 @@ export default {
this.searchLabel = 'name'
if (this.type === 'list') {
this.typeString = `list`
this.typeString = 'list'
this.stuffService = new TeamListService()
this.stuffModel = new TeamListModel({listId: this.id})
} else if (this.type === 'namespace') {
this.typeString = `namespace`
this.typeString = 'namespace'
this.stuffService = new TeamNamespaceService()
this.stuffModel = new TeamNamespaceModel({
namespaceId: this.id,

View File

@ -31,23 +31,23 @@
</template>
<script>
import LabelTask from "../../models/labelTask";
import LabelModel from "../../models/label";
import LabelTask from '../../models/labelTask';
import LabelModel from '../../models/label';
import { HAS_TASKS } from "@/store/mutation-types";
import { HAS_TASKS } from '@/store/mutation-types';
// import Nothing from "@/components/misc/nothing";
import ListService from "../../services/list";
import TaskService from "../../services/task";
import TaskModel from "../../models/task";
import LabelService from "../../services/label";
import LabelTaskService from "../../services/labelTask";
import ListService from '../../services/list';
import TaskService from '../../services/task';
import TaskModel from '../../models/task';
import LabelService from '../../services/label';
import LabelTaskService from '../../services/labelTask';
export default {
name: "add-task",
name: 'add-task',
data() {
return {
newTaskText: "",
newTaskText: '',
listService: ListService,
taskService: TaskService,
labelService: LabelService,
@ -69,7 +69,7 @@ export default {
},
methods: {
addTask() {
if (this.newTaskText === "") {
if (this.newTaskText === '') {
this.showError = true;
return;
}
@ -89,10 +89,10 @@ export default {
.then(task => {
// this.tasks.push(task);
// this.sortTasks();
this.newTaskText = "";
this.newTaskText = '';
// Check if the task has words starting with ~ in the title and make them to labels
const parts = task.title.split(" ~");
const parts = task.title.split(' ~');
// The first element will always contain the title, even if there is no occurrence of ~
if (parts.length > 1) {
// First, create an unresolved promise for each entry in the array to wait
@ -118,10 +118,10 @@ export default {
}
// The part up until the next space
const labelTitle = p.split(" ")[0];
const labelTitle = p.split(' ')[0];
// Don't create an empty label
if (labelTitle === "") {
if (labelTitle === '') {
return;
}
@ -141,7 +141,7 @@ export default {
task.labels.push(res[0]);
// Remove the label text from the task title
task.title = task.title.replace(` ~${labelTitle}`, "");
task.title = task.title.replace(` ~${labelTitle}`, '');
// Make the promise done (the one with the index 0 does not exist)
labelAddings[index - 1].resolve(result);
@ -167,7 +167,7 @@ export default {
// Remove the label text from the task title
task.title = task.title.replace(
` ~${labelTitle}`,
""
''
);
// Make the promise done (the one with the index 0 does not exist)
@ -204,7 +204,7 @@ export default {
});
});
}
this.$emit("taskAdded", task);
this.$emit('taskAdded', task);
})
.catch(e => {
this.error(e, this);

View File

@ -12,7 +12,7 @@ export const createDateFromString = dateString => {
}
if (dateString.includes('-')) {
dateString = dateString.replace(/-/g, "/")
dateString = dateString.replace(/-/g, '/')
}
return new Date(dateString)

View File

@ -35,13 +35,13 @@
</template>
<script>
import { mapState } from "vuex";
import ShowTasks from "./tasks/ShowTasks";
import AddTask from "../components/tasks/add-task";
import ListModel from "../models/list";
import { mapState } from 'vuex';
import ShowTasks from './tasks/ShowTasks';
import AddTask from '../components/tasks/add-task';
import ListModel from '../models/list';
export default {
name: "Home",
name: 'Home',
components: {
ShowTasks,
AddTask
@ -53,7 +53,7 @@ export default {
tasks: [],
defaultList: ListModel,
updateWelcomeInterval: 1000,
welcomePrefix: "Hi",
welcomePrefix: 'Hi',
showTasksKey: 0
};
},
@ -66,7 +66,7 @@ export default {
this.updateWelcome,
this.updateWelcomeInterval
);
this.$on("hook:destroyed", () => window.clearTimeout(timer));
this.$on('hook:destroyed', () => window.clearTimeout(timer));
},
computed: mapState({
migratorsEnabled: state =>
@ -97,11 +97,11 @@ export default {
updateWelcome() {
this.currentDate = new Date();
if (this.currentDate.getHours() < 12) {
this.welcomePrefix = "Good Morning";
this.welcomePrefix = 'Good Morning';
} else if (this.currentDate.getHours() < 17) {
this.welcomePrefix = "Good Afternoon";
this.welcomePrefix = 'Good Afternoon';
} else {
this.welcomePrefix = "Good Evening";
this.welcomePrefix = 'Good Evening';
}
this.$options.timer = window.setTimeout(
this.updateDateTime,

View File

@ -165,30 +165,30 @@
</template>
<script>
import TaskService from "../../../services/task";
import TaskModel from "../../../models/task";
import LabelTaskService from "../../../services/labelTask";
import LabelService from "../../../services/label";
import TaskService from '../../../services/task';
import TaskModel from '../../../models/task';
import LabelTaskService from '../../../services/labelTask';
import LabelService from '../../../services/label';
import EditTask from "../../../components/tasks/edit-task";
import AddTask from "../../../components/tasks/add-task";
import SingleTaskInList from "../../../components/tasks/partials/singleTaskInList";
import taskList from "../../../components/tasks/mixins/taskList";
import { saveListView } from "@/helpers/saveListView";
import Rights from "../../../models/rights.json";
import { mapState } from "vuex";
import FilterPopup from "@/components/list/partials/filter-popup";
import { HAS_TASKS } from "@/store/mutation-types";
import Nothing from "@/components/misc/nothing";
import EditTask from '../../../components/tasks/edit-task';
import AddTask from '../../../components/tasks/add-task';
import SingleTaskInList from '../../../components/tasks/partials/singleTaskInList';
import taskList from '../../../components/tasks/mixins/taskList';
import { saveListView } from '@/helpers/saveListView';
import Rights from '../../../models/rights.json';
import { mapState } from 'vuex';
import FilterPopup from '@/components/list/partials/filter-popup';
import { HAS_TASKS } from '@/store/mutation-types';
import Nothing from '@/components/misc/nothing';
export default {
name: "List",
name: 'List',
data() {
return {
taskService: TaskService,
isTaskEdit: false,
taskEditTask: TaskModel,
newTaskText: "",
newTaskText: '',
showError: false,
labelTaskService: LabelTaskService,
@ -223,7 +223,7 @@ export default {
},
methods: {
// This function initializes the tasks page and loads the first page of tasks
initTasks(page, search = "") {
initTasks(page, search = '') {
this.taskEditTask = null;
this.isTaskEdit = false;
this.loadTasks(page, search);

View File

@ -127,7 +127,7 @@ export default {
let emailVerifyToken = localStorage.getItem('emailConfirmToken')
if (emailVerifyToken) {
const cancel = message.setLoading(this)
HTTP.post(`user/confirm`, {token: emailVerifyToken})
HTTP.post('user/confirm', {token: emailVerifyToken})
.then(() => {
localStorage.removeItem('emailConfirmToken')
this.confirmedEmailSuccess = true

View File

@ -20,22 +20,22 @@ module.exports = {
msTileImage: 'images/icons/msapplication-icon-144x144.png',
},
manifestOptions: {
"icons": [
'icons': [
{
"src": "./images/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
'src': './images/icons/android-chrome-192x192.png',
'sizes': '192x192',
'type': 'image/png'
},
{
"src": "./images/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
'src': './images/icons/android-chrome-512x512.png',
'sizes': '512x512',
'type': 'image/png'
},
{
"src": "./images/icons/icon-maskable.png",
"sizes": "1024x1024",
"type": "image/png",
"purpose": "maskable"
'src': './images/icons/icon-maskable.png',
'sizes': '1024x1024',
'type': 'image/png',
'purpose': 'maskable'
},
],
shortcuts: [