feat: Super admin design improvements (#8517)
- Revamp the super admin design - Introduce a new settings page for support and billing settings - Move the access tokens into users, agent bots and platform app show pages Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
b1a68759cf
commit
f002870c6a
@@ -25,7 +25,6 @@
|
||||
@import 'components/flashes';
|
||||
@import 'components/form-actions';
|
||||
@import 'components/main-content';
|
||||
@import 'components/navigation';
|
||||
@import 'components/pagination';
|
||||
@import 'components/search';
|
||||
@import 'components/reports';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
html {
|
||||
background-color: $color-white;
|
||||
box-sizing: border-box;
|
||||
font-size: 10px;
|
||||
font-size: 16px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
.attribute-data {
|
||||
float: left;
|
||||
margin-bottom: $base-spacing;
|
||||
margin-left: 2rem;
|
||||
width: calc(84% - 1rem);
|
||||
margin-left: 1.25rem;
|
||||
width: calc(84% - 0.625rem);
|
||||
}
|
||||
|
||||
.attribute--nested {
|
||||
|
||||
@@ -9,22 +9,22 @@
|
||||
|
||||
.field-unit__label {
|
||||
float: left;
|
||||
margin-left: 1rem;
|
||||
margin-left: 0.625rem;
|
||||
text-align: right;
|
||||
width: calc(15% - 1rem);
|
||||
width: calc(15% - 0.625rem);
|
||||
}
|
||||
|
||||
.field-unit__field {
|
||||
float: left;
|
||||
margin-left: 2rem;
|
||||
max-width: 50rem;
|
||||
margin-left: 1.25rem;
|
||||
max-width: 31.15rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.field-unit--nested {
|
||||
border: $base-border;
|
||||
margin-left: 7.5%;
|
||||
max-width: 60rem;
|
||||
max-width: 37.5rem;
|
||||
padding: $small-spacing;
|
||||
width: 100%;
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
.form-actions {
|
||||
margin-left: calc(15% + 2rem);
|
||||
margin-left: calc(15% + 1.25rem);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
table {
|
||||
font-size: $font-size-small;
|
||||
}
|
||||
|
||||
form {
|
||||
margin-top: $space-two;
|
||||
}
|
||||
}
|
||||
|
||||
.main-content__header {
|
||||
@@ -20,7 +24,7 @@
|
||||
background-color: $color-white;
|
||||
border-bottom: 1px solid $color-border;
|
||||
display: flex;
|
||||
min-height: 5.6rem;
|
||||
min-height: 3.5rem;
|
||||
padding: $space-small $space-normal;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
.logo-brand {
|
||||
margin-bottom: $space-normal;
|
||||
padding: $space-normal $space-smaller $space-small;
|
||||
text-align: left;
|
||||
|
||||
img {
|
||||
margin-bottom: $space-smaller;
|
||||
max-height: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.navigation {
|
||||
background: $white;
|
||||
border-right: 1px solid $color-border;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: $font-size-default;
|
||||
font-weight: $font-weight-medium;
|
||||
height: 100%;
|
||||
justify-content: flex-start;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
padding: $space-normal;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 21rem;
|
||||
z-index: 1023;
|
||||
|
||||
li {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
font-size: $font-size-small;
|
||||
|
||||
a {
|
||||
color: $color-gray;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
i {
|
||||
min-width: $space-medium;
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: $space-slab;
|
||||
}
|
||||
}
|
||||
|
||||
.navigation__link {
|
||||
background-color: transparent;
|
||||
color: $color-gray;
|
||||
display: block;
|
||||
line-height: 1;
|
||||
margin-bottom: $space-smaller;
|
||||
padding: $space-small;
|
||||
|
||||
&:hover {
|
||||
color: $blue;
|
||||
|
||||
a {
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.navigation__link--active {
|
||||
background-color: $color-background;
|
||||
border-radius: $base-border-radius;
|
||||
color: $blue;
|
||||
|
||||
a {
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logout {
|
||||
bottom: $space-normal;
|
||||
left: $space-normal;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.app-version {
|
||||
color: $color-gray;
|
||||
font-size: $font-size-small;
|
||||
padding-top: $space-smaller;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
.search {
|
||||
margin-left: auto;
|
||||
margin-right: 2rem;
|
||||
max-width: 44rem;
|
||||
margin-right: 1.25rem;
|
||||
max-width: 27.5rem;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Typography
|
||||
$base-font-family: PlusJakarta, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
||||
$base-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
sans-serif !default;
|
||||
$heading-font-family: $base-font-family !default;
|
||||
|
||||
$base-font-size: 14px !default;
|
||||
$base-font-size: 16px !default;
|
||||
|
||||
$base-line-height: 1.5 !default;
|
||||
$heading-line-height: 1.2 !default;
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
// Font sizes
|
||||
$font-size-nano: 0.8rem;
|
||||
$font-size-micro: 1.0rem;
|
||||
$font-size-mini: 1.2rem;
|
||||
$font-size-small: 1.4rem;
|
||||
$font-size-default: 1.6rem;
|
||||
$font-size-medium: 1.8rem;
|
||||
$font-size-large: 2.2rem;
|
||||
$font-size-big: 2.4rem;
|
||||
$font-size-bigger: 3.0rem;
|
||||
$font-size-mega: 3.4rem;
|
||||
$font-size-giga: 4.0rem;
|
||||
$font-size-nano: 0.5rem;
|
||||
$font-size-micro: 0.675rem;
|
||||
$font-size-mini: 0.75rem;
|
||||
$font-size-small: 0.875rem;
|
||||
$font-size-default: 1rem;
|
||||
$font-size-medium: 1.125rem;
|
||||
$font-size-large: 1.375rem;
|
||||
$font-size-big: 1.5rem;
|
||||
$font-size-bigger: 1.75rem;
|
||||
$font-size-mega: 2.125rem;
|
||||
$font-size-giga: 2.5rem;
|
||||
|
||||
// spaces
|
||||
$zero: 0;
|
||||
$space-micro: 0.2rem;
|
||||
$space-smaller: 0.4rem;
|
||||
$space-small: 0.8rem;
|
||||
$space-one: 1rem;
|
||||
$space-slab: 1.2rem;
|
||||
$space-normal: 1.6rem;
|
||||
$space-two: 2.0rem;
|
||||
$space-medium: 2.4rem;
|
||||
$space-large: 3.2rem;
|
||||
$space-larger: 4.8rem;
|
||||
$space-jumbo: 6.4rem;
|
||||
$space-mega: 10.0rem;
|
||||
$space-micro: 0.125rem;
|
||||
$space-smaller: 0.25rem;
|
||||
$space-small: 0.5rem;
|
||||
$space-one: 0.675rem;
|
||||
$space-slab: 0.75rem;
|
||||
$space-normal: 1rem;
|
||||
$space-two: 1.25rem;
|
||||
$space-medium: 1.5rem;
|
||||
$space-large: 2rem;
|
||||
$space-larger: 3rem;
|
||||
$space-jumbo: 4rem;
|
||||
$space-mega: 6.25rem;
|
||||
|
||||
// font-weight
|
||||
$font-weight-feather: 100;
|
||||
|
||||
@@ -20,4 +20,13 @@ class SuperAdmin::ApplicationController < Administrate::ApplicationController
|
||||
params.fetch(resource_name, {}).fetch(:direction, 'desc')
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def invalid_action_perfomed
|
||||
# rubocop:disable Rails/I18nLocaleTexts
|
||||
flash[:error] = 'Invalid action performed'
|
||||
# rubocop:enable Rails/I18nLocaleTexts
|
||||
redirect_back(fallback_location: root_path)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class SuperAdmin::InstallationConfigsController < SuperAdmin::ApplicationController
|
||||
rescue_from ActiveRecord::RecordNotUnique, :with => :invalid_action_perfomed
|
||||
# Overwrite any of the RESTful controller actions to implement custom behavior
|
||||
# For example, you may want to send an email after a foo is updated.
|
||||
#
|
||||
|
||||
10
app/controllers/super_admin/settings_controller.rb
Normal file
10
app/controllers/super_admin/settings_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class SuperAdmin::SettingsController < SuperAdmin::ApplicationController
|
||||
def show; end
|
||||
|
||||
def refresh
|
||||
Internal::CheckNewVersionsJob.perform_now
|
||||
# rubocop:disable Rails/I18nLocaleTexts
|
||||
redirect_to super_admin_settings_path, notice: 'Instance status refreshed'
|
||||
# rubocop:enable Rails/I18nLocaleTexts
|
||||
end
|
||||
end
|
||||
@@ -30,11 +30,7 @@ class AccessTokenDashboard < Administrate::BaseDashboard
|
||||
# SHOW_PAGE_ATTRIBUTES
|
||||
# an array of attributes that will be displayed on the model's show page.
|
||||
SHOW_PAGE_ATTRIBUTES = %i[
|
||||
owner
|
||||
id
|
||||
token
|
||||
created_at
|
||||
updated_at
|
||||
].freeze
|
||||
|
||||
# FORM_ATTRIBUTES
|
||||
|
||||
@@ -46,6 +46,7 @@ class AgentBotDashboard < Administrate::BaseDashboard
|
||||
name
|
||||
description
|
||||
outgoing_url
|
||||
access_token
|
||||
].freeze
|
||||
|
||||
# FORM_ATTRIBUTES
|
||||
|
||||
@@ -32,6 +32,7 @@ class PlatformAppDashboard < Administrate::BaseDashboard
|
||||
name
|
||||
created_at
|
||||
updated_at
|
||||
access_token
|
||||
].freeze
|
||||
|
||||
# FORM_ATTRIBUTES
|
||||
|
||||
@@ -36,7 +36,8 @@ class UserDashboard < Administrate::BaseDashboard
|
||||
updated_at: Field::DateTime,
|
||||
pubsub_token: Field::String,
|
||||
type: Field::Select.with_options(collection: [nil, 'SuperAdmin']),
|
||||
accounts: CountField
|
||||
accounts: CountField,
|
||||
access_token: Field::HasOne
|
||||
}.freeze
|
||||
|
||||
# COLLECTION_ATTRIBUTES
|
||||
@@ -67,6 +68,7 @@ class UserDashboard < Administrate::BaseDashboard
|
||||
updated_at
|
||||
confirmed_at
|
||||
account_users
|
||||
access_token
|
||||
].freeze
|
||||
|
||||
# FORM_ATTRIBUTES
|
||||
|
||||
@@ -1,39 +1,8 @@
|
||||
@import '../variables';
|
||||
@import 'shared/assets/fonts/inter';
|
||||
@import 'tailwindcss/base';
|
||||
@import 'tailwindcss/components';
|
||||
@import 'tailwindcss/utilities';
|
||||
|
||||
.superadmin-body {
|
||||
background: var(--color-background);
|
||||
|
||||
.hero--title {
|
||||
font-size: var(--font-size-mega);
|
||||
font-weight: var(--font-weight-light);
|
||||
margin-top: var(--space-large);
|
||||
}
|
||||
|
||||
.update-subscription--checkbox {
|
||||
display: flex;
|
||||
|
||||
input {
|
||||
line-height: 1.5;
|
||||
margin-right: var(--space-one);
|
||||
margin-top: var(--space-smaller);
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: var(--font-size-small);
|
||||
line-height: 1.5;
|
||||
margin-bottom: var(--space-normal);
|
||||
}
|
||||
}
|
||||
body {
|
||||
font-family: Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
|
||||
}
|
||||
|
||||
.alert-box {
|
||||
background-color: var(--r-500);
|
||||
border-radius: 5px;
|
||||
color: var(--color-white);
|
||||
font-size: 14px;
|
||||
margin-bottom: 14px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
@import 'shared/assets/fonts/plus-jakarta';
|
||||
@import '../variables';
|
||||
@import '~shared/assets/stylesheets/ionicons';
|
||||
@@ -1,2 +1 @@
|
||||
import '../dashboard/assets/scss/app.scss';
|
||||
import '../dashboard/assets/scss/super_admin/index.scss';
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
import '../dashboard/assets/scss/super_admin/pages.scss';
|
||||
import 'chart.js';
|
||||
|
||||
@@ -4,9 +4,20 @@ class Internal::CheckNewVersionsJob < ApplicationJob
|
||||
def perform
|
||||
return unless Rails.env.production?
|
||||
|
||||
latest_version = ChatwootHub.latest_version
|
||||
return unless latest_version
|
||||
instance_info = ChatwootHub.sync_with_hub
|
||||
return unless instance_info
|
||||
|
||||
::Redis::Alfred.set(::Redis::Alfred::LATEST_CHATWOOT_VERSION, latest_version)
|
||||
::Redis::Alfred.set(::Redis::Alfred::LATEST_CHATWOOT_VERSION, instance_info['version'])
|
||||
update_installation_config(key: 'INSTALLATION_PRICING_PLAN', value: instance_info['plan'])
|
||||
update_installation_config(key: 'CHATWOOT_SUPPORT_WEBSITE_TOKEN', value: instance_info['chatwoot_support_website_token'])
|
||||
update_installation_config(key: 'CHATWOOT_SUPPORT_IDENTIFIER_HASH', value: instance_info['chatwoot_support_identifier_hash'])
|
||||
update_installation_config(key: 'CHATWOOT_SUPPORT_SCRIPT_URL', value: instance_info['chatwoot_support_script_url'])
|
||||
end
|
||||
|
||||
def update_installation_config(key:, value:)
|
||||
config = InstallationConfig.find_or_initialize_by(name: key)
|
||||
config.value = value
|
||||
config.locked = true
|
||||
config.save!
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,55 +5,73 @@
|
||||
<%= javascript_pack_tag 'superadmin' %>
|
||||
<%= stylesheet_pack_tag 'superadmin' %>
|
||||
</head>
|
||||
<body data-gr-c-s-loaded="true">
|
||||
<div id="app" class="superadmin-body app-wrapper app-root">
|
||||
<div class="medium column login">
|
||||
<div class="text-center medium-12 login__hero align-self-top">
|
||||
<img
|
||||
src="/brand-assets/logo.svg"
|
||||
alt="Chatwoot logo"
|
||||
class="hero__logo"
|
||||
/>
|
||||
<h2 class="hero--title">
|
||||
<body>
|
||||
<div class="h-full w-full antialiased">
|
||||
<main class="flex flex-col bg-woot-25 min-h-screen w-full py-20 sm:px-6 lg:px-8 dark:bg-slate-900">
|
||||
<section class="max-w-5xl mx-auto">
|
||||
<img src="/brand-assets/logo.svg" alt="Chatwoot" class="mx-auto h-8 w-auto block dark:hidden">
|
||||
<img src="/brand-assets/logo_dark.svg" alt="Chatwoot" class="mx-auto h-8 w-auto hidden dark:block">
|
||||
<h2 class="mt-6 text-center text-3xl font-medium text-slate-900 dark:text-woot-50">
|
||||
Howdy, Welcome to Chatwoot 👋
|
||||
</h2>
|
||||
</div>
|
||||
<div class="row align-center">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= form_tag('/installation/onboarding', class: 'login-box column align-self-top') do %>
|
||||
<div class="column log-in-form">
|
||||
<% if flash[:error].present? %>
|
||||
<div data-alert class="alert-box warning"><%= flash[:error] %></div>
|
||||
<% end %>
|
||||
<label>
|
||||
<span>Name</span>
|
||||
<%= text_field :user, :name, placeholder: "Enter your full name. eg: Bruce Wayne", required: true %>
|
||||
</section>
|
||||
<section class="bg-white shadow sm:mx-auto mt-11 sm:w-full sm:max-w-lg dark:bg-slate-800 p-11 sm:shadow-lg sm:rounded-lg mb-8 mt-15">
|
||||
<div>
|
||||
<%= form_tag('/installation/onboarding') do %>
|
||||
<div class="space-y-5">
|
||||
<% if flash[:error].present? %>
|
||||
<div class="rounded-md bg-red-500 p-4 text-white text-sm mb-5"><%= flash[:error] %></div>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<label for="name" class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white">
|
||||
Name
|
||||
</label>
|
||||
<label>
|
||||
<span>Company Name</span>
|
||||
<%= text_field :user, :company, placeholder: "Enter your company name. eg: Wayne Enterprises", required: true %>
|
||||
</label>
|
||||
<label>
|
||||
<span>Work Email</span>
|
||||
<%= email_field :user, :email, placeholder: "Enter your work email address. eg: bruce@wayne.enterprises", required: true %>
|
||||
</label>
|
||||
<label>
|
||||
<span>Password</span>
|
||||
<%= password_field :user, :password, placeholder: "Enter a password with 6 characters or more.", required: true %>
|
||||
</label>
|
||||
<div class="update-subscription--checkbox">
|
||||
<%= check_box_tag "subscribe_to_updates", 'true', true %>
|
||||
<label for="subscribe_to_updates">
|
||||
Subscribe to release notes, newsletters & product feedback surveys.
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<%= text_field :user, :name, placeholder: "Enter your full name. eg: Bruce Wayne", required: true, class: "block w-full rounded-md border-0 px-3 py-3 appearance-none shadow-sm ring-1 ring-inset text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-woot-500 sm:text-sm sm:leading-6 outline-none dark:bg-slate-700 dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200" %>
|
||||
</div>
|
||||
<button type="submit" class="button nice large expanded">
|
||||
Finish Setup
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="name" class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white">
|
||||
Company Name
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<%= text_field :user, :company, placeholder: "Enter your company name. eg: Wayne Enterprises", required: true, class: "block w-full rounded-md border-0 px-3 py-3 appearance-none shadow-sm ring-1 ring-inset text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-woot-500 sm:text-sm sm:leading-6 outline-none dark:bg-slate-700 dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="name" class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white">
|
||||
Work Email
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<%= email_field :user, :email, placeholder: "Enter your work email address. eg: bruce@wayne.enterprises", required: true, class: "block w-full rounded-md border-0 px-3 py-3 appearance-none shadow-sm ring-1 ring-inset text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-woot-500 sm:text-sm sm:leading-6 outline-none dark:bg-slate-700 dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="name" class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white">
|
||||
Password
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<%= password_field :user, :password, placeholder: "Enter a password with 6 characters or more.", required: true, class: "block w-full rounded-md border-0 px-3 py-3 appearance-none shadow-sm ring-1 ring-inset text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-woot-500 sm:text-sm sm:leading-6 outline-none dark:bg-slate-700 dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-sm text-slate-900">
|
||||
<%= check_box_tag "subscribe_to_updates", 'true', true %>
|
||||
<label class="ml-2" for="subscribe_to_updates">
|
||||
Subscribe to release notes, newsletters & product feedback surveys.
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="flex items-center w-full justify-center rounded-md bg-woot-500 py-3 px-3 text-base font-medium text-white shadow-sm hover:bg-woot-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-woot-500 cursor-pointer">
|
||||
Finish Setup
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -13,7 +13,7 @@ By default, it renders:
|
||||
%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= I18n.locale %>">
|
||||
<html lang="<%= I18n.locale %>" class="w-full h-full">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="ROBOTS" content="NOODP">
|
||||
@@ -22,20 +22,19 @@ By default, it renders:
|
||||
<%= content_for(:title) %> - <%= application_title %>
|
||||
</title>
|
||||
<%= render "stylesheet" %>
|
||||
<%= javascript_pack_tag 'superadmin' %>
|
||||
<%= stylesheet_pack_tag 'superadmin' %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="antialiased w-full h-full">
|
||||
<%= render "icons" %>
|
||||
|
||||
<div class="app-container super-admin">
|
||||
<div class="flex w-full h-full">
|
||||
<%= render "navigation" -%>
|
||||
|
||||
<main class="main-content" role="main">
|
||||
<main class="w-full overflow-auto" role="main">
|
||||
<%= render "flashes" -%>
|
||||
<%= yield %>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<%= render "javascript" %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,10 +3,123 @@
|
||||
<path fill-rule="evenodd" d="M24 19.757l-8.485-8.485c-.784-.783-2.047-.782-2.827 0l-1.417 1.416c-.777.777-.78 2.046.002 2.827L19.757 24l-8.485 8.485c-.783.784-.782 2.047 0 2.827l1.416 1.417c.777.777 2.046.78 2.827-.002L24 28.243l8.485 8.485c.784.783 2.047.782 2.827 0l1.417-1.416c.777-.777.78-2.046-.002-2.827L28.243 24l8.485-8.485c.783-.784.782-2.047 0-2.827l-1.416-1.417c-.777-.777-2.046-.78-2.827.002L24 19.757zM24 47c12.703 0 23-10.297 23-23S36.703 1 24 1 1 11.297 1 24s10.297 23 23 23z" />
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-eyeglass" viewBox="0 0 48 48">
|
||||
<path d="M27.885 32.515c-2.864 1.966-6.333 3.116-10.07 3.116C7.976 35.63 0 27.656 0 17.817 0 7.976 7.976 0 17.816 0S35.63 7.976 35.63 17.816c0 3.736-1.15 7.205-3.115 10.07l14.53 14.53c1.278 1.277 1.275 3.352 0 4.628-1.28 1.278-3.353 1.278-4.63 0l-14.53-14.53zm-10.07-3.736c6.056 0 10.964-4.91 10.964-10.964 0-6.055-4.91-10.964-10.964-10.964-6.055 0-10.964 4.91-10.964 10.964 0 6.055 4.91 10.963 10.964 10.963z" />
|
||||
<symbol id="icon-grid-line" viewBox="0 0 20 20">
|
||||
<path d="M16.75 3.25C16.9489 3.25 17.1397 3.32902 17.2803 3.46967C17.421 3.61032 17.5 3.80109 17.5 4V16C17.5 16.1989 17.421 16.3897 17.2803 16.5303C17.1397 16.671 16.9489 16.75 16.75 16.75H3.25C3.05109 16.75 2.86032 16.671 2.71967 16.5303C2.57902 16.3897 2.5 16.1989 2.5 16V4C2.5 3.80109 2.57902 3.61032 2.71967 3.46967C2.86032 3.32902 3.05109 3.25 3.25 3.25H16.75ZM9.25 10.75H4V15.25H9.25V10.75ZM16 10.75H10.75V15.25H16V10.75ZM9.25 4.75H4V9.25H9.25V4.75ZM16 4.75H10.75V9.25H16V4.75Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-user-follow-line" viewBox="0 0 20 20">
|
||||
<path d="M11.5 11.689V13.2565C10.8212 13.0165 10.0947 12.9429 9.38155 13.0418C8.6684 13.1408 7.9894 13.4094 7.40157 13.8252C6.81375 14.2409 6.33426 14.7916 6.00337 15.4311C5.67249 16.0705 5.49986 16.78 5.5 17.5L4 17.4993C3.99977 16.5834 4.20919 15.6797 4.61222 14.8573C5.01526 14.0349 5.6012 13.3157 6.32516 12.7548C7.04912 12.1939 7.89188 11.8061 8.78887 11.6212C9.68585 11.4364 10.6132 11.4593 11.5 11.6883V11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4863 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4863 10.75 10 10.75ZM10 9.25C11.6575 9.25 13 7.9075 13 6.25C13 4.5925 11.6575 3.25 10 3.25C8.3425 3.25 7 4.5925 7 6.25C7 7.9075 8.3425 9.25 10 9.25ZM14.3448 15.9355L16.996 13.2843L18.0573 14.3448L14.3448 18.0573L11.6928 15.4053L12.754 14.3448L14.344 15.9355H14.3448Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-mist-fill" viewBox="0 0 20 20">
|
||||
<path d="M4 4H7V5.5H4V4ZM13 15.25H16V16.75H13V15.25ZM2.5 7.75H10V9.25H2.5V7.75ZM11.5 7.75H16V9.25H11.5V7.75ZM4 11.5H8.5V13H4V11.5ZM10 11.5H17.5V13H10V11.5ZM8.5 4H17.5V5.5H8.5V4ZM2.5 15.25H11.5V16.75H2.5V15.25Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-settings-2-line" viewBox="0 0 20 20">
|
||||
<path d="M7.51453 4L9.46979 2.04475C9.61043 1.90415 9.80116 1.82516 10 1.82516C10.1989 1.82516 10.3896 1.90415 10.5303 2.04475L12.4855 4H15.25C15.4489 4 15.6397 4.07902 15.7804 4.21967C15.921 4.36033 16 4.55109 16 4.75V7.5145L17.9553 9.46975C18.0959 9.6104 18.1749 9.80113 18.1749 10C18.1749 10.1989 18.0959 10.3896 17.9553 10.5303L16 12.4855V15.25C16 15.4489 15.921 15.6397 15.7804 15.7803C15.6397 15.921 15.4489 16 15.25 16H12.4855L10.5303 17.9553C10.3896 18.0959 10.1989 18.1748 10 18.1748C9.80116 18.1748 9.61043 18.0959 9.46979 17.9553L7.51453 16H4.75003C4.55112 16 4.36036 15.921 4.21971 15.7803C4.07905 15.6397 4.00003 15.4489 4.00003 15.25V12.4855L2.04479 10.5303C1.90418 10.3896 1.8252 10.1989 1.8252 10C1.8252 9.80113 1.90418 9.6104 2.04479 9.46975L4.00003 7.5145V4.75C4.00003 4.55109 4.07905 4.36033 4.21971 4.21967C4.36036 4.07902 4.55112 4 4.75003 4H7.51453ZM5.50003 5.5V8.13625L3.63629 10L5.50003 11.8638V14.5H8.13629L10 16.3638L11.8638 14.5H14.5V11.8638L16.3638 10L14.5 8.13625V5.5H11.8638L10 3.63625L8.13629 5.5H5.50003ZM10 13C9.20438 13 8.44132 12.6839 7.87871 12.1213C7.31611 11.5587 7.00003 10.7957 7.00003 10C7.00003 9.20435 7.31611 8.44129 7.87871 7.87868C8.44132 7.31607 9.20438 7 10 7C10.7957 7 11.5587 7.31607 12.1214 7.87868C12.684 8.44129 13 9.20435 13 10C13 10.7957 12.684 11.5587 12.1214 12.1213C11.5587 12.6839 10.7957 13 10 13ZM10 11.5C10.3979 11.5 10.7794 11.342 11.0607 11.0607C11.342 10.7794 11.5 10.3978 11.5 10C11.5 9.60218 11.342 9.22065 11.0607 8.93934C10.7794 8.65804 10.3979 8.5 10 8.5C9.60221 8.5 9.22068 8.65804 8.93937 8.93934C8.65807 9.22065 8.50003 9.60218 8.50003 10C8.50003 10.3978 8.65807 10.7794 8.93937 11.0607C9.22068 11.342 9.60221 11.5 10 11.5Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-health-book-line" viewBox="0 0 20 20">
|
||||
<path d="M16 2.5C16.414 2.5 16.75 2.836 16.75 3.25V16.75C16.75 17.164 16.414 17.5 16 17.5H5.5C5.086 17.5 4.75 17.164 4.75 16.75V15.25H3.25V13.75H4.75V12.25H3.25V10.75H4.75V9.25H3.25V7.75H4.75V6.25H3.25V4.75H4.75V3.25C4.75 2.836 5.086 2.5 5.5 2.5H16ZM15.25 4H6.25V16H15.25V4ZM11.5 7V9.25H13.75V10.75H11.4992L11.5 13H10L9.99925 10.75H7.75V9.25H10V7H11.5Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-building-4-line" viewBox="0 0 20 20">
|
||||
<path d="M16.75 16H18.25V17.5H1.75V16H3.25V3.25C3.25 3.05109 3.32902 2.86032 3.46967 2.71967C3.61032 2.57902 3.80109 2.5 4 2.5H16C16.1989 2.5 16.3897 2.57902 16.5303 2.71967C16.671 2.86032 16.75 3.05109 16.75 3.25V16ZM15.25 16V4H4.75V16H15.25ZM7 9.25H9.25V10.75H7V9.25ZM7 6.25H9.25V7.75H7V6.25ZM7 12.25H9.25V13.75H7V12.25ZM10.75 12.25H13V13.75H10.75V12.25ZM10.75 9.25H13V10.75H10.75V9.25ZM10.75 6.25H13V7.75H10.75V6.25Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-robot-line" viewBox="0 0 20 20">
|
||||
<path d="M10.75 4.04125C14.125 4.414 16.75 7.27525 16.75 10.75V17.5H3.25V10.75C3.25 7.27525 5.875 4.414 9.25 4.04125V1.75H10.75V4.04125ZM15.25 16V10.75C15.25 9.35761 14.6969 8.02226 13.7123 7.03769C12.7277 6.05312 11.3924 5.5 10 5.5C8.60761 5.5 7.27226 6.05312 6.28769 7.03769C5.30312 8.02226 4.75 9.35761 4.75 10.75V16H15.25ZM10 14.5C9.00544 14.5 8.05161 14.1049 7.34835 13.4017C6.64509 12.6984 6.25 11.7446 6.25 10.75C6.25 9.75544 6.64509 8.80161 7.34835 8.09835C8.05161 7.39509 9.00544 7 10 7C10.9946 7 11.9484 7.39509 12.6517 8.09835C13.3549 8.80161 13.75 9.75544 13.75 10.75C13.75 11.7446 13.3549 12.6984 12.6517 13.4017C11.9484 14.1049 10.9946 14.5 10 14.5V14.5ZM10 13C10.5967 13 11.169 12.7629 11.591 12.341C12.0129 11.919 12.25 11.3467 12.25 10.75C12.25 10.1533 12.0129 9.58097 11.591 9.15901C11.169 8.73705 10.5967 8.5 10 8.5C9.40326 8.5 8.83097 8.73705 8.40901 9.15901C7.98705 9.58097 7.75 10.1533 7.75 10.75C7.75 11.3467 7.98705 11.919 8.40901 12.341C8.83097 12.7629 9.40326 13 10 13V13ZM10 11.5C9.80109 11.5 9.61032 11.421 9.46967 11.2803C9.32902 11.1397 9.25 10.9489 9.25 10.75C9.25 10.5511 9.32902 10.3603 9.46967 10.2197C9.61032 10.079 9.80109 10 10 10C10.1989 10 10.3897 10.079 10.5303 10.2197C10.671 10.3603 10.75 10.5511 10.75 10.75C10.75 10.9489 10.671 11.1397 10.5303 11.2803C10.3897 11.421 10.1989 11.5 10 11.5Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-apps-2-line" viewBox="0 0 20 20">
|
||||
<path d="M5.875 9.625C5.43179 9.625 4.99292 9.5377 4.58344 9.36809C4.17397 9.19848 3.80191 8.94988 3.48851 8.63649C3.17512 8.32309 2.92652 7.95103 2.75691 7.54156C2.5873 7.13208 2.5 6.69321 2.5 6.25C2.5 5.80679 2.5873 5.36792 2.75691 4.95844C2.92652 4.54897 3.17512 4.17691 3.48851 3.86351C3.80191 3.55012 4.17397 3.30152 4.58344 3.13191C4.99292 2.9623 5.43179 2.875 5.875 2.875C6.77011 2.875 7.62855 3.23058 8.26149 3.86351C8.89442 4.49645 9.25 5.35489 9.25 6.25C9.25 7.14511 8.89442 8.00355 8.26149 8.63649C7.62855 9.26942 6.77011 9.625 5.875 9.625V9.625ZM6.25 17.125C5.35489 17.125 4.49645 16.7694 3.86351 16.1365C3.23058 15.5035 2.875 14.6451 2.875 13.75C2.875 12.8549 3.23058 11.9965 3.86351 11.3635C4.49645 10.7306 5.35489 10.375 6.25 10.375C7.14511 10.375 8.00355 10.7306 8.63649 11.3635C9.26942 11.9965 9.625 12.8549 9.625 13.75C9.625 14.6451 9.26942 15.5035 8.63649 16.1365C8.00355 16.7694 7.14511 17.125 6.25 17.125V17.125ZM13.75 9.625C13.3068 9.625 12.8679 9.5377 12.4584 9.36809C12.049 9.19848 11.6769 8.94988 11.3635 8.63649C11.0501 8.32309 10.8015 7.95103 10.6319 7.54156C10.4623 7.13208 10.375 6.69321 10.375 6.25C10.375 5.80679 10.4623 5.36792 10.6319 4.95844C10.8015 4.54897 11.0501 4.17691 11.3635 3.86351C11.6769 3.55012 12.049 3.30152 12.4584 3.13191C12.8679 2.9623 13.3068 2.875 13.75 2.875C14.6451 2.875 15.5035 3.23058 16.1365 3.86351C16.7694 4.49645 17.125 5.35489 17.125 6.25C17.125 7.14511 16.7694 8.00355 16.1365 8.63649C15.5035 9.26942 14.6451 9.625 13.75 9.625V9.625ZM13.75 17.125C12.8549 17.125 11.9965 16.7694 11.3635 16.1365C10.7306 15.5035 10.375 14.6451 10.375 13.75C10.375 12.8549 10.7306 11.9965 11.3635 11.3635C11.9965 10.7306 12.8549 10.375 13.75 10.375C14.6451 10.375 15.5035 10.7306 16.1365 11.3635C16.7694 11.9965 17.125 12.8549 17.125 13.75C17.125 14.6451 16.7694 15.5035 16.1365 16.1365C15.5035 16.7694 14.6451 17.125 13.75 17.125ZM5.875 8.125C6.37228 8.125 6.84919 7.92746 7.20083 7.57583C7.55246 7.22419 7.75 6.74728 7.75 6.25C7.75 5.75272 7.55246 5.27581 7.20083 4.92417C6.84919 4.57254 6.37228 4.375 5.875 4.375C5.37772 4.375 4.90081 4.57254 4.54917 4.92417C4.19754 5.27581 4 5.75272 4 6.25C4 6.74728 4.19754 7.22419 4.54917 7.57583C4.90081 7.92746 5.37772 8.125 5.875 8.125V8.125ZM6.25 15.625C6.74728 15.625 7.22419 15.4275 7.57583 15.0758C7.92746 14.7242 8.125 14.2473 8.125 13.75C8.125 13.2527 7.92746 12.7758 7.57583 12.4242C7.22419 12.0725 6.74728 11.875 6.25 11.875C5.75272 11.875 5.27581 12.0725 4.92417 12.4242C4.57254 12.7758 4.375 13.2527 4.375 13.75C4.375 14.2473 4.57254 14.7242 4.92417 15.0758C5.27581 15.4275 5.75272 15.625 6.25 15.625ZM13.75 8.125C14.2473 8.125 14.7242 7.92746 15.0758 7.57583C15.4275 7.22419 15.625 6.74728 15.625 6.25C15.625 5.75272 15.4275 5.27581 15.0758 4.92417C14.7242 4.57254 14.2473 4.375 13.75 4.375C13.2527 4.375 12.7758 4.57254 12.4242 4.92417C12.0725 5.27581 11.875 5.75272 11.875 6.25C11.875 6.74728 12.0725 7.22419 12.4242 7.57583C12.7758 7.92746 13.2527 8.125 13.75 8.125ZM13.75 15.625C14.2473 15.625 14.7242 15.4275 15.0758 15.0758C15.4275 14.7242 15.625 14.2473 15.625 13.75C15.625 13.2527 15.4275 12.7758 15.0758 12.4242C14.7242 12.0725 14.2473 11.875 13.75 11.875C13.2527 11.875 12.7758 12.0725 12.4242 12.4242C12.0725 12.7758 11.875 13.2527 11.875 13.75C11.875 14.2473 12.0725 14.7242 12.4242 15.0758C12.7758 15.4275 13.2527 15.625 13.75 15.625Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-folder-3-line" viewBox="0 0 20 20">
|
||||
<path d="M10.3105 4.75H16.75C16.9489 4.75 17.1397 4.82902 17.2803 4.96967C17.421 5.11032 17.5 5.30109 17.5 5.5V16C17.5 16.1989 17.421 16.3897 17.2803 16.5303C17.1397 16.671 16.9489 16.75 16.75 16.75H3.25C3.05109 16.75 2.86032 16.671 2.71967 16.5303C2.57902 16.3897 2.5 16.1989 2.5 16V4C2.5 3.80109 2.57902 3.61032 2.71967 3.46967C2.86032 3.32902 3.05109 3.25 3.25 3.25H8.8105L10.3105 4.75ZM4 6.25V15.25H16V6.25H4Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-draft-line" viewBox="0 0 20 20">
|
||||
<path d="M16 2.5C16.414 2.5 16.75 2.836 16.75 3.25V6.06775L15.25 7.56775V4H4.75V16H15.25V13.9315L16.75 12.4315V16.75C16.75 17.164 16.414 17.5 16 17.5H4C3.586 17.5 3.25 17.164 3.25 16.75V3.25C3.25 2.836 3.586 2.5 4 2.5H16ZM17.3335 7.606L18.394 8.6665L12.5605 14.5L11.4985 14.4985L11.5 13.4395L17.3335 7.606V7.606ZM10.75 10V11.5H7V10H10.75ZM13 7V8.5H7V7H13Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-reply-line" viewBox="0 0 20 20">
|
||||
<path d="M9.25 16L1.75 10L9.25 4V7.75C13.3922 7.75 16.75 11.1078 16.75 15.25C16.75 15.4548 16.7425 15.6572 16.726 15.8575C15.6288 13.777 13.4785 12.3393 10.9847 12.2538L10.75 12.25H9.25V16ZM7.75 10.75H10.7755L11.0357 10.7552C11.9995 10.7875 12.9287 10.9877 13.7927 11.3297C12.6925 10.0562 11.065 9.25 9.25 9.25H7.75V7.12075L4.1515 10L7.75 12.8792V10.75Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-logout-circle-r-line" viewBox="0 0 20 20">
|
||||
<path d="M10 17.5C5.85775 17.5 2.5 14.1423 2.5 10C2.5 5.85775 5.85775 2.5 10 2.5C11.1645 2.49913 12.3131 2.76983 13.3547 3.29061C14.3963 3.81139 15.302 4.56788 16 5.5H13.9675C13.1014 4.73632 12.0334 4.23877 10.8915 4.06705C9.74969 3.89533 8.58255 4.05674 7.53017 4.53191C6.47778 5.00708 5.58486 5.77582 4.95855 6.74589C4.33224 7.71596 3.99915 8.84615 3.99925 10.0008C3.99934 11.1555 4.33262 12.2856 4.95909 13.2556C5.58557 14.2256 6.47861 14.9942 7.53108 15.4692C8.58354 15.9442 9.75071 16.1054 10.8925 15.9335C12.0343 15.7616 13.1023 15.2638 13.9683 14.5H16.0007C15.3027 15.4322 14.3968 16.1888 13.3551 16.7096C12.3134 17.2303 11.1646 17.501 10 17.5V17.5ZM15.25 13V10.75H9.25V9.25H15.25V7L19 10L15.25 13Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
<symbol id="icon-dashboard-line" viewBox="0 0 20 20">
|
||||
<path d="M10.75 16.75V9.25H16.75V16.75H10.75ZM3.25 10.75V3.25H9.25V10.75H3.25ZM7.75 9.25V4.75H4.75V9.25H7.75ZM3.25 16.75V12.25H9.25V16.75H3.25ZM4.75 15.25H7.75V13.75H4.75V15.25ZM12.25 15.25H15.25V10.75H12.25V15.25ZM10.75 3.25H16.75V7.75H10.75V3.25ZM12.25 4.75V6.25H15.25V4.75H12.25Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-refresh-line" viewBox="0 0 16 16">
|
||||
<path d="M4.0778 3.4598C5.16654 2.51639 6.55939 1.99799 8 2C11.3138 2 14 4.6862 14 8C14 9.2816 13.598 10.4696 12.914 11.444L11 8H12.8C12.8001 7.05897 12.5235 6.13868 12.0048 5.35355C11.486 4.56842 10.748 3.95309 9.88231 3.58407C9.01666 3.21505 8.06163 3.10862 7.13597 3.27801C6.21032 3.4474 5.35487 3.88514 4.676 4.5368L4.0778 3.4598ZM11.9222 12.5402C10.8335 13.4836 9.44061 14.002 8 14C4.6862 14 2 11.3138 2 8C2 6.7184 2.402 5.5304 3.086 4.556L5 8H3.2C3.19992 8.94102 3.47645 9.86132 3.9952 10.6464C4.51395 11.4316 5.25204 12.0469 6.11769 12.4159C6.98334 12.7849 7.93837 12.8914 8.86403 12.722C9.78968 12.5526 10.6451 12.1149 11.324 11.4632L11.9222 12.5402Z" fill="#1F93FF"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-sailbot-fill" viewBox="0 0 24 24">
|
||||
<path d="M3.89995 17.4H20.1C20.1835 17.4 20.2654 17.4233 20.3365 17.4672C20.4076 17.5111 20.4651 17.574 20.5024 17.6487C20.5398 17.7235 20.5556 17.8072 20.5481 17.8904C20.5406 17.9736 20.5101 18.0531 20.46 18.12L18.57 20.64C18.4861 20.7518 18.3774 20.8425 18.2524 20.905C18.1275 20.9675 17.9897 21 17.85 21H6.14995C6.01023 21 5.87243 20.9675 5.74746 20.905C5.62249 20.8425 5.51378 20.7518 5.42995 20.64L3.53995 18.12C3.48981 18.0531 3.45927 17.9736 3.45177 17.8904C3.44426 17.8072 3.46009 17.7235 3.49746 17.6487C3.53483 17.574 3.59228 17.5111 3.66337 17.4672C3.73446 17.4233 3.81638 17.4 3.89995 17.4ZM14.7 3.38249V14.7C14.7 14.9387 14.6051 15.1676 14.4363 15.3364C14.2676 15.5052 14.0386 15.6 13.8 15.6H4.83595C4.75127 15.5999 4.66835 15.5759 4.59671 15.5307C4.52507 15.4856 4.46761 15.4211 4.43095 15.3448C4.39429 15.2685 4.37991 15.1834 4.38946 15.0992C4.39902 15.0151 4.43211 14.9354 4.48495 14.8692L13.899 3.10169C13.9572 3.02905 14.0366 2.97628 14.1261 2.95066C14.2157 2.92503 14.3109 2.92782 14.3988 2.95863C14.4867 2.98943 14.5629 3.04675 14.6168 3.12267C14.6707 3.19858 14.6998 3.28936 14.7 3.38249Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-menu-search-line" viewBox="0 0 24 24">
|
||||
<path d="M14.625 6.75C13.1753 6.75 12 7.92525 12 9.375C12 10.8247 13.1753 12 14.625 12C16.0747 12 17.25 10.8247 17.25 9.375C17.25 7.92525 16.0747 6.75 14.625 6.75ZM10.5 9.375C10.5 7.09682 12.3468 5.25 14.625 5.25C16.9032 5.25 18.75 7.09682 18.75 9.375C18.75 10.2431 18.4818 11.0486 18.0238 11.7131L20.0303 13.7197L18.9697 14.7803L16.9631 12.7738C16.2986 13.2318 15.4931 13.5 14.625 13.5C12.3468 13.5 10.5 11.6532 10.5 9.375ZM5.25 6H9V7.5H5.25V6ZM5.25 11.25H9V12.75H5.25V11.25ZM18.75 16.5V18H5.25V16.5H18.75Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-hourglass-line" viewBox="0 0 24 24">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
<path d="M7.5 6H6V4.5H18V6H16.5V7.5C16.5 8.71157 15.8878 9.68601 15.1171 10.4825C14.5899 11.0273 13.9485 11.529 13.2982 12C13.9485 12.471 14.5899 12.9728 15.1171 13.5175C15.8878 14.314 16.5 15.2885 16.5 16.5V18H18V19.5H6V18H7.5V16.5C7.5 15.2885 8.11212 14.314 8.88293 13.5175C9.41012 12.9728 10.0515 12.471 10.7018 12C10.0515 11.529 9.41012 11.0273 8.88293 10.4825C8.11212 9.68601 7.5 8.71157 7.5 7.5V6ZM9 6V7.5C9 8.01386 9.19519 8.50124 9.57848 9H14.4215C14.8048 8.50124 15 8.01386 15 7.5V6H9ZM12 12.9164C11.2161 13.4702 10.506 13.9972 9.96083 14.5606C9.81756 14.7087 9.69005 14.8548 9.57848 15H14.4215C14.3099 14.8548 14.1824 14.7087 14.0392 14.5606C13.494 13.9972 12.7839 13.4702 12 12.9164Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-paint-brush-line" viewBox="0 0 24 24">
|
||||
<path d="M5.6999 5.69999V8.39999H18.2999V5.69999H5.6999ZM4.7999 3.89999H19.1999C19.4386 3.89999 19.6675 3.99482 19.8363 4.1636C20.0051 4.33238 20.0999 4.5613 20.0999 4.79999V9.29999C20.0999 9.53869 20.0051 9.76761 19.8363 9.93639C19.6675 10.1052 19.4386 10.2 19.1999 10.2H4.7999C4.56121 10.2 4.33229 10.1052 4.16351 9.93639C3.99472 9.76761 3.8999 9.53869 3.8999 9.29999V4.79999C3.8999 4.5613 3.99472 4.33238 4.16351 4.1636C4.33229 3.99482 4.56121 3.89999 4.7999 3.89999V3.89999ZM6.5999 12H11.9999C12.2386 12 12.4675 12.0948 12.6363 12.2636C12.8051 12.4324 12.8999 12.6613 12.8999 12.9V15.6H13.7999V21H10.1999V15.6H11.0999V13.8H5.6999C5.46121 13.8 5.23229 13.7052 5.06351 13.5364C4.89472 13.3676 4.7999 13.1387 4.7999 12.9V11.1H6.5999V12ZM17.1587 13.5588L18.7499 11.9676L20.3411 13.5588C20.6557 13.8735 20.8699 14.2744 20.9567 14.7108C21.0435 15.1473 20.9989 15.5996 20.8286 16.0107C20.6583 16.4218 20.3699 16.7732 19.9999 17.0204C19.6299 17.2676 19.1949 17.3996 18.7499 17.3996C18.3049 17.3996 17.8699 17.2676 17.4999 17.0204C17.1299 16.7732 16.8415 16.4218 16.6712 16.0107C16.5009 15.5996 16.4563 15.1473 16.5431 14.7108C16.6299 14.2744 16.8441 13.8735 17.1587 13.5588V13.5588Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-whatsapp-line" viewBox="0 0 24 24">
|
||||
<path d="M7.72771 17.8446L8.37931 18.2253C9.47816 18.8662 10.7279 19.2026 12 19.2C13.424 19.2 14.8161 18.7777 16.0001 17.9866C17.1842 17.1954 18.107 16.0709 18.6519 14.7553C19.1969 13.4397 19.3395 11.992 19.0617 10.5953C18.7839 9.19869 18.0981 7.91577 17.0912 6.90883C16.0842 5.90189 14.8013 5.21616 13.4047 4.93835C12.008 4.66053 10.5603 4.80312 9.24469 5.34807C7.92906 5.89302 6.80458 6.81586 6.01343 7.99989C5.22228 9.18393 4.80001 10.576 4.80001 12C4.80001 13.2924 5.13931 14.5317 5.77561 15.6216L6.15541 16.2732L5.56771 18.4341L7.72771 17.8446ZM3.00361 21L4.22041 16.5288C3.41864 15.1544 2.9974 13.5912 3.00001 12C3.00001 7.0293 7.02931 3 12 3C16.9707 3 21 7.0293 21 12C21 16.9707 16.9707 21 12 21C10.4095 21.0026 8.847 20.5817 7.47301 19.7805L3.00361 21ZM8.75191 7.7772C8.87251 7.7682 8.99401 7.7682 9.11461 7.7736C9.16321 7.7772 9.21181 7.7826 9.26041 7.788C9.40351 7.8042 9.56101 7.8915 9.61411 8.0121C9.88231 8.6205 10.1433 9.2334 10.3953 9.8481C10.4511 9.9849 10.4178 10.1604 10.3116 10.3314C10.2386 10.447 10.1596 10.5588 10.0749 10.6662C9.97321 10.7967 9.75451 11.0361 9.75451 11.0361C9.75451 11.0361 9.66541 11.1423 9.69961 11.2746C9.71221 11.325 9.75361 11.3979 9.79141 11.4591L9.84451 11.5446C10.0749 11.9289 10.3845 12.3186 10.7625 12.6858C10.8705 12.7902 10.9758 12.8973 11.0892 12.9972C11.5104 13.3689 11.9874 13.6722 12.5022 13.8972L12.5067 13.899C12.5832 13.9323 12.6219 13.9503 12.7335 13.998C12.7893 14.0214 12.8469 14.0421 12.9054 14.0574C12.9659 14.0728 13.0295 14.0699 13.0883 14.0491C13.1471 14.0282 13.1984 13.9904 13.2357 13.9404C13.8873 13.1511 13.9467 13.0998 13.9521 13.0998V13.1016C13.9974 13.0594 14.0512 13.0273 14.1098 13.0076C14.1685 12.9879 14.2307 12.981 14.2923 12.9873C14.3463 12.9909 14.4012 13.0008 14.4516 13.0233C14.9295 13.242 15.7116 13.5831 15.7116 13.5831L16.2354 13.818C16.3236 13.8603 16.4037 13.9602 16.4064 14.0565C16.41 14.1168 16.4154 14.214 16.3947 14.3922C16.3659 14.6253 16.2957 14.9052 16.2255 15.0519C16.1774 15.152 16.1136 15.2438 16.0365 15.3237C15.9457 15.4191 15.8463 15.5058 15.7395 15.5829C15.7026 15.6107 15.6651 15.6377 15.627 15.6639C15.5151 15.7349 15.4001 15.801 15.2823 15.8619C15.0506 15.985 14.7947 16.0556 14.5326 16.0689C14.3661 16.0779 14.1996 16.0905 14.0322 16.0815C14.025 16.0815 13.521 16.0032 13.521 16.0032C12.2414 15.6666 11.0581 15.0361 10.065 14.1618C9.86161 13.9827 9.67351 13.7901 9.48091 13.5984C8.67991 12.8019 8.07511 11.9424 7.70791 11.1306C7.51996 10.7322 7.41844 10.2985 7.41001 9.858C7.4063 9.31157 7.58492 8.7795 7.91761 8.346C7.98331 8.2614 8.04541 8.1732 8.15251 8.0715C8.26681 7.9635 8.33881 7.9059 8.41711 7.8663C8.52122 7.81413 8.63479 7.78352 8.75101 7.7763L8.75191 7.7772Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-book-2-line" viewBox="0 0 24 24">
|
||||
<path d="M20.0999 17.4H6.5999C6.36121 17.4 6.13229 17.4948 5.96351 17.6636C5.79472 17.8324 5.6999 18.0613 5.6999 18.3C5.6999 18.5387 5.79472 18.7676 5.96351 18.9364C6.13229 19.1052 6.36121 19.2 6.5999 19.2H20.0999V21H6.5999C5.88382 21 5.19706 20.7155 4.69071 20.2092C4.18437 19.7028 3.8999 19.0161 3.8999 18.3V4.8C3.8999 4.32261 4.08954 3.86477 4.42711 3.52721C4.76468 3.18964 5.22251 3 5.6999 3H20.0999V17.4ZM5.6999 15.645C5.8457 15.6153 5.996 15.6 6.1499 15.6H18.2999V4.8H5.6999V15.645ZM15.5999 9.3H8.3999V7.5H15.5999V9.3Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-message-line" viewBox="0 0 24 24">
|
||||
<path d="M7.0095 18.3L3 21.45V4.80002C3 4.56133 3.09482 4.33241 3.2636 4.16363C3.43239 3.99485 3.66131 3.90002 3.9 3.90002H20.1C20.3387 3.90002 20.5676 3.99485 20.7364 4.16363C20.9052 4.33241 21 4.56133 21 4.80002V17.4C21 17.6387 20.9052 17.8676 20.7364 18.0364C20.5676 18.2052 20.3387 18.3 20.1 18.3H7.0095ZM6.3867 16.5H19.2V5.70002H4.8V17.7465L6.3867 16.5ZM8.4 10.2H15.6V12H8.4V10.2Z" fill="#0A0D14"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-messenger-line" viewBox="0 0 24 24">
|
||||
<path d="M8.1876 18.5025C8.7186 18.2685 9.3126 18.2244 9.8688 18.3774C10.5618 18.5664 11.2773 18.6618 12 18.66C16.1265 18.66 19.2 15.7017 19.2 11.73C19.2 7.7583 16.1265 4.8 12 4.8C7.8735 4.8 4.8 7.7583 4.8 11.73C4.8 13.773 5.6064 15.5748 7.0194 16.8384C7.27613 17.0658 7.48374 17.3432 7.62952 17.6537C7.7753 17.9641 7.85618 18.301 7.8672 18.6438L8.1876 18.5025ZM12 3C17.0706 3 21 6.7143 21 11.73C21 16.7457 17.0706 20.46 12 20.46C11.1199 20.4623 10.2436 20.346 9.3945 20.1144C9.23502 20.0706 9.06531 20.0829 8.9139 20.1495L7.1283 20.9379C7.02042 20.9856 6.90247 21.006 6.78484 20.9974C6.6672 20.9888 6.55347 20.9515 6.45366 20.8887C6.35384 20.8258 6.27099 20.7394 6.2124 20.637C6.1538 20.5347 6.12125 20.4195 6.1176 20.3016L6.0681 18.6996C6.06486 18.6022 6.0418 18.5065 6.00033 18.4183C5.95886 18.3301 5.89985 18.2512 5.8269 18.1866C4.0755 16.6215 3 14.3553 3 11.73C3 6.7143 6.9303 3 12 3ZM6.5955 14.2833L9.2388 10.0893C9.33825 9.9314 9.46936 9.79583 9.62385 9.69116C9.77834 9.58648 9.95286 9.51497 10.1364 9.48114C10.3199 9.44731 10.5084 9.4519 10.6901 9.49461C10.8718 9.53733 11.0426 9.61724 11.1918 9.7293L13.2942 11.3043C13.3879 11.375 13.5021 11.4133 13.6195 11.4133C13.737 11.4133 13.8512 11.375 13.9449 11.3043L16.7844 9.1479C17.1633 8.8608 17.6583 9.3144 17.4045 9.7176L14.7612 13.9116C14.6617 14.0695 14.5306 14.2051 14.3761 14.3097C14.2217 14.4144 14.0471 14.4859 13.8636 14.5198C13.6801 14.5536 13.4916 14.549 13.3099 14.5063C13.1282 14.4636 12.9574 14.3837 12.8082 14.2716L10.7058 12.6966C10.6121 12.6259 10.4979 12.5876 10.3804 12.5876C10.263 12.5876 10.1488 12.6259 10.0551 12.6966L7.2156 14.8521C6.8367 15.1392 6.3417 14.6856 6.5955 14.2824V14.2833Z" fill="#0A0D14"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-mail-send-fill" viewBox="0 0 24 24">
|
||||
<path d="M2.99995 6.14999V4.79369C3.0016 4.55733 3.09616 4.33111 3.26321 4.16389C3.43026 3.99667 3.65639 3.90188 3.89275 3.89999H20.1072C20.6003 3.89999 21 4.30049 21 4.79369V19.2063C20.9983 19.4427 20.9037 19.6689 20.7367 19.8361C20.5696 20.0033 20.3435 20.0981 20.1072 20.1H3.89275C3.65588 20.0998 3.4288 20.0055 3.26139 19.8379C3.09398 19.6703 2.99995 19.4432 2.99995 19.2063V18.3H19.2V7.76999L12 14.25L2.99995 6.14999ZM1.19995 10.2H5.69995V12H1.19995V10.2ZM1.19995 14.7H8.39995V16.5H1.19995V14.7Z" fill="#0A0D14"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-chat-smile-3-line" viewBox="0 0 24 24">
|
||||
<path d="M3.00001 12C3.00001 7.0293 7.02931 3 12 3C16.9707 3 21 7.0293 21 12C21 16.9707 16.9707 21 12 21H3.00001L5.63611 18.3639C4.79914 17.5291 4.13539 16.5371 3.683 15.445C3.23061 14.3529 2.9985 13.1821 3.00001 12ZM7.34521 19.2H12C13.424 19.2 14.8161 18.7777 16.0001 17.9866C17.1841 17.1954 18.107 16.0709 18.6519 14.7553C19.1969 13.4397 19.3395 11.992 19.0617 10.5953C18.7838 9.19869 18.0981 7.91577 17.0912 6.90883C16.0842 5.90189 14.8013 5.21616 13.4047 4.93835C12.008 4.66053 10.5603 4.80312 9.24469 5.34807C7.92906 5.89302 6.80457 6.81586 6.01343 7.99989C5.22228 9.18393 4.80001 10.576 4.80001 12C4.80001 13.9368 5.56591 15.7485 6.90871 17.0913L8.18131 18.3639L7.34521 19.2ZM8.40001 12.9H15.6C15.6 13.8548 15.2207 14.7705 14.5456 15.4456C13.8705 16.1207 12.9548 16.5 12 16.5C11.0452 16.5 10.1296 16.1207 9.45442 15.4456C8.77929 14.7705 8.40001 13.8548 8.40001 12.9Z" fill="#0A0D14"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-telegram-line" viewBox="0 0 24 24">
|
||||
<path d="M12 19.2C13.9096 19.2 15.7409 18.4414 17.0912 17.0912C18.4414 15.7409 19.2 13.9096 19.2 12C19.2 10.0904 18.4414 8.25909 17.0912 6.90883C15.7409 5.55857 13.9096 4.8 12 4.8C10.0904 4.8 8.25909 5.55857 6.90883 6.90883C5.55857 8.25909 4.8 10.0904 4.8 12C4.8 13.9096 5.55857 15.7409 6.90883 17.0912C8.25909 18.4414 10.0904 19.2 12 19.2ZM12 21C7.0293 21 3 16.9707 3 12C3 7.0293 7.0293 3 12 3C16.9707 3 21 7.0293 21 12C21 16.9707 16.9707 21 12 21ZM9.201 13.053L6.9528 12.3519C6.4668 12.2034 6.4641 11.8686 7.0617 11.6283L15.8214 8.2443C16.3299 8.0373 16.6179 8.2992 16.4532 8.9553L14.9619 15.9933C14.8575 16.4946 14.556 16.6143 14.1375 16.383L11.8416 14.6838L10.7715 15.717C10.6617 15.8232 10.5726 15.9141 10.4034 15.9366C10.2351 15.96 10.0965 15.9096 9.9948 15.6306L9.2118 13.0467L9.201 13.0539V13.053Z" fill="#0A0D14"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-line-line" viewBox="0 0 24 24">
|
||||
<path d="M21 10.821C21 12.4293 20.3817 13.881 19.0893 15.2976C17.1993 17.4702 12.9801 20.1243 12.0117 20.5284C11.0451 20.9343 11.1918 20.2701 11.2251 20.0451L11.3484 19.2801C11.379 19.0443 11.4096 18.6951 11.3196 18.4701C11.2188 18.2208 10.8192 18.0885 10.5267 18.0273C6.2022 17.4531 3 14.43 3 10.821C3 6.79347 7.0383 3.51477 12 3.51477C16.9608 3.51477 21 6.79347 21 10.821ZM17.76 14.0835C18.7617 12.9855 19.2 11.9586 19.2 10.821C19.2 7.87977 16.041 5.31477 12 5.31477C7.959 5.31477 4.8 7.87977 4.8 10.821C4.8 13.4355 7.2552 15.7773 10.7634 16.2426L10.8957 16.266C11.8659 16.4694 12.5913 16.8186 12.9918 17.8032L13.0242 17.8896C14.6496 16.8312 16.7808 15.2076 17.7591 14.0835H17.76ZM17.5242 10.4835C17.6445 10.4909 17.7574 10.5439 17.8399 10.6317C17.9225 10.7195 17.9684 10.8355 17.9684 10.956C17.9684 11.0765 17.9225 11.1924 17.8399 11.2802C17.7574 11.368 17.6445 11.421 17.5242 11.4285H16.2075V12.2727H17.5233C17.587 12.2699 17.6507 12.28 17.7104 12.3025C17.77 12.325 17.8246 12.3593 17.8707 12.4034C17.9167 12.4475 17.9534 12.5005 17.9785 12.5591C18.0035 12.6178 18.0164 12.6809 18.0164 12.7447C18.0164 12.8085 18.0035 12.8716 17.9785 12.9303C17.9534 12.989 17.9167 13.0419 17.8707 13.086C17.8246 13.1301 17.77 13.1645 17.7104 13.1869C17.6507 13.2094 17.587 13.2196 17.5233 13.2168H15.735C15.6104 13.2158 15.4912 13.1658 15.4032 13.0775C15.3153 12.9892 15.2657 12.8698 15.2652 12.7452V9.16677C15.2652 8.90847 15.4767 8.69427 15.7377 8.69427H17.5269C17.6522 8.69463 17.7723 8.74475 17.8606 8.83362C17.949 8.92248 17.9984 9.04281 17.998 9.16812C17.9977 9.29344 17.9476 9.41348 17.8587 9.50183C17.7698 9.59019 17.6495 9.63963 17.5242 9.63927H16.2084V10.4835H17.5242ZM14.6325 12.7452C14.6323 12.8071 14.6198 12.8684 14.5959 12.9255C14.572 12.9826 14.5371 13.0345 14.4931 13.0781C14.4491 13.1217 14.397 13.1563 14.3397 13.1798C14.2824 13.2032 14.221 13.2152 14.1591 13.215C14.085 13.2166 14.0116 13.2005 13.9451 13.1679C13.8785 13.1353 13.8208 13.0873 13.7766 13.0278L11.9442 10.5402V12.7452C11.9352 12.864 11.8817 12.975 11.7943 13.056C11.7069 13.137 11.5922 13.182 11.4731 13.182C11.3539 13.182 11.2392 13.137 11.1518 13.056C11.0644 12.975 11.0109 12.864 11.0019 12.7452V9.16677C11.0017 9.04233 11.0508 8.92287 11.1385 8.83462C11.2263 8.74638 11.3455 8.69655 11.4699 8.69607C11.6157 8.69607 11.7507 8.77347 11.8407 8.88597L13.6875 11.3835V9.16677C13.6875 8.90847 13.899 8.69427 14.16 8.69427C14.4183 8.69427 14.6325 8.90847 14.6325 9.16677V12.7452ZM10.3269 12.7452C10.3262 12.8703 10.276 12.9902 10.1873 13.0785C10.0987 13.1668 9.97867 13.2165 9.8535 13.2168C9.72873 13.2161 9.60928 13.1661 9.52113 13.0778C9.43299 12.9895 9.38327 12.8699 9.3828 12.7452V9.16677C9.3828 8.90847 9.5952 8.69427 9.8553 8.69427C10.1154 8.69427 10.3269 8.90847 10.3269 9.16677V12.7452ZM8.4774 13.2168H6.6873C6.56236 13.2161 6.44272 13.1662 6.35429 13.0779C6.26586 12.9897 6.21574 12.8701 6.2148 12.7452V9.16677C6.22513 9.04857 6.27938 8.93854 6.36685 8.85838C6.45432 8.77822 6.56865 8.73375 6.6873 8.73375C6.80595 8.73375 6.92028 8.77822 7.00775 8.85838C7.09522 8.93854 7.14947 9.04857 7.1598 9.16677V12.2718H8.4774C8.60272 12.2718 8.7229 12.3216 8.81151 12.4102C8.90012 12.4988 8.9499 12.619 8.9499 12.7443C8.9499 12.8696 8.90012 12.9898 8.81151 13.0784C8.7229 13.167 8.60272 13.2168 8.4774 13.2168Z" fill="#0A0D14"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-eyeglass" viewBox="0 0 48 48">
|
||||
<path d="M27.885 32.515c-2.864 1.966-6.333 3.116-10.07 3.116C7.976 35.63 0 27.656 0 17.817 0 7.976 7.976 0 17.816 0S35.63 7.976 35.63 17.816c0 3.736-1.15 7.205-3.115 10.07l14.53 14.53c1.278 1.277 1.275 3.352 0 4.628-1.28 1.278-3.353 1.278-4.63 0l-14.53-14.53zm-10.07-3.736c6.056 0 10.964-4.91 10.964-10.964 0-6.055-4.91-10.964-10.964-10.964-6.055 0-10.964 4.91-10.964 10.964 0 6.055 4.91 10.963 10.964 10.963z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-tick-line" viewBox="0 0 24 24">
|
||||
<path d="M4.53 12.97a.75.75 0 0 0-1.06 1.06l4.5 4.5a.75.75 0 0 0 1.06 0l11-11a.75.75 0 0 0-1.06-1.06L8.5 16.94l-3.97-3.97Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
<symbol id="icon-lock-line" viewBox="0 0 24 24">
|
||||
<path d="M18.3 10.2H19.2C19.4387 10.2 19.6676 10.2948 19.8364 10.4636C20.0052 10.6324 20.1 10.8613 20.1 11.1V20.1C20.1 20.3387 20.0052 20.5676 19.8364 20.7364C19.6676 20.9052 19.4387 21 19.2 21H4.80002C4.56133 21 4.33241 20.9052 4.16363 20.7364C3.99485 20.5676 3.90002 20.3387 3.90002 20.1V11.1C3.90002 10.8613 3.99485 10.6324 4.16363 10.4636C4.33241 10.2948 4.56133 10.2 4.80002 10.2H5.70002V9.3C5.70002 8.47267 5.86298 7.65345 6.17958 6.88909C6.49619 6.12474 6.96024 5.43024 7.54525 4.84523C8.13026 4.26022 8.82477 3.79616 9.58912 3.47956C10.3535 3.16295 11.1727 3 12 3C12.8274 3 13.6466 3.16295 14.4109 3.47956C15.1753 3.79616 15.8698 4.26022 16.4548 4.84523C17.0398 5.43024 17.5039 6.12474 17.8205 6.88909C18.1371 7.65345 18.3 8.47267 18.3 9.3V10.2ZM5.70002 12V19.2H18.3V12H5.70002ZM11.1 13.8H12.9V17.4H11.1V13.8ZM16.5 10.2V9.3C16.5 8.10653 16.0259 6.96193 15.182 6.11802C14.3381 5.27411 13.1935 4.8 12 4.8C10.8066 4.8 9.66196 5.27411 8.81804 6.11802C7.97413 6.96193 7.50002 8.10653 7.50002 9.3V10.2H16.5Z" fill="currentColor"/>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="icon-up-caret" viewBox="0 0 48 48">
|
||||
<path d="M2.988 33.02c-1.66 0-1.943-.81-.618-1.824l20-15.28c.878-.672 2.31-.67 3.188 0l20.075 15.288c1.316 1.003 1.048 1.816-.62 1.816H2.987z" />
|
||||
</symbol>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 31 KiB |
@@ -19,3 +19,33 @@ by providing a `content_for(:javascript)` block.
|
||||
$.ajaxSetup({ async: false });
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
window.chatwootSettings = {
|
||||
hideMessageBubble: true,
|
||||
};
|
||||
|
||||
(function(d,t) {
|
||||
var BASE_URL = '';
|
||||
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src= BASE_URL + "/packs/js/sdk.js";
|
||||
g.defer = true;
|
||||
g.async = true;
|
||||
s.parentNode.insertBefore(g,s);
|
||||
g.onload=function(){
|
||||
window.chatwootSDK.run({
|
||||
websiteToken: '<%= ChatwootHub.support_config[:support_website_token] %>',
|
||||
baseUrl: '<%= ChatwootHub.support_config[:support_script_url] %>'
|
||||
})
|
||||
}
|
||||
})(document,"script");
|
||||
|
||||
window.addEventListener('chatwoot:ready', function() {
|
||||
window.$chatwoot.setUser('<%= ChatwootHub.installation_identifier %>', {
|
||||
identifier_hash: '<%= ChatwootHub.support_config[:support_identifier_hash] %>',
|
||||
email: '<%= SuperAdmin.first.email %>',
|
||||
name: '<%= SuperAdmin.first.name %>'
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
9
app/views/super_admin/application/_nav_item.html.erb
Normal file
9
app/views/super_admin/application/_nav_item.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<li
|
||||
class="px-4 border-l-4 mb-1 <%= current_page?(url) ? 'border-woot-500' : 'border-transparent' %>"
|
||||
>
|
||||
<% text_class_name = current_page?(url) ? 'text-woot-500 bg-slate-25' : 'text-slate-800' %>
|
||||
<%= link_to(url, class: text_class_name + " -ml-1 focus:outline-none cursor-pointer flex items-center px-2 py-1.5 text-slate-800 cursor-pointer hover:text-woot-500 hover:bg-slate-25 rounded-lg") do %>
|
||||
<svg width="16" height="16"><use xlink:href="#<%= icon %>" /></svg>
|
||||
<span class="ml-2 text-sm"><%= label %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -6,88 +6,57 @@ By default, the navigation contains navigation links
|
||||
for all resources in the admin dashboard,
|
||||
as defined by the routes in the `admin/` namespace
|
||||
%>
|
||||
|
||||
<%= javascript_pack_tag 'superadmin_pages' %>
|
||||
<%= stylesheet_pack_tag 'superadmin_pages' %>
|
||||
|
||||
|
||||
<%
|
||||
sidebar_icons = {
|
||||
accounts: 'ion ion-briefcase',
|
||||
users: 'ion ion-person-stalker',
|
||||
super_admins: 'ion ion-unlocked',
|
||||
access_tokens: 'ion-key',
|
||||
platform_apps: 'ion ion-social-buffer',
|
||||
installation_configs: 'ion ion-settings',
|
||||
agent_bots: 'ion ion-social-android',
|
||||
accounts: 'icon-building-4-line',
|
||||
users: 'icon-user-follow-line',
|
||||
platform_apps: 'icon-apps-2-line',
|
||||
agent_bots: 'icon-robot-line',
|
||||
}
|
||||
%>
|
||||
|
||||
<div class="navigation" role="navigation">
|
||||
<div class="logo-brand">
|
||||
<%= link_to image_tag('/brand-assets/logo.svg', alt: 'Chatwoot Admin Dashboard'), super_admin_root_url %>
|
||||
<div class="app-version">v<%= Chatwoot.config[:version] %></div>
|
||||
<div class="border-slate-100 border-r w-56 flex-shrink-0 justify-between h-full flex flex-col" role="navigation">
|
||||
<div>
|
||||
<div class="flex mx-4 mb-4 border-slate-100 border-b py-6">
|
||||
<%= link_to image_tag('/brand-assets/logo_thumbnail.svg', alt: 'Chatwoot Admin Dashboard', class: 'h-10'), super_admin_root_url %>
|
||||
<div class="flex flex-col ml-3">
|
||||
<div class="text-sm">Chatwoot <%= Chatwoot.config[:version] %></div>
|
||||
<div class="text-xs text-slate-700 mt-0.5">Super Admin Console</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="my-4">
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-grid-line', url: super_admin_root_url, label: 'Dashboard' } %>
|
||||
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
|
||||
<% next if ["account_users", "access_tokens", "installation_configs", "dashboard", "devise/sessions", "app_configs", "instance_statuses", "responses", "response_sources", "response_documents" , "settings"].include? resource.resource %>
|
||||
<%= render partial: "nav_item", locals: {
|
||||
icon: sidebar_icons[resource.resource.to_sym],
|
||||
url: resource_index_route(resource),
|
||||
label: display_resource_name(resource),
|
||||
}
|
||||
%>
|
||||
<% end %>
|
||||
<hr class="border-slate-100 border-t my-5 mx-4"/>
|
||||
<% if InstallationConfig.find_by(name: 'DEPLOYMENT_ENV')&.value == 'cloud' || Rails.env.development? %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-folder-3-line', url: super_admin_response_sources_url, label: 'Sources' } %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-draft-line', url: super_admin_response_documents_url, label: 'Documents' } %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-reply-line', url: super_admin_responses_url, label: 'Responses' } %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="my-4">
|
||||
<% if ChatwootApp.enterprise? %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-settings-2-line', url: super_admin_settings_url, label: 'Settings' } %>
|
||||
<% end %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-mist-fill', url: sidekiq_web_url, label: 'Sidekiq Dashboard' } %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-health-book-line', url: super_admin_instance_status_url, label: 'Instance Health' } %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-dashboard-line', url: '/', label: 'Agent Dashboard' } %>
|
||||
<%= render partial: "nav_item", locals: { icon: 'icon-logout-circle-r-line', url: super_admin_logout_url, label: 'Logout' } %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-ios-keypad"></i>
|
||||
<%= link_to "Dashboard", super_admin_root_url %>
|
||||
</li>
|
||||
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-android-settings"></i>
|
||||
<%= link_to "App Config", super_admin_app_config_url %>
|
||||
</li>
|
||||
|
||||
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
|
||||
<% next if ["account_users", "dashboard", "devise/sessions", "app_configs", "instance_statuses", "responses", "response_sources", "response_documents" ].include? resource.resource %>
|
||||
<li class="navigation__link navigation__link--<%= nav_link_state(resource) %>">
|
||||
<i class="<%= sidebar_icons[resource.resource.to_sym] %>"></i>
|
||||
<%= link_to(
|
||||
display_resource_name(resource),
|
||||
resource_index_route(resource)
|
||||
) if existing_action? resource, :index %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if InstallationConfig.find_by(name: 'DEPLOYMENT_ENV')&.value == 'cloud' || Rails.env.development? %>
|
||||
<hr/>
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-help-buoy"></i>
|
||||
<%= link_to "Sources", super_admin_response_sources_url %>
|
||||
</li>
|
||||
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-document-text"></i>
|
||||
<%= link_to "Documents", super_admin_response_documents_url %>
|
||||
</li>
|
||||
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-help"></i>
|
||||
<%= link_to "Responses", super_admin_responses_url %>
|
||||
</li>
|
||||
<hr/>
|
||||
<% end %>
|
||||
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-medkit"></i>
|
||||
<%= link_to "Instance Health", super_admin_instance_status_url %>
|
||||
</li>
|
||||
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion ion-network"></i>
|
||||
<%= link_to "Sidekiq", sidekiq_web_url, { target: "_blank" } %>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="logout">
|
||||
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-log-out"></i>
|
||||
<%= link_to "Logout", super_admin_logout_url %>
|
||||
</li>
|
||||
<li class="navigation__link">
|
||||
<i class="ion ion-android-contacts"></i>
|
||||
<%= link_to "Agent Dashboard", '/' %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -5,42 +5,45 @@
|
||||
<%= javascript_pack_tag 'superadmin' %>
|
||||
<%= stylesheet_pack_tag 'superadmin' %>
|
||||
</head>
|
||||
<body data-gr-c-s-loaded="true">
|
||||
<div id="app" class="superadmin-body app-wrapper app-root">
|
||||
<div class="medium column login">
|
||||
<div class="text-center medium-12 login__hero align-self-top">
|
||||
<h2 class="hero__title">
|
||||
<body>
|
||||
<div class="h-full w-full antialiased">
|
||||
<main class="flex flex-col bg-woot-25 min-h-screen w-full py-20 sm:px-6 lg:px-8 dark:bg-slate-900">
|
||||
<section class="max-w-5xl mx-auto">
|
||||
<img src="/brand-assets/logo.svg" alt="Chatwoot" class="mx-auto h-8 w-auto block dark:hidden">
|
||||
<img src="/brand-assets/logo_dark.svg" alt="Chatwoot" class="mx-auto h-8 w-auto hidden dark:block">
|
||||
<h2 class="mt-6 text-center text-3xl font-medium text-slate-900 dark:text-woot-50">
|
||||
Howdy, admin 👋
|
||||
</h2>
|
||||
</div>
|
||||
<div class="row align-center">
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= form_for(resource, as: resource_name, url: '/super_admin/sign_in', html: { class: 'login-box column align-self-top'}) do |f| %>
|
||||
<div class="column log-in-form">
|
||||
<% if flash[:error].present? %>
|
||||
<div data-alert class="alert-box warning"><%= flash[:error] %></div>
|
||||
<% end %>
|
||||
<label>
|
||||
Email
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: "Email eg: someone@example.com" %>
|
||||
</section>
|
||||
<section class="bg-white shadow sm:mx-auto mt-11 sm:w-full sm:max-w-lg dark:bg-slate-800 p-11 sm:shadow-lg sm:rounded-lg mb-8 mt-15">
|
||||
<div>
|
||||
<%= form_for(resource, as: resource_name, url: '/super_admin/sign_in') do |f| %>
|
||||
<% if flash[:error].present? %>
|
||||
<div data-alert class="rounded-md bg-red-500 p-4 text-white text-sm mb-5"><%= flash[:error] %></div>
|
||||
<% end %>
|
||||
<div class="mb-5">
|
||||
<label for="email_address" class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white">
|
||||
Email Address
|
||||
</label>
|
||||
<label>
|
||||
Password
|
||||
<%= f.password_field :password, autocomplete: "current-password", placeholder: "Password" %>
|
||||
</label>
|
||||
<p>
|
||||
<%= f.check_box :remember_me %> Remember me
|
||||
</p>
|
||||
<button type="submit" class="button nice large expanded">
|
||||
Login
|
||||
</button>
|
||||
<div class="mt-1">
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: "Email eg: someone@example.com", class: "block w-full rounded-md border-0 px-3 py-3 appearance-none shadow-sm ring-1 ring-inset text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-woot-500 sm:text-sm sm:leading-6 outline-none dark:bg-slate-700 dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-5">
|
||||
<label for="password" class="flex justify-between text-sm font-medium leading-6 text-slate-900 dark:text-white">
|
||||
Password
|
||||
</label>
|
||||
<div class="mt-1">
|
||||
<%= f.password_field :password, autocomplete: "current-password", placeholder: "Password", class: "block w-full rounded-md border-0 px-3 py-3 appearance-none shadow-sm ring-1 ring-inset text-slate-900 dark:text-slate-100 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-woot-500 sm:text-sm sm:leading-6 outline-none dark:bg-slate-700 dark:ring-slate-600 dark:focus:ring-woot-500 ring-slate-200" %>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="flex items-center w-full justify-center rounded-md bg-woot-500 py-3 px-3 text-base font-medium text-white shadow-sm hover:bg-woot-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-woot-500 cursor-pointer">
|
||||
<span>Login</span>
|
||||
</button>
|
||||
<% end %>
|
||||
<div class="column text-center sigin__footer">
|
||||
© Chatwoot
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% content_for(:title) do %>
|
||||
Instance Health
|
||||
Instance Status
|
||||
<% end %>
|
||||
<header class="main-content__header" role="banner">
|
||||
<h1 class="main-content__page-title" id="page-title">
|
||||
@@ -15,7 +15,7 @@
|
||||
<% @metrics.each do |key,value| %>
|
||||
<tr>
|
||||
<td> <%= key %> </td>
|
||||
<td> <%= value %> </td>
|
||||
<td> <%= value %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
89
app/views/super_admin/settings/show.html.erb
Normal file
89
app/views/super_admin/settings/show.html.erb
Normal file
@@ -0,0 +1,89 @@
|
||||
<% content_for(:title) do %>
|
||||
Settings
|
||||
<% end %>
|
||||
<header class="flex mx-8 py-4 items-center border-b border-solid border-slate-100" role="banner">
|
||||
<div class="border border-solid border-slate-100 text-slate-700 mr-4 p-2 rounded-full">
|
||||
<svg width="24" height="24"><use xlink:href="#icon-settings-2-line" /></svg>
|
||||
</div>
|
||||
<div class="flex flex-col h-14 justify-center">
|
||||
<h1 class="text-base font-medium leading-6 text-slate-900" id="page-title">
|
||||
<%= content_for(:title) %>
|
||||
</h1>
|
||||
<p class="text-sm font-normal leading-5 text-slate-500 m-0">Update your instance settings, access billing portal</p>
|
||||
</div>
|
||||
</header>
|
||||
<section class="main-content__body">
|
||||
<div class="bg-white py-2 px-3">
|
||||
<div class="mb-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2 class="h-5 leading-5 text-slate-900 font-medium">Current plan</h2>
|
||||
<a href="<%= refresh_super_admin_settings_url %>" class="inline-flex gap-1 text-xs font-medium items-center text-woot-500 hover:text-woot-700">
|
||||
<svg width="16" height="16"><use xlink:href="#icon-refresh-line" /></svg>
|
||||
<span>Refresh</span>
|
||||
</a>
|
||||
</div>
|
||||
<p class="text-slate-600 mt-1">You are currently on the <span class="font-semibold"><%= ChatwootHub.pricing_plan %></span> edition plan.</p>
|
||||
<div class="flex items-center mt-6">
|
||||
<h4 class="text-sm font-medium leading-5 h-5 text-slate-900 mr-4">Installation Identifier</h4>
|
||||
<span class="text-sm leading-5 h-5 text-slate-600"><%= ChatwootHub.installation_identifier %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex p-4 border border-solid border-slate-100 rounded-lg mt-8 items-start md:items-center shadow-sm flex-col md:flex-row">
|
||||
<div class="flex flex-col flex-grow gap-1">
|
||||
<h2 class="h-5 leading-5 text-slate-900 text-sm font-medium">Current plan</h2>
|
||||
<p class="text-slate-600 m-0 text-sm">You are currently on the <span class="font-semibold"><%= ChatwootHub.pricing_plan %></span> edition plan.</p>
|
||||
</div>
|
||||
<a href="https://www.chatwoot.com/pricing/self-hosted-plans?utm_source=chatwoot_superadmin" target="_blank" rel="noopener noreferrer">
|
||||
<button class="mt-4 md:mt-0 flex gap-1 items-center bg-transparent shadow-sm h-9 hover:bg-slate-100 hover:text-slate-800 border border-solid border-slate-100 rounded text-slate-700 font-medium p-2">
|
||||
<svg width="16" height="16"><use xlink:href="#icon-settings-2-line" /></svg>
|
||||
<span class="px-1">Manage</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex p-4 border border-solid border-slate-100 rounded-lg mt-4 items-start md:items-center shadow-sm flex-col md:flex-row">
|
||||
<div class="flex flex-col flex-grow gap-1">
|
||||
<h2 class="h-5 leading-5 text-slate-900 text-sm font-medium">Need help?</h2>
|
||||
<p class="text-slate-600 m-0 text-sm">Do you face any issues? We are here to help.</p>
|
||||
</div>
|
||||
<a href="https://discord.gg/cJXdrwS" target="_blank">
|
||||
<button class="flex mt-4 md:mt-0 gap-1 items-center bg-transparent shadow-sm h-9 bg-violet-500 hover:bg-violet-600 text-violet-100 hover:text-violet-200 border border-solid border-violet-600 rounded font-medium p-2">
|
||||
<svg class="h-4 w-4" width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10a9.96 9.96 0 0 1-4.587-1.112l-3.826 1.067a1.25 1.25 0 0 1-1.54-1.54l1.068-3.823A9.96 9.96 0 0 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5A8.5 8.5 0 0 0 3.5 12c0 1.47.373 2.883 1.073 4.137l.15.27-1.112 3.984 3.987-1.112.27.15A8.5 8.5 0 1 0 12 3.5ZM8.75 13h4.498a.75.75 0 0 1 .102 1.493l-.102.007H8.75a.75.75 0 0 1-.102-1.493L8.75 13h4.498H8.75Zm0-3.5h6.505a.75.75 0 0 1 .101 1.493l-.101.007H8.75a.75.75 0 0 1-.102-1.493L8.75 9.5h6.505H8.75Z" fill="currentColor"/></svg>
|
||||
<span class="px-1">Community Support</span>
|
||||
</button>
|
||||
</a>
|
||||
<% if ChatwootHub.pricing_plan !='community' %>
|
||||
<button class="ml-4 flex gap-1 items-center bg-transparent h-9 hover:bg-slate-100 hover:text-slate-800 border border-solid border-slate-100 rounded text-slate-700 font-medium p-2" onclick="window.$chatwoot.toggle('open')">
|
||||
<svg class="h-4 w-4" width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10a9.96 9.96 0 0 1-4.587-1.112l-3.826 1.067a1.25 1.25 0 0 1-1.54-1.54l1.068-3.823A9.96 9.96 0 0 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5A8.5 8.5 0 0 0 3.5 12c0 1.47.373 2.883 1.073 4.137l.15.27-1.112 3.984 3.987-1.112.27.15A8.5 8.5 0 1 0 12 3.5ZM8.75 13h4.498a.75.75 0 0 1 .102 1.493l-.102.007H8.75a.75.75 0 0 1-.102-1.493L8.75 13h4.498H8.75Zm0-3.5h6.505a.75.75 0 0 1 .101 1.493l-.101.007H8.75a.75.75 0 0 1-.102-1.493L8.75 9.5h6.505H8.75Z" fill="currentColor"/></svg>
|
||||
<span class="px-1">Chat Support</span>
|
||||
</button>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="mt-10 py-4">
|
||||
<h3 class="h-5 leading-5 text-slate-900 font-medium text-base">Features</h3>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-2 gap-y-3">
|
||||
<% SuperAdmin::FeaturesHelper.available_features.each do |feature, attrs| %>
|
||||
<div class="group border-slate-100 border p-4 rounded-lg relative shadow-sm">
|
||||
<span class="<%= attrs[:enabled] ? 'bg-green-400 text-white': 'bg-slate-300 text-slate-800' %> absolute rounded-full p-1 inline-flex right-4 top-5">
|
||||
<svg width="14" height="14"><use xlink:href="<%= attrs[:enabled] ? '#icon-tick-line': '#icon-lock-line' %>" /></svg>
|
||||
</span>
|
||||
<div class="visible <% if !attrs[:enabled] %> group-hover:invisible <% end %> flex items-center justify-center w-10 h-10 mb-2 border border-slate-100 border-solid text-slate-800 rounded-full">
|
||||
<svg width="20" height="20"><use xlink:href="#<%= attrs[:icon] %>" /></svg>
|
||||
</div>
|
||||
<% if !attrs[:enabled] %>
|
||||
<div class="flex h-9 absolute top-5 items-center invisible group-hover:visible">
|
||||
<a href="https://www.chatwoot.com/pricing/self-hosted-plans?utm_source=chatwoot_superadmin" target="_blank" rel="noopener noreferrer" class="flex gap-1 items-center bg-slate-100 h-9 hover:bg-slate-300 hover:text-slate-900 border border-solid border-slate-100 rounded text-slate-600 font-medium p-2">
|
||||
<svg class="h-4 w-4" width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.209 3.103c-.495-1.004-1.926-1.004-2.421 0L8.43 7.88l-5.273.766c-1.107.161-1.55 1.522-.748 2.303l3.815 3.72-.9 5.25c-.19 1.103.968 1.944 1.959 1.424l4.715-2.48 4.716 2.48c.99.52 2.148-.32 1.96-1.424l-.902-5.25 3.816-3.72c.8-.78.359-2.142-.748-2.303l-5.273-.766-2.358-4.777ZM9.74 8.615l2.258-4.576 2.259 4.576a1.35 1.35 0 0 0 1.016.738l5.05.734-3.654 3.562a1.35 1.35 0 0 0-.388 1.195l.862 5.03-4.516-2.375a1.35 1.35 0 0 0-1.257 0l-4.516 2.374.862-5.029a1.35 1.35 0 0 0-.388-1.195l-3.654-3.562 5.05-.734c.44-.063.82-.34 1.016-.738ZM1.164 3.782a.75.75 0 0 0 .118 1.054l2.5 2a.75.75 0 1 0 .937-1.172l-2.5-2a.75.75 0 0 0-1.055.118Z" fill="currentColor"/><path d="M22.836 18.218a.75.75 0 0 0-.117-1.054l-2.5-2a.75.75 0 0 0-.938 1.172l2.5 2a.75.75 0 0 0 1.055-.117ZM1.282 17.164a.75.75 0 1 0 .937 1.172l2.5-2a.75.75 0 0 0-.937-1.172l-2.5 2ZM22.836 3.782a.75.75 0 0 1-.117 1.054l-2.5 2a.75.75 0 0 1-.938-1.172l2.5-2a.75.75 0 0 1 1.055.118Z" fill="currentColor"/></svg>
|
||||
<span class="px-1">Upgrade now</span>
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex items-center justify-between mb-1.5 mt-4">
|
||||
<h3 class="text-slate-900 font-medium"><%= attrs[:name] %></h3>
|
||||
</div>
|
||||
<p class="text-slate-600 mb-0"><%= attrs[:description] %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -74,3 +74,11 @@
|
||||
value:
|
||||
- name: LOGO_DARK
|
||||
value: '/brand-assets/logo_dark.svg'
|
||||
- name: INSTALLATION_PRICING_PLAN
|
||||
value: 'community'
|
||||
- name: CHATWOOT_SUPPORT_WEBSITE_TOKEN
|
||||
value:
|
||||
- name: CHATWOOT_SUPPORT_SCRIPT_URL
|
||||
value:
|
||||
- name: CHATWOOT_SUPPORT_IDENTIFIER_HASH
|
||||
value:
|
||||
|
||||
@@ -444,6 +444,10 @@ Rails.application.routes.draw do
|
||||
resources :platform_apps, only: [:index, :new, :create, :show, :edit, :update]
|
||||
resource :instance_status, only: [:show]
|
||||
|
||||
resource :settings, only: [:show] do
|
||||
get :refresh, on: :collection
|
||||
end
|
||||
|
||||
# resources that doesn't appear in primary navigation in super admin
|
||||
resources :account_users, only: [:new, :create, :destroy]
|
||||
end
|
||||
|
||||
60
enterprise/app/helpers/super_admin/features.yml
Normal file
60
enterprise/app/helpers/super_admin/features.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
custom_branding:
|
||||
name: 'Custom Branding'
|
||||
description: 'Apply your own branding to this installation.'
|
||||
enabled: <%= (ChatwootHub.pricing_plan != 'community') %>
|
||||
icon: 'icon-paint-brush-line'
|
||||
agent_capacity:
|
||||
name: 'Agent Capacity'
|
||||
description: 'Set limits to auto-assigning conversations to your agents.'
|
||||
enabled: <%= (ChatwootHub.pricing_plan != 'community') %>
|
||||
icon: 'icon-hourglass-line'
|
||||
audit_logs:
|
||||
name: 'Audit Logs'
|
||||
description: 'Track and trace account activities with ease with detailed audit logs.'
|
||||
enabled: <%= (ChatwootHub.pricing_plan != 'community') %>
|
||||
icon: 'icon-menu-search-line'
|
||||
disable_branding:
|
||||
name: 'Disable Branding'
|
||||
description: 'Disable branding on live-chat widget and external emails.'
|
||||
enabled: <%= (ChatwootHub.pricing_plan != 'community') %>
|
||||
icon: 'icon-sailbot-fill'
|
||||
live_chat:
|
||||
name: 'Live Chat'
|
||||
description: 'Improve your customer experience using a live chat on your website.'
|
||||
enabled: true
|
||||
icon: 'icon-chat-smile-3-line'
|
||||
email:
|
||||
name: 'Email'
|
||||
description: 'Manage your email customer interactions from Chatwoot.'
|
||||
enabled: true
|
||||
icon: 'icon-mail-send-fill'
|
||||
messenger:
|
||||
name: 'Messenger'
|
||||
description: 'Stay connected with your customers on Facebook & Instagram.'
|
||||
enabled: true
|
||||
icon: 'icon-messenger-line'
|
||||
whatsapp:
|
||||
name: 'WhatsApp'
|
||||
description: 'Manage your WhatsApp business interactions from Chatwoot.'
|
||||
enabled: true
|
||||
icon: 'icon-whatsapp-line'
|
||||
telegram:
|
||||
name: 'Telegram'
|
||||
description: 'Manage your Telegram customer interactions from Chatwoot.'
|
||||
enabled: true
|
||||
icon: 'icon-telegram-line'
|
||||
line:
|
||||
name: 'Line'
|
||||
description: 'Manage your Line customer interactions from Chatwoot.'
|
||||
enabled: true
|
||||
icon: 'icon-line-line'
|
||||
sms:
|
||||
name: 'SMS'
|
||||
description: 'Manage your SMS customer interactions from Chatwoot.'
|
||||
enabled: true
|
||||
icon: 'icon-message-line'
|
||||
help_center:
|
||||
name: 'Help Center'
|
||||
description: 'Allow agents to create help center articles and publish them in a portal.'
|
||||
enabled: true
|
||||
icon: 'icon-book-2-line'
|
||||
5
enterprise/app/helpers/super_admin/features_helper.rb
Normal file
5
enterprise/app/helpers/super_admin/features_helper.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module SuperAdmin::FeaturesHelper
|
||||
def self.available_features
|
||||
YAML.load(ERB.new(Rails.root.join('enterprise/app/helpers/super_admin/features.yml').read).result).with_indifferent_access
|
||||
end
|
||||
end
|
||||
@@ -11,6 +11,18 @@ class ChatwootHub
|
||||
identifier
|
||||
end
|
||||
|
||||
def self.pricing_plan
|
||||
InstallationConfig.find_by(name: 'INSTALLATION_PRICING_PLAN')&.value || 'community'
|
||||
end
|
||||
|
||||
def self.support_config
|
||||
{
|
||||
support_website_token: InstallationConfig.find_by(name: 'CHATWOOT_SUPPORT_WEBSITE_TOKEN')&.value,
|
||||
support_script_url: InstallationConfig.find_by(name: 'CHATWOOT_SUPPORT_SCRIPT_URL')&.value,
|
||||
support_identifier_hash: InstallationConfig.find_by(name: 'CHATWOOT_SUPPORT_IDENTIFIER_HASH')&.value
|
||||
}
|
||||
end
|
||||
|
||||
def self.instance_config
|
||||
{
|
||||
installation_identifier: installation_identifier,
|
||||
@@ -33,18 +45,18 @@ class ChatwootHub
|
||||
}
|
||||
end
|
||||
|
||||
def self.latest_version
|
||||
def self.sync_with_hub
|
||||
begin
|
||||
info = instance_config
|
||||
info = info.merge(instance_metrics) unless ENV['DISABLE_TELEMETRY']
|
||||
response = RestClient.post(PING_URL, info.to_json, { content_type: :json, accept: :json })
|
||||
version = JSON.parse(response)['version']
|
||||
parsed_response = JSON.parse(response)
|
||||
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS => e
|
||||
Rails.logger.error "Exception: #{e.message}"
|
||||
rescue StandardError => e
|
||||
ChatwootExceptionTracker.new(e).capture_exception
|
||||
end
|
||||
version
|
||||
parsed_response
|
||||
end
|
||||
|
||||
def self.register_instance(company_name, owner_name, owner_email)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Super Admin Instance health', type: :request do
|
||||
RSpec.describe 'Super Admin Instance status', type: :request do
|
||||
let(:super_admin) { create(:super_admin) }
|
||||
|
||||
describe 'GET /super_admin/instance_status' do
|
||||
|
||||
@@ -4,11 +4,11 @@ RSpec.describe Internal::CheckNewVersionsJob do
|
||||
subject(:job) { described_class.perform_now }
|
||||
|
||||
it 'updates the latest chatwoot version in redis' do
|
||||
version = '1.1.1'
|
||||
data = { 'version' => '1.2.3' }.to_json
|
||||
allow(Rails.env).to receive(:production?).and_return(true)
|
||||
allow(ChatwootHub).to receive(:latest_version).and_return(version)
|
||||
allow(ChatwootHub).to receive(:sync_with_hub).and_return(data)
|
||||
job
|
||||
expect(ChatwootHub).to have_received(:latest_version)
|
||||
expect(Redis::Alfred.get(Redis::Alfred::LATEST_CHATWOOT_VERSION)).to eq version
|
||||
expect(ChatwootHub).to have_received(:sync_with_hub)
|
||||
expect(Redis::Alfred.get(Redis::Alfred::LATEST_CHATWOOT_VERSION)).to eq data['version']
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,11 +7,11 @@ describe ChatwootHub do
|
||||
expect(described_class.installation_identifier).to eq installation_identifier
|
||||
end
|
||||
|
||||
context 'when fetching latest_version' do
|
||||
context 'when fetching sync_with_hub' do
|
||||
it 'get latest version from chatwoot hub' do
|
||||
version = '1.1.1'
|
||||
allow(RestClient).to receive(:post).and_return({ version: version }.to_json)
|
||||
expect(described_class.latest_version).to eq version
|
||||
expect(described_class.sync_with_hub['version']).to eq version
|
||||
expect(RestClient).to have_received(:post).with(described_class::PING_URL, described_class.instance_config
|
||||
.merge(described_class.instance_metrics).to_json, { content_type: :json, accept: :json })
|
||||
end
|
||||
@@ -20,7 +20,7 @@ describe ChatwootHub do
|
||||
version = '1.1.1'
|
||||
with_modified_env DISABLE_TELEMETRY: 'true' do
|
||||
allow(RestClient).to receive(:post).and_return({ version: version }.to_json)
|
||||
expect(described_class.latest_version).to eq version
|
||||
expect(described_class.sync_with_hub['version']).to eq version
|
||||
expect(RestClient).to have_received(:post).with(described_class::PING_URL,
|
||||
described_class.instance_config.to_json, { content_type: :json, accept: :json })
|
||||
end
|
||||
@@ -28,7 +28,7 @@ describe ChatwootHub do
|
||||
|
||||
it 'returns nil when chatwoot hub is down' do
|
||||
allow(RestClient).to receive(:post).and_raise(ExceptionList::REST_CLIENT_EXCEPTIONS.sample)
|
||||
expect(described_class.latest_version).to be_nil
|
||||
expect(described_class.sync_with_hub).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user