mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
Added authentication slice skeleton
Necessary to provide initial scaffolding for implementing authentication functionality. This also ensures that application assets are imported for reuse within this slice. Milestone: minor
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Authentication
|
||||
# The health slice configuration.
|
||||
class Slice < Hanami::Slice
|
||||
import keys: ["assets"], from: Hanami.app.container, as: :main
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/db/relation"
|
||||
|
||||
module Authentication
|
||||
module DB
|
||||
# The slice database relation.
|
||||
class Relation < Terminus::DB::Relation
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/db/repo"
|
||||
|
||||
module Authentication
|
||||
module DB
|
||||
# The application database base repository.
|
||||
class Repository < Terminus::DB::Repo
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "hanami/db/struct"
|
||||
|
||||
module Authentication
|
||||
module DB
|
||||
# The application database base struct.
|
||||
class Struct < Terminus::DB::Struct
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Authentication
|
||||
# The slice view.
|
||||
class View < Terminus::View
|
||||
config.paths += ["app/templates"]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# auto_register: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Authentication
|
||||
module Views
|
||||
# The slice view context.
|
||||
class Context < Hanami::View::Context
|
||||
include Deps[main_assets: "main.assets"]
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user