Skip to content

Commit

Permalink
Upgraded / fixed the controllers
Browse files Browse the repository at this point in the history
commit-id:ec0dd444
  • Loading branch information
brand-it committed Apr 12, 2024
1 parent 9121939 commit 60b45d5
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 109 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ gem 'text'
gem 'view_component'
gem 'wisper'
gem 'workflow'
gem 'stimulus-rails'

group :development, :test do
gem 'annotate'
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ DEPENDENCIES
spring
sprockets-rails
sqlite3
stimulus-rails
super_diff
sys-filesystem
text
Expand Down
96 changes: 49 additions & 47 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,64 @@
*/


@import "colors";
@import "bootstrap/scss/bootstrap";
@import "minimal";
@import "checkbox_toggle";
@import "colors";
@import "bootstrap/scss/bootstrap";
@import "minimal";
@import "checkbox_toggle";
// @import "bg_process";

// @import "./custom";
// app/javascript/packs/stylesheets/_custom.scss
// h1 {
// color: red;
// } */
html, body {
height: 100%;
}
body {
font-family: "Lucida Console", Monaco, monospace;
display: flex;
}
// @import "./custom";
// app/javascript/packs/stylesheets/_custom.scss
// h1 {
// color: red;
// } */
html,
body {
height: 100%;
}

.debug_dump {
border-radius: 0.5rem;
padding: 0.5rem;
}
body {
font-family: "Lucida Console", Monaco, monospace;
display: flex;
}

.h-90 {
height: 90%;
}
.debug_dump {
border-radius: 0.5rem;
padding: 0.5rem;
}

.h-10 {
height: 10%;
}
.h-90 {
height: 90%;
}

.h-85 {
height: 85%;
}
.h-15 {
height: 15%;
}
.h-10 {
height: 10%;
}

.h-85 {
height: 85%;
}

.d-inline-grid {
display: inline-grid;
}
.h-15 {
height: 15%;
}

.d-inline-grid {
display: inline-grid;
}

.overflow-scroll-y {
overflow-y: scroll;
}
.overflow-scroll-y {
overflow-y: scroll;
}

.overflow-hidden-y {
overflow-y: hidden;
}
.overflow-hidden-y {
overflow-y: hidden;
}

.overflow-hidden-x {
overflow-x: hidden;
}
.overflow-hidden-x {
overflow-x: hidden;
}

.overflow-scroll-x {
overflow-x: scroll;
}
.overflow-scroll-x {
overflow-x: scroll;
}
3 changes: 3 additions & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ import '@fortawesome/fontawesome-free/js/all.js';
// const images = require.context('./images', true)
// const imagePath = (name) => images(name, true)

// Turbo
import '@hotwired/turbo-rails';

import "./controllers"
2 changes: 0 additions & 2 deletions app/javascript/controllers/application_controller.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/javascript/controllers/hello_controller.js

This file was deleted.

8 changes: 6 additions & 2 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@

import { application } from "./application"

import HelloController from "./hello_controller"
application.register("hello", HelloController)
import PaginationController from "./pagination_controller"
application.register("pagination", PaginationController)

import PlexController from "./plex_controller"
application.register("plex", PlexController)

2 changes: 1 addition & 1 deletion app/javascript/controllers/pagination_controller.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Controller } from 'stimulus'
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
static targets = ['showMore']
Expand Down
26 changes: 13 additions & 13 deletions app/javascript/controllers/plex_controller.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Controller } from "stimulus"
// import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
static targets = ["fileNavigator"]
// greet() {
// this.outputTarget.textContent =
// `Hello, ${this.nameTarget.value}!`
// }
// export default class extends Controller {
// static targets = ["fileNavigator"]
// // greet() {
// // this.outputTarget.textContent =
// // `Hello, ${this.nameTarget.value}!`
// // }

// getDirectories() {
// fetch(this.data.get("url")).then(/* … */)
// }
// // getDirectories() {
// // fetch(this.data.get("url")).then(/* … */)
// // }

// useFtp() {
// // useFtp() {

// }
}
// // }
// }
2 changes: 1 addition & 1 deletion app/views/layouts/_head.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= javascript_include_tag 'application'%>
<%= javascript_include_tag "application" %>
<%= stylesheet_link_tag 'application' %>
<%= csrf_meta_tag %>
<%= csp_meta_tag %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>

<html lang='en' data-bs-theme="<%= light_dark_mode %>">
<html lang='en' data-bs-theme="<%= light_dark_mode %>">
<head>
<title>Plex The Ripper</title>
<%= render 'layouts/head' %>
Expand Down
5 changes: 4 additions & 1 deletion bin/dev
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env sh

if ! gem list foreman -i --silent; then
if gem list --no-installed --exact --silent foreman; then
echo "Installing foreman..."
gem install foreman
fi

# Default to port 3000 if not specified
export PORT="${PORT:-3000}"

exec foreman start -f Procfile.dev "$@"
10 changes: 0 additions & 10 deletions config/webpack/base.js

This file was deleted.

5 changes: 0 additions & 5 deletions config/webpack/development.js

This file was deleted.

3 changes: 0 additions & 3 deletions config/webpack/environment.js

This file was deleted.

5 changes: 0 additions & 5 deletions config/webpack/production.js

This file was deleted.

5 changes: 0 additions & 5 deletions config/webpack/test.js

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": ">=5.15.2",
"@hotwired/stimulus": "^3.2.1",
"@hotwired/stimulus": "^3.2.2",
"@hotwired/turbo-rails": ">=7.0.0-beta.5",
"@popperjs/core": ">=2.9.2",
"@rails/actioncable": ">=7.0.1",
Expand All @@ -22,7 +22,7 @@
"regenerator-runtime": ">=0.13.11",
"sass": ">=1.63.4",
"stimulus": ">=3.0.1",
"webpack": ">=5.87.0"
"webpack": "^5.91.0"
},
"version": "0.1.0",
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ module.exports = {
output: {
filename: "[name].js",
sourceMapFilename: "[file].map",
chunkFormat: "module",
path: path.resolve(__dirname, "app/assets/builds"),
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
],

]
}
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
resolved "https://registry.yarnpkg.com/@hotwired/stimulus-webpack-helpers/-/stimulus-webpack-helpers-1.0.1.tgz#4cd74487adeca576c9865ac2b9fe5cb20cef16dd"
integrity sha512-wa/zupVG0eWxRYJjC1IiPBdt3Lruv0RqGN+/DTMmUWUyMAEB27KXmVY6a8YpUVTM7QwVuaLNGW4EqDgrS2upXQ==

"@hotwired/stimulus@^3.2.1", "@hotwired/stimulus@^3.2.2":
"@hotwired/stimulus@^3.2.2":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@hotwired/stimulus/-/stimulus-3.2.2.tgz#071aab59c600fed95b97939e605ff261a4251608"
integrity sha512-eGeIqNOQpXoPAIP7tC1+1Yc1yl1xnwYqg+3mzqxyrbE5pg5YFBZcA6YoTiByJB6DKAEsiWtl6tjTJS4IYtbB7A==
Expand Down Expand Up @@ -2806,7 +2806,7 @@ webpack-sources@^3.2.3:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

webpack@>=5.87.0:
webpack@^5.91.0:
version "5.91.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9"
integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==
Expand Down

0 comments on commit 60b45d5

Please sign in to comment.