feat support db_url
This commit is contained in:
parent
3ebcd7b785
commit
35c6c48b2e
@ -6,6 +6,7 @@
|
|||||||
return {
|
return {
|
||||||
---@type string the directory for database file and password file
|
---@type string the directory for database file and password file
|
||||||
dir = require 'Trans'.plugin_dir,
|
dir = require 'Trans'.plugin_dir,
|
||||||
|
db_url = 'https://github.com/skywind3000/ECDICT-ultimate/releases/download/1.0.0/ecdict-ultimate-sqlite.zip',
|
||||||
debug = true,
|
debug = true,
|
||||||
---@type 'default' | 'dracula' | 'tokyonight' global Trans theme [see lua/Trans/style/theme.lua]
|
---@type 'default' | 'dracula' | 'tokyonight' global Trans theme [see lua/Trans/style/theme.lua]
|
||||||
theme = 'default', -- default | tokyonight | dracula
|
theme = 'default', -- default | tokyonight | dracula
|
||||||
@ -24,10 +25,10 @@ return {
|
|||||||
query = 'fallback',
|
query = 'fallback',
|
||||||
border = 'rounded',
|
border = 'rounded',
|
||||||
title = vim.fn.has 'nvim-0.9' == 1 and {
|
title = vim.fn.has 'nvim-0.9' == 1 and {
|
||||||
{ '', 'TransTitleRound' },
|
{ '', 'TransTitleRound' },
|
||||||
{ ' Trans', 'TransTitle' },
|
{ ' Trans', 'TransTitle' },
|
||||||
{ '', 'TransTitleRound' },
|
{ '', 'TransTitleRound' },
|
||||||
} or nil, -- need nvim-0.9+
|
} or nil, -- need nvim-0.9+
|
||||||
auto_play = true,
|
auto_play = true,
|
||||||
---@type {open: string | boolean, close: string | boolean, interval: integer} Hover Window Animation
|
---@type {open: string | boolean, close: string | boolean, interval: integer} Hover Window Animation
|
||||||
animation = {
|
animation = {
|
||||||
|
@ -17,7 +17,7 @@ return function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- INFO :Download ultimate.db
|
-- INFO :Download ultimate.db
|
||||||
local uri = 'https://github.com/skywind3000/ECDICT-ultimate/releases/download/1.0.0/ecdict-ultimate-sqlite.zip'
|
local uri = Trans.conf.db_url
|
||||||
local zip = dir .. '/ultimate.zip'
|
local zip = dir .. '/ultimate.zip'
|
||||||
local continue = fn.filereadable(zip) == 1
|
local continue = fn.filereadable(zip) == 1
|
||||||
local handle = function(output)
|
local handle = function(output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user