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) => { link: (href, title, text) => {
const isLocal = href.startsWith(`${location.protocol}//${location.hostname}`) const isLocal = href.startsWith(`${location.protocol}//${location.hostname}`)
const html = linkRenderer.call(renderer, href, title, text) 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) { highlight: function (code, language) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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