Applied style rules to genocide all \t characters
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
Delete {{ typeName }}
|
||||
</v-toolbar-title>
|
||||
<div>
|
||||
<v-alert type="warning" outlined>
|
||||
<v-alert
|
||||
type="warning"
|
||||
outlined
|
||||
>
|
||||
This can't be undone
|
||||
</v-alert>
|
||||
<p v-if="name">
|
||||
@@ -12,9 +15,9 @@
|
||||
</p>
|
||||
<v-text-field
|
||||
v-if="name"
|
||||
v-model="inputName"
|
||||
label="Confirmation"
|
||||
outlined
|
||||
v-model="inputName"
|
||||
/>
|
||||
<div class="layout justify-center">
|
||||
<v-btn
|
||||
@@ -41,26 +44,35 @@
|
||||
import DialogBase from '/imports/ui/dialogStack/DialogBase.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
DialogBase,
|
||||
},
|
||||
props: {
|
||||
typeName: String,
|
||||
name: String,
|
||||
},
|
||||
data(){return {
|
||||
inputName: undefined,
|
||||
}},
|
||||
computed: {
|
||||
nameMatch(){
|
||||
if (!this.name) return true;
|
||||
let uppername = this.name.toUpperCase();
|
||||
let upperInputName = this.inputName && this.inputName.toUpperCase();
|
||||
return uppername === upperInputName;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
DialogBase,
|
||||
},
|
||||
props: {
|
||||
typeName: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inputName: undefined,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
nameMatch() {
|
||||
if (!this.name) return true;
|
||||
let uppername = this.name.toUpperCase();
|
||||
let upperInputName = this.inputName && this.inputName.toUpperCase();
|
||||
return uppername === upperInputName;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -50,63 +50,69 @@
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import getThemeColor from '/imports/ui/utility/getThemeColor.js';
|
||||
import isDarkColor from '/imports/ui/utility/isDarkColor.js';
|
||||
import getThemeColor from '/imports/ui/utility/getThemeColor.js';
|
||||
import isDarkColor from '/imports/ui/utility/isDarkColor.js';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
overrideBackButton: {
|
||||
type: Function,
|
||||
default: undefined,
|
||||
},
|
||||
darkBody: Boolean,
|
||||
},
|
||||
data(){ return {
|
||||
offsetTop: 0,
|
||||
}},
|
||||
computed: {
|
||||
isDark(){
|
||||
return isDarkColor(this.computedColor);
|
||||
},
|
||||
computedColor(){
|
||||
return this.color || getThemeColor('secondary');
|
||||
export default {
|
||||
props: {
|
||||
color: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
overrideBackButton: {
|
||||
type: Function,
|
||||
default: undefined,
|
||||
},
|
||||
darkBody: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
offsetTop: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isDark() {
|
||||
return isDarkColor(this.computedColor);
|
||||
},
|
||||
computedColor() {
|
||||
return this.color || getThemeColor('secondary');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onScroll(e) {
|
||||
this.offsetTop = e.target.scrollTop
|
||||
},
|
||||
back() {
|
||||
if (this.overrideBackButton) {
|
||||
this.overrideBackButton();
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onScroll(e){
|
||||
this.offsetTop = e.target.scrollTop
|
||||
},
|
||||
back(){
|
||||
if (this.overrideBackButton){
|
||||
this.overrideBackButton();
|
||||
} else {
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
close(){
|
||||
this.$store.dispatch('popDialogStack');
|
||||
},
|
||||
},
|
||||
}
|
||||
close() {
|
||||
this.$store.dispatch('popDialogStack');
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.base-dialog-toolbar {
|
||||
z-index: 2;
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
#base-dialog-body, .unwrapped-content {
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
#base-dialog-body.dark-body {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.theme--dark #base-dialog-body.dark-body {
|
||||
background-color: #303030;
|
||||
}
|
||||
.base-dialog-toolbar {
|
||||
z-index: 2;
|
||||
border-radius: 2px 2px 0 0;
|
||||
}
|
||||
|
||||
#base-dialog-body,
|
||||
.unwrapped-content {
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#base-dialog-body.dark-body {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.theme--dark #base-dialog-body.dark-body {
|
||||
background-color: #303030;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -43,16 +43,16 @@ import MarkdownText from '/imports/ui/components/MarkdownText.vue';
|
||||
import Docs from '/imports/api/docs/Docs.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
components: {
|
||||
DialogBase,
|
||||
MarkdownText,
|
||||
},
|
||||
props: {
|
||||
},
|
||||
props: {
|
||||
path: {
|
||||
type: String,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
prop() {
|
||||
return propsByDocsPath.get(this.path);
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
} else {
|
||||
const titleCase = this.path.replace(
|
||||
/(\w*)(\W+)/g,
|
||||
function(txt, word) {
|
||||
function (txt, word) {
|
||||
return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase() + ' ';
|
||||
}
|
||||
);
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
},
|
||||
meteor: {
|
||||
$subscribe: {
|
||||
'docs'(){
|
||||
'docs'() {
|
||||
return [this.path];
|
||||
},
|
||||
},
|
||||
@@ -104,4 +104,5 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { parse, stringify } from 'css-box-shadow';
|
||||
|
||||
// Only supports border radius defined like "20px" or "100%"
|
||||
const transformedRadius = (radiusString, deltaWidth, deltaHeight) => {
|
||||
if (/^\d+\.?\d*px$/.test(radiusString)){
|
||||
if (/^\d+\.?\d*px$/.test(radiusString)) {
|
||||
//The radius is defined in pixel units, so get the radius as a number
|
||||
const rad = +radiusString.match(/\d+\.?\d*/)[0];
|
||||
// Set the x and y radius of the "to" element, compensating for scale
|
||||
@@ -15,7 +15,7 @@ const transformedRadius = (radiusString, deltaWidth, deltaHeight) => {
|
||||
|
||||
const transformedBoxShadow = (shadowString, deltaWidth, deltaHeight) => {
|
||||
if (shadowString === 'none') return shadowString;
|
||||
if (shadowString[0] === 'r'){
|
||||
if (shadowString[0] === 'r') {
|
||||
let strings = shadowString.match(/rgba\([^)]+\)[^,]+/g);
|
||||
strings = strings.map(string => {
|
||||
// Move color to end
|
||||
@@ -35,24 +35,24 @@ const transformedBoxShadow = (shadowString, deltaWidth, deltaHeight) => {
|
||||
return stringify(shadows);
|
||||
}
|
||||
|
||||
export default function mockElement({source, target, offset = {x: 0, y: 0}}){
|
||||
if (!source || !target) throw `Can't mock without ${source ? 'target' : 'source'}` ;
|
||||
export default function mockElement({ source, target, offset = { x: 0, y: 0 } }) {
|
||||
if (!source || !target) throw `Can't mock without ${source ? 'target' : 'source'}`;
|
||||
let sourceRect = source.getBoundingClientRect();
|
||||
let targetRect = target.getBoundingClientRect();
|
||||
let targetRect = target.getBoundingClientRect();
|
||||
|
||||
// Get how must the target change to become the source
|
||||
const deltaWidth = sourceRect.width / targetRect.width;
|
||||
const deltaHeight = sourceRect.height / targetRect.height;
|
||||
const deltaLeft = sourceRect.left - targetRect.left + offset.x;
|
||||
const deltaTop = sourceRect.top - targetRect.top + offset.y;
|
||||
// Mock the source
|
||||
target.style.transform = `translate(${deltaLeft}px, ${deltaTop}px) ` +
|
||||
// Get how must the target change to become the source
|
||||
const deltaWidth = sourceRect.width / targetRect.width;
|
||||
const deltaHeight = sourceRect.height / targetRect.height;
|
||||
const deltaLeft = sourceRect.left - targetRect.left + offset.x;
|
||||
const deltaTop = sourceRect.top - targetRect.top + offset.y;
|
||||
// Mock the source
|
||||
target.style.transform = `translate(${deltaLeft}px, ${deltaTop}px) ` +
|
||||
`scale(${deltaWidth}, ${deltaHeight})`;
|
||||
// Mock the background color unless it's completely transparent
|
||||
let backgroundColor = getComputedStyle(source).backgroundColor
|
||||
if (backgroundColor !== 'rgba(0, 0, 0, 0)'){
|
||||
target.style.backgroundColor = backgroundColor;
|
||||
}
|
||||
// Mock the background color unless it's completely transparent
|
||||
let backgroundColor = getComputedStyle(source).backgroundColor
|
||||
if (backgroundColor !== 'rgba(0, 0, 0, 0)') {
|
||||
target.style.backgroundColor = backgroundColor;
|
||||
}
|
||||
// Edge might not combine all border radii into a single value,
|
||||
// So we just sample the top left one if we need to
|
||||
let oldRadius = getComputedStyle(source).borderRadius ||
|
||||
|
||||
Reference in New Issue
Block a user