return Files::mkdir(resource_path('fluidbookpublication/player'));
}
+ /**
+ * @return array
+ */
protected function getActiveBranches()
{
$cacheFile = self::getFluidbookPlayerBaseDirectory() . 'activebranches';
- return json_decode(file_get_contents($cacheFile));
+ $res = json_decode(file_get_contents($cacheFile), true);
+ if (!$res) {
+ return self::updateAllBranches();
+ }
+ return $res;
}
protected static function reposDirectory()
return !in_array($branch, $this->getActiveBranches());
}
+ /**
+ * @return []
+ */
protected function updateAllBranches()
{
PHP::neverStop();
}
$this->executeGitCommands($branchesDir . $b, ['reset --hard origin/' . $b, 'pull']);
}
+
+ return $branches;
}
}
$this->addField('header_disposition', FormSection::class, __('Disposition'));
$this->addField('group_disposition', FieldGroupStart::class);
$this->addField('group_position', FieldGroupStart::class, __('Position'));
- $this->addField('x', Text::class, 'X');
- $this->addField('y', Text::class, 'Y');
+ $this->addField('x', Text::class, 'X',['suffix'=>'px']);
+ $this->addField('y', Text::class, 'Y',['suffix'=>'px']);
$this->addField('group_position_end', FieldGroupEnd::class);
$this->addField('group_dimensions', FieldGroupStart::class, __('Dimensions'));
- $this->addField('w', Text::class, 'W');
- $this->addField('h', Text::class, 'H');
+ $this->addField('w', Text::class, 'W',['suffix'=>'px']);
+ $this->addField('h', Text::class, 'H',['suffix'=>'px']);
$this->addField('group_dimensions_end', FieldGroupEnd::class);
if ($this->_displayedOnFluidbook) {
$this->addField('group_transform', FieldGroupStart::class);
$pings = [];
if (file_exists($cache)) {
$cached = json_decode(file_get_contents($cache));
- if (count($cached) === count($servers)) {
+ if (is_countable($cached) && count($cached) === count($servers)) {
$pings = $cached;
}
}
vertical-align: top
position: relative
-.select2-container--bootstrap
- font-size: 12px
- font-weight: 500
- color: #5D5D5D
- hr
- border: 0
- height: 1px
- background-color: #d5d5d5
- margin: 5px 0
+#linkeditor-panel-form
+ --form-text-color: #5d5d5d
+ --field-background: #fff
+ --field-color: #111
+ --field-border: #aaa
- &.select2-container--focus .select2-selection, &.select2-container--open .select2-selection
- box-shadow: 0 0 8px rgba(0, 0, 0, 0.1)
+ @media (prefers-color-scheme: dark)
+ --form-text-color: #aaa
+ --field-background: #000
+ --field-color: #ccc
+ --field-border: #777
-#linkeditor-panel-form
padding: 12px
- font-size: 12px
+ font-size: 13px
+
+ .select2-container--bootstrap
+ font-size: 13px
+ font-weight: 400
+
+ hr
+ border: 0
+ height: 1px
+ background-color: var(--form-text-color)
+ margin: 5px 0
+
+ &, .select2-selection
+ color: var(--form-text-color)
+ background-color: var(--field-background)
+ border-color: var(--field-background)
+ border-radius: 4px
+ box-shadow: none
+
+ &.select2-container--focus .select2-selection, &.select2-container--open .select2-selection
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.1)
+ border-color: var(--field-border)
h3
font-size: 16px
- color: #5D5D5D
+ color: var(--form-text-color)
text-transform: uppercase
padding-top: 15px
- border-top: 1px solid #5d5d5d
+ border-top: 1px solid var(--form-text-color)
margin-top: 20px
+ p.help-block
+ color: var(--form-text-color)
+ font-size: 11px
+ padding-top: 2px
+
+ .freefile-file
+ position: relative
+ &::after
+ content: "..."
+ position: absolute
+ display: block
+ padding: 6px
+ right: 0
+ top: -3px
+ width: 34px
+ height: 34px
+ color: var(--field-color)
+ box-sizing: border-box
+ pointer-events: none
+ font-size: 17px
+
+ input[type=file]
+ position: absolute
+ right: 0px
+ width: 35px
+ opacity: 0
+ height: 100%
+ cursor: pointer
+
+ .input-group
+ position: relative
+ .input-group-append
+ position: absolute
+ height: 100%
+ top: 0
+ right: 0
+ pointer-events: none
+ padding: 8px
+
textarea, input[type="text"], input[type="number"], input[type="email"], input[type="url"]
font-family: $font
height: 34px
padding: 8px
width: 100%
- font-weight: 500
- color: #5D5D5D
- border: 1px solid #D5D5D5
+ font-weight: 400
+ color: var(--field-color)
+ background-color: var(--field-background)
+ border: 1px solid var(--field-background)
border-radius: 3px
- font-size: 12px
+ font-size: 13px
transition: box-shadow 500ms, border 500ms
appearance: none
&:focus
- border: 1px solid #ccc
- box-shadow: 0 0 8px rgba(0, 0, 0, 0.1)
+ border: 1px solid var(--field-border)
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.3)
+
textarea
min-height: 150px
min-width: 100%
span
- font-weight: 600
- font-size: 12px
- color: #5D5D5D
+ font-weight: 400
+ font-size: 13px
+ color: var(--form-text-color)
label
display: block
font-weight: 600
font-size: 12px
- color: #5D5D5D
+ color: var(--form-text-color)
margin: 8px 0 5px 0
.checkbox
#group_position, #group_dimensions, #group_transform
margin-top: 5px
+
h4
font-size: 12px
font-weight: 700
- color: #5D5D5D
+ color: var(--form-text-color)
grid-column: 1 / 3
grid-row: 1 / 2
margin-bottom: 5px
label
display: inline-block
width: 20px
+
input
width: calc(100% - 20px)
+ [data-name="rot"]
+ label
+ display: block
+ .input-group
+ .input-group-append
+ right: 0
+
+ .input-group
+ display: inline-block
+ .input-group-append
+ right: 20px
+
+
#group_transform
input
width: 100%
position: relative
@media (prefers-color-scheme: dark)
- background-color: #333
+ background-color: #444
nav
position: absolute
background: $panel-background
height: 100%
@media (prefers-color-scheme: dark)
- background-color: #111
+ background-color: #333
&.open
display: block
$toolbar-color: #5d5d5d
$toolbar-color-dark: #bbb
-$panel-background: #fcfcfc
+$panel-background: #dcdcdc