Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: teamnovu/localize
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: teamnovu/localize
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.1
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 8, 2024

  1. fix: handle <empty string>

    arcs- committed Aug 8, 2024
    Copy the full SHA
    0fb6b00 View commit details
  2. fix: trim spaces also in vue

    arcs- committed Aug 8, 2024
    Copy the full SHA
    9d63936 View commit details
  3. Copy the full SHA
    5322f95 View commit details
Showing with 20 additions and 79 deletions.
  1. +0 −17 resources/dist/css/cp.css
  2. +12 −60 resources/dist/js/cp.js
  3. +7 −1 resources/js/components/TrackedInput.vue
  4. +1 −1 src/ServiceProvider.php
17 changes: 0 additions & 17 deletions resources/dist/css/cp.css
Original file line number Diff line number Diff line change
@@ -28,14 +28,6 @@
.novu-grow {
flex-grow: 1 !important
}
.novu-translate-y-\[-75\%\] {
--tw-translate-y: -75% !important;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important
}
.novu-translate-y-\[-70\%\] {
--tw-translate-y: -70% !important;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important
}
.novu-translate-y-\[-65\%\] {
--tw-translate-y: -65% !important;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important
@@ -49,9 +41,6 @@
.novu-overflow-hidden {
overflow: hidden !important
}
.\!novu-p-3 {
padding: 0.75rem !important
}
.\!novu-p-2 {
padding: 0.5rem !important
}
@@ -79,12 +68,6 @@
width: 15rem !important
}
}
@media (prefers-color-scheme: dark) {
.dark\:novu-border-white {
--tw-border-opacity: 1 !important;
border-color: rgb(255 255 255 / var(--tw-border-opacity)) !important
}
}
.section+.\[\.section\+\&\]\:novu-mt-6 {
margin-top: 1.5rem !important
}
72 changes: 12 additions & 60 deletions resources/dist/js/cp.js
Original file line number Diff line number Diff line change
@@ -239,6 +239,8 @@ __webpack_require__.r(__webpack_exports__);
},
computed: {
isDirty: function isDirty() {
// handle "<empty string>" in firefox
if (!this.trackedValue && !this.value) return false;
return this.trackedValue != this.value;
}
},
@@ -484,81 +486,31 @@ var render = function render() {
}
}, [_vm._v("•")]) : _vm._e(), _vm._v(" "), _c("div", {
staticClass: "input-group"
}, [_vm.$attrs.type === "checkbox" ? _c("input", _vm._b({
}, [_c("input", _vm._b({
directives: [{
name: "model",
rawName: "v-model",
rawName: "v-model.trim",
value: _vm.trackedValue,
expression: "trackedValue"
}],
staticClass: "input-text",
attrs: {
id: _vm.name,
name: _vm.name,
type: "checkbox"
},
domProps: {
checked: Array.isArray(_vm.trackedValue) ? _vm._i(_vm.trackedValue, null) > -1 : _vm.trackedValue
},
on: {
change: function change($event) {
var $$a = _vm.trackedValue,
$$el = $event.target,
$$c = $$el.checked ? true : false;
if (Array.isArray($$a)) {
var $$v = null,
$$i = _vm._i($$a, $$v);
if ($$el.checked) {
$$i < 0 && (_vm.trackedValue = $$a.concat([$$v]));
} else {
$$i > -1 && (_vm.trackedValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
}
} else {
_vm.trackedValue = $$c;
}
expression: "trackedValue",
modifiers: {
trim: true
}
}
}, "input", _vm.$attrs, false)) : _vm.$attrs.type === "radio" ? _c("input", _vm._b({
directives: [{
name: "model",
rawName: "v-model",
value: _vm.trackedValue,
expression: "trackedValue"
}],
staticClass: "input-text",
attrs: {
id: _vm.name,
name: _vm.name,
type: "radio"
},
domProps: {
checked: _vm._q(_vm.trackedValue, null)
},
on: {
change: function change($event) {
_vm.trackedValue = null;
}
}
}, "input", _vm.$attrs, false)) : _c("input", _vm._b({
directives: [{
name: "model",
rawName: "v-model",
value: _vm.trackedValue,
expression: "trackedValue"
}],
staticClass: "input-text",
attrs: {
id: _vm.name,
name: _vm.name,
type: _vm.$attrs.type
name: _vm.name
},
domProps: {
value: _vm.trackedValue
},
on: {
input: function input($event) {
if ($event.target.composing) return;
_vm.trackedValue = $event.target.value;
_vm.trackedValue = $event.target.value.trim();
},
blur: function blur($event) {
return _vm.$forceUpdate();
}
}
}, "input", _vm.$attrs, false))])]);
8 changes: 7 additions & 1 deletion resources/js/components/TrackedInput.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<template>
<div class="relative w-full">

<div v-if="isDirty" class="absolute novu-right-3 novu-mt-[0.4rem] novu-pointer-events-none" aria-hidden>•</div>

<div class="input-group">
<input v-bind="$attrs" v-model="trackedValue" :id="name" :name="name" class="input-text">
<input v-bind="$attrs" v-model.trim="trackedValue" :id="name" :name="name" class="input-text">
</div>

</div>
</template>

@@ -21,6 +24,9 @@ export default {
},
computed: {
isDirty() {
// handle "<empty string>" in firefox
if (!this.trackedValue && !this.value) return false;
return this.trackedValue != this.value
}
},
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ protected function bootAddonNav()
if ($user->can('edit localize')) {
$nav->content('Localize')
->route('localize.dashboard')
->icon('earth');
->icon('partial');
}
});
}