Skip to content

Commit

Permalink
Set a default for the group
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 committed Dec 13, 2024
1 parent 50b748d commit 188d4e3
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ composer.lock
node_modules
/vendor
mix-manifest.json
yarn.lock
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.2.0",
"laravel-vite-plugin": "^0.7.2",
"postcss": "^8.4.41",
"tailwindcss": "^3.4.10",
"vite": "^4.0.0",
"vue": "^2.6.11"
}
}
5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
tailwindcss: {}
},
};
17 changes: 8 additions & 9 deletions resources/blueprints/vendor/runway/language_line.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ tabs:
validate: required
localizable: false
-
handle: group
handle: text
field:
type: text
display: Group
validate: required
type: locale_select_array
display: Translations
localizable: false
placeholder: 'In general this will be "*"'
default: '*'
-
handle: text
handle: group
field:
type: locale_select_array
display: Text
default: '*'
type: hidden
display: Group
localizable: false
visibility: hidden
title: 'Language line'

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

7 changes: 7 additions & 0 deletions resources/dist/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"resources/js/translation-manager.js": {
"file": "assets/translation-manager-62298d23.js",
"isEntry": true,
"src": "resources/js/translation-manager.js"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<table class="data-table">
<thead>
<tr>
<th>Key</th>
<th>Locale</th>
<th>Value</th>
<th>Actions</th>
</tr>
Expand Down
8 changes: 8 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@

class ServiceProvider extends AddonServiceProvider
{
protected $vite = [

Check failure on line 13 in src/ServiceProvider.php

View workflow job for this annotation

GitHub Actions / P8.3 - L11.* - prefer-stable - ubuntu-latest

Property Justbetter\StatamicTranslationManagement\ServiceProvider::$vite (array<int, string>) does not accept default value of type array<string, array<int, string>|string>.
'input' => [
'resources/js/translation-manager.js',
],
'publicDirectory' => 'resources/dist',
];

public function register()
{
$this->app->register(TranslationServiceProvider::class, true);
Expand All @@ -27,6 +34,7 @@ protected function bootRunway(): self
config(['runway.resources' => array_merge(
[LanguageLine::class => [
'name' => 'Translations',
'primary_column' => 'key'
]],
config('runway.resources') ?? []
)]);
Expand Down
5 changes: 5 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
content: [
'./resources/js/components/**/*.vue',
]
}
15 changes: 15 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue2';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/js/translation-manager.js',
],
publicDirectory: 'resources/dist',
}),
vue(),
],
});

0 comments on commit 188d4e3

Please sign in to comment.