Uncrop setting

This commit is contained in:
Cutls 2019-03-21 23:38:15 +09:00
parent e11f0293fe
commit f7a80da21b
8 changed files with 14 additions and 5 deletions

View File

@ -275,6 +275,7 @@ grid-area: toot;
.toot-img {
object-fit: cover;
width: 100%;
margin-right:1px;
}
.toot img:not(.emoji-img) {
max-width: 100%;

View File

@ -92,6 +92,7 @@ $(function($) {
if (e.keyCode === 88) {
if (!$("#post-box").hasClass("appear")) {
show();
$('textarea').focus();
} else {
hide();
}

View File

@ -33,6 +33,11 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var ltr = localStorage.getItem("letters");
var gif = localStorage.getItem("gif");
var imh = localStorage.getItem("img-height");
if(imh=="full"){
imh="auto";
}else{
imh=imh+"px";
}
//独自ロケール
var locale = localStorage.getItem("locale");
if(locale=="yes"){
@ -510,7 +515,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url +
'" data-type="' + media.type + '" class="img-parsed"><img draggable="false" src="' +
purl + '" class="' + sense +
' toot-img pointer" style="width:' + cwdt + '%; height:'+imh+'px;"></a></span>';
' toot-img pointer" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"></a></span>';
});
media_ids = media_ids.slice(0, -1) ;
} else {

View File

@ -1,5 +1,5 @@
// Create the Application's main menu
function templete(lang,mainWindow){
function templete(lang,mainWindow,packaged){
const electron = require("electron");
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
@ -95,7 +95,7 @@ function templete(lang,mainWindow){
{
label: 'Toggle Developer Tools',
accelerator: 'Alt+Command+I',
click: function() { mainWindow.toggleDevTools(); }
click: function() { if(!packaged){mainWindow.toggleDevTools();} }
},
{
label: dict.reload[lang],

View File

@ -138,7 +138,7 @@ function createWindow() {
var platform=process.platform;
var bit=process.arch;
if(platform=="darwin"){
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang,mainWindow)));
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang,mainWindow,false)));
}
}
// Electronの初期化完了後に実行

View File

@ -81,6 +81,7 @@
"letters":"letters",
"or":"or",
"imgheight":"Height of images",
"imgheightwarn":"Option:Set \"full\" to uncrop.",
"ticker":"Enable #InstanceTicker",
"tickerwarn":"Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
"animation":"Animation of timelines",

View File

@ -81,6 +81,7 @@
"letters":"文字",
"or":"または",
"imgheight":"画像の高さ",
"imgheightwarn":"オプション:「full」と指定すると全ての画像をクロップしません。",
"ticker":"#InstanceTickerを使う",
"tickerwarn":"トゥートした人の所属サーバーをわかりやすく彩ります(自サーバー以外のトゥート向け)。<a href=\"https://cdn.weep.me/mastodon/\">#InstanceTickerについて</a> Copyright 2018 weepjp, kyori19.",
"animation":"タイムラインのアニメーション",

View File

@ -263,7 +263,7 @@ var tlConstruction=[
setValue:200,
text:{
head:"@@imgheight@@",
desc:"",
desc:'@@imgheightwarn@@',
after:"px"
}
},{