Compare commits

...

29 Commits

Author SHA1 Message Date
KodeStar
02dfed0bc7 Merge pull request #823 from tomyvi/patch-2
Disable SSL checks on API calls
2022-04-12 11:56:20 +01:00
KodeStar
71d356935f Merge pull request #822 from tomyvi/patch-1
Disable SSL checks on API calls
2022-04-12 11:56:04 +01:00
KodeStar
e53bae2c69 Update app.php 2022-04-12 11:51:47 +01:00
KodeStar
3117b9c483 Don't try to autoload file when checking if a class exists 2022-04-12 11:48:03 +01:00
tomyvi
c5817c9b2e Disable SSL checks on API calls 2022-04-07 10:34:07 +02:00
tomyvi
c403e8b2df Disable SSL checks on API calls 2022-04-07 10:33:31 +02:00
Kode
758c174141 Only getApp if app found 2022-04-02 15:19:55 +01:00
KodeStar
9bc9c48e06 Localhost doesn't like the certificate so ignore the warning 2022-03-30 13:14:35 +01:00
KodeStar
9a6dd623db add tag_id to fillable to try and fix #810 2022-03-30 13:14:05 +01:00
Kode
d1c6001fae update app version 2022-03-26 19:01:11 +00:00
Kode
74196a2bfa Check if class exists before checking if it's a search provider 2022-03-26 18:59:49 +00:00
Kode
724110dad2 Run ProcessApps when database version is bumped 2022-03-25 15:35:05 +00:00
KodeStar
3a043e0165 Update app.php 2022-03-25 15:02:35 +00:00
KodeStar
ac37c60e1f Merge pull request #800 from xiazeyu/baidu
added Baidu and sort order by alphabet
2022-03-25 15:01:22 +00:00
S4kura0ne
937e576520 move tiles to the first 2022-03-25 01:00:07 +08:00
KodeStar
9086e9bd75 Merge pull request #794 from xiazeyu/2.x
Latest Chinese translation combined #789 and #617
2022-03-24 13:21:07 +00:00
s4kura0ne
4c90d8c87e added Baidu and sort order by alphabet 2022-03-24 09:25:30 +08:00
s4kura0ne
a4cceb3ae0 remove Baidu in searchprovides.yaml 2022-03-24 09:20:46 +08:00
s4kura0ne
90c21d700d merged old 'zh' translation, improved translation 2022-03-24 00:33:36 +08:00
s4kura0ne
15b1f3234b added translation for baidu 2022-03-24 00:23:08 +08:00
s4kura0ne
a116345d60 remove unused translation 2022-03-24 00:21:47 +08:00
s4kura0ne
2b4e6d372c remove changes in outdated SettingsSeeder.php 2022-03-24 00:19:43 +08:00
s4kura0ne
d370f2c3ee finished chinese translation 2022-03-23 10:09:18 +08:00
S4kura0ne
ade09f3b1c Merge pull request #3 from xiazeyu/master
https://github.com/xiazeyu/Heimdall/pull/2
2022-03-23 09:31:58 +08:00
s4kura0ne
80aa120086 solved Russian readme conflict 2022-03-23 09:28:39 +08:00
S4kura0ne
a5cbcaca03 Merge pull request #1 from anerg2046/2.x
Merge Chinese translate from anerg2046
2022-03-23 09:24:33 +08:00
罗翀
9e4a06999b Chinese translate
add baidu search
2022-03-21 00:53:28 +08:00
KodeStar
398df75865 Merge branch '2.x' 2022-03-17 11:01:43 +00:00
KodeStar
bd3b882b3a Squashed commit of the following:
commit e52bc9c6b2
Author: KodeStar <kodestar@gmail.com>
Date:   Thu Mar 17 10:23:15 2022 +0000

    Update supportedapps.json

commit a16233ee10
Author: KodeStar <kodestar@gmail.com>
Date:   Thu Mar 17 10:21:24 2022 +0000

    Fix for displaying svg icons correctly
2022-03-17 10:24:31 +00:00
15 changed files with 261 additions and 48 deletions

View File

@@ -191,7 +191,13 @@ class ItemController extends Controller
'icon' => $path,
]);
} elseif (strpos($request->input('icon'), 'http') === 0) {
$contents = file_get_contents($request->input('icon'));
$options=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$contents = file_get_contents($request->input('icon'), false, stream_context_create($options));
if ($application) {
$icon = $application->icon;

View File

@@ -30,7 +30,7 @@ class Item extends Model
//
protected $fillable = [
'title', 'url', 'colour', 'icon', 'appdescription', 'description', 'pinned', 'order', 'type', 'class', 'user_id', 'appid',
'title', 'url', 'colour', 'icon', 'appdescription', 'description', 'pinned', 'order', 'type', 'class', 'user_id', 'tag_id', 'appid',
];
@@ -169,7 +169,7 @@ class Item extends Model
public static function isEnhanced($class)
{
if ($class === null || $class === 'null') {
if (!class_exists($class, false) || $class === null || $class === 'null') {
return false;
}
$app = new $class;
@@ -179,6 +179,9 @@ class Item extends Model
public static function isSearchProvider($class)
{
if (!class_exists($class, false) || $class === null || $class === 'null') {
return false;
}
$app = new $class;
return ((bool) ($app instanceof \App\SearchInterface)) ? $app : false;

View File

@@ -47,7 +47,9 @@ class ProcessApps implements ShouldQueue
foreach ($items as $item) {
if (! file_exists(app_path('SupportedApps/'.Item::nameFromClass($item->class)))) {
$app = Application::where('class', $item->class)->first();
Application::getApp($app->appid);
if ($app) {
Application::getApp($app->appid);
}
}
}
}

View File

@@ -39,6 +39,7 @@ class AppServiceProvider extends ServiceProvider
$app_version = config('app.version');
if (version_compare($app_version, $db_version) == 1) { // app is higher than db, so need to run migrations etc
Artisan::call('migrate', ['--path' => 'database/migrations', '--force' => true, '--seed' => true]);
ProcessApps::dispatch();
}
} else {
Artisan::call('migrate', ['--path' => 'database/migrations', '--force' => true, '--seed' => true]);

View File

@@ -113,7 +113,7 @@ abstract class SupportedApps
{
// $list_url = 'https://apps.heimdall.site/list';
$list_url = config('app.appsource').'list.json';
$client = new Client(['http_errors' => false, 'timeout' => 15, 'connect_timeout' => 15]);
$client = new Client(['http_errors' => false, 'verify' => false, 'timeout' => 15, 'connect_timeout' => 15]);
return $client->request('GET', $list_url);
}
@@ -131,7 +131,7 @@ abstract class SupportedApps
{
$zipurl = config('app.appsource').'files/'.$app->sha.'.zip';
$client = new Client(['http_errors' => false, 'timeout' => 60, 'connect_timeout' => 15]);
$client = new Client(['http_errors' => false, 'timeout' => 60, 'connect_timeout' => 15, 'verify' => false]);
$res = $client->request('GET', $zipurl);
if (! file_exists(app_path('SupportedApps'))) {

View File

@@ -14,7 +14,7 @@ return [
*/
'name' => env('APP_NAME', 'Heimdall'),
'version' => '2.4.6',
'version' => '2.4.11',
/*
|--------------------------------------------------------------------------

View File

@@ -123,6 +123,7 @@ class SettingsSeeder extends Seeder
$language_options = json_encode([
'de' => 'Deutsch (German)',
'en' => 'English',
'cn' => '简体中文 (Simplified Chinese)',
'fi' => 'Suomi (Finnish)',
'fr' => 'Français (French)',
'el' => 'Ελληνικά (Greek)',

View File

@@ -91,6 +91,7 @@ Currently added languages are
- Spanish
- Turkish
- Russian
- Chinese
## Web Server Configuration

View File

@@ -11,7 +11,9 @@ return [
'settings.system' => '系统',
'settings.appearance' => '外观',
'settings.miscellaneous' => '其他',
'settings.miscellaneous' => '杂项',
'settings.advanced' => '高级',
'settings.support' => '支持',
'settings.donate' => '捐赠',
@@ -25,7 +27,7 @@ return [
'settings.search_provider' => '默认搜索引擎',
'settings.language' => '语言',
'settings.reset' => '重置为默认值',
'settings.remove' => '除',
'settings.remove' => '除',
'settings.search' => '搜索',
'settings.no_items' => '没有可用项目',
@@ -34,12 +36,16 @@ return [
'settings.edit' => '编辑',
'settings.view' => '查看',
'settings.custom_css' => '自定义 CSS',
'settings.custom_js' => '自定义 JavaScript',
'options.none' => '- 未设置 -',
'options.google' => 'Google',
'options.baidu' => '百度',
'options.ddg' => 'DuckDuckGo',
'options.bing' => 'Bing',
'options.qwant' => 'Qwant',
'options.startpage' => 'StartPage',
'options.startpage' => '起始页',
'options.yes' => '是',
'options.no' => '否',
'options.nzbhydra' => 'NZBHydra',
@@ -51,11 +57,11 @@ return [
'buttons.upload' => '上传图标',
'buttons.downloadapps' => '更新应用列表',
'dash.pin_item' => '将应用固定到仪表盘',
'dash.no_apps' => '当前没有固定的应用, :link1 或 :link2',
'dash.pin_item' => '固定应用到仪表盘',
'dash.no_apps' => '当前没有固定的应用, :link1 或 :link2',
'dash.link1' => '添加应用',
'dash.link2' => '将应用固定到仪表盘',
'dash.pinned_items' => '固定应用',
'dash.pinned_items' => '固定应用',
'apps.app_list' => '应用列表',
'apps.view_trash' => '查看垃圾箱',
@@ -65,12 +71,12 @@ return [
'apps.icon' => '图标',
'apps.pinned' => '固定',
'apps.title' => '标题',
'apps.hex' => 'Hex色',
'apps.username' => '用户名',
'apps.hex' => 'Hex色',
'apps.username' => '用户名',
'apps.password' => '密码',
'apps.config' => '配置',
'apps.apikey' => 'API 密钥',
'apps.enable' => 'Enable',
'apps.enable' => '开启',
'apps.tag_list' => '标签列表',
'apps.add_tag' => '添加标签',
'apps.tag_name' => '标签名称',
@@ -78,41 +84,46 @@ return [
'apps.override' => '如果与主链接不同',
'apps.preview' => '预览',
'apps.apptype' => '应用类型',
'apps.website' => '网址',
'apps.description' => '描述',
'apps.only_admin_account' => '您必须拥有管理员账户!',
'apps.autologin_url' => '自动登录网址',
'apps.show_deleted' => '显示已移除的应用',
'dashboard' => '主页-控制台',
'dashboard' => '仪表盘',
'user.user_list' => '用户',
'user.add_user' => '加用户',
'user.username' => '用户名',
'user.add_user' => '加用户',
'user.username' => '用户名',
'user.avatar' => '头像',
'user.email' => '邮箱地址',
'user.password_confirm' => '重复密码',
'user.secure_front' => '仅设置密码后才允许公开访问.',
'user.autologin' => '仅可从特定链接访问(任何通过链接都可访问).',
'user.email' => '邮箱',
'user.password_confirm' => '确认密码',
'user.secure_front' => '允许公开访问 - 仅在设置密码时有效',
'user.autologin' => '允许从特定链接进入 - 任何拥有链接的人均可访问',
'url' => '链接',
'url' => '网址',
'title' => '标题',
'delete' => '除',
'delete' => '除',
'optional' => '可选',
'restore' => '复',
'restore' => '复',
'alert.success.item_created' => '应用添加成功',
'alert.success.item_updated' => '应用更新成功',
'alert.success.item_deleted' => '应用除成功',
'alert.success.item_restored' => '应用复成功',
'alert.success.updating' => '更新应用列表完成',
'alert.success.item_created' => '应用创建成功',
'alert.success.item_updated' => '应用修改成功',
'alert.success.item_deleted' => '应用除成功',
'alert.success.item_restored' => '应用复成功',
'alert.success.updating' => '应用列表升级中...',
'alert.success.tag_created' => '标签添加成功',
'alert.success.tag_updated' => '标签更新成功',
'alert.success.tag_deleted' => '标签除成功',
'alert.success.tag_restored' => '标签复成功',
'alert.success.tag_created' => '标签创建成功',
'alert.success.tag_updated' => '标签修改成功',
'alert.success.tag_deleted' => '标签除成功',
'alert.success.tag_restored' => '标签复成功',
'alert.success.setting_updated' => '你已成功编辑此设置',
'alert.error.not_exist' => '此设置项不存在.',
'alert.success.setting_updated' => '成功编辑此设置',
'alert.error.not_exist' => '此设置项不存在',
'alert.success.user_created' => '用户添加成功',
'alert.success.user_updated' => '用户更新成功',
'alert.success.user_deleted' => '用户除成功',
'alert.success.user_restored' => '用户复成功',
'alert.success.user_created' => '用户创建成功',
'alert.success.user_updated' => '用户修改成功',
'alert.success.user_deleted' => '用户除成功',
'alert.success.user_restored' => '用户复成功',
];

View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => '此凭据无效,请重试。',
'throttle' => '登录尝试次数过多. 请等待 :seconds 秒后重试.',
];

View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; 上一页',
'next' => '下一页 &raquo;',
];

View File

@@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'password' => '密码必须至少包含6个字符, 且两次输入一致.',
'reset' => '您的密码已重置!',
'sent' => '我们已通过邮件将密码重置链接发送至您的邮箱!',
'token' => '密码重置令牌无效.',
'user' => "我们无法找到该邮箱对应的用户.",
];

View File

@@ -0,0 +1,121 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => '必须同意 :attribute.',
'active_url' => ':attribute 不是一个有效的网址.',
'after' => ':attribute 必须在 :date 之后.',
'after_or_equal' => ':attribute 必须是 :date 或在其之后.',
'alpha' => ':attribute 只能包含英文字母.',
'alpha_dash' => ':attribute 只能包含英文字母, 数字或"-"符号.',
'alpha_num' => ':attribute 只能包含英文字母与数字.',
'array' => ':attribute 只能是一个数组.',
'before' => ':attribute 必须在 :date 之前.',
'before_or_equal' => ':attribute 必须是 :date 或在其之前.',
'between' => [
'numeric' => ':attribute 必须在 :min 到 :max 之间.',
'file' => ':attribute 必须在 :min 到 :max 千字节 之间.',
'string' => ':attribute 必须在 :min 到 :max 个字符 之间.',
'array' => ':attribute 必须在 :min 到 :max 个项 之间.',
],
'boolean' => ':attribute 只能是真或假.',
'confirmed' => ':attribute 确认不匹配.',
'date' => ':attribute 是无效日期.',
'date_format' => ':attribute 不符合 :format 的格式.',
'different' => ':attribute 与 :other 必须不一致.',
'digits' => ':attribute 必须是 :digits 位.',
'digits_between' => ':attribute 必须在 :min 到 :max 位 之间.',
'dimensions' => ':attribute 图像尺寸无效.',
'distinct' => ':attribute 字段有重复值.',
'email' => ':attribute 必须是有效的邮箱地址.',
'exists' => '选中的 :attribute 已存在.',
'file' => ':attribute 只能是文件.',
'filled' => ':attribute 必须填写.',
'image' => ':attribute 只能是图片.',
'in' => '选中的 :attribute 无效.',
'in_array' => ':attribute 必须不存在于 :other 中.',
'integer' => ':attribute 只能是整数.',
'ip' => ':attribute 只能是 IP 地址.',
'ipv4' => ':attribute 必须是有效的 IPv4 地址.',
'ipv6' => ':attribute 必须是有效的 IPv6 地址.',
'json' => ':attribute 必须是有效的 JSON 字符串.',
'max' => [
'numeric' => ':attribute 不应比 :max 大.',
'file' => ':attribute 不应比 :max 千字节 多.',
'string' => ':attribute 不应比 :max 个字符 多.',
'array' => ':attribute 不应有多于 :max 个项.',
],
'mimes' => ':attribute 必须是 :values 类型的文件.',
'mimetypes' => ':attribute 必须是 :values 类型的文件.',
'min' => [
'numeric' => ':attribute 不应比 :min 小.',
'file' => ':attribute 不应比 :min 千字节 少.',
'string' => ':attribute 不应比 :min 个字符 少.',
'array' => ':attribute 不应有多于 :min 个项.',
],
'not_in' => '选中的 :attribute 无效.',
'numeric' => ':attribute 只能是数字.',
'present' => ':attribute 字段必须存在.',
'regex' => ':attribute 格式无效.',
'required' => ':attribute 字段必须填写.',
'required_if' => ':attribute 字段必须填写, 因 :other 是 :value.',
'required_unless' => ':attribute 字段必须填写, 除非 :other 在 :values 中.',
'required_with' => ':attribute 字段必须填写, 因 :values 存在.',
'required_with_all' => ':attribute 字段必须填写, 因 :values 存在.',
'required_without' => ':attribute 字段必须填写, 因 :values 不存在.',
'required_without_all' => ':attribute 字段必须填写, 因任何 :values 均不存在.',
'same' => ':attribute 与 :other 必须相符.',
'size' => [
'numeric' => ':attribute 必须是 :size.',
'file' => ':attribute 必须是 :size 千字节.',
'string' => ':attribute 必须是 :size 个字符.',
'array' => ':attribute 必须包含 :size 个项.',
],
'string' => ':attribute 必须是字符串.',
'timezone' => ':attribute 必须是有效时区.',
'unique' => ':attribute 已被占用.',
'uploaded' => ':attribute 上传失败.',
'url' => ':attribute 格式无效.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => '自定义信息',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [],
];

View File

@@ -3,13 +3,13 @@ tiles:
name: Tiles
target: _blank
google:
id: google
url: https://www.google.com/search
name: Google
baidu:
id: baidu
url: https://www.baidu.com/s
name: Baidu
method: get
target: _blank
query: q
query: wd
bing:
id: bing
@@ -27,6 +27,14 @@ ddg:
target: _blank
query: q
google:
id: google
url: https://www.google.com/search
name: Google
method: get
target: _blank
query: q
startpage:
id: startpage
url: https://www.startpage.com/do/dsearch
@@ -34,4 +42,3 @@ startpage:
method: get
target: _blank
query: query

File diff suppressed because one or more lines are too long